Created
July 24, 2018 13:38
-
-
Save Criteo-dotnet-blog/8b142495ce1a63c4a47ae91889dd43e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// register handlers for events on the session source | |
// more on this later... | |
// decide which provider to listen to with filters if needed | |
userSession.EnableProvider( | |
ClrTraceEventParser.ProviderGuid, | |
TraceEventLevel.Verbose, | |
(ulong)( | |
ClrTraceEventParser.Keywords.Contention | // thread contention timing | |
ClrTraceEventParser.Keywords.Threading | // threadpool events | |
ClrTraceEventParser.Keywords.Exception | // get the first chance exceptions | |
ClrTraceEventParser.Keywords.GCHeapAndTypeNames | | |
ClrTraceEventParser.Keywords.Type | // for finalizer and exceptions type names | |
ClrTraceEventParser.Keywords.GC // garbage collector details | |
) | |
); | |
// this is a blocking call until the session is disposed | |
userSession.Source.Process(); | |
Console.WriteLine("End of session"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment