Skip to content

Commit

Permalink
fix event id
Browse files Browse the repository at this point in the history
  • Loading branch information
kelindar committed Dec 26, 2022
1 parent 8cbf8f5 commit 708251d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func BenchmarkEvent(b *testing.B) {
b.Run(fmt.Sprintf("%dx%d", topics, subs), func(b *testing.B) {
var count atomic.Int64
for i := 0; i < subs; i++ {
for id := 0; id < topics; id++ {
for id := 10; id < 10+topics; id++ {
defer OnType(uint32(id), func(ev MyEvent3) {
count.Add(1)
})()
Expand All @@ -39,7 +39,7 @@ func BenchmarkEvent(b *testing.B) {
b.ReportAllocs()
b.ResetTimer()
for n := 0; n < b.N; n++ {
for id := 0; id < topics; id++ {
for id := 10; id < 10+topics; id++ {
Emit(MyEvent3{ID: id})
}
}
Expand Down

0 comments on commit 708251d

Please sign in to comment.