aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2019-01-16 12:52:04 +0100
committerSiri Hansen <[email protected]>2019-01-16 12:53:12 +0100
commitf7123f64f6fa1727b49648e4335720910d8f10bf (patch)
tree18897c4abc96643a004aba5cbb1daa73e532a069 /lib
parentcc5ab7a04932fe483a854f30bc599256385a9907 (diff)
downloadotp-f7123f64f6fa1727b49648e4335720910d8f10bf.tar.gz
otp-f7123f64f6fa1727b49648e4335720910d8f10bf.tar.bz2
otp-f7123f64f6fa1727b49648e4335720910d8f10bf.zip
[logger] Update bench marks to report percent instead of 0.XX
Also remove some compiler warnings from test suite.
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel/test/logger_stress_SUITE.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/kernel/test/logger_stress_SUITE.erl b/lib/kernel/test/logger_stress_SUITE.erl
index 5ec724c524..4072e8c86a 100644
--- a/lib/kernel/test/logger_stress_SUITE.erl
+++ b/lib/kernel/test/logger_stress_SUITE.erl
@@ -100,7 +100,7 @@ reject_events(Config) ->
{logger_level,error}]),
N = 1000000,
{T,_} = timer:tc(fun() -> rpc:call(Node,?MODULE,nlogs,[N]) end),
- IOPS = N * 1000/T, % log events rejeted per second
+ IOPS = N * 1000/T, % log events rejected per millisecond
ct_event:notify(#event{name = benchmark_data,
data = [{value,IOPS}]}),
{comment,io_lib:format("~.2f rejected events pr millisecond",
@@ -229,7 +229,7 @@ nlogs(N) ->
ok.
%% cascade(ProducerInfo,ConsumerInfo,TestFun)
-cascade({PNode,PMFA,PStatProcs},{CNode,CMFA,CStatProcs},TestFun) ->
+cascade({PNode,PMFA,_PStatProcs},{CNode,CMFA,_CStatProcs},TestFun) ->
Tab = ets:new(counter,[set,public]),
ets:insert(Tab,{producer,0}),
ets:insert(Tab,{consumer,0}),
@@ -251,13 +251,13 @@ cascade({PNode,PMFA,PStatProcs},{CNode,CMFA,CStatProcs},TestFun) ->
Written = ets:lookup_element(Tab,consumer,2),
dbg:stop_clear(),
?COLLECT_STATS(All,
- [{PNode,P,Id} || {Id,P} <- PStatProcs] ++
- [{CNode,P,Id} || {Id,P} <- CStatProcs]),
- Ratio = Written/All,
+ [{PNode,P,Id} || {Id,P} <- _PStatProcs] ++
+ [{CNode,P,Id} || {Id,P} <- _CStatProcs]),
+ Ratio = Written/All * 100,
ct_event:notify(#event{name = benchmark_data,
data = [{value,Ratio}]}),
- {comment,io_lib:format("~.2f (~p written, ~p produced)",
- [Ratio,Written,All])}
+ {comment,io_lib:format("~p % (~p written, ~p produced)",
+ [round(Ratio),Written,All])}
end.
wrap_test(Fun) ->