Skip to content

Instantly share code, notes, and snippets.

@maguec
Created July 6, 2021 20:26
Show Gist options
  • Save maguec/dd5a66ed245a1315bdf3d2212a839091 to your computer and use it in GitHub Desktop.
Save maguec/dd5a66ed245a1315bdf3d2212a839091 to your computer and use it in GitHub Desktop.
Memtier-analysis.py
#!/usr/bin/env python
import json
import glob
print ("#{:<4} {:<4} {:<15}".format("X: clients", "Y: threads", "Z: Ops/sec"))
for j in glob.glob('*.json'):
f = open(j)
try:
data = json.load(f)
print ("{:<4} {:<4} {:<15}".format(
data['configuration']['clients'],
data['configuration']['threads'],
data['ALL STATS']['Totals']['Ops/sec'],
))
except:
f.close()
pass
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment