Merged PR 680191: Fix scrubber duplicate stats

The statistics identifier has never been taken into account when producing the stats. Thus the resulting stats contain the following duplicate entries:
```
Scrubbing.DurationMs=22
Scrubbing.DirectoriesEncountered=37
Scrubbing.FilesEncountered=18
Scrubbing.FilesRemoved=0
Scrubbing.DirectoriesRemovedRecursively=0
SharedOpaqueScrubbing.DurationMs=110
Scrubbing.DirectoriesEncountered=350
Scrubbing.FilesEncountered=1312
Scrubbing.FilesRemoved=1312
Scrubbing.DirectoriesRemovedRecursively=6
```
This commit is contained in:
Iman Narasamdya 2022-09-20 19:34:24 +00:00
Родитель 3d832cc9f1
Коммит a20ee334f5
1 изменённых файлов: 4 добавлений и 5 удалений

Просмотреть файл

@ -12,7 +12,6 @@ using BuildXL.Native.IO;
using BuildXL.Pips;
using BuildXL.Tracing;
using BuildXL.Utilities;
using BuildXL.Utilities.Collections;
using BuildXL.Utilities.Configuration;
using BuildXL.Utilities.Instrumentation.Common;
using static BuildXL.Utilities.FormattableStringEx;
@ -160,10 +159,10 @@ namespace BuildXL.Engine
loggingContext,
new Dictionary<string, long>
{
[I($"{Category}.DirectoriesEncountered")] = directoriesEncountered,
[I($"{Category}.FilesEncountered")] = filesEncountered,
[I($"{Category}.FilesRemoved")] = filesRemoved,
[I($"{Category}.DirectoriesRemovedRecursively")] = directoriesRemovedRecursively,
[I($"{statisticIdentifier}.DirectoriesEncountered")] = directoriesEncountered,
[I($"{statisticIdentifier}.FilesEncountered")] = filesEncountered,
[I($"{statisticIdentifier}.FilesRemoved")] = filesRemoved,
[I($"{statisticIdentifier}.DirectoriesRemovedRecursively")] = directoriesRemovedRecursively,
});
}))
using (var timer = new Timer(