public void EqualTest3()
        {
            EventPipeProvider provider1 = new EventPipeProvider(
                "System.Runtime",
                EventLevel.Verbose,
                (long)(-1),
                new Dictionary <string, string>()
            {
                { "EventCounterIntervalSec", "1" }
            });
            EventPipeProvider provider2 = new EventPipeProvider(
                "System.Runtime",
                EventLevel.Verbose,
                (long)(-1),
                new Dictionary <string, string>()
            {
                { "EventCounterIntervalSec", "1" }
            });

            Assert.True(provider1 == provider2);
        }
        public void ToStringTest1()
        {
            var provider = new EventPipeProvider("MyProvider", EventLevel.Verbose, (long)(0xdeadbeef));

            Assert.Equal("MyProvider:0x00000000DEADBEEF:5", provider.ToString());
        }
 /// <summary>
 /// Start tracing the application and return an EventPipeSession object
 /// </summary>
 /// <param name="provider">An EventPipeProvider to turn on.</param>
 /// <param name="requestRundown">If true, request rundown events from the runtime</param>
 /// <param name="circularBufferMB">The size of the runtime's buffer for collecting events in MB</param>
 /// <param name="token">The token to monitor for cancellation requests.</param>
 /// <returns>
 /// An EventPipeSession object representing the EventPipe session that just started.
 /// </returns>
 internal Task <EventPipeSession> StartEventPipeSessionAsync(EventPipeProvider provider, bool requestRundown, int circularBufferMB, CancellationToken token)
 {
     return(EventPipeSession.StartAsync(_endpoint, new[] { provider }, requestRundown, circularBufferMB, token));
 }
 /// <summary>
 /// Start tracing the application and return an EventPipeSession object
 /// </summary>
 /// <param name="provider">An EventPipeProvider to turn on.</param>
 /// <param name="requestRundown">If true, request rundown events from the runtime</param>
 /// <param name="circularBufferMB">The size of the runtime's buffer for collecting events in MB</param>
 /// <returns>
 /// An EventPipeSession object representing the EventPipe session that just started.
 /// </returns>
 public EventPipeSession StartEventPipeSession(EventPipeProvider provider, bool requestRundown = true, int circularBufferMB = 256)
 {
     return(EventPipeSession.Start(_endpoint, new[] { provider }, requestRundown, circularBufferMB));
 }
Beispiel #5
0
 public static Task <EventPipeSession> StartEventPipeSession(this DiagnosticsClientApiShim shim, EventPipeProvider provider)
 {
     return(shim.StartEventPipeSession(provider, DefaultPositiveVerificationTimeout));
 }