summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjasplin <qt-info@nokia.com>2011-01-27 15:33:55 +0100
committerjasplin <qt-info@nokia.com>2011-01-27 15:33:55 +0100
commit5b3c56f415d5c8a37855c64f31234dab282c515a (patch)
tree36f9c92a4930d44af04de686563301c7be5fb216
parentff833742d61339eeefbc435b25e8e04e16f1f6b2 (diff)
Added a benchmark quality score: QS.
-rw-r--r--web/getstats/global.js27
-rw-r--r--web/getstats/tsbmbody.html6
-rw-r--r--web/getstats/tsbmbody.js20
-rw-r--r--web/getstats/tspbmtabledef.html1
-rw-r--r--web/getstats/tsstats.js43
5 files changed, 76 insertions, 21 deletions
diff --git a/web/getstats/global.js b/web/getstats/global.js
index a750fb3..733fdd1 100644
--- a/web/getstats/global.js
+++ b/web/getstats/global.js
@@ -5,6 +5,7 @@ var anySpace = / /g;
// --- END Global variables -----------------------------------
+// ### 2 B DOCUMENTED!
function updateStatus(msg, showSpinner) {
// Note: the "span[id^=status]" selector matches all span elements
// with an id attribute that begins with "status".
@@ -18,6 +19,7 @@ function updateStatus(msg, showSpinner) {
}
}
+// ### 2 B DOCUMENTED!
function trim(s)
{
var i;
@@ -27,6 +29,7 @@ function trim(s)
return (i <= j) ? s.substr(i, (j - i) + 1) : "";
}
+// ### 2 B DOCUMENTED!
function queryStringArgs() {
pairs = document.location.search.slice(1).split("&");
var args = [];
@@ -41,6 +44,7 @@ function queryStringArgs() {
return args;
}
+// ### 2 B DOCUMENTED!
function extractArg(args, name) {
arg = args[name];
if (arg == null) {
@@ -49,16 +53,36 @@ function extractArg(args, name) {
return arg;
}
+// ### 2 B DOCUMENTED!
function isNonNullNumber(x) {
return (x != null) && (!isNaN(x));
}
+// ### 2 B DOCUMENTED!
function changeMagnitudeScore(change) {
var maxChange = 2.0;
var absChange = (change < 1.0) ? (1.0 / change) : change;
return (Math.min(absChange, maxChange) - 1.0) / (maxChange - 1.0);
}
+// ### 2 B DOCUMENTED!
+function normalizedQuality(lsd, ni, nz, nc, mdrse) {
+ var maxBadSnapshots = 30; // experimental; maybe use max durability score?
+ var maxSampleSize = 5;
+ var maxLSD = maxBadSnapshots;
+ var maxNI = maxBadSnapshots * maxSampleSize;
+ var maxNZ = maxBadSnapshots * maxSampleSize;
+ var maxNC = maxBadSnapshots;
+
+ var lsdScore = Math.min(1, lsd / maxLSD);
+ var niScore = Math.min(1, ni / maxNI);
+ var nzScore = Math.min(1, nz / maxNZ);
+ var ncScore = Math.min(1, nc / maxNC);
+ var mdrseScore = mdrse / 100;
+
+ return (lsdScore + niScore + nzScore + ncScore + mdrseScore) / 5;
+}
+
// Assigns tooltip with text 'text' to jQuery object 'obj'.
function setTooltip(obj, text) {
obj.attr(
@@ -97,10 +121,12 @@ function daysToSecs(days) {
return days * secsInDay;
}
+// ### 2 B DOCUMENTED!
function zeroPad2(s) {
return (s.length == 2) ? s : ("0" + s);
}
+// ### 2 B DOCUMENTED!
function ageColor(secsAgo) {
var secsInDay = 86400; // 24 * 60 * 60
@@ -128,6 +154,7 @@ function ageColor(secsAgo) {
return color;
}
+// ### 2 B DOCUMENTED!
function initTablesorter() {
// Define a parser that handles mixed standard- and scientific notation
// and sorts in _descending_ order before any missing values (i.e.
diff --git a/web/getstats/tsbmbody.html b/web/getstats/tsbmbody.html
index 82bd370..5918453 100644
--- a/web/getstats/tsbmbody.html
+++ b/web/getstats/tsbmbody.html
@@ -191,6 +191,12 @@
setTooltip($("#lead_rsemd"), tooltipText_rsemd())</script>
</tr>
<tr>
+ <td class="leadText" id="lead_qs"><b>QS:</b></td>
+ <td class="contentText_pad" id="bmstats_qs" colspan=5></td>
+ <script type="text/javascript">
+ setTooltip($("#lead_qs"), tooltipText_qs())</script>
+ </tr>
+ <tr>
<td class="leadText" id="lead_lc"><b>LC:</b></td>
<td class="contentText_pad" id="bmstats_lc"></td>
<script type="text/javascript">
diff --git a/web/getstats/tsbmbody.js b/web/getstats/tsbmbody.js
index 61db186..4a90c4c 100644
--- a/web/getstats/tsbmbody.js
+++ b/web/getstats/tsbmbody.js
@@ -66,6 +66,15 @@ function tooltipText_rsemd() {
"or 2) stable changes of a high magnitude.";
}
+function tooltipText_qs() {
+ return "Quality score for the benchmark:<br /><br />" +
+ "&nbsp;&nbsp;&nbsp;&nbsp;" +
+ "nq(LSD, NI, NZ, NC, MDRSE),<br /><br />" +
+ "where nq() computes the \"normalized quality\", i.e. a number " +
+ "between 0 and 1.<br /><br />" +
+ "The higher this score, the worse the quality of the benchmark.";
+}
+
function tooltipText_lc() {
return "Last significant change. <i>(See documentation elsewhere for a " +
"definition of how the significant changes of a time series are " +
@@ -494,6 +503,7 @@ function clearPlot() {
$("#bmstats_nc").text("");
$("#bmstats_mdrse").text("");
$("#bmstats_rsemd").text("");
+ $("#bmstats_qs").text("");
$("#bmstats_lc").text("");
$("#bmstats_lcda").text("");
$("#bmstats_lcms").text("");
@@ -520,7 +530,7 @@ function clearPlot() {
// for a single benchmark.
function createPlot(
timeSeries, changes, benchmark, metric, lowerIsBetter, ms, lsd, ni, nz,
- nc, mdrse, rsemd, lc, lcda, lcd, lcms, lcss, lcss1, lcgss, lclss, lcds1,
+ nc, mdrse, rsemd, qs, lc, lcda, lcd, lcms, lcss, lcss1, lcgss, lclss, lcds1,
lcds2) {
clearPlot();
@@ -937,6 +947,8 @@ function createPlot(
$("#bmstats_mdrse").text(parseFloat(mdrse).toFixed(2));
if (isNonNullNumber(rsemd))
$("#bmstats_rsemd").text(parseFloat(rsemd).toFixed(2));
+ if (isNonNullNumber(qs))
+ $("#bmstats_qs").text(qs);
if (isNonNullNumber(lc)) {
$("#bmstats_lc").text(lc);
$("#bmstats_lc").css(
@@ -1122,6 +1134,7 @@ function fetchTimeSeries(
var nz = null;
var mdrse = null;
var rsemd = null;
+ var qs = null;
var lc = null;
var lcda = null;
var lcd = null;
@@ -1139,6 +1152,7 @@ function fetchTimeSeries(
nc = data.nc;
mdrse = data.med_of_rses;
rsemd = data.rse_of_meds;
+ qs = normalizedQuality(lsd, ni, nz, nc, mdrse);
if (nc > 0) {
lc = data.lc;
var currTime = dateToTimestamp(currDate);
@@ -1160,8 +1174,8 @@ function fetchTimeSeries(
createPlot(
data.time_series, data.changes, benchmark, metric,
parseInt(data.lib), ms, lsd, ni, nz, nc, mdrse, rsemd,
- lc, lcda, lcd, lcms, lcss, lcss1, lcgss, lclss, lcds1,
- lcds2);
+ qs, lc, lcda, lcd, lcms, lcss, lcss1, lcgss, lclss,
+ lcds1, lcds2);
if (showTSBMURL)
enableTSBMURL(
diff --git a/web/getstats/tspbmtabledef.html b/web/getstats/tspbmtabledef.html
index ab92647..6f1ba92 100644
--- a/web/getstats/tspbmtabledef.html
+++ b/web/getstats/tspbmtabledef.html
@@ -8,6 +8,7 @@
<th>NC</th>
<th>MDRSE</th>
<th>RSEMD</th>
+ <th>QS</th>
<th>LC</th>
<th>LCDA</th>
<th>LCMS</th>
diff --git a/web/getstats/tsstats.js b/web/getstats/tsstats.js
index 813985d..368cf14 100644
--- a/web/getstats/tsstats.js
+++ b/web/getstats/tsstats.js
@@ -77,6 +77,7 @@ function populatePbmTable(tableSel, data) {
var nz = null;
var mdrse = null;
var rsemd = null;
+ var qs = null;
var lcda = null;
var lcd = null;
var lcms = null;
@@ -120,6 +121,9 @@ function populatePbmTable(tableSel, data) {
rbdy += "<td></td>";
}
+ qs = normalizedQuality(lsd, ni, nz, nc, mdrse);
+ rbdy += "<td>" + qs.toFixed(4) + "</td>";
+
if (nc > 0) {
rbdy += "<td style=\"text-align:right; color:" +
@@ -170,6 +174,7 @@ function populatePbmTable(tableSel, data) {
rbdy += "<td></td>"; // NC
rbdy += "<td></td>"; // MDRSE
rbdy += "<td></td>"; // RSEMD
+ rbdy += "<td></td>"; // QS
rbdy += "<td></td>"; // LC
rbdy += "<td></td>"; // LCDA
rbdy += "<td></td>"; // LCMS
@@ -309,15 +314,16 @@ function initPbmTable(tableSel) {
5: { sorter: "mixed_numeric_desc_before_missing" }, // NC
6: { sorter: "mixed_numeric_desc_before_missing" }, // MDRSE
7: { sorter: "mixed_numeric_desc_before_missing" }, // RSEMD
- 8: { sorter: "mixed_numeric_desc_before_missing" }, // LC
- 9: { sorter: "mixed_numeric_asc_before_missing" }, // LCDA
- 10: { sorter: "mixed_numeric_desc_before_missing" }, // LCMS
- 11: { sorter: "mixed_numeric_desc_before_missing" }, // LCSS
- 12: { sorter: "mixed_numeric_desc_before_missing" }, // LCSS1
- 13: { sorter: "mixed_numeric_desc_before_missing" }, // LCGSS
- 14: { sorter: "mixed_numeric_desc_before_missing" }, // LCLSS
- 15: { sorter: "mixed_numeric_desc_before_missing" }, // LCDS1
- 16: { sorter: "mixed_numeric_desc_before_missing" } // LCDS2
+ 8: { sorter: "mixed_numeric_desc_before_missing" }, // QS
+ 9: { sorter: "mixed_numeric_desc_before_missing" }, // LC
+ 10: { sorter: "mixed_numeric_asc_before_missing" }, // LCDA
+ 11: { sorter: "mixed_numeric_desc_before_missing" }, // LCMS
+ 12: { sorter: "mixed_numeric_desc_before_missing" }, // LCSS
+ 13: { sorter: "mixed_numeric_desc_before_missing" }, // LCSS1
+ 14: { sorter: "mixed_numeric_desc_before_missing" }, // LCGSS
+ 15: { sorter: "mixed_numeric_desc_before_missing" }, // LCLSS
+ 16: { sorter: "mixed_numeric_desc_before_missing" }, // LCDS1
+ 17: { sorter: "mixed_numeric_desc_before_missing" } // LCDS2
}
});
@@ -329,15 +335,16 @@ function initPbmTable(tableSel) {
setTooltip($(tableSel).find("th:nth-child(6)"), tooltipText_nc());
setTooltip($(tableSel).find("th:nth-child(7)"), tooltipText_mdrse());
setTooltip($(tableSel).find("th:nth-child(8)"), tooltipText_rsemd());
- setTooltip($(tableSel).find("th:nth-child(9)"), tooltipText_lc());
- setTooltip($(tableSel).find("th:nth-child(10)"), tooltipText_lcda());
- setTooltip($(tableSel).find("th:nth-child(11)"), tooltipText_lcms());
- setTooltip($(tableSel).find("th:nth-child(12)"), tooltipText_lcss());
- setTooltip($(tableSel).find("th:nth-child(13)"), tooltipText_lcss1());
- setTooltip($(tableSel).find("th:nth-child(14)"), tooltipText_lcgss());
- setTooltip($(tableSel).find("th:nth-child(15)"), tooltipText_lclss());
- setTooltip($(tableSel).find("th:nth-child(16)"), tooltipText_lcds1());
- setTooltip($(tableSel).find("th:nth-child(17)"), tooltipText_lcds2());
+ setTooltip($(tableSel).find("th:nth-child(9)"), tooltipText_qs());
+ setTooltip($(tableSel).find("th:nth-child(10)"), tooltipText_lc());
+ setTooltip($(tableSel).find("th:nth-child(11)"), tooltipText_lcda());
+ setTooltip($(tableSel).find("th:nth-child(12)"), tooltipText_lcms());
+ setTooltip($(tableSel).find("th:nth-child(13)"), tooltipText_lcss());
+ setTooltip($(tableSel).find("th:nth-child(14)"), tooltipText_lcss1());
+ setTooltip($(tableSel).find("th:nth-child(15)"), tooltipText_lcgss());
+ setTooltip($(tableSel).find("th:nth-child(16)"), tooltipText_lclss());
+ setTooltip($(tableSel).find("th:nth-child(17)"), tooltipText_lcds1());
+ setTooltip($(tableSel).find("th:nth-child(18)"), tooltipText_lcds2());
$(tableSel).bind("sortStart",function() {
$("#pbmTable_sortInProgress").show();