aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2019-04-12 11:21:49 +0200
committerLukas Larsson <[email protected]>2019-04-18 14:13:35 +0200
commit8cba01c623eeb962298750d60bf22f6d6f5538dc (patch)
treeb2b5a639b68ffea8a1de9a2feb10b164a7f25f22 /erts
parent3e9c74400d20d95e9bbc378478dc00cbafba6b47 (diff)
downloadotp-8cba01c623eeb962298750d60bf22f6d6f5538dc.tar.gz
otp-8cba01c623eeb962298750d60bf22f6d6f5538dc.tar.bz2
otp-8cba01c623eeb962298750d60bf22f6d6f5538dc.zip
erts: Add extra debugging to dist frag testcases
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/test/distribution_SUITE.erl10
1 files changed, 8 insertions, 2 deletions
diff --git a/erts/emulator/test/distribution_SUITE.erl b/erts/emulator/test/distribution_SUITE.erl
index c8f190d29d..d1d1e3840e 100644
--- a/erts/emulator/test/distribution_SUITE.erl
+++ b/erts/emulator/test/distribution_SUITE.erl
@@ -1527,13 +1527,19 @@ measure_latency(DataFun, Dropper, Echo, Payload) ->
ok
end || _ <- lists:seq(1,10)],
- {TS, _} =
+ {TS, Times} =
timer:tc(fun() ->
[begin
+ T0 = erlang:monotonic_time(),
Echo ! {self(), hello},
- receive hello -> ok end
+ receive hello -> ok end,
+ (erlang:monotonic_time() - T0) / 1000000
end || _ <- lists:seq(1,100)]
end),
+ Avg = lists:sum(Times) / length(Times),
+ StdDev = math:sqrt(lists:sum([math:pow(V - Avg,2) || V <- Times]) / length(Times)),
+ ct:pal("Times: Avg: ~p Max: ~p Min: ~p Var: ~p",
+ [Avg, lists:max(Times), lists:min(Times), StdDev]),
[begin
Sender ! die,
receive