aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-04-07 18:46:10 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-04-08 14:53:36 +0200
commit858ded838419a375a505f55f2cdb2d15acdc8e73 (patch)
treea414484e3deb918aa952a7cd5b609ac9f41d5b6f /erts/emulator
parent1e7422e64ef5f0713115715abb3925b690796b77 (diff)
downloadotp-858ded838419a375a505f55f2cdb2d15acdc8e73.tar.gz
otp-858ded838419a375a505f55f2cdb2d15acdc8e73.tar.bz2
otp-858ded838419a375a505f55f2cdb2d15acdc8e73.zip
Don't divide by zero in test logging
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/test/multi_load_SUITE.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/emulator/test/multi_load_SUITE.erl b/erts/emulator/test/multi_load_SUITE.erl
index 784b239116..f3fab02170 100644
--- a/erts/emulator/test/multi_load_SUITE.erl
+++ b/erts/emulator/test/multi_load_SUITE.erl
@@ -81,9 +81,12 @@ many_measure(Ms) ->
"Sequential: ~9w µs\n"
"Parallel: ~9w µs\n"
"Ratio: ~9w\n",
- [length(Ms),Us1,Us2,round(Us1/Us2)]),
+ [length(Ms),Us1,Us2,divide(Us1,Us2)]),
ok.
+divide(A,B) when B > 0 -> A div B;
+divide(_,_) -> inf.
+
many_load_seq(Ms) ->
[erlang:finish_loading([M]) || M <- Ms],
ok.