<td>$count</td>
<td>$min</td>
<td>$max</td>
- <td>$average</td>} ;
- foreach my $lp (@LATENCY_PERCENTILE) {
- $queries .=
- qq{
- <td>$percentile{$lp}</td> };
- };
- $queries .= qq{</tr>};
+ <td>$average</td>
+};
+ foreach my $lp (@LATENCY_PERCENTILE) {
+ $queries .= "<td>$percentile{$lp}</td>\n";
+ }
+ $queries .= qq{
+ </tr>};
$count = &comma_numbers($cur_period_info{'SELECT'}{count});
$average = &convert_time($cur_period_info{'SELECT'}{average});
$select_queries .= qq{
<td>$zday</td>
<td>$h</td>
<td>$count</td>
- <td>$average</td>} ;
- foreach my $lp (@LATENCY_PERCENTILE) {
- $select_queries .=
- qq{
- <td>$percentile{'SELECT'}{$lp}</td> };
- };
- $select_queries .= qq{</tr>};
+ <td>$average</td>
+};
+ foreach my $lp (@LATENCY_PERCENTILE) {
+ $select_queries .= "<td>$percentile{'SELECT'}{$lp}</td>\n";
+ }
+ $select_queries .= qq{
+ </tr>};
my $insert_count = &comma_numbers($cur_period_info{'INSERT'}{count});
my $update_count = &comma_numbers($cur_period_info{'UPDATE'}{count});
my $delete_count = &comma_numbers($cur_period_info{'DELETE'}{count});
<td>$update_count</td>
<td>$delete_count</td>
<td>$write_average</td>} ;
- foreach my $lp (@LATENCY_PERCENTILE) {
- $write_queries .=
- qq{
- <td>$percentile{'WRITE'}{$lp}</td> };
- };
- $write_queries .= qq{</tr>};
+ foreach my $lp (@LATENCY_PERCENTILE) {
+ $write_queries .= "<td>$percentile{'WRITE'}{$lp}</td>\n";
+ }
+ $write_queries .= qq{
+ </tr>};
my $prepare_count = &comma_numbers($cur_period_info{prepare});
my $execute_count = &comma_numbers($cur_period_info{execute});
my $bind_prepare = &comma_numbers(sprintf("%.2f", $cur_period_info{execute}/($cur_period_info{prepare}||1)));
if ($datefmt ne "$year-$month-$day") {
return -1;
}
- my $weekNumber = POSIX::strftime("%W", 1, 1, 1, $day, $month - 1, $year - 1900);
+ my $weekNumber = POSIX::strftime("%U", 1, 1, 1, $day, $month - 1, $year - 1900);
return sprintf("%02d", $weekNumber+1);
}
if ($datefmt ne "$y-$m-$day") {
next;
}
- my $weekNumber = POSIX::strftime("%W", 1, 1, 1, $day, $m - 1, $y - 1900);
+ my $weekNumber = POSIX::strftime("%U", 1, 1, 1, $day, $m - 1, $y - 1900);
if ( ($weekNumber == $wn) || ( ($weekNumber eq '00') && (($wn == 1) || ($wn >= 52)) ) ) {
push(@retdays, "$year-$m-$day");
return @retdays if ($#retdays == 6);
if ($datefmt ne "$y-$m-$day") {
next;
}
- my $weekNumber = POSIX::strftime("%W", 1, 1, 1, $day, $m - 1, $y - 1900);
+ my $weekNumber = POSIX::strftime("%U", 1, 1, 1, $day, $m - 1, $y - 1900);
push(@{$result{$weekNumber}}, "$y-$m-$day");
}
}