Skip to content

Commit bfb841b

Browse files
committed
refactor: remove FileFullPath stopwatch
1 parent 72fe0a3 commit bfb841b

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

deadlock-dotnet-sdk/Domain/SafeFileHandleEx.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ public unsafe (string? v, Exception? ex) FileFullPath
206206
const uint LengthIndicatesError = 0;
207207

208208
// Try without duplicating. If it fails, try duplicating the handle.
209-
Stopwatch sw = Stopwatch.StartNew();
210209
try
211210
{
212211
GETFINALPATHNAMEBYHANDLE_FLAGS flags = IsFilePathRemote.v is true ? GETFINALPATHNAMEBYHANDLE_FLAGS.FILE_NAME_OPENED : GETFINALPATHNAMEBYHANDLE_FLAGS.FILE_NAME_NORMALIZED;
@@ -248,11 +247,6 @@ public unsafe (string? v, Exception? ex) FileFullPath
248247
{
249248
return fileFullPath = (null, ex);
250249
}
251-
finally
252-
{
253-
sw.Stop();
254-
Console.WriteLine($"(handle 0x{handle:X}) TryGetFinalPath time: {sw.Elapsed}");
255-
}
256250

257251
/// Return the normalized drive name. This is the default.
258252
using SafeProcessHandle processHandle = OpenProcess_SafeHandle(PROCESS_ACCESS_RIGHTS.PROCESS_DUP_HANDLE, false, ProcessId);

0 commit comments

Comments
 (0)