benchmark silo added
[c11concurrency-benchmarks.git] / silo / benchmarks / results / make_graphs.py
1 #!/usr/bin/env python
2
3 import matplotlib
4 import pylab as plt
5 import numpy as np
6
7 import os
8 import sys
9
10 if __name__ == '__main__':
11   files = sys.argv[1:]
12   for f in files:
13     execfile(f)
14     for (db, res) in zip(DBS[:-1], RESULTS):
15       #plt.plot(THREADS, np.log(np.array(res)))
16       #plt.plot(THREADS, res)
17       #plt.plot(THREADS, np.array(res)/np.array(THREADS)) # per-core
18       plt.plot(THREADS, np.log10(np.array(res)/np.array(THREADS))) # per-core
19     plt.xlabel('num threads')
20     #plt.ylabel('ops/sec')
21     #plt.ylabel('ops/sec/core')
22     plt.ylabel('$log_{10}$ ops/sec/thread')
23     plt.legend(DBS[:-1], loc='right')
24     plt.title('YCSB workload 95/4/1 read/rmw/write 10M keys')
25     plt.savefig('.'.join(os.path.basename(f).split('.')[:-1] + ['pdf']))
26     plt.close()