use sprintf to round
This commit is contained in:
parent
07da0d91a5
commit
1200d98323
@ -72,9 +72,7 @@ sub generate_output_table ($ts) {
|
|||||||
|
|
||||||
# create hash with each computer and its average GHz Days per day
|
# create hash with each computer and its average GHz Days per day
|
||||||
my %ranks = pairmap {
|
my %ranks = pairmap {
|
||||||
my $mean = sum( @$b ) / @$b;
|
$a => sprintf "%.0f", sum(@$b)/@$b;
|
||||||
my $rounded = int( $mean + 0.5 );
|
|
||||||
$a => $rounded;
|
|
||||||
} %$list;
|
} %$list;
|
||||||
|
|
||||||
# sort hash by the average and print to screen
|
# sort hash by the average and print to screen
|
||||||
|
Loading…
Reference in New Issue
Block a user