diff options
author | Björn Gustavsson <[email protected]> | 2016-03-21 14:06:24 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-03-21 14:06:24 +0100 |
commit | e369312640200396b277e2e63378f86ff965d166 (patch) | |
tree | 30d39ffb0d5b5955cf8f6598750503b47da240b5 /lib/asn1/test/test_special_decode_performance.erl | |
parent | 4695e77f9884ea92633ec0b3e3fcc3c19d357630 (diff) | |
parent | cb67cfb5320a7f8e37bc9269afcafe62bb6c1d1a (diff) | |
download | otp-e369312640200396b277e2e63378f86ff965d166.tar.gz otp-e369312640200396b277e2e63378f86ff965d166.tar.bz2 otp-e369312640200396b277e2e63378f86ff965d166.zip |
Merge branch 'bjorn/asn1/modernize-tests'
* bjorn/asn1/modernize-tests:
Eliminate suite and doc clauses
Replace ?config() macro with proplists:get_value()
Modernize timetraps
Eliminate ?line macros
Diffstat (limited to 'lib/asn1/test/test_special_decode_performance.erl')
-rw-r--r-- | lib/asn1/test/test_special_decode_performance.erl | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/asn1/test/test_special_decode_performance.erl b/lib/asn1/test/test_special_decode_performance.erl index 6cf7ee2805..55e64b61e0 100644 --- a/lib/asn1/test/test_special_decode_performance.erl +++ b/lib/asn1/test/test_special_decode_performance.erl @@ -27,29 +27,29 @@ go(all) -> {Time_S_s,Time_S_e,Time_S_c}=go(10000,'PartialDecSeq'), {Time_MGC_s,Time_MGC_e,Time_MGC_c}=go(10000,'MEDIA-GATEWAY-CONTROL'), - ?line do_comment({Time_S_s,Time_MGC_s}, + do_comment({Time_S_s,Time_MGC_s}, {Time_S_e,Time_MGC_e}, {Time_S_c,Time_MGC_c}). go(N,Mod) -> {Type,Val} = val(Mod), {ok,B} = Mod:encode(Type, Val), - ?line go(Mod,B,N). + go(Mod,B,N). go(Mod,Bin,N) -> - ?line FsS = get_selective_funcs(Mod), - ?line FsE = get_exclusive_funcs(Mod), - ?line io:format("~nSize of value for module ~p: ~p bytes.~n~n",[Mod,size(Bin)]), - ?line Time_s=go1(selective,Mod,FsS,Bin,N,0), - ?line Time_e=go1(exclusive,Mod,FsE,Bin,N,0), - ?line Time_c=go1(common,Mod,[decode],Bin,N,0), - ?line {Time_s/length(FsS),Time_e/length(FsE),Time_c}. + FsS = get_selective_funcs(Mod), + FsE = get_exclusive_funcs(Mod), + io:format("~nSize of value for module ~p: ~p bytes.~n~n",[Mod,size(Bin)]), + Time_s=go1(selective,Mod,FsS,Bin,N,0), + Time_e=go1(exclusive,Mod,FsE,Bin,N,0), + Time_c=go1(common,Mod,[decode],Bin,N,0), + {Time_s/length(FsS),Time_e/length(FsE),Time_c}. go1(_,_,[],_,_,AccTime) -> - ?line AccTime; + AccTime; %% go1 for common decode go1(common,Mod,_,Bin,N,_) -> - ?line TT=get_top_type(Mod), + TT=get_top_type(Mod), {Time,Result} = timer:tc(fun() -> loop1(Mod, decode, TT, Bin, N) end), case Result of {ok,_R1} -> |