示例#1
0
        private static TraceConfiguration CreateConfiguration(string outputFilename)
        {
            // Setup the configuration values.
            uint circularBufferMB = 1024; // 1 GB
            uint level            = 5;    // Verbose

            // Create a new instance of EventPipeConfiguration.
            TraceConfiguration config = new TraceConfiguration(outputFilename, 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);

            return(config);
        }
示例#2
0
        private static TraceConfiguration EventPipeGetConfig(EventSource eventSource, EventKeywords keywords, string outputFile = "default.netperf")
        {
            // Setup the configuration values.
            uint circularBufferMB = 1024; // 1 GB
            uint level            = 5;

            // Create a new instance of EventPipeConfiguration.
            TraceConfiguration config = new TraceConfiguration(outputFile, circularBufferMB);

            // Enable the provider.
            config.EnableProvider(eventSource.Name, (ulong)keywords, level);

            return(config);
        }
示例#3
0
        public static TraceConfiguration GetConfig(EventSource eventSource, string outputFile = "default.netperf")
        {
            // Setup the configuration values.
            uint     circularBufferMB = 1024; // 1 GB
            uint     level            = 5;    //(uint)EventLevel.Informational;
            TimeSpan profSampleDelay  = TimeSpan.FromMilliseconds(1);

            // Create a new instance of EventPipeConfiguration.
            TraceConfiguration config = new TraceConfiguration(outputFile, circularBufferMB);
            // Setup the provider values.
            // Public provider.
            string providerName = eventSource.Name;
            UInt64 keywords     = 0xffffffffffffffff;

            // Enable the provider.
            config.EnableProvider(providerName, keywords, level);

            // Set the sampling rate.
            config.SetSamplingRate(profSampleDelay);

            return(config);
        }