Add put timing points
This commit is contained in:
parent
299e8e6de3
commit
060ce2e263
5 changed files with 74 additions and 14 deletions
|
@ -472,11 +472,11 @@ stringcheck_test() ->
|
|||
%% Test below proved that the overhead of performing hashes was trivial
|
||||
%% Maybe 5 microseconds per hash
|
||||
|
||||
hashperf_test() ->
|
||||
OL = lists:map(fun(_X) -> crypto:rand_bytes(8192) end, lists:seq(1, 10000)),
|
||||
SW = os:timestamp(),
|
||||
_HL = lists:map(fun(Obj) -> erlang:phash2(Obj) end, OL),
|
||||
io:format(user, "10000 object hashes in ~w microseconds~n",
|
||||
[timer:now_diff(os:timestamp(), SW)]).
|
||||
%hashperf_test() ->
|
||||
% OL = lists:map(fun(_X) -> crypto:rand_bytes(8192) end, lists:seq(1, 10000)),
|
||||
% SW = os:timestamp(),
|
||||
% _HL = lists:map(fun(Obj) -> erlang:phash2(Obj) end, OL),
|
||||
% io:format(user, "10000 object hashes in ~w microseconds~n",
|
||||
% [timer:now_diff(os:timestamp(), SW)]).
|
||||
|
||||
-endif.
|
Loading…
Add table
Add a link
Reference in a new issue