aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/rand_SUITE.erl
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2017-10-10 08:03:52 +0200
committerRaimo Niskanen <[email protected]>2017-10-18 12:04:54 +0200
commit5ce0138c0809bd3f17029413fdf2ead1a8979762 (patch)
tree98e2255919911df10e660571bf4938601a3d406d /lib/stdlib/test/rand_SUITE.erl
parent0248865dea315253618e733d77177b5a80679e20 (diff)
downloadotp-5ce0138c0809bd3f17029413fdf2ead1a8979762.tar.gz
otp-5ce0138c0809bd3f17029413fdf2ead1a8979762.tar.bz2
otp-5ce0138c0809bd3f17029413fdf2ead1a8979762.zip
Scale down measure rounds
Diffstat (limited to 'lib/stdlib/test/rand_SUITE.erl')
-rw-r--r--lib/stdlib/test/rand_SUITE.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/stdlib/test/rand_SUITE.erl b/lib/stdlib/test/rand_SUITE.erl
index 0c7d8d842e..ef4f9faad9 100644
--- a/lib/stdlib/test/rand_SUITE.erl
+++ b/lib/stdlib/test/rand_SUITE.erl
@@ -850,8 +850,10 @@ do_measure(_Config) ->
exrop, TMarkNormalFloat),
ok.
+-define(LOOP_MEASURE, (?LOOP div 5)).
+
measure_loop(Fun, State) ->
- measure_loop(Fun, State, ?LOOP).
+ measure_loop(Fun, State, ?LOOP_MEASURE).
%%
measure_loop(Fun, State, N) when 0 < N ->
measure_loop(Fun, Fun(State), N-1);
@@ -889,7 +891,8 @@ measure_1(RangeFun, Fun, Alg, TMark) ->
end,
io:format(
"~.12w: ~p ns ~p% [16#~.16b]~n",
- [Alg, (Time * 1000 + 500) div ?LOOP, Percent, Range]),
+ [Alg, (Time * 1000 + 500) div ?LOOP_MEASURE,
+ Percent, Range]),
Parent ! {self(), Time},
normal
end),