From 5518fe802d9836d26b00dc0ea415916ae9e893e5 Mon Sep 17 00:00:00 2001 From: Vadim Alekseev Date: Mon, 31 Jul 2023 19:22:28 +0300 Subject: [PATCH] Remove unused bench --- plugin/input/journalctl/journalctl_test.go | 28 ---------------------- 1 file changed, 28 deletions(-) diff --git a/plugin/input/journalctl/journalctl_test.go b/plugin/input/journalctl/journalctl_test.go index a25882337..923d157af 100644 --- a/plugin/input/journalctl/journalctl_test.go +++ b/plugin/input/journalctl/journalctl_test.go @@ -3,19 +3,16 @@ package journalctl import ( - "path" "path/filepath" "strings" "sync" "testing" - "time" "github.com/ozontech/file.d/cfg" "github.com/ozontech/file.d/pipeline" "github.com/ozontech/file.d/plugin/output/devnull" "github.com/ozontech/file.d/test" "github.com/stretchr/testify/assert" - insaneJSON "github.com/vitkovskii/insane-json" ) func setInput(p *pipeline.Pipeline, config *Config) { @@ -110,28 +107,3 @@ func TestOffsets(t *testing.T) { assert.Equal(t, 1, cnt) } } - -func BenchmarkName(b *testing.B) { - p := Plugin{config: &Config{ - OffsetsFile: path.Join(b.TempDir(), "offsets.yaml"), - }} - p.commiter = NewSyncCommiter(p.sync) - - event := &pipeline.Event{Root: insaneJSON.Spawn()} - defer insaneJSON.Release(event.Root) - - p.config.PersistenceMode_ = persistenceModeSync - b.Run("sync", func(b *testing.B) { - for i := 0; i < b.N; i++ { - p.Commit(event) - } - }) - - p.commiter = NewAsyncCommiter(NewDebouncer(time.Second), p.sync) - p.config.PersistenceMode_ = persistenceModeAsync - b.Run("async", func(b *testing.B) { - for i := 0; i < b.N; i++ { - p.Commit(event) - } - }) -}