Skip to content

Commit

Permalink
fixes based on review
Browse files Browse the repository at this point in the history
  • Loading branch information
leehinman committed Mar 22, 2024
1 parent 2d8d120 commit 436351a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
3 changes: 0 additions & 3 deletions libbeat/outputs/discard/discard.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ func (out *discardOutput) Publish(_ context.Context, batch publisher.Batch) erro
st := out.observer
events := batch.Events()
st.NewBatch(len(events))
for range events {
st.WriteError(nil)
}
st.Acked(len(events))
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions libbeat/outputs/discard/docs/discard.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
The Discard output throws away data.

WARNING: The Discard output should be used only for development or
debugging issues. Data is lost.
debugging issues. Data is lost.

This can be useful if you want to work on your input configuration
without needing to configure an output. It can also be useful to test
without needing to configure an output. It can also be useful to test
how changes in input and processor configuration affect performance.

Example configuration:
Expand Down
8 changes: 4 additions & 4 deletions x-pack/filebeat/docs/inputs/input-benchmark.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

beta[]

The Benchmark input generates generic events and sends them to the output. This can be useful when you want to benchmark the difference between outputs or output settings.
The Benchmark input generates generic events and sends them to the output. This can be useful when you want to benchmark the difference between outputs or output settings.

Example configurations:

Expand Down Expand Up @@ -60,17 +60,17 @@ This is the value that will be in the `message` field of the json document.
[float]
==== `threads`

This is the number of go routines that will be started generating messages. Normally 1 thread can saturate an output but if necessary this can be increased.
This is the number of goroutines that will be started generating messages. Normally 1 thread can saturate an output but if necessary this can be increased.

[float]
==== `count`

This is the number of messages to send. 0 represents sending infinite messages. This is mutually exclusive with the `eps` option.
This is the number of messages to send. 0 represents sending infinite messages. This is mutually exclusive with the `eps` option.

[float]
==== `eps`

This is the number of events per second to send. 0 represents sending as quickly as possible. This is mutually exclusive with the `count` option.
This is the number of events per second to send. 0 represents sending as quickly as possible. This is mutually exclusive with the `count` option.


[float]
Expand Down
2 changes: 1 addition & 1 deletion x-pack/filebeat/input/benchmark/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func runThread(ctx v2.Context, publisher stateless.Publisher, thread uint8, cfg
default:
publishEvt(publisher, cfg.Message, line, name, thread, metrics)
line++
if (line % cfg.Count) == 0 {
if line == cfg.Count {
return
}
}
Expand Down

0 comments on commit 436351a

Please sign in to comment.