Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.

Commit 6514a9e

Browse files
authored
update benchmarks (#10)
1 parent ccfd7f3 commit 6514a9e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

encoder_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ package sse
4040
import (
4141
"bytes"
4242
"testing"
43+
"time"
4344

4445
"github.com/cloudwego/hertz/pkg/common/json"
4546

@@ -249,6 +250,7 @@ func BenchmarkSimpleSSE(b *testing.B) {
249250
b.ResetTimer()
250251
b.ReportAllocs()
251252
for i := 0; i < b.N; i++ {
253+
time.Sleep(time.Second)
252254
_ = Encode(buf, &Event{
253255
Event: "new_message",
254256
Data: []byte("hi! how are you? I am fine. this is a long stupid message!!!"),

0 commit comments

Comments
 (0)