aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2019-03-28 11:13:20 +0100
committerRaimo Niskanen <[email protected]>2019-03-29 11:22:29 +0100
commit7f507b2d6b3ce8acdd34c9c0c1fa1e4b7f0bddb3 (patch)
treedb6dc98f75f0b0c0cf6234eedd21073adfc32e99 /lib/ssl
parent7965fa45b1afb12c262b9988160593f9bb5c048a (diff)
downloadotp-7f507b2d6b3ce8acdd34c9c0c1fa1e4b7f0bddb3.tar.gz
otp-7f507b2d6b3ce8acdd34c9c0c1fa1e4b7f0bddb3.tar.bz2
otp-7f507b2d6b3ce8acdd34c9c0c1fa1e4b7f0bddb3.zip
Polish sched util benchmark
Diffstat (limited to 'lib/ssl')
-rw-r--r--lib/ssl/test/ssl_dist_bench_SUITE.erl36
1 files changed, 20 insertions, 16 deletions
diff --git a/lib/ssl/test/ssl_dist_bench_SUITE.erl b/lib/ssl/test/ssl_dist_bench_SUITE.erl
index 04cb30ffdc..9cc4d8c67b 100644
--- a/lib/ssl/test/ssl_dist_bench_SUITE.erl
+++ b/lib/ssl/test/ssl_dist_bench_SUITE.erl
@@ -421,10 +421,10 @@ sched_util_runner(A, B, false) ->
sched_util_runner(A, B, Senders) ->
Payload = payload(5),
[A] = rpc:call(B, erlang, nodes, []),
- ServerPid =
- erlang:spawn(
- B,
- fun () -> throughput_server() end),
+ ServerPids =
+ [erlang:spawn_link(
+ B, fun () -> throughput_server() end)
+ || _ <- lists:seq(1, Senders)],
ServerMsacc =
erlang:spawn(
B,
@@ -432,24 +432,28 @@ sched_util_runner(A, B, Senders) ->
receive
{start,Pid} ->
msacc:start(10000),
- Pid ! {ServerPid,msacc:stats()}
+ receive
+ {done,Pid} ->
+ Pid ! {self(),msacc:stats()}
+ end
end
end),
- spawn_link(
- fun() ->
- %% We spawn 250 senders which should mean that we
- %% have a load of 250 msgs/msec
- [spawn_link(
- fun() ->
- throughput_client(ServerPid,Payload)
- end) || _ <- lists:seq(1, Senders)]
- end),
-
erlang:system_monitor(self(),[busy_dist_port]),
+ %% We spawn 250 senders which should mean that we
+ %% have a load of 250 msgs/msec
+ [spawn_link(
+ fun() ->
+ throughput_client(Pid, Payload)
+ end) || Pid <- ServerPids],
+ %%
+ receive after 1000 -> ok end,
ServerMsacc ! {start,self()},
msacc:start(10000),
ClientMsaccStats = msacc:stats(),
- ServerMsaccStats = receive {ServerPid,Stats} -> Stats end,
+ receive after 1000 -> ok end,
+ ServerMsacc ! {done,self()},
+ ServerMsaccStats = receive {ServerMsacc,Stats} -> Stats end,
+ %%
{ClientMsaccStats,ServerMsaccStats, flush()}.
flush() ->