[llvm-commits] [zorg] r150115 - in /zorg/trunk/lnt/lnt/server/ui: templates/v4_graph.html views.py
Daniel Dunbar
daniel at zuster.org
Wed Feb 8 15:33:46 PST 2012
Author: ddunbar
Date: Wed Feb 8 17:33:46 2012
New Revision: 150115
URL: http://llvm.org/viewvc/llvm-project?rev=150115&view=rev
Log:
[lnt/v0.4] lnt.server.ui: Add an option to normalize graph by median. Useful for
plotting different tests side by side.
Modified:
zorg/trunk/lnt/lnt/server/ui/templates/v4_graph.html
zorg/trunk/lnt/lnt/server/ui/views.py
Modified: zorg/trunk/lnt/lnt/server/ui/templates/v4_graph.html
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/ui/templates/v4_graph.html?rev=150115&r1=150114&r2=150115&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/ui/templates/v4_graph.html (original)
+++ zorg/trunk/lnt/lnt/server/ui/templates/v4_graph.html Wed Feb 8 17:33:46 2012
@@ -65,6 +65,10 @@
<input type="checkbox" name="show_all_points" value="yes" {{
'checked' if options.show_all_points}}><br>
+<b>Normalize By Median:</b>
+<input type="checkbox" name="normalize_by_median" value="yes" {{
+ 'checked' if options.normalize_by_median}}><br>
+
{# Add all the hidden fields. #}
{% for name,value in request.args.items() %}
{% if name.startswith('test.') %}
Modified: zorg/trunk/lnt/lnt/server/ui/views.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/ui/views.py?rev=150115&r1=150114&r2=150115&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/ui/views.py (original)
+++ zorg/trunk/lnt/lnt/server/ui/views.py Wed Feb 8 17:33:46 2012
@@ -945,6 +945,8 @@
request.args.get('show_linear_regression'))
options['show_failures'] = show_failures = bool(
request.args.get('show_failures'))
+ options['normalize_by_median'] = normalize_by_median = bool(
+ request.args.get('normalize_by_median'))
# Load the graph parameters.
graph_tests = []
@@ -1033,7 +1035,13 @@
errorbar_data = []
points_data = []
pts = []
- for x,values in data:
+ if normalize_by_median:
+ normalize_by = 1.0/stats.median([min(values)
+ for _,values in data])
+ else:
+ normalize_by = 1.0
+ for x,orig_values in data:
+ values = [v*normalize_by for v in orig_values]
min_value = min(values)
pts.append((x, min_value))
More information about the llvm-commits
mailing list