aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2019-01-17 15:52:21 +0100
committerHans Nilsson <[email protected]>2019-01-25 18:04:05 +0100
commit9b0256865cf2b469311c6a4d56c8233df38b5825 (patch)
tree0d82d8575870da9dc8be6f9b86b2f822d2e7b00b /lib
parente14cbae59eabcdf8b18fdefb443b000fbbea77bd (diff)
downloadotp-9b0256865cf2b469311c6a4d56c8233df38b5825.tar.gz
otp-9b0256865cf2b469311c6a4d56c8233df38b5825.tar.bz2
otp-9b0256865cf2b469311c6a4d56c8233df38b5825.zip
ssh: Invert ssh_bench
Diffstat (limited to 'lib')
-rw-r--r--lib/ssh/test/ssh_bench_SUITE.erl13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/ssh/test/ssh_bench_SUITE.erl b/lib/ssh/test/ssh_bench_SUITE.erl
index 764c52b624..5d8ea240bb 100644
--- a/lib/ssh/test/ssh_bench_SUITE.erl
+++ b/lib/ssh/test/ssh_bench_SUITE.erl
@@ -109,10 +109,11 @@ connect(Config) ->
lists:foreach(
fun(KexAlg) ->
PrefAlgs = preferred_algorithms(KexAlg),
- report([{value, measure_connect(Config,
- [{preferred_algorithms,PrefAlgs}])},
+ report([{value, 1000000 /
+ measure_connect(Config,
+ [{preferred_algorithms,PrefAlgs}])},
{suite, ?MODULE},
- {name, mk_name(["Connect erlc erld ",KexAlg," [µs]"])}
+ {name, mk_name(["Connect erlc erld ",KexAlg," [connects/sec]"])}
])
end, KexAlgs).
@@ -130,7 +131,7 @@ measure_connect(Config, Opts) ->
[begin
{Time, {ok,Pid}} = timer:tc(ssh,connect,["localhost", Port, ConnectOptions]),
ssh:close(Pid),
- Time
+ Time % in µs
end || _ <- lists:seq(1,?Nruns)]).
%%%----------------------------------------------------------------
@@ -221,9 +222,9 @@ connect_measure(Port, Cipher, Mac, Data, Options) ->
Time
end || _ <- lists:seq(1,?Nruns)],
- report([{value, median(Times)},
+ report([{value, 1000000 / median(Times)}, % Time in µs
{suite, ?MODULE},
- {name, mk_name(["Transfer 1M bytes ",Cipher,"/",Mac," [µs]"])}]).
+ {name, mk_name(["Transfer ",Cipher,"/",Mac," [Mbyte/s]"])}]).
send_wait_acc(C, Ch, Data) ->
ssh_connection:send(C, Ch, Data),