예제 #1
0
        public static string AnnounceWorst()
        {
            if (Profiler.expectedTimes.Count == 0)
            {
                return("Nothing profiled.");
            }

            string worst = Profiler.WorstCode();

            return("Worst Code: " + worst + ": " + Profiler.numExecuted[worst] + "x " + ((int)Profiler.AverageExpected(worst)) + " expected, " + ((int)Profiler.AverageTotal(worst)) + " (" + ((int)Profiler.AverageSelf(worst)) + ") actual");
        }
예제 #2
0
        public static string AnnounceEach()
        {
            StringBuilder result = new StringBuilder();

            foreach (KeyValuePair <string, double> kvp in expectedTimes)
            {
                result.Append(kvp.Key + ": " + Profiler.numExecuted[kvp.Key] + "x " + ((int)Profiler.AverageExpected(kvp.Key)) + " expected, " + ((int)Profiler.AverageTotal(kvp.Key)) + " (" + ((int)Profiler.AverageSelf(kvp.Key)) + ") actual: " + ((double)totalTimes[kvp.Key]) + "\n");
            }

            return(result.ToString());
        }
예제 #3
0
        public static string AnnounceWorst()
        {
            string worst = Profiler.WorstCode();

            return("Worst Code: " + worst + ": " + Profiler.numExecuted[worst] + "x " + ((int)Profiler.AverageExpected(worst)) + " expected, " + ((int)Profiler.AverageTotal(worst)) + " (" + ((int)Profiler.AverageSelf(worst)) + ") actual");
        }