Commit 083c1550 authored by nkbai's avatar nkbai

cors test benchmark doesn't use b.N

parent 3daaaeb3
...@@ -225,8 +225,8 @@ func Benchmark_WithoutCORS(b *testing.B) { ...@@ -225,8 +225,8 @@ func Benchmark_WithoutCORS(b *testing.B) {
ctx.Output.SetStatus(500) ctx.Output.SetStatus(500)
}) })
b.ResetTimer() b.ResetTimer()
for i := 0; i < 100; i++ { r, _ := http.NewRequest("PUT", "/foo", nil)
r, _ := http.NewRequest("PUT", "/foo", nil) for i := 0; i < b.N; i++ {
handler.ServeHTTP(recorder, r) handler.ServeHTTP(recorder, r)
} }
} }
...@@ -246,8 +246,8 @@ func Benchmark_WithCORS(b *testing.B) { ...@@ -246,8 +246,8 @@ func Benchmark_WithCORS(b *testing.B) {
ctx.Output.SetStatus(500) ctx.Output.SetStatus(500)
}) })
b.ResetTimer() b.ResetTimer()
for i := 0; i < 100; i++ { r, _ := http.NewRequest("PUT", "/foo", nil)
r, _ := http.NewRequest("PUT", "/foo", nil) for i := 0; i < b.N; i++ {
handler.ServeHTTP(recorder, r) handler.ServeHTTP(recorder, r)
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment