mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-02 11:22:41 +01:00
Add an ipython notebook exporter results_processor
This commit is contained in:
60
wlauto/result_processors/ipynb_exporter/template.ipynb
Normal file
60
wlauto/result_processors/ipynb_exporter/template.ipynb
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"metadata": {
|
||||
"name": ""
|
||||
},
|
||||
"nbformat": 3,
|
||||
"nbformat_minor": 0,
|
||||
"worksheets": [
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"%pylab inline"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"prompt_number": 1
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"results = {",
|
||||
{% for ir in result.iteration_results -%}
|
||||
{% for metric in ir.metrics -%}
|
||||
{% if metric.name in ir.workload.summary_metrics -%}
|
||||
"\"{{ ir.spec.label }}_{{ ir.id }}_{{ ir.iteration }}_{{ metric.name }}\": {{ metric.value }}, ",
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- endfor %}
|
||||
"}\n",
|
||||
"width = 0.7\n",
|
||||
"ind = np.arange(len(results))"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"prompt_number": 2
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"fig, ax = plt.subplots()\n",
|
||||
"ax.bar(ind, results.values(), width)\n",
|
||||
"ax.set_xticks(ind + width/2)\n",
|
||||
"_ = ax.set_xticklabels(results.keys())"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"prompt_number": 3
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user