Add performance monitoring for file listing function
This commit is contained in:
parent
2ddb8aa97e
commit
949217e4f8
|
|
@ -86,6 +86,8 @@ class Program
|
||||||
|
|
||||||
dirs.Push(directory);
|
dirs.Push(directory);
|
||||||
Log.Debug("Dirs Starting as: {DirStack}",dirs );
|
Log.Debug("Dirs Starting as: {DirStack}",dirs );
|
||||||
|
Stopwatch timer = new();
|
||||||
|
timer.Start();
|
||||||
|
|
||||||
while (dirs.Count > 0)
|
while (dirs.Count > 0)
|
||||||
{
|
{
|
||||||
|
|
@ -107,6 +109,8 @@ class Program
|
||||||
Log.Debug("Adding Directory {subdir} to dirs\nResult: {dirs}",subdir,dirs);
|
Log.Debug("Adding Directory {subdir} to dirs\nResult: {dirs}",subdir,dirs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
timer.Stop();
|
||||||
|
Log.Information("Crawled {directory} in {time}ms with {number} results",directory,timer.ElapsedMilliseconds,res.Count());
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user