[
https://issues.apache.org/jira/browse/KAFKA-7289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16580792#comment-16580792
]
Attila Sasvari commented on KAFKA-7289:
---------------------------------------
- I will start the KIP soon. It might be enough to deal with CSV in the first
run.
- I have started to work on a POC that allows ProducerPerformance to print out
final results to an output file in CSV format:
https://github.com/asasvari/kafka/commit/82bbff649c5afb2c30f56960172319d2c380fbcd.
It will be probably a subtask of this JIRA. It uses Apache Commons CSV.
{{--print-metrics}} is not handled (metrics are not written to the output file
of the final results - could be handled in KAFKA-1939).
{code}
$ bin/kafka-run-class.sh org.apache.kafka.tools.ProducerPerformance
...
--output-with-header Print out final results to output file with headers.
(default: false)
--output-type OUTPUT-TYPE
Format type of the output file. By default it is CSV.
(default: csv)
--output-path OUTPUT-PATH
Write final results to the file OUTPUT-PATH.
$ bin/kafka-run-class.sh org.apache.kafka.tools.ProducerPerformance --topic
TOPIC --num-records 1 --throughput -1 --record-size 100 --producer-props
bootstrap.servers=localhost:9092 --output-path producer_stats.csv
--output-with-header
$ cat producer_stats.csv
records sent,records/sec,MB/sec,ms avg latency,ms max latency,ms 50th,ms
95th,ms 99th,ms 99.9th
1,6.7114093959731544,6.400498767827181E-4,142.0,142.0,142,142,142,142
{code}
> Performance tools should allow user to specify output type
> ----------------------------------------------------------
>
> Key: KAFKA-7289
> URL: https://issues.apache.org/jira/browse/KAFKA-7289
> Project: Kafka
> Issue Type: Improvement
> Components: tools
> Affects Versions: 2.0.0
> Reporter: Attila Sasvari
> Assignee: Attila Sasvari
> Priority: Major
>
> Currently, org.apache.kafka.tools.ProducerPerformance and
> kafka.tools.ConsumerPerformance do not provide command line options to
> specify output type(s).
> Sample output of ProducerPerformance is as follows:
> {code}
> 10000000 records sent, 48107.452807 records/sec (9.18 MB/sec), 3284.34 ms avg
> latency, 3858.00 ms max latency, 3313 ms 50th, 3546 ms 95th, 3689 ms 99th,
> 3842 ms 99.9th.
> {code}
> It would be, however, nice to allow users to generate performance reports in
> a machine-readable format (such as CSV and JSON). This way, performance
> results could be easily processed by external applications (e.g. displayed in
> charts).
> It will probably require a KIP.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)