|
|
@ -31,11 +31,12 @@ ts(M, F, A, N) -> |
|
|
|
{Max, Min, Sum, Aver, Greater, Less} = loop ({M, F, A}, N), |
|
|
|
io:format ("=====================~n"), |
|
|
|
io:format ("execute [~p] times of {~p, ~p, ~p}:~n", [N, M, F, A]), |
|
|
|
io:format ("Maximum: ~p(μs)\t~p(s)~n", [Max, Max / 1000000]), |
|
|
|
io:format ("Minimum: ~p(μs)\t~p(s)~n", [Min, Min / 1000000]), |
|
|
|
io:format ("Sum: ~p(μs)\t~p(s)~n", [Sum, Sum / 1000000]), |
|
|
|
io:format ("Average: ~p(μs)\t~p(s)~n", [Aver, Aver / 1000000]), |
|
|
|
io:format ("Greater: ~p~nLess: ~p~n", [Greater, Less]), |
|
|
|
io:format ("Maximum: ~p(us)\t~p(s)~n", [Max, Max / 1000000]), |
|
|
|
io:format ("Minimum: ~p(us)\t~p(s)~n", [Min, Min / 1000000]), |
|
|
|
io:format ("Sum: ~p(us)\t~p(s)~n", [Sum, Sum / 1000000]), |
|
|
|
io:format ("Average: ~p(us)\t~p(s)~n", [Aver, Aver / 1000000]), |
|
|
|
io:format ("Greater: ~p ~n", [Greater]), |
|
|
|
io:format ("Less: ~p ~n", [Less]), |
|
|
|
io:format ("=====================~n"). |
|
|
|
|
|
|
|
|
|
|
@ -71,12 +72,13 @@ loop({_M, _F, _A}, N, _I, Max, Min, Sum, List) -> |
|
|
|
tm(M, F, A, N) -> |
|
|
|
{Max, Min, Sum, Aver, Greater, Less} = cloop ({M, F, A}, N), |
|
|
|
io:format ("=====================~n"), |
|
|
|
io:format ("spawn [~p] processes of {~p, ~p, ~p}:~n", [N, M, F, A]), |
|
|
|
io:format ("Maximum: ~p(μs)\t~p(s)~n", [Max, Max / 1000000]), |
|
|
|
io:format ("Minimum: ~p(μs)\t~p(s)~n", [Min, Min / 1000000]), |
|
|
|
io:format ("Sum: ~p(μs)\t~p(s)~n", [Sum, Sum / 1000000]), |
|
|
|
io:format ("Average: ~p(μs)\t~p(s)~n", [Aver, Aver / 1000000]), |
|
|
|
io:format ("Greater: ~p~nLess: ~p~n", [Greater, Less]), |
|
|
|
io:format ("execute [~p] times of {~p, ~p, ~p}:~n", [N, M, F, A]), |
|
|
|
io:format ("Maximum: ~p(us)\t~p(s)~n", [Max, Max / 1000000]), |
|
|
|
io:format ("Minimum: ~p(us)\t~p(s)~n", [Min, Min / 1000000]), |
|
|
|
io:format ("Sum: ~p(us)\t~p(s)~n", [Sum, Sum / 1000000]), |
|
|
|
io:format ("Average: ~p(us)\t~p(s)~n", [Aver, Aver / 1000000]), |
|
|
|
io:format ("Greater: ~p ~n", [Greater]), |
|
|
|
io:format ("Less: ~p ~n", [Less]), |
|
|
|
io:format ("=====================~n"). |
|
|
|
|
|
|
|
|
|
|
|