コード例 #1
0
ファイル: IpcTraceTest.cs プロジェクト: vitek-karas/runtime
        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);

            try
            {
                var ret = test.Validate();
                if (ret == 100)
                {
                    Logger.logger.Log("==TEST FINISHED: PASSED!==");
                }
                else
                {
                    Logger.logger.Log("==TEST FINISHED: FAILED!==");
                }
                return(ret);
            }
            catch (Exception e)
            {
                Logger.logger.Log(e.ToString());
                Logger.logger.Log("==TEST FINISHED: FAILED!==");
                return(-1);
            }
        }
コード例 #2
0
ファイル: IpcTraceTest.cs プロジェクト: pgovind/runtime
        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);

            try
            {
                var ret = test.Validate();
                if (ret == 100)
                {
                    Logger.logger.Log("==TEST FINISHED: PASSED!==");
                }
                else
                {
                    Logger.logger.Log("==TEST FINISHED: FAILED!==");
                }
                return(ret);
            }
            catch (Exception e)
            {
                Logger.logger.Log(e.ToString());
                Logger.logger.Log("==TEST FINISHED: FAILED!==");
                return(-1);
            }
        }
コード例 #3
0
ファイル: IpcTraceTest.cs プロジェクト: riberk/coreclr
        public static int RunAndValidateEventCounts(
            Dictionary <string, ExpectedEventCount> expectedEventCounts,
            Action eventGeneratingAction,
            SessionConfiguration?sessionConfiguration = null,
            Func <EventPipeEventSource, Func <int> > optionalTraceValidator = null)
        {
            Console.WriteLine("TEST STARTING");
            var test = new IpcTraceTest(expectedEventCounts, eventGeneratingAction, sessionConfiguration, optionalTraceValidator);

            try
            {
                var ret = test.Validate();
                if (ret == 100)
                {
                    Console.WriteLine("TEST PASSED!");
                }
                return(ret);
            }
            catch (Exception e)
            {
                Console.WriteLine("TEST FAILED!");
                Console.WriteLine(e);
                return(-1);
            }
        }