Skip to content

Commit a52f0f9

Browse files
committed
accurate benchmark measurements
1 parent 2f31914 commit a52f0f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ctx_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,9 +1421,9 @@ func Benchmark_Ctx_Fresh_LastModified(b *testing.B) {
14211421
app := New()
14221422
c := app.AcquireCtx(&fasthttp.RequestCtx{})
14231423

1424+
c.Response().Header.Set(HeaderLastModified, "Wed, 21 Oct 2015 07:28:00 GMT")
1425+
c.Request().Header.Set(HeaderIfModifiedSince, "Wed, 21 Oct 2015 07:28:00 GMT")
14241426
for n := 0; n < b.N; n++ {
1425-
c.Response().Header.Set(HeaderLastModified, "Wed, 21 Oct 2015 07:28:00 GMT")
1426-
c.Request().Header.Set(HeaderIfModifiedSince, "Wed, 21 Oct 2015 07:28:00 GMT")
14271427
c.Fresh()
14281428
}
14291429
}

0 commit comments

Comments
 (0)