my $date = $ret->{date} ;
delete $ret->{date};
+ # turn off legend if too many elements to display
+ my $nb_legend = scalar(keys %$ret);
+ if ($nb_legend > 100) {
+ $legend = 0;
+ } elsif ($nb_legend > 10) {
+ $arg->{height} += $nb_legend / 4 * 15;
+ }
+
return ($date, $ret);
}
print STDERR $query if ($debug);
+ my $all = $dbh->selectall_arrayref($query) ;
+ my ($d, $ret) = make_tab($all);
+
my $obj = get_graph('title' => "Job Size : $arg->{jclients}/$arg->{jjobnames}",
'y_label' => 'Size',
'y_min_value' => 0,
'y_number_format' => \&Bweb::human_size,
);
- my $all = $dbh->selectall_arrayref($query) ;
-
- my ($d, $ret) = make_tab($all);
if ($legend) {
$obj->set_legend(keys %$ret);
}
print STDERR $query if ($debug);
+ my $all = $dbh->selectall_arrayref($query) ;
+ my ($d, $ret) = make_tab($all);
+
my $obj = get_graph('title' => "Job Files : $arg->{jclients}/$arg->{jjobnames}",
'y_label' => 'Number Files',
'y_min_value' => 0,
);
- my $all = $dbh->selectall_arrayref($query) ;
- my ($d, $ret) = make_tab($all);
if ($legend) {
$obj->set_legend(keys %$ret);
}
print STDERR $query if ($debug);
my $all = $dbh->selectall_arrayref($query) ;
+ my ($d, $ret) = make_tab($all);
my $obj = get_graph('title' => "File size : $arg->{where}",
'y_label' => 'File size',
'y_number_format' => \&Bweb::human_size,
);
-
- my ($d, $ret) = make_tab($all);
if ($legend) {
$obj->set_legend(keys %$ret);
}
print STDERR $query if ($debug);
my $all = $dbh->selectall_arrayref($query) ;
+ my ($d, $ret) = make_tab($all);
my $obj = get_graph('title' => "Directory size : $arg->{where}",
'y_label' => 'Directory size',
'y_min_value' => 0,
'y_number_format' => \&Bweb::human_size,
);
-
-
- my ($d, $ret) = make_tab($all);
if ($legend) {
$obj->set_legend(keys %$ret);
}
print STDERR $query if ($debug);
+ my $all = $dbh->selectall_arrayref($query) ;
+ my ($d, $ret) = make_tab($all);
+
my $obj = get_graph('title' => "Job Rate : $arg->{jclients}/$arg->{jjobnames}",
'y_label' => 'Rate b/s',
'y_min_value' => 0,
'y_number_format' => \&Bweb::human_size,
);
- my $all = $dbh->selectall_arrayref($query) ;
-
- my ($d, $ret) = make_tab($all);
if ($legend) {
$obj->set_legend(keys %$ret);
}
print STDERR $query if ($debug);
+ my $all = $dbh->selectall_arrayref($query) ;
+ my ($d, $ret) = make_tab($all);
+
my $obj = get_graph('title' => "Job Duration : $arg->{jclients}/$arg->{jjobnames}",
'y_label' => 'Duration',
'y_min_value' => 0,
'y_number_format' => \&Bweb::human_sec,
);
- my $all = $dbh->selectall_arrayref($query) ;
-
- my ($d, $ret) = make_tab($all);
if ($legend) {
$obj->set_legend(keys %$ret);
}
";
print STDERR $query if ($debug);
+ my $all = $dbh->selectall_arrayref($query) ;
+ my ($ret) = make_tab_sum($all);
+
my $obj = get_graph('title' => "Job $t : $arg->{jclients}/$arg->{jjobnames}",
'y_label' => $t,
'y_min_value' => 0,
@arg,
);
- my $all = $dbh->selectall_arrayref($query) ;
-# print STDERR Data::Dumper::Dumper($all);
- my ($ret) = make_tab_sum($all);
-
print $obj->plot([$ret->{date}, $ret->{nb}])->png;
}