Skip to content

Commit

Permalink
lib/matrix.rb, create_stats_matrix: improve precision of average stat
Browse files Browse the repository at this point in the history
Improve precision via using float.

Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Philip Li <philip.li@intel.com>
  • Loading branch information
yhuang-intel authored and rli9 committed Sep 27, 2023
1 parent 6efcd77 commit f27d5b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/matrix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def create_stats_matrix(result_root)
elsif event_counter? k
v[-1] - v[0]
else
v.sum / stats_part_len
v.sum.to_f / stats_part_len
end
stats["#{k}.max"] = v.max if should_add_max_latency k
end
Expand Down

0 comments on commit f27d5b2

Please sign in to comment.