/// <summary> /// Constructor. /// </summary> /// <param name="configuration">Configuration</param> private TestingProcessScheduler(Configuration configuration) { this.TestingProcesses = new Dictionary<int, Process>(); this.Profiler = new Profiler(); this.SchedulerLock = new object(); this.BugFound = false; configuration.Verbose = 1; configuration.PrintTrace = false; configuration.PerformFullExploration = false; configuration.EnableDataRaceDetection = false; this.Configuration = configuration; }
void InitOnEntry() { int numOfNodes = (this.ReceivedEvent as Config).NumberOfNodes; this.Nodes = new List<MachineId>(); Profiler profiler = new Profiler(); profiler.StartMeasuringExecutionTime(); for (int idx = 0; idx < numOfNodes; idx++) { var node = this.CreateMachine(typeof(Node)); this.Nodes.Add(node); } profiler.StopMeasuringExecutionTime(); Console.WriteLine($"... Created {numOfNodes} machines in '" + profiler.Results() + "' seconds."); }
static void Main(string[] args) { Profiler profiler = new Profiler(); profiler.StartMeasuringExecutionTime(); new TPLTest().Start(Test.NumOfNodes); profiler.StopMeasuringExecutionTime(); Console.WriteLine("... TPL executed for '" + profiler.Results() + "' seconds."); profiler.StartMeasuringExecutionTime(); var runtime = PSharpRuntime.Create(); Test.Execute(runtime); runtime.Wait(); profiler.StopMeasuringExecutionTime(); Console.WriteLine("... P# executed for '" + profiler.Results() + "' seconds."); }
/// <summary> /// Constructor. /// </summary> /// <param name="configuration">Configuration</param> private RaceDetectionProcess(Configuration configuration) { this.Profiler = new Profiler(); this.Configuration = configuration; }
/// <summary> /// Constructor. /// </summary> /// <param name="configuration">Configuration</param> /// <param name="action">Action</param> protected AbstractTestingEngine(Configuration configuration, Action<PSharpRuntime> action) { this.Profiler = new Profiler(); this.Configuration = configuration; this.PerIterationCallbacks = new HashSet<Action<int>>(); this.TestAction = action; this.Initialize(); }
/// <summary> /// Constructor. /// </summary> /// <param name="configuration">Configuration</param> /// <param name="assembly">Assembly</param> protected AbstractTestingEngine(Configuration configuration, Assembly assembly) { this.Profiler = new Profiler(); this.Configuration = configuration; this.PerIterationCallbacks = new HashSet<Action<int>>(); this.Assembly = assembly; this.FindEntryPoint(); this.TestInitMethod = FindTestMethod(typeof(TestInit)); this.TestDisposeMethod = FindTestMethod(typeof(TestDispose)); this.TestIterationDisposeMethod = FindTestMethod(typeof(TestIterationDispose)); this.Initialize(); }
/// <summary> /// Constructor. /// </summary> /// <param name="configuration">Configuration</param> protected AbstractTestingEngine(Configuration configuration) { this.Profiler = new Profiler(); this.Configuration = configuration; this.PerIterationCallbacks = new HashSet<Action<int>>(); try { this.Assembly = Assembly.LoadFrom(configuration.AssemblyToBeAnalyzed); } catch (FileNotFoundException ex) { IO.Error.ReportAndExit(ex.Message); } this.FindEntryPoint(); this.TestInitMethod = FindTestMethod(typeof(TestInit)); this.TestDisposeMethod = FindTestMethod(typeof(TestDispose)); this.TestIterationDisposeMethod = FindTestMethod(typeof(TestIterationDispose)); this.Initialize(); }
/// <summary> /// Constructor. /// </summary> /// <param name="context">CompilationContext</param> private StaticAnalysisEngine(CompilationContext context) { this.Profiler = new Profiler(); this.CompilationContext = context; }
/// <summary> /// Constructor. /// </summary> /// <param name="context">AnalysisContext</param> /// <param name="configuration">Configuration</param> protected StateMachineAnalysisPass(AnalysisContext context, Configuration configuration) { this.Profiler = new Profiler(); this.AnalysisContext = context; this.Configuration = configuration; }