public static void EnableDefault(TimeSpan profSampleDelay, string outputFile = "default.netperf") { // Setup the configuration values. uint circularBufferMB = 1024; // 1 GB uint level = 5; // Verbose // Create a new instance of EventPipeConfiguration. TraceConfiguration config = new TraceConfiguration(outputFile, circularBufferMB); // Setup the provider values. // Public provider. string providerName = "Microsoft-Windows-DotNETRuntime"; UInt64 keywords = 0x4c14fccbd; // Enable the provider. config.EnableProvider(providerName, keywords, level); // Private provider. providerName = "Microsoft-Windows-DotNETRuntimePrivate"; keywords = 0x4002000b; // Enable the provider. config.EnableProvider(providerName, keywords, level); // Sample profiler. providerName = "Microsoft-DotNETCore-SampleProfiler"; keywords = 0x0; // Enable the provider. config.EnableProvider(providerName, keywords, level); // Set the sampling rate. config.SetSamplingRate(profSampleDelay); // Enable tracing. Enable(config); }
public static void EnableDefault(TimeSpan profSampleDelay, string outputFile = "default.netperf") { // Setup the configuration values. uint circularBufferMB = 1024; // 1 GB uint level = 5; // Verbose // Create a new instance of EventPipeConfiguration. TraceConfiguration config = new TraceConfiguration(outputFile, circularBufferMB); // Setup the provider values. // Public provider. string providerName = "e13c0d23-ccbc-4e12-931b-d9cc2eee27e4"; UInt64 keywords = 0x4c14fccbd; // Enable the provider. config.EnableProvider(providerName, keywords, level); // Private provider. providerName = "763fd754-7086-4dfe-95eb-c01a46faf4ca"; keywords = 0x4002000b; // Enable the provider. config.EnableProvider(providerName, keywords, level); // Sample profiler. providerName = "3c530d44-97ae-513a-1e6d-783e8f8e03a9"; keywords = 0x0; // Enable the provider. config.EnableProvider(providerName, keywords, level); // Set the sampling rate. config.SetSamplingRate(profSampleDelay); // Enable tracing. Enable(config); }
private TraceConfiguration GenerateConfiguration() { uint circularBufferMB = 1024; // 1 GB TraceConfiguration traceConfig = new TraceConfiguration(m_file.Path, circularBufferMB); // Add each of the registered EventSources. foreach (EventSource source in m_eventSources) { traceConfig.EnableProvider( source.Name, // ProviderName 0xFFFFFFFFFFFFFFFF, // Keywords 5); // Level } return(traceConfig); }