From 708251dda1a8600cd968710565e0e3a27967cbc5 Mon Sep 17 00:00:00 2001 From: Roman Atachiants Date: Mon, 26 Dec 2022 15:40:41 +0400 Subject: [PATCH] fix event id --- default_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/default_test.go b/default_test.go index 31389ec..4fe5502 100644 --- a/default_test.go +++ b/default_test.go @@ -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) })() @@ -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}) } }