summaryrefslogtreecommitdiffstats
path: root/web/analysis/tsbmbody.js
diff options
context:
space:
mode:
authorjasplin <qt-info@nokia.com>2011-05-26 15:07:14 +0200
committerjasplin <qt-info@nokia.com>2011-05-26 15:07:14 +0200
commitcac600fc0a2069e34036c5112ba4cfb8483bb559 (patch)
tree8fba1a4e47113b902582cc6c5f03af909b6e9e73 /web/analysis/tsbmbody.js
parenteae8ff839296559a637ff100d7585562d68b5cb1 (diff)
Added Top Changes page to replace ranking feature.
This commit introduces the Top Changes page. This page retrieves 'top 10' changes for all host/platform/branch combinations from a new 'change' database table. The script that updates this table for a given host/platform/branch combination is run automatically after uploading a new set of results (since this is when new changes may potentially arise). This commit also removes the ranking feature as this is obsoleted (more or less) by the new feature.
Diffstat (limited to 'web/analysis/tsbmbody.js')
-rw-r--r--web/analysis/tsbmbody.js43
1 files changed, 29 insertions, 14 deletions
diff --git a/web/analysis/tsbmbody.js b/web/analysis/tsbmbody.js
index 2901ebb..ee81045 100644
--- a/web/analysis/tsbmbody.js
+++ b/web/analysis/tsbmbody.js
@@ -51,7 +51,7 @@ function tooltipText_mdrse() {
return "Median of the valid relative standard errors of all " +
"snapshots.<br /><br />" +
"&nbsp;&nbsp;&nbsp;&nbsp;" +
- "<img src=\"images/rse.png\" />" +
+ "<img src=\"../global/images/rse.png\" />" +
"<br /><br />A high value might indicate " +
"unstable or fluctuating results.";
}
@@ -60,7 +60,7 @@ function tooltipText_rsemd() {
return "Relative standard error of the valid median observations " +
"of all snapshots.<br /><br />" +
"&nbsp;&nbsp;&nbsp;&nbsp;" +
- "<img src=\"images/rse.png\" />" +
+ "<img src=\"../global/images/rse.png\" />" +
"<br /><br />A high value might indicate either 1)" +
"unstable or fluctuating results<br />" +
"or 2) stable changes of a high magnitude.";
@@ -104,7 +104,7 @@ function tooltipText_lcms() {
"indicates the strength of the last signicifant change as a value " +
"ranging from 0 (weak) to 1 (strong):<br /><br />" +
"&nbsp;&nbsp;&nbsp;&nbsp;" +
- "<img src=\"images/lcms.png\" />";
+ "<img src=\"../global/images/lcms.png\" />";
}
function tooltipText_lcss() {
@@ -184,7 +184,7 @@ function tooltipText_lcds2() {
function tooltipText_rse_plot() {
return "Relative standard error of the valid and positive observations " +
"in this sample.<br /><br />" +
- "<img src=\"images/rse.png\" /><br /><br />" +
+ "<img src=\"../global/images/rse.png\" /><br /><br />" +
"<b>Note:</b> RSE is not defined for less than two values.";
}
@@ -536,7 +536,7 @@ function clearPlot() {
function createPlot(
timeSeries, changes, benchmark, metric, lowerIsBetter, ms, lsd, ni, nz,
nc, mdrse, rsemd, qs, lc, lcda, lcd, lcms, lcss, lcss1, lcgss, lclss, lcds1,
- lcds2) {
+ lcds2, sha1Sel) {
clearPlot();
@@ -798,7 +798,7 @@ function createPlot(
$("#plot_canvas").unbind("plothover");
$("#plot_canvas").bind("plothover", function (event, pos, item) {
- snIndex = Math.floor(pos.x + 0.5); // Snapshot index
+ var snIndex = Math.floor(pos.x + 0.5); // Snapshot index
if ((snIndex < 0) || (snIndex >= snapshots.length))
return;
if (snIndex == prevHoverIndex)
@@ -861,9 +861,7 @@ function createPlot(
$("#sample2 tr:gt(0)").remove();
}
- $("#plot_canvas").unbind("plotclick");
- $("#plot_canvas").bind("plotclick", function (event, pos, item) {
- snIndex = Math.floor(pos.x + 0.5); // Snapshot index
+ function clickPlot(snIndex) {
if ((snIndex < 0) || (snIndex >= snapshots.length))
return;
if (snIndex == prevClickIndex) {
@@ -950,6 +948,12 @@ function createPlot(
fetchResultDetails2(benchmark, metric, "", sha1);
}
}
+ }
+
+ $("#plot_canvas").unbind("plotclick");
+ $("#plot_canvas").bind("plotclick", function (event, pos, item) {
+ var snIndex = Math.floor(pos.x + 0.5); // Snapshot index
+ clickPlot(snIndex);
});
clearHoverHighlighting();
@@ -987,6 +991,16 @@ function createPlot(
if (isNonNullNumber(lclss)) $("#bmstats_lclss").text(lclss);
if (isNonNullNumber(lcds1)) $("#bmstats_lcds1").text(lcds1);
if (isNonNullNumber(lcds2)) $("#bmstats_lcds2").text(lcds2);
+
+ // Select an initial snapshot if requested:
+ if ((sha1Sel != null) && (sha1Sel != "")) {
+ for (i = 0; i < snapshots.length; ++i)
+ if (snapshots[i][0] == sha1Sel) {
+ clickPlot(i);
+ toggleSnapshotDetails();
+ break;
+ }
+ }
}
// ### REFACTOR: Similar function in stats2.js! 2 B DONE!
@@ -1106,8 +1120,8 @@ function fetchResultDetails2(benchmark, metric, sha11, sha12) {
}
function fetchTimeSeries(
- database, host, platform, branch, sha11, sha12, benchmark, metric, difftol,
- durtolmin, durtolmax, showTSBMURL) {
+ database, host, platform, branch, sha11, sha12, sha1Sel, benchmark, metric,
+ difftol, durtolmin, durtolmax, showTSBMURL) {
hideTSBMURL();
@@ -1194,7 +1208,7 @@ function fetchTimeSeries(
data.time_series, data.changes, benchmark, metric,
parseInt(data.lib), ms, lsd, ni, nz, nc, mdrse, rsemd,
qs, lc, lcda, lcd, lcms, lcss, lcss1, lcgss, lclss,
- lcds1, lcds2);
+ lcds1, lcds2, sha1Sel);
if (showTSBMURL)
enableTSBMURL(
@@ -1300,9 +1314,10 @@ function clickBMRadioButton(
if (cb.checked) {
// Fetch and plot time series:
+ var sha1Sel = ""; // no snapshot selected initially
fetchTimeSeries(
- database, host, platform, branch, sha11, sha12, benchmark, metric,
- difftol, durtolmin, durtolmax, true);
+ database, host, platform, branch, sha11, sha12, sha1Sel, benchmark,
+ metric, difftol, durtolmin, durtolmax, true);
} else {
clearPlot();
}