diff --git a/src/leveled_log.erl b/src/leveled_log.erl index 4822e29..0e475fc 100644 --- a/src/leveled_log.erl +++ b/src/leveled_log.erl @@ -54,7 +54,9 @@ ++ " with fetch_count=~w"}}, {"B0017", {info, "Fold timing with sample_count=~w and setup_time=~w"}}, - + {"B0018", + {info, "Positive HEAD responses timed with sample_count=~w and " + ++ " pcl_time=~w rsp_time=~w"}}, {"R0001", {debug, "Object fold to process batch of ~w objects"}}, diff --git a/test/end_to_end/riak_SUITE.erl b/test/end_to_end/riak_SUITE.erl index 1539ccf..42a233e 100644 --- a/test/end_to_end/riak_SUITE.erl +++ b/test/end_to_end/riak_SUITE.erl @@ -54,6 +54,9 @@ crossbucket_aae(_Config) -> fun testutil:generate_smallobjects/2, 40000), + %% Check all the objects are found - used to trigger HEAD performance log + ok = testutil:checkhead_forlist(Bookie2, lists:nth(1, CLs)), + % Start a new store, and load the same objects (except fot the original % test object) into this store diff --git a/test/end_to_end/testutil.erl b/test/end_to_end/testutil.erl index 0d1af19..93b5166 100644 --- a/test/end_to_end/testutil.erl +++ b/test/end_to_end/testutil.erl @@ -11,6 +11,7 @@ reset_filestructure/0, reset_filestructure/1, check_bucket_stats/2, + checkhead_forlist/2, check_forlist/2, check_forlist/3, check_formissinglist/2, @@ -266,6 +267,25 @@ check_forlist(Bookie, ChkList, Log) -> io:format("Fetch check took ~w microseconds checking list of length ~w~n", [timer:now_diff(os:timestamp(), SW), length(ChkList)]). +checkhead_forlist(Bookie, ChkList) -> + SW = os:timestamp(), + lists:foreach(fun({_RN, Obj, _Spc}) -> + R = book_riakhead(Bookie, + Obj#r_object.bucket, + Obj#r_object.key), + true = case R of + {ok, _Head} -> + true; + not_found -> + io:format("Object not found for key ~s~n", + [Obj#r_object.key]), + error + end + end, + ChkList), + io:format("Head check took ~w microseconds checking list of length ~w~n", + [timer:now_diff(os:timestamp(), SW), length(ChkList)]). + check_formissinglist(Bookie, ChkList) -> SW = os:timestamp(), lists:foreach(fun({_RN, Obj, _Spc}) ->