diff options
author | jasplin <qt-info@nokia.com> | 2011-01-03 10:52:58 +0100 |
---|---|---|
committer | jasplin <qt-info@nokia.com> | 2011-01-03 10:52:58 +0100 |
commit | 4c9489de13703419826f1a52601d4726b93f055e (patch) | |
tree | 2aaa0d3a1530c7bd430c71f3fc1baa49322618a6 | |
parent | ddfb3469be8fabe78ba814291a121fa559606540 (diff) |
Renamed tolerance -> difftol.
-rwxr-xr-x | scripts/getstats.py | 24 | ||||
-rw-r--r-- | scripts/gettimeseriesdetails.py | 6 | ||||
-rw-r--r-- | scripts/gettimeseriesstats.py | 8 | ||||
-rw-r--r-- | scripts/misc.py | 10 | ||||
-rw-r--r-- | web/getstats/index.html | 17 | ||||
-rw-r--r-- | web/getstats/main.js | 3 | ||||
-rw-r--r-- | web/getstats/tsbm.js | 14 | ||||
-rw-r--r-- | web/getstats/tsbmbody.html | 4 | ||||
-rw-r--r-- | web/getstats/tsbmbody.js | 15 | ||||
-rw-r--r-- | web/getstats/tsstats.js | 20 |
10 files changed, 60 insertions, 61 deletions
diff --git a/scripts/getstats.py b/scripts/getstats.py index 5099b52..266914f 100755 --- a/scripts/getstats.py +++ b/scripts/getstats.py @@ -77,10 +77,10 @@ def createCommand(options, http_get): "--branch1 B --sha11 S --host2 H --platform2 P --branch2 B " + "--sha12 S --benchmark BM --metric M | \\\n" + " --db D --cmd timeseriesstats --host H --platform P --branch B " + - "--sha11 S --sha12 S [--tolerance T] " + + "--sha11 S --sha12 S [--difftol T] " + "[--testcasefilter 'TC1 TC2 ...'] | \\\n" + " --db D --cmd timeseriesdetails --host H --platform P " + - "--branch B --sha11 S --sha12 S --tolerance T --benchmark BM " + + "--branch B --sha11 S --sha12 S --difftol T --benchmark BM " + "--metric M") if http_get: printErrorAsJSON("usage error") @@ -194,37 +194,37 @@ def createCommand(options, http_get): sha11 = options["sha11"] sha12 = options["sha12"] - if "tolerance" in options: + if "difftol" in options: try: - tolerance = float(options["tolerance"]) - assert tolerance >= 1.0 + difftol = float(options["difftol"]) + assert difftol >= 1.0 except: raise BaseException( - "'tolerance' not a real value >= 1.0: " + - str(options["tolerance"])) + "'difftol' not a real value >= 1.0: " + + str(options["difftol"])) else: - tolerance = 1.1 # 10% + difftol = 1.1 # 10% return GetTimeSeriesStatsAsJSON( - host, platform, branch, sha11, sha12, tolerance, + host, platform, branch, sha11, sha12, difftol, test_case_filter) # --- 'timeseriesdetails' --------------------------------- elif cmd == "timeseriesdetails": if ("host" in options and "platform" in options and "branch" in options and "sha11" in options and - "sha12" in options and "tolerance" in options and + "sha12" in options and "difftol" in options and "benchmark" in options and "metric" in options): host = options["host"] platform = options["platform"] branch = options["branch"] sha11 = options["sha11"] sha12 = options["sha12"] - tolerance = float(options["tolerance"]) + difftol = float(options["difftol"]) benchmark = options["benchmark"] metric = options["metric"] return GetTimeSeriesDetailsAsJSON( - host, platform, branch, sha11, sha12, tolerance, + host, platform, branch, sha11, sha12, difftol, benchmark, metric) # --- 'snapshots' --------------------------------- elif cmd == "snapshots": diff --git a/scripts/gettimeseriesdetails.py b/scripts/gettimeseriesdetails.py index b6e8951..b83c670 100644 --- a/scripts/gettimeseriesdetails.py +++ b/scripts/gettimeseriesdetails.py @@ -6,14 +6,14 @@ from misc import ( class GetTimeSeriesDetails: def __init__( - self, host, platform, branch, sha11, sha12, tolerance, + self, host, platform, branch, sha11, sha12, difftol, benchmark, metric): self.host = host self.platform = platform self.branch = branch self.sha11 = sha11 self.sha12 = sha12 - self.tolerance = tolerance + self.difftol = difftol self.benchmark = benchmark self.metric = metric self.host_id = textToId("host", host) @@ -41,7 +41,7 @@ class GetTimeSeriesDetails: changes = extractChanges( time_series, metricIdToLowerIsBetter(self.metric_id), - self.tolerance) + self.difftol) # Time series: print "\"time_series\": [" diff --git a/scripts/gettimeseriesstats.py b/scripts/gettimeseriesstats.py index 08e2d15..109c0a1 100644 --- a/scripts/gettimeseriesstats.py +++ b/scripts/gettimeseriesstats.py @@ -7,14 +7,14 @@ from misc import ( class GetTimeSeriesStats: def __init__( - self, host, platform, branch, sha11, sha12, tolerance, + self, host, platform, branch, sha11, sha12, difftol, test_case_filter): self.host = host self.platform = platform self.branch = branch self.sha11 = sha11 self.sha12 = sha12 - self.tolerance = tolerance + self.difftol = difftol self.test_case_filter = test_case_filter self.host_id = textToId("host", host) self.platform_id = textToId("platform", platform) @@ -84,7 +84,7 @@ class GetTimeSeriesStats: self.snapshots, benchmark_id, metric_id) changes = extractChanges( - time_series, metricIdToLowerIsBetter(metric_id), self.tolerance) + time_series, metricIdToLowerIsBetter(metric_id), self.difftol) stats = extractTimeSeriesStats(time_series, changes, self.snapshots) @@ -139,7 +139,7 @@ class GetTimeSeriesStats: print ( "\"sha12\": \"" + str(idToText("sha1", self.snapshots[-1][0])) + "\", ") - print "\"tolerance\": " + str(self.tolerance) + "" + print "\"difftol\": " + str(self.difftol) + "" # Snapshots: print ", \"snapshots\": [" diff --git a/scripts/misc.py b/scripts/misc.py index ac2344b..a87aafc 100644 --- a/scripts/misc.py +++ b/scripts/misc.py @@ -247,19 +247,19 @@ def getTimeSeries( # (like frames per second). # # A change is significant if the metric-adjusted ratio is outside -# the interval [1 / tolerance, tolerance], where tolerance is assumed to +# the interval [1 / difftol, difftol], where difftol is assumed to # be >= 1. # -def extractChanges(time_series, lower_is_better, tolerance): +def extractChanges(time_series, lower_is_better, difftol): if len(time_series) == 0: return () changes = [] prev_val = time_series[0][1] index = 1 - # assert tolerance >= 1 - hi = tolerance - lo = 1.0 / tolerance + # assert difftol >= 1 + hi = difftol + lo = 1.0 / difftol for item in time_series[1:]: val = item[1] diff --git a/web/getstats/index.html b/web/getstats/index.html index cfdd248..788e617 100644 --- a/web/getstats/index.html +++ b/web/getstats/index.html @@ -85,8 +85,8 @@ "snapshots are <u>different</u>."); </script> </td> - <td>Tolerance: - <select id="tsstats_tol" onchange="updateActions()"> + <td id="diff_tol_lead">Difference tolerance (<i>DT</i>): + <select id="diff_tol" onchange="updateActions()"> <option value="1.0">1.0</option> <option value="1.01">1.01</option> <option value="1.02">1.02</option> @@ -99,13 +99,12 @@ </select> <script type="text/javascript"> setTooltip( - "tsstats_tol", - "A <i>change</i> is defined as the ratio of<br />" + - "the median observation in a contiguous<br />" + - "snapshot pair.<br /><br />" + - "A change is considered <i>significant</i><br />" + - "if it is either greater than <i>tolerance</i><br />" + - "or less than 1 / <i>tolerance</i>."); + "diff_tol_lead", + "A <i>change</i> is the ratio of " + + "the median observation in two snapshots.<br />" + + "A change is considered <i>significant</i> " + + "if it is either greater than <i>DT</i><br />" + + "or less than 1 / <i>DT</i>."); </script> </td> </tr> diff --git a/web/getstats/main.js b/web/getstats/main.js index ff6846c..7602100 100644 --- a/web/getstats/main.js +++ b/web/getstats/main.js @@ -185,7 +185,7 @@ function updateActions() { url_tsstats += "&branch=" + encodeURIComponent(context1_["branch"]); url_tsstats += "&sha11=" + context1_["sha1"]; url_tsstats += "&sha12=" + context2_["sha1"]; - url_tsstats += "&tolerance=" + $("#tsstats_tol option:selected").val(); + url_tsstats += "&difftol=" + $("#diff_tol option:selected").val(); url_tsstats += "&testcasefilter=" + testCaseFilter; } else { url_tsstats = ""; @@ -194,7 +194,6 @@ function updateActions() { setActionUrl("action_stats1", url_stats1); setActionUrl("action_stats2", url_stats2); setActionUrl("action_tsstats", url_tsstats); - //$("#tsstats_tol").attr("disabled", url_tsstats == ""); } function updateSelectedSnapshotColor(select) { diff --git a/web/getstats/tsbm.js b/web/getstats/tsbm.js index 815f0e3..55a26d4 100644 --- a/web/getstats/tsbm.js +++ b/web/getstats/tsbm.js @@ -1,5 +1,5 @@ function fetchSnapshots( - database, host, platform, branch, sha11, sha12, tolerance, benchmark, + database, host, platform, branch, sha11, sha12, difftol, benchmark, metric, ms, lsd, ni, nz, nc, mdrse, rsemd, lcss, lcss_ls) { updateStatus("fetching snapshots ...", true); @@ -40,7 +40,7 @@ function fetchSnapshots( // Fetch and plot time series: fetchTimeSeries( database, host, platform, branch, sha11, sha12, - tolerance, benchmark, metric, ms, lsd, ni, nz, nc, + difftol, benchmark, metric, ms, lsd, ni, nz, nc, mdrse, rsemd, lcss, lcss_ls); } } @@ -108,9 +108,9 @@ $(document).ready(function() { alert("ERROR: invalid query string (empty metric)"); return; } - tolerance = extractArg(args, "tolerance"); - if (tolerance == "") { - alert("ERROR: invalid query string (empty tolerance)"); + difftol = extractArg(args, "difftol"); + if (difftol == "") { + alert("ERROR: invalid query string (empty difftol)"); return; } ms = extractArg(args, "ms"); @@ -170,10 +170,10 @@ $(document).ready(function() { $("#main_context_branch").text(branch); $("#main_context_sha11").text(sha11); $("#main_context_sha12").text(sha12); - $("#main_context_tolerance").text(tolerance); + $("#main_context_difftol").text(difftol); // Fetch snapshots: fetchSnapshots( - database, host, platform, branch, sha11, sha12, tolerance, benchmark, + database, host, platform, branch, sha11, sha12, difftol, benchmark, metric, ms, lsd, ni, nz, nc, mdrse, rsemd, lcss, lcss_ls); }); diff --git a/web/getstats/tsbmbody.html b/web/getstats/tsbmbody.html index 3b1ef91..65ce4d0 100644 --- a/web/getstats/tsbmbody.html +++ b/web/getstats/tsbmbody.html @@ -47,8 +47,8 @@ <td id="main_context_sha12_daysago" style="text-align:right"></td> </tr> <tr> - <td class="leadText"><b>Tolerance:</b></td> - <td id="main_context_tolerance" colspan=3></td> + <td class="leadText"><b>Difference Tolerance:</b></td> + <td id="main_context_difftol" colspan=3></td> </tr> </table> </td> diff --git a/web/getstats/tsbmbody.js b/web/getstats/tsbmbody.js index e3f1338..a61499c 100644 --- a/web/getstats/tsbmbody.js +++ b/web/getstats/tsbmbody.js @@ -43,8 +43,9 @@ function tooltipText_nz() { function tooltipText_nc() { return "Number of significant changes, " + "i.e. changes that are either<br />" + - "better than <i>tolerance</i> or " + - "worse than 1 / <i>tolerance</i>.<br /><br />" + + "better than <i>DT</i> or " + + "worse than 1 / <i>DT</i>, where <i>DT</i> is " + + "the difference tolerance.<br /><br />" + "A high value might indicate unstable or fluctuating results."; } @@ -995,7 +996,7 @@ function fetchResultDetails2(benchmark, metric, sha11, sha12) { } function fetchTimeSeries( - database, host, platform, branch, sha11, sha12, tolerance, benchmark, + database, host, platform, branch, sha11, sha12, difftol, benchmark, metric, ms, lsd, ni, nz, nc, mdrse, rsemd, lcss, lcss_ls, showTSBMURL) { hideTSBMURL(); @@ -1009,7 +1010,7 @@ function fetchTimeSeries( "&branch=" + encodeURIComponent(branch) + "&sha11=" + sha11 + "&sha12=" + sha12 + - "&tolerance=" + tolerance + + "&difftol=" + difftol + "&benchmark=" + encodeURIComponent(benchmark) + "&metric=" + encodeURIComponent(metric); @@ -1042,7 +1043,7 @@ function fetchTimeSeries( if (showTSBMURL) enableTSBMURL( database, host, platform, branch, sha11, sha12, - tolerance, benchmark, metric, ms, lsd, ni, nz, nc, + difftol, benchmark, metric, ms, lsd, ni, nz, nc, mdrse, rsemd, lcss, lcss_ls); } } @@ -1075,7 +1076,7 @@ function disableTSBMURL() { } function enableTSBMURL( - database, host, platform, branch, sha11, sha12, tolerance, benchmark, + database, host, platform, branch, sha11, sha12, difftol, benchmark, metric, ms, lsd, ni, nz, nc, mdrse, rsemd, lcss, lcss_ls) { query = "?db=" + database; @@ -1084,7 +1085,7 @@ function enableTSBMURL( query += "&branch=" + encodeURIComponent(branch); query += "&sha11=" + sha11; query += "&sha12=" + sha12; - query += "&tolerance=" + tolerance; + query += "&difftol=" + difftol; query += "&benchmark=" + encodeURIComponent(benchmark); query += "&metric=" + encodeURIComponent(metric); query += "&ms=" + encodeURIComponent(ms); diff --git a/web/getstats/tsstats.js b/web/getstats/tsstats.js index eade3ff..a1ea87b 100644 --- a/web/getstats/tsstats.js +++ b/web/getstats/tsstats.js @@ -1,7 +1,7 @@ // Handles clicking a benchmark checkbox. At most one benchmark may // be selected at any time. function clickBenchmarkCheckbox( - cb, database, host, platform, branch, sha11, sha12, tolerance, benchmark, + cb, database, host, platform, branch, sha11, sha12, difftol, benchmark, metric, ms, lsd, ni, nz, nc, mdrse, rsemd, lcss, lcss_ls) { if (cb.checked) { @@ -12,7 +12,7 @@ function clickBenchmarkCheckbox( // Fetch and plot time series: fetchTimeSeries( - database, host, platform, branch, sha11, sha12, tolerance, + database, host, platform, branch, sha11, sha12, difftol, benchmark, metric, ms, lsd, ni, nz, nc, mdrse, rsemd, lcss, lcss_ls, true); } else { @@ -21,7 +21,7 @@ function clickBenchmarkCheckbox( } function fetchStats( - database, host, platform, branch, sha11, sha12, tolerance, testCaseFilter) { + database, host, platform, branch, sha11, sha12, difftol, testCaseFilter) { updateStatus("fetching statistics ...", true); query = "?db=" + database + @@ -31,8 +31,8 @@ function fetchStats( "&branch=" + encodeURIComponent(branch) + "&sha11=" + sha11 + "&sha12=" + sha12; - if (tolerance != "") - query += "&tolerance=" + tolerance; + if (difftol != "") + query += "&difftol=" + difftol; if (testCaseFilter != "") query += "&testcasefilter=" + encodeURIComponent(testCaseFilter); @@ -65,7 +65,7 @@ function fetchStats( $("#main_context_branch").text(data.branch); $("#main_context_sha11").text(data.sha11); $("#main_context_sha12").text(data.sha12); - $("#main_context_tolerance").text(data.tolerance); + $("#main_context_difftol").text(data.difftol); setSnapshots(data.snapshots); @@ -186,7 +186,7 @@ function fetchStats( data.database + "', '" + data.host + "', '" + data.platform + "', '" + data.branch + "', '" + data.sha11 + "', '" + data.sha12 + "', " + - data.tolerance + ", '" + stats.bm + "', '" + + data.difftol + ", '" + stats.bm + "', '" + stats.mt + "', " + ms + ", " + lsd + ", " + @@ -300,8 +300,8 @@ $(document).ready(function() { return; } - // Extract tolerance and test case filter (optional); - tolerance = extractArg(args, "tolerance"); + // Extract difference tolerance and test case filter (optional); + difftol = extractArg(args, "difftol"); testCaseFilter = extractArg(args, "testcasefilter"); $("#div_tsbm_border").css("display", "none"); @@ -310,6 +310,6 @@ $(document).ready(function() { // Fetch per-benchmark stats and populate table: fetchStats( - database, host, platform, branch, sha11, sha12, tolerance, + database, host, platform, branch, sha11, sha12, difftol, testCaseFilter); }); |