| 90,6 → 90,10 |
| my $formatter = new Number::Format( |
| -decimal_point => $decimal_point, |
| -thousands_sep => $thousands_sep, |
| -kibi_suffix => ' KiB', |
| -mebi_suffix => ' MiB', |
| -gibi_suffix => ' GiB', |
| |
| # -grouping => $grouping[0] |
| ); |
| |
| 616,8 → 620,8 |
| ), |
| 76 |
| ); |
| print "\n\n"; |
| printf __"Total articles considered: %s over %d days\n", |
| print "\n"; |
| printf __"Total articles considered: %s over %d days\n", |
| $formatter->format_number($totalposts), |
| $formatter->format_number($numdays); |
| my $time_locale = setlocale(LC_TIME); |
| 632,23 → 636,24 |
| time_zone => 'UTC', |
| ); |
| my $datetime_format = '%a, %Y-%m-%dT%H:%M:%S %Z'; |
| printf __"Earliest article: %s\n", |
| printf __"Earliest article: %s" . "\n", |
| $earliest_datetime->strftime($datetime_format); |
| printf __"Latest article: %s\n", |
| printf __"Latest article: %s" . "\n", |
| $latest_datetime->strftime($datetime_format); |
| printf __"Original articles: %s; replies: %s\n", |
| printf __"Original articles: %s; replies: %s" . "\n", |
| $formatter->format_number($origposts), |
| $formatter->format_number($replies); |
| printf __"Total size of articles: %s bytes (%s)" . "\n", |
| printf __"Total size of articles: %s bytes (%s)" . "\n", |
| $formatter->format_number($totsize), |
| $formatter->format_bytes( $totsize, ( 'precision' => 1, 'mode' => 'iec' ) ); |
| printf __"Average %s articles per day, %s per day, %s bytes per article\n", |
| printf __"Average %s articles per day, %s per day, %s bytes per article.\n", |
| $formatter->format_number( int( $totalposts / $numdays ) ), |
| $formatter->format_bytes( $totsize / $numdays, ( 'mode' => 'iec' ) ), |
| $formatter->format_number( int( $totsize / $totalposts ) ); |
| |
| my $count = keys %data; |
| printf __"Total headers: %s; bodies: %s\n", |
| print "\n"; |
| printf __"Total headers: %s; bodies: %s\n", |
| $formatter->format_bytes( |
| $totheader, ( 'precision' => 1, 'mode' => 'iec' ) |
| ), |
| 659,14 → 664,16 |
| $totquoted, ( 'precision' => 1, 'mode' => 'iec' ) |
| ), |
| $formatter->format_bytes( $totorig, ( 'precision' => 1, 'mode' => 'iec' ) ), |
| $formatter->format_number( ( $totorig * 100 ) / ( $totorig + $totquoted ) ), |
| $formatter->format_number( ( $totorig * 100 ) / ( $totorig + $totquoted ) ) |
| , |
| $formatter->format_bytes( $totsig, ( 'precision' => 1, 'mode' => 'iec' ) ); |
| printf __"Total number of posters: %s, average %s per poster\n", |
| print "\n"; |
| printf __"Total number of posters: %s, average %s per poster\n", |
| $formatter->format_number($count), |
| $formatter->format_bytes( $totsize / $count, |
| ( 'precision' => 1, 'mode' => 'iec' ) ); |
| $count = keys %threads; |
| printf __"Total number of threads: %s, average %s per thread\n", |
| printf __"Total number of threads: %s, average %s per thread\n", |
| $formatter->format_number($count), |
| $formatter->format_bytes( $totsize / $count, |
| ( 'precision' => 1, 'mode' => 'iec' ) ); |