{% set nosidebar = True %} {% import "utils.html" as utils %} {% set db = request.get_db() %} {% extends "layout.html" %} {% set components = [(testsuite_name, v4_url_for(".v4_recent_activity"))] %} {% block title %}Regression Triage{% endblock %} {% block head %} {% endblock %} {% block javascript %} var g = {} {% set api_graph = "api/db_default/v4/" + testsuite_name + "/graph"%} var changes = [ {% for form_change in form.field_changes%} {% set fc = changes[loop.index -1] %} {% set fc_ri_field_index = ts.get_field_index(fc.ri.field) %} {"url": "/{{api_graph}}/{{ fc.ri.machine.id}}/{{fc.ri.test.id}}/{{fc_ri_field_index}}", "start": "{{fc.ri.start_order.as_ordered_string()}}", "end": "{{fc.ri.end_order.as_ordered_string()}}" }, {% endfor %} ]; /* Bind events to the zoom bar buttons, so that * the zoom buttons work, then position them * over top of the main graph. */ function bind_zoom_bar(my_plot) { $('#out').click(function (e) { e.preventDefault(); my_plot.zoomOut(); }); $('#in').click(function (e) { e.preventDefault(); my_plot.zoom(); }); // Now move the bottons onto the graph. $('#zoombar').css('position', 'relative'); $('#zoombar').css('left', '40px'); $('#zoombar').css('top', '-235px'); } $('#normalize').click(function (e) { normalize = !normalize; alert(normalize); update_graph(); }); function init(data, start_highlight, end_highlight) { // Set up the primary graph. var graph = $("#graph"); var graph_plots = data; var line_width = 1; if (data.length > 0 && data[0]['data'].length < 50) { line_width = 2; } var graph_options = { series : { lines : { lineWidth : line_width }, shadowSize : 0 }, highlight : { range: {"end": [end_highlight], "start": [start_highlight]}, alpha: "0.1", stroke: false, }, zoom : { interactive : false }, pan : { interactive : true, frameRate: 60 }, grid : { hoverable : true } }; var main_plot = $.plot("#graph", graph_plots, graph_options); // Add tooltips. $("#graph").bind("plothover", function(e,p,i) { update_tooltip(e, p, i, show_tooltip, graph_plots); }); bind_zoom_bar(main_plot); } // Show our overlay tooltip. g.current_tip_point = null; function show_tooltip(x, y, item, pos, graph_data) { // Given the event handler item, get the graph metadata. function extract_metadata(item, graph_data) { var index = item.dataIndex; var series_index = item.seriesIndex; // Graph data is formatted as [x, y, meta_data]. var meta_data = item.series.data[series_index][2]; return meta_data; } var data = item.datapoint; var meta_data = extract_metadata(item, graph_data); var tip_body = '
'; if ("test_name" in meta_data) { tip_body += "Test: " + meta_data.test_name + "
"; } if ("label" in meta_data) { tip_body += "Revision: " + meta_data.label + "
"; } tip_body += "Value: " + data[1].toFixed(4) + "
"; if ("date" in meta_data) { tip_body += "Date: " + meta_data.date; } tip_body += "
"; var tooltip_div = $(tip_body).css( { position: 'absolute', display: 'none', top: y + 5, left: x + 5, border: '1px solid #fdd', padding: '2px', 'background-color': '#fee', opacity: 0.80 }).appendTo("body").fadeIn(200); // Now make sure the tool tip is on the graph canvas. var tt_position = tooltip_div.position(); var tt_offset = tooltip_div.offset(); var graph_div = $("#graph"); var graph_position = graph_div.position(); // The right edge of the graph. var max_width = graph_position.left + graph_div.width(); // The right edge of the tool tip. var tt_right = tt_position.left + tooltip_div.width(); if (tt_right > max_width) { var diff = tt_right - max_width var GRAPH_BORDER = 10; var VISUAL_APPEAL = 10; tooltip_div.css({'left' : tt_position.left - diff - GRAPH_BORDER - VISUAL_APPEAL}); } } // Event handler function to update the tooltop. function update_tooltip(event, pos, item, show_fn, graph_data) { if (!item) { $("#tooltip").remove(); g.current_tip_point = null; return; } if (!g.current_tip_point || (g.current_tip_point[0] != item.datapoint[0] || g.current_tip_point[1] != item.datapoint[1])) { $("#tooltip").remove(); g.current_tip_point = item.datapoint; show_fn(pos.pageX, pos.pageY, item, pos, graph_data); } } {% endblock %} {% block body %}

Recent Changes

Data: More Less


{{ form.hidden_tag() }} {% set graph_base=v4_url_for('.v4_graph') %} {# Show the active submissions. #} {% for form_change in form.field_changes%} {% set fc = changes[loop.index -1] %} {% set fc_ri_field_index = ts.get_field_index(fc.ri.field) %} {% set graph_base=v4_url_for('.v4_graph', highlight_run=fc.run.id) %} {{ utils.get_regression_cell_value(fc.cr, analysis)}} {{ utils.get_regression_cell_value(fc.latest_cr, analysis)}} {% endfor %}
X Machine Metric Test Good, Bad OldNew Δ Now Curernt Age
{{ form_change }}
{{utils.render_machine(fc.ri.machine)}} {{ fc.ri.field.name }} {{ fc.ri.test.name }} m{{ fc.ri.start_order.llvm_project_revision }}, {{utils.render_order_link(fc.ri.end_order)}} {{ fc.cr.previous }}{{ fc.cr.current }}{{ fc.latest_cr.current }}{{ fc.run.end_time.isoformat() }}
{% endblock %}