blib/script/img.pl untested

filter: Statementstmt 0.0% 0 / 28 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 34 CC 1 SCAR 6.9
CC
1
Cov
0%
main
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/bin/env perl
2  
3 use strict;
4 use warnings;
5 use CGI qw(:standard);
6 use App::ProcTrends::RRD;
7  
8 exit(main());
9  
10 sub main {
11 my $ref = {};
12  
13 my $q = CGI->new();
14 $ref->{ rrd_dir } = $q->param('rrd_dir');
15 $ref->{ start } = $q->param('start');
16 $ref->{ end } = $q->param('end');
17 $ref->{ line } = $q->param('line');
18 $ref->{ stack } = $q->param('stack');
19 $ref->{ imgformat } = $q->param('imgformat');
20 $ref->{ title } = $q->param('title');
21 $ref->{ width } = $q->param('width');
22 $ref->{ height } = $q->param('height');
23 my $process = $q->param('process');
24 my $metric = $q->param('metric');
25
26 my $rrd = App::ProcTrends::RRD->new( $ref );
27 $rrd->gen_image( '/home/satoshi/test.png', 'cpu', 'firefox' );
28 }