コード例 #1
0
 private IEnumerable<Result> GetResults(string sql, PlanDefinition testPlan)
 {
     var sqlConnection = new SqlConnection(connectionString);
     sqlConnection.Open();
     var enumerable = sqlConnection.Query<Result>(sql, new {TestPlan = testPlan.Id} );
     sqlConnection.Close();
     return enumerable;
 }
コード例 #2
0
        private GraphViewModel GetResultsFor(PlanDefinition definition)
        {
            var dailyResults = resultsRepository.GetDailyResultsForPerformanceTest(definition);
            var heartBeatResults = resultsRepository.GetHeartBeatResultsForPerformanceTest(definition);

            var dailyLines = lineMapper.MapToLines(dailyResults);
            var heartBeatLines = lineMapper.MapToLines(heartBeatResults);

            return new GraphViewModel(definition.Name, dailyLines, heartBeatLines);
        }
コード例 #3
0
 public IEnumerable<Result> GetHeartBeatResultsForPerformanceTest(PlanDefinition testPlan)
 {
     return GetResults(sqlForHeartBeat, testPlan);
 }
コード例 #4
0
 public IEnumerable<Result> GetDailyResultsForPerformanceTest(PlanDefinition testPlan)
 {
     return GetResults(sqlForDailyResults, testPlan);
 }