mirror of
https://github.com/Hopiu/django-cachalot.git
synced 2026-05-15 16:13:10 +00:00
Generates a grid on the benchmark results.
This commit is contained in:
parent
3e7a9a0808
commit
f597a72ee1
1 changed files with 7 additions and 5 deletions
12
benchmark.py
12
benchmark.py
|
|
@ -231,19 +231,21 @@ class Benchmark(object):
|
|||
kind='barh', xerr=self.errors[v],
|
||||
xlim=self.xlim, figsize=(15, 15), subplots=True, layout=(6, 2),
|
||||
sharey=True, legend=False)
|
||||
plt.gca().invert_yaxis()
|
||||
for row in axes:
|
||||
for ax in row:
|
||||
ax.invert_yaxis()
|
||||
ax.xaxis.grid(True)
|
||||
ax.set_ylabel('')
|
||||
ax.set_xlabel('Time (s)')
|
||||
plt.savefig(os.path.join(RESULTS_PATH, '%s_%s.svg' % (param, v)))
|
||||
|
||||
def plot_general(self, param):
|
||||
plt.figure()
|
||||
self.means.plot(kind='barh', xerr=self.errors, xlim=self.xlim)
|
||||
plt.gca().invert_yaxis()
|
||||
plt.ylabel('')
|
||||
plt.xlabel('Time (s)')
|
||||
ax = self.means.plot(kind='barh', xerr=self.errors, xlim=self.xlim)
|
||||
ax.invert_yaxis()
|
||||
ax.xaxis.grid(True)
|
||||
ax.set_ylabel('')
|
||||
ax.set_xlabel('Time (s)')
|
||||
plt.savefig(os.path.join(RESULTS_PATH, '%s.svg' % param))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue