Tidy logging following changes

Include detailed timings in a permanent log
This commit is contained in:
martinsumner 2016-12-13 12:41:44 +00:00
parent cfc6a67638
commit 52499170c0
2 changed files with 7 additions and 4 deletions

View file

@ -1330,12 +1330,12 @@ write_hash_tables(Indexes, HashTree, CurrPos) ->
write_hash_tables(Indexes, HashTree, CurrPos, CurrPos, [], [], {0, 0, 0}). write_hash_tables(Indexes, HashTree, CurrPos, CurrPos, [], [], {0, 0, 0}).
write_hash_tables([], _HashTree, _CurrPos, _BasePos, write_hash_tables([], _HashTree, _CurrPos, _BasePos,
IndexList, HT_BinList, {T1, T2, T3}) -> IndexList, HT_BinList, {T1, T2, T3}) ->
io:format("CDB99 ~w T1 ~w T2 ~w T3 ~w~n", [self(), T1, T2, T3]), leveled_log:log("CDB14", [T1, T2, T3]),
IL = lists:reverse(IndexList), IL = lists:reverse(IndexList),
{IL, list_to_binary(HT_BinList)}; {IL, list_to_binary(HT_BinList)};
write_hash_tables([Index|Rest], HashTree, CurrPos, BasePos, write_hash_tables([Index|Rest], HashTree, CurrPos, BasePos,
IndexList, HT_BinList, Timers) -> IndexList, HT_BinList, Timers) ->
SW1 = os:timestamp(), SW1 = os:timestamp(),
SlotMap = to_slotmap(HashTree, Index), SlotMap = to_slotmap(HashTree, Index),
T1 = timer:now_diff(os:timestamp(), SW1) + element(1, Timers), T1 = timer:now_diff(os:timestamp(), SW1) + element(1, Timers),

View file

@ -258,7 +258,10 @@
{"CDB12", {"CDB12",
{info, "HashTree written"}}, {info, "HashTree written"}},
{"CDB13", {"CDB13",
{info, "Write options of ~w"}} {info, "Write options of ~w"}},
{"CDB14",
{info, "Microsecond imings for hashtree build of "
++ "to_list ~w sort ~w build ~w"}}
])). ])).