Skip to content

Commit

Permalink
remove benchmark code not backported to 8.16
Browse files Browse the repository at this point in the history
  • Loading branch information
mauri870 committed Jan 6, 2025
1 parent 9a2c875 commit 92b22de
Showing 1 changed file with 0 additions and 47 deletions.
47 changes: 0 additions & 47 deletions x-pack/filebeat/fbreceiver/receiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,50 +89,3 @@ found:
err = r.Shutdown(context.Background())
assert.NoError(t, err, "Error shutting down filebeatreceiver")
}
<<<<<<< HEAD
=======

func BenchmarkFactory(b *testing.B) {
tmpDir := b.TempDir()

cfg := &Config{
Beatconfig: map[string]interface{}{
"filebeat": map[string]interface{}{
"inputs": []map[string]interface{}{
{
"type": "benchmark",
"enabled": true,
"message": "test",
"count": 10,
},
},
},
"output": map[string]interface{}{
"otelconsumer": map[string]interface{}{},
},
"logging": map[string]interface{}{
"level": "debug",
"selectors": []string{
"*",
},
},
"path.home": tmpDir,
},
}

var zapLogs bytes.Buffer
core := zapcore.NewCore(
zapcore.NewJSONEncoder(zap.NewProductionEncoderConfig()),
zapcore.AddSync(&zapLogs),
zapcore.DebugLevel)

receiverSettings := receiver.Settings{}
receiverSettings.Logger = zap.New(core)

b.ResetTimer()
for i := 0; i < b.N; i++ {
_, err := NewFactory().CreateLogs(context.Background(), receiverSettings, cfg, nil)
require.NoError(b, err)
}
}
>>>>>>> 1430cfda7 (Fix Otel API change and update system test golden files to 2025 (#42199))

0 comments on commit 92b22de

Please sign in to comment.