summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Doan <doanac@gmail.com>2012-02-01 14:51:11 -0600
committerAndy Doan <doanac@gmail.com>2012-02-01 14:51:11 -0600
commitcdd02422ba1c9363cd094beeb6f6953d746215a1 (patch)
tree7822ab6d41aa37d99b0063a900b3b1d8f4a086a5
parent6a028dd0ce7e73b463d2f375c32a9c4d13cbdf1f (diff)
downloadandroid_benchmark_views-cdd02422ba1c9363cd094beeb6f6953d746215a1.tar.gz
change main view to give historical snapshot
This changes the main page to show a historical view of linaro-4.6 performance for the last 6 months. It tricks out the report.html framework that already exists in order to produce the view
-rw-r--r--android_benchmark_views_app/templates/android_benchmark_views_app/index.html13
-rw-r--r--android_benchmark_views_app/templates/android_benchmark_views_app/report.html2
-rw-r--r--android_benchmark_views_app/views.py19
3 files changed, 26 insertions, 8 deletions
diff --git a/android_benchmark_views_app/templates/android_benchmark_views_app/index.html b/android_benchmark_views_app/templates/android_benchmark_views_app/index.html
index c9690b7..e138832 100644
--- a/android_benchmark_views_app/templates/android_benchmark_views_app/index.html
+++ b/android_benchmark_views_app/templates/android_benchmark_views_app/index.html
@@ -1,11 +1,6 @@
-{% extends "layouts/content.html" %}
+{% extends "android_benchmark_views_app/report.html" %}
-{% block extrahead %}
-{{ block.super }}
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}android_benchmark_views_app/css/bmarks.css"></style>
-{% endblock %}
-
-{% block content %}
+{% block sidebar %}
<h2>Reports</h2>
<ul>
{% for report in reports %}
@@ -13,3 +8,7 @@
{% endfor %}
</ul>
{% endblock %}
+
+{% block report_title %}
+<h2>Linaro GCC 4.6 Results Over Time</h2>
+{% endblock %}
diff --git a/android_benchmark_views_app/templates/android_benchmark_views_app/report.html b/android_benchmark_views_app/templates/android_benchmark_views_app/report.html
index 12d32b2..50228b3 100644
--- a/android_benchmark_views_app/templates/android_benchmark_views_app/report.html
+++ b/android_benchmark_views_app/templates/android_benchmark_views_app/report.html
@@ -90,7 +90,9 @@ function populate_table(test, tableid) {
{% endblock %}
{% block content %}
+ {% block report_title %}
<h2>Android Toolchain Benchmark Results for the {{report.series}} Engineering Cycle</h2>
+ {% endblock %}
{% for main_ta in runs.0.get_test_averages %}
<script type="text/javascript" charset="utf-8">
diff --git a/android_benchmark_views_app/views.py b/android_benchmark_views_app/views.py
index 47ed6b7..2d55868 100644
--- a/android_benchmark_views_app/views.py
+++ b/android_benchmark_views_app/views.py
@@ -37,10 +37,27 @@ from lava_server.bread_crumbs import (
parent=None
)
def index(request):
- reports = BenchmarkReport.objects.all().order_by('series')
+ reports = BenchmarkReport.objects.all().order_by('series').reverse()
+ history_reports = reports
+ if reports.count() > 6:
+ history_reports = reports[6:]
+
+ # fake out data so that we can compare GCC 4.6 performance
+ # over the last 6 months
+ report = BenchmarkReport()
+ runs = []
+ for r in history_reports:
+ run = BenchmarkRun()
+ run.report = report
+ run.label = r.series
+ b = BenchmarkRun.objects.filter(report=r, label='linaro-4.6')
+ run.bundle = b[0].bundle
+ runs.append(run)
+
return render_to_response(
"android_benchmark_views_app/index.html", {
'reports': reports,
+ 'runs': runs,
'bread_crumb_trail': BreadCrumbTrail.leading_to(index)
}, RequestContext(request))