Permalink
Browse files

Make a sanity check less strict, so that minor roundoff differences

do not prevent printing out measurement results.
  • Loading branch information...
1 parent 8a4cba2 commit 1b4fc5dabb2ccecb123c15b9e9d6b4a67ce3d4ee @jafingerhut committed Feb 22, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 bin/measureproc
View
@@ -769,7 +769,8 @@ if (($os eq 'GNU/Linux') || ($os eq 'Cygwin')) {
$per_cpu_stats_end->[$i]{idle},
$per_cpu_stats_start->[$i]{total},
$per_cpu_stats_end->[$i]{total});
- if ($cpu_busy_percent ne $cpu_busy_percent_without_bigints) {
+ my $delta = $cpu_busy_percent - $cpu_busy_percent_without_bigints;
+ if (($delta < -1) || ($delta > 1)) {
die sprintf "For idle times %s %s and total times %s %s cpu_busy_percent() returned %s but cpu_busy_percent_without_bigints() returned %s\n",
$per_cpu_stats_start->[$i]{idle},
$per_cpu_stats_end->[$i]{idle},

0 comments on commit 1b4fc5d

Please sign in to comment.