This is code used to benchmark throughput using the kafka-pixy kafka client.
curl -L https://github.com/mailgun/kafka-pixy/releases/download/v0.10.1/kafka-pixy-v0.10.1-linux-amd64.tar.gz | tar xz
cd kafka-pixy-v0.10.1-linux-amd64
./kafka-pixy --kafkaPeers "localhost:9092", --zookeeperPeers "localhost:2181"
node server.js
You may need to change the path value in the opts hash if you want a consumer group that isnt called bar or a topic that isnt observations.json.
Start time:1453933649.864
Processed 15052 observations
TPS: 752.5623746085273
End time: 1453933669.865
Duration: 20.000999927520752
Start time:1453933718.617
Processed 15252 observations
TPS: 762.5237531513997
End time: 1453933738.619
Duration: 20.001999855041504
Start time:1453933863.309
Processed 15020 observations
TPS: 750.9249040005247
End time: 1453933883.311