From 539ce65faf3c3b24c02c78e8e3e38552a8549e3a Mon Sep 17 00:00:00 2001 From: a <a@tuxpa.in> Date: Sat, 28 Oct 2023 15:57:21 -0500 Subject: [PATCH] ok --- benchmark/suite_test.go | 16 ++++++++-------- pkg/server/responsewriter.go | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/benchmark/suite_test.go b/benchmark/suite_test.go index 91e6423..01a3389 100644 --- a/benchmark/suite_test.go +++ b/benchmark/suite_test.go @@ -22,11 +22,9 @@ func TestBenchmarkSuite(t *testing.T) { ctx := context.Background() makeTest("SingleClient", func(t *testing.T, server *server.Server, client codec.Conn) { - for i := 0; i < 10; i++ { - err := client.Do(ctx, nil, "test_ping", nil) - if err != nil { - t.Error(err) - } + err := client.Do(ctx, nil, "test_ping", nil) + if err != nil { + t.Error(err) } }) } @@ -41,9 +39,11 @@ func runBenchmarkSuite(b *testing.B, sm jrpctest.ServerMaker) { } makeBench("SingleClient", func(b *testing.B, server *server.Server, client codec.Conn) { for i := 0; i < b.N; i++ { - err := client.Do(ctx, nil, "test_ping", nil) - if err != nil { - panic(err) + for j := 0; j < 100; j++ { + err := client.Do(ctx, nil, "test_ping", nil) + if err != nil { + panic(err) + } } } }) diff --git a/pkg/server/responsewriter.go b/pkg/server/responsewriter.go index a25fbbd..d39f7f3 100644 --- a/pkg/server/responsewriter.go +++ b/pkg/server/responsewriter.go @@ -13,7 +13,7 @@ import ( ) // 16mb... should be more than enough for any batch. -// you shouldn't be batching more than this +// you shouldn't be batching more than this. really, you shouldn't be using batching at all. // TODO: make this configurable const maxBatchSizeBytes = 1024 * 1024 * 1024 * 16 -- GitLab