Confirmed results to SummaryResults.txt logger

This commit is contained in:
Milan Hanajik
2015-02-02 11:38:42 +01:00
parent 376056fb1a
commit e1756f692c
9 changed files with 18 additions and 13 deletions
@@ -393,10 +393,15 @@ namespace TBF.BenchControl.Sequences
} }
while (e.Contains(Event.Busy)); while (e.Contains(Event.Busy));
///
//------------------------------------------------------ /// Save to database and to 'summary results' logger
///
IList<Entities.TestResult> sortedResults = Utils.GetSortedTestResults(StateMachine.Procedure, results, 0); IList<Entities.TestResult> sortedResults = Utils.GetSortedTestResults(StateMachine.Procedure, results, 0);
foreach (var rslt in sortedResults) FluentCommon.SaveToDb(StateMachine.WtSession, rslt); foreach (var rslt in sortedResults)
{
FluentCommon.SaveToDb(StateMachine.WtSession, rslt);
summaryResults.Info(TestResult2CsvLine(rslt));
}
//-------------------------------- //--------------------------------
@@ -19,7 +19,7 @@ namespace TBF.BenchControl.Sequences
private static readonly ILog log = LogManager.GetLogger(typeof(SequenceBase)); private static readonly ILog log = LogManager.GetLogger(typeof(SequenceBase));
protected static readonly ILog processDataLogger = LogManager.GetLogger("ProcessData"); protected static readonly ILog processDataLogger = LogManager.GetLogger("ProcessData");
protected static readonly ILog allResults = LogManager.GetLogger("AllResults"); protected static readonly ILog allResults = LogManager.GetLogger("AllResults");
protected static readonly ILog summaryResults = LogManager.GetLogger("SummaryResults"); protected static readonly ILog summaryResults = LogManager.GetLogger("SummaryResults");
///------------------------------------------------------------ ///------------------------------------------------------------
/// Global static variables set only once. /// Global static variables set only once.
@@ -720,7 +720,7 @@ namespace TBF.BenchControl.Sequences
return data; return data;
} }
protected string TestResult2CsvLine(Entities.TestResult tstRslt, int currentRefPulses) protected string TestResult2CsvLine(Entities.TestResult tstRslt)
{ {
System.Text.StringBuilder sb = new System.Text.StringBuilder(); System.Text.StringBuilder sb = new System.Text.StringBuilder();
@@ -795,7 +795,7 @@ namespace TBF.BenchControl.Sequences
sb.Append(";"); sb.Append(tstRslt.TimeDivEnd3); /// Time Div End3 sb.Append(";"); sb.Append(tstRslt.TimeDivEnd3); /// Time Div End3
sb.Append(";"); sb.Append(tstRslt.TimeDivEnd4); /// Time Div End4 sb.Append(";"); sb.Append(tstRslt.TimeDivEnd4); /// Time Div End4
sb.Append(";"); sb.Append(tstRslt.TimeDivEnd5); /// Time Div End5 sb.Append(";"); sb.Append(tstRslt.TimeDivEnd5); /// Time Div End5
sb.Append(";"); sb.Append(currentRefPulses); /// Celkovy pocet et. pulzov skusky sb.Append(";"); sb.Append(tstRslt.PulsesMaster); /// Celkovy pocet et. pulzov skusky
sb.Append(";"); sb.Append(" "); /// - '' - pre druhy sb.Append(";"); sb.Append(" "); /// - '' - pre druhy
for (int i = 0; i < tstRslt.Meters.Count; i++) for (int i = 0; i < tstRslt.Meters.Count; i++)
{ {
@@ -323,7 +323,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(tstRslt)); Bridge.OnTestCompleted(this, new TestCompletedEventArgs(tstRslt));
/// Append the results to the CSV-file /// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(tstRslt, cBrd.EtPulses(0))); allResults.Info(TestResult2CsvLine(tstRslt));
stopTest: stopTest:
@@ -433,7 +433,7 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(tstRslt)); Bridge.OnTestCompleted(this, new TestCompletedEventArgs(tstRslt));
/// Append the results to the CSV-file /// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(tstRslt, cBrd.EtPulses(0))); allResults.Info(TestResult2CsvLine(tstRslt));
if (++repetitionNr <= test.Repeats) if (++repetitionNr <= test.Repeats)
@@ -627,7 +627,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
AddOrOverwriteResult(tstRslt); AddOrOverwriteResult(tstRslt);
/// Append the results to the CSV-file /// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(tstRslt, cBrd.EtPulses(0))); allResults.Info(TestResult2CsvLine(tstRslt));
if (++repetitionNr <= test.Repeats) if (++repetitionNr <= test.Repeats)
{ {
@@ -527,7 +527,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(tstRslt)); Bridge.OnTestCompleted(this, new TestCompletedEventArgs(tstRslt));
/// Append the results to the CSV-file /// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(tstRslt, cBrd.EtPulses(0))); allResults.Info(TestResult2CsvLine(tstRslt));
if (++repetitionNr <= test.Repeats) if (++repetitionNr <= test.Repeats)
@@ -274,7 +274,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(tstRslt)); Bridge.OnTestCompleted(this, new TestCompletedEventArgs(tstRslt));
/// Append the results to the CSV-file /// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(tstRslt, cBrd.EtPulses(0))); allResults.Info(TestResult2CsvLine(tstRslt));
if (++repetitionNr <= test.Repeats) if (++repetitionNr <= test.Repeats)
@@ -418,7 +418,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(tstRslt)); Bridge.OnTestCompleted(this, new TestCompletedEventArgs(tstRslt));
/// Append the results to the CSV-file /// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(tstRslt, cBrd.EtPulses(0))); allResults.Info(TestResult2CsvLine(tstRslt));
if (++repetitionNr <= test.Repeats) if (++repetitionNr <= test.Repeats)
@@ -407,7 +407,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(tstRslt)); Bridge.OnTestCompleted(this, new TestCompletedEventArgs(tstRslt));
/// Append the results to the CSV-file /// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(tstRslt, cBrd.EtPulses(0))); allResults.Info(TestResult2CsvLine(tstRslt));
if (++repetitionNr <= test.Repeats) if (++repetitionNr <= test.Repeats)