<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[201238] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/201238">201238</a></dd>
<dt>Author</dt> <dd>rniwa@webkit.org</dd>
<dt>Date</dt> <dd>2016-05-20 20:57:34 -0700 (Fri, 20 May 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>run-benchmark's results should contain Animometer's debug output
https://bugs.webkit.org/show_bug.cgi?id=157941
Reviewed by Stephanie Lewis.
PerformanceTests:
Made developer.html support the JSON generated by run-benchmark which stores everything under debugOutput.
* Animometer/resources/debug-runner/animometer.js:
(Utilities.initialize): Unwrap debugOutput in the case run-benchmark's result JSON is used.
Tools:
Modified the Animometer patch to store debug output and made benchmark_runner extract them together as a single array.
The result can be dragged and dropped into Animometer's developer.html page.
* Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
(BenchmarkRunner._run_one_test): Parse JSON here instead of doing it in multiple call sites.
(BenchmarkRunner._run_benchmark): Strip debugOutput from individual test result, and merge them together separately.
* Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch:
Modified the patch to store the debug output.
* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:
(ServerControl.render_POST): Fixed a bug that POST to /report results in 500 because getvalue is not defined
when the request body is larger than a certain size on twisted.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkPerformanceTestsAnimometerresourcesdebugrunneranimometerjs">trunk/PerformanceTests/Animometer/resources/debug-runner/animometer.js</a></li>
<li><a href="#trunkPerformanceTestsChangeLog">trunk/PerformanceTests/ChangeLog</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptswebkitpybenchmark_runnerbenchmark_runnerpy">trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py</a></li>
<li><a href="#trunkToolsScriptswebkitpybenchmark_runnerdatapatchesAnimometerpatch">trunk/Tools/Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch</a></li>
<li><a href="#trunkToolsScriptswebkitpybenchmark_runnerhttp_server_driverhttp_servertwisted_http_serverpy">trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkPerformanceTestsAnimometerresourcesdebugrunneranimometerjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/resources/debug-runner/animometer.js (201237 => 201238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/resources/debug-runner/animometer.js        2016-05-21 02:00:42 UTC (rev 201237)
+++ trunk/PerformanceTests/Animometer/resources/debug-runner/animometer.js        2016-05-21 03:57:34 UTC (rev 201238)
</span><span class="lines">@@ -531,6 +531,8 @@
</span><span class="cx"> reader.filename = file.name;
</span><span class="cx"> reader.onload = function(e) {
</span><span class="cx"> var run = JSON.parse(e.target.result);
</span><ins>+ if (run.debugOutput instanceof Array)
+ run = run.debugOutput[0];
</ins><span class="cx"> benchmarkRunnerClient.results = new ResultsDashboard(run.options, run.data);
</span><span class="cx"> benchmarkController.showResults();
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkPerformanceTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/ChangeLog (201237 => 201238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/ChangeLog        2016-05-21 02:00:42 UTC (rev 201237)
+++ trunk/PerformanceTests/ChangeLog        2016-05-21 03:57:34 UTC (rev 201238)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-05-20 Ryosuke Niwa <rniwa@webkit.org>
+
+ run-benchmark's results should contain Animometer's debug output
+ https://bugs.webkit.org/show_bug.cgi?id=157941
+
+ Reviewed by Stephanie Lewis.
+
+ Made developer.html support the JSON generated by run-benchmark which stores everything under debugOutput.
+
+ * Animometer/resources/debug-runner/animometer.js:
+ (Utilities.initialize): Unwrap debugOutput in the case run-benchmark's result JSON is used.
+
</ins><span class="cx"> 2016-05-18 Timothy Hatcher <timothy@apple.com>
</span><span class="cx">
</span><span class="cx"> Make Animometer work in all browsers
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (201237 => 201238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-05-21 02:00:42 UTC (rev 201237)
+++ trunk/Tools/ChangeLog        2016-05-21 03:57:34 UTC (rev 201238)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2016-05-20 Ryosuke Niwa <rniwa@webkit.org>
+
+ run-benchmark's results should contain Animometer's debug output
+ https://bugs.webkit.org/show_bug.cgi?id=157941
+
+ Reviewed by Stephanie Lewis.
+
+ Modified the Animometer patch to store debug output and made benchmark_runner extract them together as a single array.
+ The result can be dragged and dropped into Animometer's developer.html page.
+
+ * Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
+ (BenchmarkRunner._run_one_test): Parse JSON here instead of doing it in multiple call sites.
+ (BenchmarkRunner._run_benchmark): Strip debugOutput from individual test result, and merge them together separately.
+ * Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch:
+ Modified the patch to store the debug output.
+ * Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:
+ (ServerControl.render_POST): Fixed a bug that POST to /report results in 500 because getvalue is not defined
+ when the request body is larger than a certain size on twisted.
+
</ins><span class="cx"> 2016-05-20 Srinivasan Vijayaraghavan <svijayaraghavan@apple.com>
</span><span class="cx">
</span><span class="cx"> Use clearer names for JSON output of javascriptcore test results
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpybenchmark_runnerbenchmark_runnerpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py (201237 => 201238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py        2016-05-21 02:00:42 UTC (rev 201237)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py        2016-05-21 03:57:34 UTC (rev 201238)
</span><span class="lines">@@ -78,10 +78,11 @@
</span><span class="cx"> self._browser_driver.close_browsers()
</span><span class="cx"> self._http_server_driver.kill_server()
</span><span class="cx">
</span><del>- return result
</del><ins>+ return json.loads(result)
</ins><span class="cx">
</span><span class="cx"> def _run_benchmark(self, count, web_root):
</span><span class="cx"> results = []
</span><ins>+ debug_outputs = []
</ins><span class="cx"> for iteration in xrange(1, count + 1):
</span><span class="cx"> _log.info('Start the iteration {current_iteration} of {iterations} for current benchmark'.format(current_iteration=iteration, iterations=count))
</span><span class="cx"> try:
</span><span class="lines">@@ -89,14 +90,16 @@
</span><span class="cx">
</span><span class="cx"> if 'entry_point' in self._plan:
</span><span class="cx"> result = self._run_one_test(web_root, self._plan['entry_point'])
</span><ins>+ debug_outputs.append(result.pop('debugOutput', None))
</ins><span class="cx"> assert(result)
</span><del>- results.append(json.loads(result))
</del><ins>+ results.append(result)
</ins><span class="cx"> elif 'test_files' in self._plan:
</span><span class="cx"> run_result = {}
</span><span class="cx"> for test in self._plan['test_files']:
</span><span class="cx"> result = self._run_one_test(web_root, test)
</span><span class="cx"> assert(result)
</span><del>- run_result = self._merge(run_result, json.loads(result))
</del><ins>+ run_result = self._merge(run_result, result)
+ debug_outputs.append(result.pop('debugOutput', None))
</ins><span class="cx">
</span><span class="cx"> results.append(run_result)
</span><span class="cx"> else:
</span><span class="lines">@@ -109,7 +112,8 @@
</span><span class="cx"> _log.info('End the iteration {current_iteration} of {iterations} for current benchmark'.format(current_iteration=iteration, iterations=count))
</span><span class="cx">
</span><span class="cx"> results = self._wrap(results)
</span><del>- self._dump(results, self._output_file if self._output_file else self._plan['output_file'])
</del><ins>+ output_file = self._output_file if self._output_file else self._plan['output_file']
+ self._dump(self._merge({'debugOutput': debug_outputs}, results), output_file)
</ins><span class="cx"> self.show_results(results, self._scale_unit)
</span><span class="cx">
</span><span class="cx"> def execute(self):
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpybenchmark_runnerdatapatchesAnimometerpatch"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch (201237 => 201238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch        2016-05-21 02:00:42 UTC (rev 201237)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch        2016-05-21 03:57:34 UTC (rev 201238)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> index b20a1c9..e434e89 100644
</span><span class="cx"> --- a/resources/runner/animometer.js
</span><span class="cx"> +++ b/resources/runner/animometer.js
</span><del>-@@ -320,6 +320,57 @@ window.benchmarkRunnerClient = {
</del><ins>+@@ -320,6 +320,61 @@ window.benchmarkRunnerClient = {
</ins><span class="cx"> didFinishLastIteration: function()
</span><span class="cx"> {
</span><span class="cx"> benchmarkController.showResults();
</span><span class="lines">@@ -37,7 +37,11 @@
</span><span class="cx"> + {
</span><span class="cx"> + var results = this.results.results[0];
</span><span class="cx"> + var iterationReports = this._computeIterationReports(results);
</span><del>-+ return {"Animometer": {"metrics" : {"Score" : ["Geometric"]}, "tests" : iterationReports } };
</del><ins>++ var debugOutput = {
++ options: benchmarkRunnerClient.results.options,
++ data: benchmarkRunnerClient.results.data,
++ }
++ return {"Animometer": {"metrics" : {"Score" : ["Geometric"]}, "tests" : iterationReports }, "debugOutput": debugOutput};
</ins><span class="cx"> + },
</span><span class="cx"> +
</span><span class="cx"> + didFinishLastIteration: function()
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpybenchmark_runnerhttp_server_driverhttp_servertwisted_http_serverpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py (201237 => 201238)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py        2016-05-21 02:00:42 UTC (rev 201237)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py        2016-05-21 03:57:34 UTC (rev 201238)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx">
</span><span class="cx"> def render_POST(self, request):
</span><span class="cx"> _log.info("Serving request %s" % request)
</span><del>- sys.stdout.write(request.content.getvalue())
</del><ins>+ sys.stdout.write(request.content.read())
</ins><span class="cx"> sys.stdout.flush()
</span><span class="cx"> reactor.stop()
</span><span class="cx"> return 'OK'
</span></span></pre>
</div>
</div>
</body>
</html>