Example #1
0
 public static void Enable(TraceConfiguration traceConfig)
 {
     m_enableMethod.Invoke(
         null,
         new object[]
     {
         traceConfig.ConfigurationObject
     });
 }
Example #2
0
        public static void EnableDefault(TimeSpan profSampleDelay)
        {
            // Set the output file to be in the current working directory.
            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);
        }