/// <exclude/> public void TestThread() { lock (lockValue) { HiPerfTimer timer = new HiPerfTimer(); string output = ""; timer.Start(); long count1 = ValidateEnumerate5(); double duration1 = timer.Duration; output = string.Format("{0:###,###,###,###} hands per second", count1 / duration1); FiveCardHandTypeLabel(output); timer.Start(); long count2 = InlineValidateEnumerate5(); double duration2 = timer.Duration; output = string.Format("{0:###,###,###,###} hands per second", count2 / duration2); FiveCardHandTypeInlineLabel(output); timer.Start(); long count3 = ValidateEnumerate7(); double duration3 = timer.Duration; output = string.Format("{0:###,###,###,###} hands per second", count3 / duration3); SevenCardHandTypeLabel(output); timer.Start(); long count4 = InlineValidateEnumerate7(); double duration4 = timer.Duration; output = string.Format("{0:###,###,###,###} hands per second", count4 / duration4); SevenCardHandTypeInlinedLabel(output); timer.Start(); count4 = FiveCardEvaluateBenchmark(); duration4 = timer.Duration; output = string.Format("{0:###,###,###,###} hands per second", count4 / duration4); FiveCardEvaluateLabel(output); timer.Start(); count4 = FiveCardEvaluateBenchmarkInline(); duration4 = timer.Duration; output = string.Format("{0:###,###,###,###} hands per second", count4 / duration4); FiveCardEvaluateInlinedLabel(output); timer.Start(); count4 = SevenCardEvaluateBenchmark(); duration4 = timer.Duration; output = string.Format("{0:###,###,###,###} hands per second", count4 / duration4); SevenCardEvaluateLabel(output); timer.Start(); count4 = SevenCardEvaluateInlinedBenchmark(); duration4 = timer.Duration; output = string.Format("{0:###,###,###,###} hands per second", count4 / duration4); SevenCardEvaluateInlinedLabel(output); } }
public void Start() { var timer = new HiPerfTimer(); _mapper.Initialize(); timer.Start(); for (int i = 0; i < 100000; i++) { _mapper.Map(); } timer.Stop(); Console.WriteLine("{0}: - {1} - Mapping time: \t{2}s", _mapper.Name, _mode, timer.Duration); }
public void Start() { var timer = new HiPerfTimer(); _mapper.Initialize(); _mapper.Map(); timer.Start(); for (int i = 0; i < 1000000; i++) { _mapper.Map(); } timer.Stop(); Console.WriteLine("{0}: - {1} - Mapping time: \t{2}s", _mapper.Name, _mode, timer.Duration); }
public void Start() { var timer = new HiPerfTimer(); _mapper.Initialize(); _mapper.Map(); timer.Start(); for (var i = 0; i < 1000000; i++) { _mapper.Map(); } timer.Stop(); Console.WriteLine($"{_mapper.Name}: - {_mode} - Mapping time: \t{timer.Duration}s"); }
public void Start() { var timer = new HiPerfTimer(); _mapper.Initialize(); _mapper.Map(); DataCollection.CommentMarkProfile(1, "Begin " + _mapper); timer.Start(); for (int i = 0; i < 1000000; i++) { _mapper.Map(); } timer.Stop(); DataCollection.CommentMarkProfile(1, "End " + _mapper); Console.WriteLine("{0}: - {1} - Mapping time: \t{2}s", _mapper.Name, _mode, timer.Duration); }