public ReplayManager(ProgramArguments args, GUIDataMonitor monitor) { connectionString = OdbcUtils.CreateConnectionString(args); snapshotName = args.Snapshot; processName = args.Process; databaseName = args.TestDatabase; setupTrace = args.SetupTraceFile; testTrace = args.TestTraceFile; replayMode = args.ReplayMode; resetMethod = args.ResetMethod; nbrWarmup = args.NbrWarmup; this.backupFile = args.BackupFile; this.monitor = monitor; RunTimeMillis = new List <long>(); MemReaders = new List <MemoryReader>(); StartMemReader = new MemoryReader(processName); }
public Form1(GUIDataMonitor monitor) { InitializeComponent(); this.monitor = monitor; respondTimeChart.Series = new SeriesCollection { new ColumnSeries { Title = "Respond Time", Values = new ChartValues <double>() }, new LineSeries { Title = "Average", Values = new ChartValues <double>(), PointGeometry = null, LineSmoothness = 0, Fill = new System.Windows.Media.SolidColorBrush( System.Windows.Media.Color.FromArgb(0, 1, 1, 1)), } }; averageMemoryChart.Series = new SeriesCollection { new ColumnSeries { Title = "Average Memory", Values = new ChartValues <double>() }, new LineSeries { Title = "Average", Values = new ChartValues <double>(), PointGeometry = null, LineSmoothness = 0, Fill = new System.Windows.Media.SolidColorBrush( System.Windows.Media.Color.FromArgb(0, 1, 1, 1)), } }; }
static void Main(string[] args) { //Read command arguments ProgramArguments arguments = ProgramArguments.ReadFromFile(args[0]); GUIDataMonitor monitor = new GUIDataMonitor(); ReplayManager replayManager = new ReplayManager(arguments, monitor); var task = Task.Run(() => RunReplayManager(replayManager, arguments.NbrRepeats, arguments.OutputFile)); Thread guiThread = new Thread(() => DisplayGUI(monitor)); guiThread.SetApartmentState(ApartmentState.STA); guiThread.Start(); task.Wait(); guiThread.Join(); Console.WriteLine(); Console.WriteLine("Press any key to exit"); Console.ReadKey(); }
private static void DisplayGUI(GUIDataMonitor monitor) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1(monitor)); }