Skip to content

Instantly share code, notes, and snippets.

@fitz123
Last active September 10, 2015 10:55
Show Gist options
  • Save fitz123/946375ad9a479c4d110b to your computer and use it in GitHub Desktop.
Save fitz123/946375ad9a479c4d110b to your computer and use it in GitHub Desktop.
Elastic | Easy way to measure new docs per second
# Do you tried to measure how many new docs appear in your ES by refreshing Kibana?
# Do you research how to measure ES performance and find nothing suitable for you?
# I found that approach usefull
while true; do \
count1=`curl -s -XGET 'http://localhost:9200/_count?q=tags:imported&filter_path=count' | egrep -o '[0-9]+'` && \
sleep 125 && \
count2=`curl -s -XGET 'http://localhost:9200/_count?q=tags:imported&filter_path=count' | egrep -o '[0-9]+'` && \
echo `date +%T` - $[ ($count2 - $count1)/125 ] docs/sec; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment