diff options
author | Dan Gudmundsson <[email protected]> | 2016-03-08 08:55:13 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2016-03-08 08:55:13 +0100 |
commit | 2a44ac37f487001b551c0103ed0b4c5ab4579ff1 (patch) | |
tree | 63f8acc7ac2a48190d5e9f6ed3f0afbf86f480d6 /erts | |
parent | 184bc747089398d7fd74aef9bce48b42e8e71464 (diff) | |
parent | 3f9e87c76d4d5ec4daa9cff108e9c30346159a65 (diff) | |
download | otp-2a44ac37f487001b551c0103ed0b4c5ab4579ff1.tar.gz otp-2a44ac37f487001b551c0103ed0b4c5ab4579ff1.tar.bz2 otp-2a44ac37f487001b551c0103ed0b4c5ab4579ff1.zip |
Merge branch 'dgud/test-cuddle' into maint
* dgud/test-cuddle:
Test windows registry in places we are allowed to write
test: do not divide by zero
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/test/distribution_SUITE.erl | 2 | ||||
-rw-r--r-- | erts/emulator/test/estone_SUITE.erl | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/test/distribution_SUITE.erl b/erts/emulator/test/distribution_SUITE.erl index d71cedbdc5..151fab0a0e 100644 --- a/erts/emulator/test/distribution_SUITE.erl +++ b/erts/emulator/test/distribution_SUITE.erl @@ -164,7 +164,7 @@ bulk_send(Terms, BinSize) -> ?line stop_node(Node), ?line test_server:timetrap_cancel(Dog), - {comment, integer_to_list(trunc(Size/1024/Elapsed+0.5)) ++ " K/s"}. + {comment, integer_to_list(trunc(Size/1024/max(1,Elapsed)+0.5)) ++ " K/s"}. bulk_sendsend(Terms, BinSize) -> {Rate1, MonitorCount1} = bulk_sendsend2(Terms, BinSize, 5), diff --git a/erts/emulator/test/estone_SUITE.erl b/erts/emulator/test/estone_SUITE.erl index dc8f0aaee9..d49ab3de4d 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. |