Skip to content

Commit 118461d

Browse files
committed
Add progress on module loading
1 parent 0c4f181 commit 118461d

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/Ultra.Core/EtwConverterToFirefox.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,15 +214,16 @@ public FirefoxProfiler.Profile Convert(string traceFilePath, List<int> processId
214214
options.LogProgress?.Invoke($"Loading Modules for process {process.Name}");
215215

216216
var allModules = process.LoadedModules.ToList();
217-
foreach (var module in allModules)
217+
for (var i = 0; i < allModules.Count; i++)
218218
{
219+
var module = allModules[i];
219220
if (_mapModuleFileIndexToFirefox.ContainsKey(module.ModuleFile.ModuleFileIndex))
220221
{
221222
continue; // Skip in case
222223
}
223-
224-
options.LogStepProgress?.Invoke($"Loading Symbols for Module `{module.Name}`, ImageSize: {ByteSize.FromBytes(module.ModuleFile.ImageSize)}");
225-
224+
225+
options.LogStepProgress?.Invoke($"Loading Symbols [{i}/{allModules.Count}] for Module `{module.Name}`, ImageSize: {ByteSize.FromBytes(module.ModuleFile.ImageSize)}");
226+
226227
var lib = new FirefoxProfiler.Lib
227228
{
228229
Name = module.Name,

0 commit comments

Comments
 (0)