Skip to content

Commit 84c1d2b

Browse files
authored
Fix BenchmarkDistributor_Push benchmark (#6309)
Signed-off-by: SungJin1212 <[email protected]>
1 parent e3b4ef8 commit 84c1d2b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/distributor/distributor_test.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -2209,7 +2209,7 @@ func BenchmarkDistributor_Push(b *testing.B) {
22092209
require.NoError(b, err)
22102210

22112211
// Start the distributor.
2212-
distributor, err := New(distributorCfg, clientConfig, overrides, ingestersRing, true, nil, log.NewNopLogger())
2212+
distributor, err := New(distributorCfg, clientConfig, overrides, ingestersRing, true, prometheus.NewRegistry(), log.NewNopLogger())
22132213
require.NoError(b, err)
22142214
require.NoError(b, services.StartAndAwaitRunning(context.Background(), distributor))
22152215

@@ -3315,6 +3315,10 @@ func (i *noopIngester) Close() error {
33153315
return nil
33163316
}
33173317

3318+
func (i *noopIngester) PushPreAlloc(ctx context.Context, in *cortexpb.PreallocWriteRequest, opts ...grpc.CallOption) (*cortexpb.WriteResponse, error) {
3319+
return nil, nil
3320+
}
3321+
33183322
func (i *noopIngester) Push(ctx context.Context, req *cortexpb.WriteRequest, opts ...grpc.CallOption) (*cortexpb.WriteResponse, error) {
33193323
return nil, nil
33203324
}

0 commit comments

Comments
 (0)