Skip to content

Instantly share code, notes, and snippets.

@radu-gheorghe
Created November 14, 2012 13:51
Show Gist options
  • Save radu-gheorghe/4072200 to your computer and use it in GitHub Desktop.
Save radu-gheorghe/4072200 to your computer and use it in GitHub Desktop.
simple ES performance test
$ cat inserter.py
import pyes
import sys
conn = pyes.ES('127.0.0.1:9200', bulk_size=int(sys.argv[2]))
for i in range(int(sys.argv[1])):
conn.index({"name":"Joe Tester", "parsedtext":"Joe Testere nice guy", "uuid":"11111", "position":1}, "test-index", "test-type", bulk=True)
$ time python inserter.py 1000 1
real 0m1.957s
user 0m1.064s
sys 0m0.132s
=> 500/s
$ time python inserter.py 10000 10
real 0m4.041s
user 0m2.272s
sys 0m0.080s
=> 2500/s
$ time python inserter.py 100000 100
real 0m20.064s
user 0m9.257s
sys 0m0.072s
=> 5000/s
$ time python inserter.py 100000 1000
real 0m14.652s
user 0m6.804s
sys 0m0.060s
=> 6500/s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment