Commit 69458bec authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

[doc] Add Memory benchmark to tuto

parent ca220174
......@@ -27,21 +27,43 @@ of the number of solutions obtained per unit of time.
..
import pandas as pd
df = pd.DataFrame({"Years of development and versions":["2016\nalpha", "2017\nv0.1.7", "2019\nv0.2", "2020 1st quarter\n(dev branch)"], "Solutions per hour":[0.33, 48, 180, 633]})
df = pd.DataFrame({
"Years of development and versions": ["2016\nalpha", "2017\nv0.1.7", "2019\nv0.2", "2020 1st quarter\n(dev branch)"],
"Solutions per hour": [0.33, 48, 180, 633],
"Max memory": [2, 1.8, 1.5, 1.1],
})
ax = df.plot.bar(
x="Years of development and versions",
y="Solutions per hour",
# title="Improved performance over the development years (log scale for y axis)",
logy=True, rot=0, ylim=(0.22, 1000), fontsize=8,
)
df.plot.bar(x="Years of development and versions", y="Max memory", ax=ax, color="C2")
for p in ax.patches:
ax.annotate(
round(p.get_height(), 2),
(p.get_x() + p.get_width()/2., p.get_height()),
ha='center', va='center', xytext=(0, 10), textcoords='offset points',
fontsize=8,
)
ax = df.plot.bar(
x="Years of development and versions",
logy=True,
ylim=(0.22, 1000), fontsize=8,
rot=0, secondary_y="Max memory",
)
ax.right_ax.set_ylim(0, 3)
# ax.set_ylim((0.22, 1000))
# ax.set_yscale('log')
ax.set_ylabel('Solutions/h')
ax.right_ax.set_ylabel('Go')
def annotate_patches(axe):
for p in axe.patches:
axe.annotate(
round(p.get_height(), 2),
(p.get_x() + p.get_width()/2., p.get_height()),
ha='center', va='center', xytext=(0, 10), textcoords='offset points',
fontsize=8,
)
annotate_patches(ax)
annotate_patches(ax.right_ax)
ax.get_figure().savefig("perf_overview.svg")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment