Commit 8330eb8
Update C# benchmark Program.cs to fix benchmark timing collection. (#4478)
Update benchmark timing collection code in RedisBenchmark to better use Stopwatch.
Changed use of Stopwatch.Start() to Stopwatch.Restart(). The Restart() method zeroes out the timer for each iteration. The prior code would accumulate time across all iterations.
Converted the time collection to use Stopwatch.Elapsed.TotalMilliseconds, as this provides a double value and is the proper value to use in this case.
Signed-off-by: L Joseph McGuinness <ljosephmcguinness@gmail.com>
Co-authored-by: Joseph Brinkman <joe.brinkman@improving.com>1 parent 280b910 commit 8330eb8
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
0 commit comments