Skip to content

Commit

Permalink
update benchmarks (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skyenought authored Nov 20, 2023
1 parent ccfd7f3 commit 6514a9e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions encoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ package sse
import (
"bytes"
"testing"
"time"

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

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

0 comments on commit 6514a9e

Please sign in to comment.