Esempio n. 1
0
        public static int RunAndValidateEventCounts(
            Dictionary <string, ExpectedEventCount> expectedEventCounts,
            Action eventGeneratingAction,
            SessionConfiguration sessionConfiguration = null,
            Func <EventPipeEventSource, Func <int> > optionalTraceValidator = null)
        {
            Logger.logger.Log("==TEST STARTING==");
            var test = new IpcTraceTest(expectedEventCounts, eventGeneratingAction, sessionConfiguration, optionalTraceValidator);
            var ret  = test.Validate();

            if (ret == 100)
            {
                Logger.logger.Log("==TEST FINISHED: PASSED!==");
            }
            else
            {
                Logger.logger.Log("==TEST FINISHED: FAILED!==");
            }
            return(ret);
        }
Esempio n. 2
0
        public static int RunAndValidateEventCounts(
            Dictionary <string, ExpectedEventCount> expectedEventCounts,
            Action eventGeneratingAction,
            List <EventPipeProvider> providers,
            int circularBufferMB = 1024,
            Func <EventPipeEventSource, Func <int> > optionalTraceValidator = null)
        {
            Logger.logger.Log("==TEST STARTING==");
            var test = new IpcTraceTest(expectedEventCounts, eventGeneratingAction, providers, circularBufferMB, optionalTraceValidator);
            var ret  = test.Validate();

            if (ret == 100)
            {
                Logger.logger.Log("==TEST FINISHED: PASSED!==");
            }
            else
            {
                Logger.logger.Log("==TEST FINISHED: FAILED!==");
            }
            return(ret);
        }