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); } }
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); } }
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); } }