From f7123f64f6fa1727b49648e4335720910d8f10bf Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 16 Jan 2019 12:52:04 +0100 Subject: [logger] Update bench marks to report percent instead of 0.XX Also remove some compiler warnings from test suite. --- lib/kernel/test/logger_stress_SUITE.erl | 14 +++++++------- 1 file 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) -> -- cgit v1.2.3