aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/estone_SUITE.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-03-08 14:46:09 +0100
committerSverker Eriksson <[email protected]>2016-03-08 14:46:09 +0100
commit7ba125fafa1da21d8780bcdae97f1ef56fb6a39a (patch)
tree671891684d94d78211f501371187bb2b425bcdaa /erts/emulator/test/estone_SUITE.erl
parent2dc84032fd2a957b1625aba9bbcea9cbc04aa0df (diff)
parent652b67ba8d15ff415a8f30034bd9eb03a9c2b8ca (diff)
downloadotp-7ba125fafa1da21d8780bcdae97f1ef56fb6a39a.tar.gz
otp-7ba125fafa1da21d8780bcdae97f1ef56fb6a39a.tar.bz2
otp-7ba125fafa1da21d8780bcdae97f1ef56fb6a39a.zip
Merge branch 'maint'
Diffstat (limited to 'erts/emulator/test/estone_SUITE.erl')
-rw-r--r--erts/emulator/test/estone_SUITE.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/test/estone_SUITE.erl b/erts/emulator/test/estone_SUITE.erl
index 7be55eca8d..7710424894 100644
--- a/erts/emulator/test/estone_SUITE.erl
+++ b/erts/emulator/test/estone_SUITE.erl
@@ -382,11 +382,11 @@ apply_micro(M) ->
{weight_percentage, M#micro.weight},
{loops, M#micro.loops},
{microsecs,MicroSecs},
- {estones, (M#micro.weight * M#micro.weight * ?STONEFACTOR) div MicroSecs},
+ {estones, (M#micro.weight * M#micro.weight * ?STONEFACTOR) div max(1,MicroSecs)},
{gcs, GC1 - GC0},
{kilo_word_reclaimed, (Words1 - Words0) div 1000},
{kilo_reductions, Reds div 1000},
- {gc_intensity, gci(Elapsed, GC1 - GC0, Words1 - Words0)}].
+ {gc_intensity, gci(max(1,Elapsed), GC1 - GC0, Words1 - Words0)}].
monotonic_time() ->
try erlang:monotonic_time() catch error:undef -> erlang:now() end.