From 408dbc1801a0d54af34f8c62bc36d546035e23d1 Mon Sep 17 00:00:00 2001 From: Mukul Sabharwal Date: Wed, 12 Apr 2017 11:27:52 -0700 Subject: [PATCH] Add CloseTrace calls to flush the file --- Program.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Program.cs b/Program.cs index 5e42f7c..94447cd 100644 --- a/Program.cs +++ b/Program.cs @@ -76,6 +76,15 @@ jsonWriter.WriteEndObject(); GC.KeepAlive(fileSessions); + + for (int i = 0; i < count; ++i) + { + unsafe + { + Etw.CloseTrace(handles[i]); + } + } + return true; }