public void CompareChangingValues() { UserAssist assist = new UserAssist(); using (CsvWriter writer = new CsvWriter(new StreamWriter(File.Open("ChangingValues.csv", FileMode.Create)))) { writer.WriteHeader <ValueLetter>(); var snap1Values = assist.Snapshot("snap1.csv") .FindProgram("cmd.exe") .GetValue(); WaitOpenThenKill("cmd.exe"); var snap2Values = assist.Snapshot("snap2.csv") .FindProgram("cmd.exe") .GetValue(); for (int i = 0; i < snap1Values.Length; i++) { writer.WriteRecord(new ValueLetter() { Position = i, Value1 = snap1Values[i].ToString("X2"), Value2 = snap2Values[i].ToString("X2"), IsDiff = (snap1Values[i] != snap2Values[i]) ? "x" : "" }); } } Process.Start("ChangingValues.csv"); }
public void CompareChangingValues() { UserAssist assist = new UserAssist(); using(CsvWriter writer = new CsvWriter(new StreamWriter(File.Open("ChangingValues.csv", FileMode.Create)))) { writer.WriteHeader<ValueLetter>(); var snap1Values = assist.Snapshot("snap1.csv") .FindProgram("cmd.exe") .GetValue(); WaitOpenThenKill("cmd.exe"); var snap2Values = assist.Snapshot("snap2.csv") .FindProgram("cmd.exe") .GetValue(); for(int i = 0 ; i < snap1Values.Length ; i++) { writer.WriteRecord(new ValueLetter() { Position = i, Value1 = snap1Values[i].ToString("X2"), Value2 = snap2Values[i].ToString("X2"), IsDiff = (snap1Values[i] != snap2Values[i]) ? "x" : "" }); } } Process.Start("ChangingValues.csv"); }
public void CompareSnapshot() { UserAssist assist = new UserAssist(); assist.Snapshot("snap1.csv").Dispose(); MessageBox.Show("Run manually"); assist.Snapshot("snap2.csv").Dispose(); StartWindiff("snap1.csv", "snap2.csv"); Process.Start("snap1.csv"); }
public void CompareSnapshot() { UserAssist assist = new UserAssist(); assist.Snapshot("snap1.csv").Dispose(); MessageBox.Show("Run manually"); assist.Snapshot("snap2.csv").Dispose(); StartWindiff("snap1.csv", "snap2.csv"); Process.Start("snap1.csv"); }
public void CompareDiffSnapshot() { for (int i = 0; i < 2; i++) { var snap1 = i + "-snap1.csv"; var snap2 = i + "-snap2.csv"; var diff = i + "-diff.csv"; UserAssist assist = new UserAssist(); assist.Snapshot(snap1).Dispose(); MessageBox.Show("Run manually"); assist.Snapshot(snap2).Dispose(); Diff(diff, snap1, snap2); } StartWindiff("0-diff.csv", "1-diff.csv"); }
public void CompareDiffSnapshot() { for(int i = 0 ; i < 2 ; i++) { var snap1 = i + "-snap1.csv"; var snap2 = i + "-snap2.csv"; var diff = i + "-diff.csv"; UserAssist assist = new UserAssist(); assist.Snapshot(snap1).Dispose(); MessageBox.Show("Run manually"); assist.Snapshot(snap2).Dispose(); Diff(diff, snap1, snap2); } StartWindiff("0-diff.csv", "1-diff.csv"); }
public void CompareUnknownDataWithTime() { UserAssist assist = new UserAssist(); using (CsvWriter writer = new CsvWriter(new StreamWriter(File.Open("Experiment.csv", FileMode.Create)))) { writer.WriteHeader <RunSnap>(); var experimentStart = DateTime.UtcNow.Ticks; for (int i = 0; i < 5; i++) { RunSnap snap = new RunSnap(); var process = WaitOpen("cmd.exe"); snap.StartDate = DateTime.UtcNow.Ticks - experimentStart; WaitMaxSeconds(10); process.Kill(); snap.Duration = (DateTime.UtcNow.Ticks - experimentStart) - snap.StartDate; snap.LastChanged = assist.Snapshot() .FindProgram("cmd.exe") .ParseValue() .LastChanged; writer.WriteRecord(snap); } } }
public void CompareUnknownDataWithTime() { UserAssist assist = new UserAssist(); using(CsvWriter writer = new CsvWriter(new StreamWriter(File.Open("Experiment.csv", FileMode.Create)))) { writer.WriteHeader<RunSnap>(); var experimentStart = DateTime.UtcNow.Ticks; for(int i = 0 ; i < 5 ; i++) { RunSnap snap = new RunSnap(); var process = WaitOpen("cmd.exe"); snap.StartDate = DateTime.UtcNow.Ticks - experimentStart; WaitMaxSeconds(10); process.Kill(); snap.Duration = (DateTime.UtcNow.Ticks - experimentStart) - snap.StartDate; snap.LastChanged = assist.Snapshot() .FindProgram("cmd.exe") .ParseValue() .LastChanged; writer.WriteRecord(snap); } } }