Beispiel #1
0
 public void OnMetric(TestId testId, PerformanceMetric metric)
 {
     if (m_collectingMetrics)
     {
         m_writer.WriteLine(MetricsFileUtil.ToLine(testId, m_startTime, metric));
     }
 }
 public void OnMetric(TestId testId, PerformanceMetric metric)
 {
     if (m_collectingMetrics)
     {
         m_writer.WriteLine(MetricsFileUtil.ToLine(testId, m_startTime, metric));
     }
 }
 private TestId GetTestId()
 {
     if (m_testId == null)
     {
         m_testId = new TestId(
             machineId:m_machineId,
             agentId: m_agentId,
             threadId: Thread.CurrentThread.ManagedThreadId.ToString()
             );
     }
     return m_testId;
 }
Beispiel #4
0
 private TestId GetTestId()
 {
     if (m_testId == null)
     {
         m_testId = new TestId(
             machineId: m_machineId,
             agentId: m_agentId,
             threadId: Thread.CurrentThread.ManagedThreadId.ToString()
             );
     }
     return(m_testId);
 }
Beispiel #5
0
 static internal String ToLine(TestId testId, DateTime testRunStartTime, PerformanceMetric metric)
 {
     return(String.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9}",
                          testId.MachineId,
                          testId.AgentId,
                          testId.ThreadId,
                          (metric.Timestamp - testRunStartTime).TotalMilliseconds,
                          metric.CallId ?? "",
                          metric.Name,
                          metric.Timestamp.ToString(DateFormat),
                          metric.Value,
                          metric.IsError?"t":"f",
                          metric.Data ?? ""
                          ));
 }
 public void OnError(TestId testId, Exception testException)
 {
     Log.Warn("Test Error in : " + testId + ", exception : " + testException);
 }
 internal static string ToLine(TestId testId, DateTime testRunStartTime, PerformanceMetric metric)
 {
     return string.Format(
         "{0},{1},{2},{3},{4},{5},{6},{7},{8},{9}",
         testId.MachineId, 
         testId.AgentId, 
         testId.ThreadId,
         (metric.Timestamp - testRunStartTime).TotalMilliseconds,
         metric.CallId ?? string.Empty, 
         metric.Name,  
         metric.Timestamp.ToString(DateFormat),                                         
         metric.Value, 
         metric.IsError ? "t" : "f",
         metric.Data ?? string.Empty);
 }
 public void OnError(TestId testId, Exception testException)
 {
     Console.WriteLine(testId + ", Exception:" + testException);
 }
 public void OnMetric(TestId testId, PerformanceMetric metric)
 {
     Console.WriteLine(testId + ", " + metric);
 }
Beispiel #10
0
 public void OnError(TestId testId, Exception testException)
 {
     Log.Warn("Test Error in : " + testId + ", exception : " + testException);
 }