Beispiel #1
0
        public Dictionary <string, List <double> > CalculateAvarages()
        {
            Dictionary <string, List <double> > ret = new Dictionary <string, List <double> >();

            foreach (var kvp in BenchmarkSums)
            {
                string        algo_id = kvp.Key;
                SpeedSumCount ssc     = kvp.Value;
                ret[algo_id] = new List <double> {
                    ssc.GetAvarage(), ssc.GetSecondaryAverage()
                };
            }
            return(ret);
        }
Beispiel #2
0
 public void AddAlgorithms(List <Algorithm> algos)
 {
     foreach (var algo in algos)
     {
         var algo_id = algo.AlgorithmStringID;
         if (BenchmarkSums.ContainsKey(algo_id) == false)
         {
             var ssc = new SpeedSumCount();
             ssc.count              = 1;
             ssc.speed              = algo.BenchmarkSpeed;
             ssc.secondarySpeed     = algo.SecondaryBenchmarkSpeed;
             BenchmarkSums[algo_id] = ssc;
         }
         else
         {
             BenchmarkSums[algo_id].count++;
             BenchmarkSums[algo_id].speed          += algo.BenchmarkSpeed;
             BenchmarkSums[algo_id].secondarySpeed += algo.SecondaryBenchmarkSpeed;
         }
     }
 }