Each merge log details of the level below

Help with troubleshooting memory problems, and potential issues with GC
This commit is contained in:
Martin Sumner 2019-06-13 11:50:02 +01:00
parent da59901890
commit c3a4f5118d
3 changed files with 65 additions and 1 deletions

View file

@ -176,6 +176,13 @@ handle_work({SrcLevel, Manifest}, State) ->
{leveled_pmanifest:get_manifest_sqn(UpdManifest), EntriesToDelete}.
merge(SrcLevel, Manifest, RootPath, OptsSST) ->
case leveled_pmanifest:report_manifest_level(Manifest, SrcLevel + 1) of
{0, 0, undefined} ->
ok;
{FCnt, AvgMem, {MaxFN, MaxP, MaxMem}} ->
leveled_log:log("PC023",
[SrcLevel + 1, FCnt, AvgMem, MaxFN, MaxP, MaxMem])
end,
Src = leveled_pmanifest:mergefile_selector(Manifest, SrcLevel),
NewSQN = leveled_pmanifest:get_manifest_sqn(Manifest) + 1,
SinkList = leveled_pmanifest:merge_lookup(Manifest,