diff options
Diffstat (limited to 'internal/benchmarks/micro/micro_test.go')
-rw-r--r-- | internal/benchmarks/micro/micro_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/benchmarks/micro/micro_test.go b/internal/benchmarks/micro/micro_test.go index dd967448..cbfb2449 100644 --- a/internal/benchmarks/micro/micro_test.go +++ b/internal/benchmarks/micro/micro_test.go @@ -67,6 +67,14 @@ func BenchmarkEmptyMessage(b *testing.B) { } }) }) + b.Run("New", func(b *testing.B) { + mt := (&emptypb.Empty{}).ProtoReflect().Type() + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + mt.New() + } + }) + }) } // BenchmarkRepeatedInt32 tests a message containing 500 non-packed repeated int32s. |