[webkit-changes] [295611] trunk/Websites/perf.webkit.org

2022-06-16 Thread dewei_zhu
Title: [295611] trunk/Websites/perf.webkit.org








Revision 295611
Author dewei_...@apple.com
Date 2022-06-16 13:41:38 -0700 (Thu, 16 Jun 2022)


Log Message
Prefer using commit identifier to build commit URL.
https://bugs.webkit.org/show_bug.cgi?id=241646
rdar://93104485

Reviewed by Jonathan Bedard.

Use commit identifier to construct commit URL and blame URL when available.
This simplifies URL construction for Git transition.

* Websites/perf.webkit.org/public/v3/models/commit-log.js: Added code to prefer using commit identifiers
when available.
(CommitLog.prototype.url):
(CommitLog.prototype.diff):
* Websites/perf.webkit.org/unit-tests/commit-log-tests.js: Added a unit test for diff.
(assert.deepStrictEqual.webkitGitCommitWithRevisionIdentifier.diff.oldWebKitGitCommitWithRevisionIdentifier):
* Websites/perf.webkit.org/unit-tests/commit-set-tests.js: Updated unit test.
* Websites/perf.webkit.org/unit-tests/resources/mock-v3-models.js: Added 'blameUrl' to 'WebKitGit' mock repository.
(MockModels.inject):

Canonical link: https://commits.webkit.org/251616@main

Modified Paths

trunk/Websites/perf.webkit.org/public/v3/models/commit-log.js
trunk/Websites/perf.webkit.org/unit-tests/commit-log-tests.js
trunk/Websites/perf.webkit.org/unit-tests/commit-set-tests.js
trunk/Websites/perf.webkit.org/unit-tests/resources/mock-v3-models.js




Diff

Modified: trunk/Websites/perf.webkit.org/public/v3/models/commit-log.js (295610 => 295611)

--- trunk/Websites/perf.webkit.org/public/v3/models/commit-log.js	2022-06-16 20:37:38 UTC (rev 295610)
+++ trunk/Websites/perf.webkit.org/public/v3/models/commit-log.js	2022-06-16 20:41:38 UTC (rev 295611)
@@ -42,7 +42,7 @@
 revision() { return this._rawData['revision']; }
 revisionIdentifier() { return this._rawData['revisionIdentifier']; }
 message() { return this._rawData['message']; }
-url() { return this._repository.urlForRevision(this._rawData['revision']); }
+url() { return this._repository.urlForRevision(this.revisionIdentifier() || this.revision()); }
 ownsCommits() { return this._rawData['ownsCommits']; }
 ownedCommits() { return this._ownedCommits; }
 ownerCommit() { return this._ownerCommit; }
@@ -105,7 +105,10 @@
 return revisionRange;
 })(identifierPattern.exec(previousCommit.revisionIdentifier()), identifierPattern.exec(this.revisionIdentifier()));
 
-return {repository, label, url: repository.urlForRevisionRange(fromRevision, toRevision)};
+const from = previousCommit.revisionIdentifier() || fromRevision;
+const to = this.revisionIdentifier() || toRevision;
+
+return {repository, label, url: repository.urlForRevisionRange(from, to)};
 }
 
 static fetchLatestCommitForPlatform(repository, platform)


Modified: trunk/Websites/perf.webkit.org/unit-tests/commit-log-tests.js (295610 => 295611)

--- trunk/Websites/perf.webkit.org/unit-tests/commit-log-tests.js	2022-06-16 20:37:38 UTC (rev 295610)
+++ trunk/Websites/perf.webkit.org/unit-tests/commit-log-tests.js	2022-06-16 20:41:38 UTC (rev 295611)
@@ -28,6 +28,18 @@
 });
 }
 
+function webkitGitCommitWithRevisionIdentifier()
+{
+return new CommitLog(1, {
+id: 1,
+repository: MockModels.webkitGit,
+revision: '200805',
+revisionIdentifier: '184276@main',
+time: +(new Date('2016-05-13T00:55:57.841344Z')),
+});
+
+}
+
 function oldWebKitCommit()
 {
 return new CommitLog(2, {
@@ -49,6 +61,17 @@
 });
 }
 
+function oldWebKitGitCommitWithRevisionIdentifier()
+{
+return new CommitLog(2, {
+id: 2,
+repository: MockModels.webkitGit,
+revision: '200574',
+revisionIdentifier: '175605@main',
+time: +(new Date('2016-05-09T14:59:23.553767Z')),
+});
+}
+
 function gitWebKitCommit()
 {
 return new CommitLog(3, {
@@ -308,6 +331,14 @@
 });
 });
 
+it('should prefer using identifiers create blame URL', () => {
+assert.deepStrictEqual(webkitGitCommitWithRevisionIdentifier().diff((oldWebKitGitCommitWithRevisionIdentifier())), {
+label: '175605-184276@main (r200574-r200805)',
+url: 'https://commits.webkit.org/compare/175605@main...184276@main',
+repository: MockModels.webkitGit
+});
+});
+
 });
 
 describe('hasOrdering', () => {


Modified: trunk/Websites/perf.webkit.org/unit-tests/commit-set-tests.js (295610 => 295611)

--- trunk/Websites/perf.webkit.org/unit-tests/commit-set-tests.js	2022-06-16 20:37:38 UTC (rev 295610)
+++ trunk/Websites/perf.webkit.org/unit-tests/commit-set-tests.js	2022-06-16 20:41:38 UTC (rev 295611)
@@ -423,7 +423,7 @@
 assert.equal(CommitSet.diff(oneCommitSet(), commitSetWithAnotherWebKitCommit()), 'WebKit: webkit-commit-0 - webkit-commit-1');
 assert.equal(CommitSet.diff(commitSetWithSVNCommit(), anotherCommitSetWithSVNCommit()), 'WebKit: r12345-r45678');
 

[webkit-changes] [292519] trunk/Tools

2022-04-06 Thread dewei_zhu
Title: [292519] trunk/Tools








Revision 292519
Author dewei_...@apple.com
Date 2022-04-06 18:08:53 -0700 (Wed, 06 Apr 2022)


Log Message
Use 'open' command on macOS to launch URL should pass Safari app bundle instead of binary
https://bugs.webkit.org/show_bug.cgi?id=238915


Reviewed by Stephanie Lewis.

Pass 'Safari.app' instead of 'Safari.app/Contents/MacOS/Safari' when launching URL via 'open' command.

* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
(OSXSafariDriver.launch_url):

Canonical link: https://commits.webkit.org/249357@main

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py




Diff

Modified: trunk/Tools/ChangeLog (292518 => 292519)

--- trunk/Tools/ChangeLog	2022-04-07 01:06:34 UTC (rev 292518)
+++ trunk/Tools/ChangeLog	2022-04-07 01:08:53 UTC (rev 292519)
@@ -1,3 +1,16 @@
+2022-04-06  Dewei Zhu  
+
+Use 'open' command on macOS to launch URL should pass Safari app bundle instead of binary
+https://bugs.webkit.org/show_bug.cgi?id=238915
+
+
+Reviewed by Stephanie Lewis.
+
+Pass 'Safari.app' instead of 'Safari.app/Contents/MacOS/Safari' when launching URL via 'open' command.
+
+* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
+(OSXSafariDriver.launch_url):
+
 2022-04-04  Jonathan Bedard  
 
 [Merge-Queue] Run `git svn fetch`


Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py (292518 => 292519)

--- trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py	2022-04-07 01:06:34 UTC (rev 292518)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py	2022-04-07 01:08:53 UTC (rev 292519)
@@ -23,7 +23,8 @@
 self._maximize_window()
 
 def launch_url(self, url, options, browser_build_path, browser_path):
-args = ['/Applications/Safari.app/Contents/MacOS/Safari']
+safari_app_path = '/Applications/Safari.app'
+safari_binary_path = os.path.join(safari_app_path, 'Contents/MacOS/Safari')
 env = {}
 for key, value in os.environ.items():
 if re.match(r"^__XPC_", key):
@@ -30,31 +31,29 @@
 env[key] = value
 if browser_build_path:
 browser_build_absolute_path = os.path.abspath(browser_build_path)
-safari_app_in_build_path = os.path.join(browser_build_absolute_path, 'Safari.app/Contents/MacOS/Safari')
-has_safari_app = os.path.exists(safari_app_in_build_path)
-content_in_path = os.listdir(browser_build_absolute_path)
+safari_app_path = os.path.join(browser_build_absolute_path, 'Safari.app')
+safari_binary_path = os.path.join(safari_app_path, 'Contents/MacOS/Safari')
+has_safari_binary = os.path.exists(safari_binary_path)
 contains_frameworks = any(map(lambda entry: entry.endswith('.framework'), os.listdir(browser_build_absolute_path)))
 
-if has_safari_app:
-args = [safari_app_in_build_path]
-
 if contains_frameworks:
 env['DYLD_FRAMEWORK_PATH'] = browser_build_absolute_path
 env['DYLD_LIBRARY_PATH'] = browser_build_absolute_path
 env['__XPC_DYLD_FRAMEWORK_PATH'] = browser_build_absolute_path
 env['__XPC_DYLD_LIBRARY_PATH'] = browser_build_absolute_path
-elif not has_safari_app:
+elif not has_safari_binary:
 raise Exception('Could not find any framework "{}"'.format(browser_build_path))
 
 elif browser_path:
-safari_app_in_browser_path = os.path.join(browser_path, 'Contents/MacOS/Safari')
-if os.path.exists(safari_app_in_browser_path):
-args = [safari_app_in_browser_path]
+safari_binary_path = os.path.join(browser_path, 'Contents/MacOS/Safari')
+if os.path.exists(safari_binary_path):
+safari_app_path = browser_path
 else:
-raise Exception('Could not find Safari.app at {}'.format(safari_app_in_browser_path))
+raise Exception('Could not find Safari.app at {}'.format(safari_app_path))
 
-args.extend(self._safari_preferences)
-_log.info('Launching safari: %s with url: %s' % (args[0], url))
+args = [safari_binary_path] + self._safari_preferences
+
+_log.info('Launching safari: %s with url: %s' % (safari_binary_path, url))
 self._safari_process = OSXSafariDriver._launch_process_with_caffeinate(args, env)
 
 # Stop for initialization of the safari process, otherwise, open
@@ -71,12 +70,12 @@
 **(dict(encoding='utf-8') if sys.version_info >= (3, 6) else dict())
 )
 output = process.communicate()[0]
-if has_safari_app:
+if has_safari_binary:
 assert 

[webkit-changes] [290811] trunk/Tools

2022-03-03 Thread dewei_zhu
Title: [290811] trunk/Tools








Revision 290811
Author dewei_...@apple.com
Date 2022-03-03 18:40:59 -0800 (Thu, 03 Mar 2022)


Log Message
'run-benchmark' script should log http requests during benchmark run.
https://bugs.webkit.org/show_bug.cgi?id=237076


Reviewed by Jonathan Bedard.

Relanding 290583 with fix.
Add support to log http requests during benchmark run for diagnostic purpose.
AutoInstall sets 'AUTOINSTALL_CA_CERT_PATH' to environment variables when certificate is specified,
and uses 'AUTOINSTALL_CA_CERT_PATH' when it's present in environment variables. This ensures scripts invoked
from subprocess can use autoinstalled correcctly.

* Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(AutoInstall):
(AutoInstall.set_index):
* Scripts/webkitpy/__init__.py: Update 'attr' package version to 20.3.0 so match upgraded twisted version
* Scripts/webkitpy/autoinstalled/twisted.py: Upgrade twisted version to latest python2 & python3 compatibile
version with specified implicit dependencies.
* Scripts/webkitpy/benchmark_runner/benchmark_runner.py: Ensure benchmark diagnostic directory is created.
(BenchmarkRunner.__init__):
* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py: Add '--log-path'
arugment to allow specify logging output and it defaults to '/tmp/run-benchmark-http.log'
* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver.py:
(HTTPServerDriver.set_device_id):
(HTTPServerDriver):
(HTTPServerDriver.set_http_log):
* Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py: Pass http log path to
twisted http server if specified.
(SimpleHTTPServerDriver.__init__):
(SimpleHTTPServerDriver.serve):
(SimpleHTTPServerDriver.set_http_log):
* Scripts/webkitpy/benchmark_runner/run_benchmark.py: Fix a tiny bug that default_diagnose_dir() is involked twice in
argument parser help message.
(config_argument_parser):
* Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py: Set http request log path if diagnostic directory
is specified.
(WebServerBenchmarkRunner.__init__):

Canonical link: https://commits.webkit.org/248047@main

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py
trunk/Tools/Scripts/webkitpy/__init__.py
trunk/Tools/Scripts/webkitpy/autoinstalled/twisted.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/run_benchmark.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py




Diff

Modified: trunk/Tools/ChangeLog (290810 => 290811)

--- trunk/Tools/ChangeLog	2022-03-04 02:19:22 UTC (rev 290810)
+++ trunk/Tools/ChangeLog	2022-03-04 02:40:59 UTC (rev 290811)
@@ -1,3 +1,43 @@
+2022-03-03  Dewei Zhu  
+
+'run-benchmark' script should log http requests during benchmark run.
+https://bugs.webkit.org/show_bug.cgi?id=237076
+
+
+Reviewed by Jonathan Bedard.
+
+Relanding 290583 with fix.
+Add support to log http requests during benchmark run for diagnostic purpose.
+AutoInstall sets 'AUTOINSTALL_CA_CERT_PATH' to environment variables when certificate is specified,
+and uses 'AUTOINSTALL_CA_CERT_PATH' when it's present in environment variables. This ensures scripts invoked
+from subprocess can use autoinstalled correcctly.
+
+* Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
+(AutoInstall):
+(AutoInstall.set_index):
+* Scripts/webkitpy/__init__.py: Update 'attr' package version to 20.3.0 so match upgraded twisted version
+* Scripts/webkitpy/autoinstalled/twisted.py: Upgrade twisted version to latest python2 & python3 compatibile
+version with specified implicit dependencies.
+* Scripts/webkitpy/benchmark_runner/benchmark_runner.py: Ensure benchmark diagnostic directory is created.
+(BenchmarkRunner.__init__):
+* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py: Add '--log-path'
+arugment to allow specify logging output and it defaults to '/tmp/run-benchmark-http.log'
+* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver.py:
+(HTTPServerDriver.set_device_id):
+(HTTPServerDriver):
+(HTTPServerDriver.set_http_log):
+* Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py: Pass http log path to
+twisted http server if specified.
+(SimpleHTTPServerDriver.__init__):
+(SimpleHTTPServerDriver.serve):
+(SimpleHTTPServerDriver.set_http_log):
+* 

[webkit-changes] [290583] trunk/Tools

2022-02-27 Thread dewei_zhu
Title: [290583] trunk/Tools








Revision 290583
Author dewei_...@apple.com
Date 2022-02-27 23:07:45 -0800 (Sun, 27 Feb 2022)


Log Message
'run-benchmark' script should log http requests during benchmark run.
https://bugs.webkit.org/show_bug.cgi?id=237076


Reviewed by Simon Fraser.

Add support to log http requests during benchmark run for diagnostic purpose.
* Scripts/webkitpy/__init__.py: Update 'attr' package version to 20.3.0 so match upgraded twisted version
* Scripts/webkitpy/autoinstalled/twisted.py: Upgrade twisted version to latest python2 & python3 compatibile
version.
* Scripts/webkitpy/benchmark_runner/benchmark_runner.py: Ensure benchmark diagnostic directory is created.
(BenchmarkRunner.__init__):
* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py: Add '--log-path'
arugment to allow specify logging output and it defaults to '/tmp/run-benchmark-http.log'
* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver.py:
(HTTPServerDriver.set_device_id):
(HTTPServerDriver):
(HTTPServerDriver.set_http_log):
* Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py: Pass http log path to
twisted http server if specified.
(SimpleHTTPServerDriver.__init__):
(SimpleHTTPServerDriver.serve):
(SimpleHTTPServerDriver.set_http_log):
* Scripts/webkitpy/benchmark_runner/run_benchmark.py: Fix a tiny bug that default_diagnose_dir() is involked twice in
argument parser help message.
(config_argument_parser):
* Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py: Set http request log path if diagnostic directory
is specified.
(WebServerBenchmarkRunner.__init__):

Canonical link: https://commits.webkit.org/247861@main

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/__init__.py
trunk/Tools/Scripts/webkitpy/autoinstalled/twisted.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/run_benchmark.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py




Diff

Modified: trunk/Tools/ChangeLog (290582 => 290583)

--- trunk/Tools/ChangeLog	2022-02-28 05:09:32 UTC (rev 290582)
+++ trunk/Tools/ChangeLog	2022-02-28 07:07:45 UTC (rev 290583)
@@ -1,3 +1,36 @@
+2022-02-27  Dewei Zhu  
+
+'run-benchmark' script should log http requests during benchmark run.
+https://bugs.webkit.org/show_bug.cgi?id=237076
+
+
+Reviewed by Simon Fraser.
+
+Add support to log http requests during benchmark run for diagnostic purpose.
+* Scripts/webkitpy/__init__.py: Update 'attr' package version to 20.3.0 so match upgraded twisted version
+* Scripts/webkitpy/autoinstalled/twisted.py: Upgrade twisted version to latest python2 & python3 compatibile
+version.
+* Scripts/webkitpy/benchmark_runner/benchmark_runner.py: Ensure benchmark diagnostic directory is created.
+(BenchmarkRunner.__init__):
+* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py: Add '--log-path'
+arugment to allow specify logging output and it defaults to '/tmp/run-benchmark-http.log'
+* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver.py:
+(HTTPServerDriver.set_device_id):
+(HTTPServerDriver):
+(HTTPServerDriver.set_http_log):
+* Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py: Pass http log path to
+twisted http server if specified.
+(SimpleHTTPServerDriver.__init__):
+(SimpleHTTPServerDriver.serve):
+(SimpleHTTPServerDriver.set_http_log):
+* Scripts/webkitpy/benchmark_runner/run_benchmark.py: Fix a tiny bug that default_diagnose_dir() is involked twice in
+argument parser help message.
+(config_argument_parser):
+* Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py: Set http request log path if diagnostic directory
+is specified.
+(WebServerBenchmarkRunner.__init__):
+
+
 2022-02-27  Jonathan Bedard  
 
 webkitpy: WebSocket server doesn't support Python 3


Modified: trunk/Tools/Scripts/webkitpy/__init__.py (290582 => 290583)

--- trunk/Tools/Scripts/webkitpy/__init__.py	2022-02-28 05:09:32 UTC (rev 290582)
+++ trunk/Tools/Scripts/webkitpy/__init__.py	2022-02-28 07:07:45 UTC (rev 290583)
@@ -54,7 +54,7 @@
 AutoInstall.register(Package('importlib_metadata', Version(1, 7, 0)))
 
 AutoInstall.register(Package('atomicwrites', Version(1, 1, 5)))
-AutoInstall.register(Package('attr', Version(18, 1, 0), pypi_name='attrs'))
+AutoInstall.register(Package('attr', Version(20, 3, 0), 

[webkit-changes] [289773] trunk/Tools/Scripts

2022-02-14 Thread dewei_zhu
Title: [289773] trunk/Tools/Scripts








Revision 289773
Author dewei_...@apple.com
Date 2022-02-14 15:19:00 -0800 (Mon, 14 Feb 2022)


Log Message
Update shebang for run-benchmark scripts.

Reviewed by Jonathan Bedard.

Use python3 in shebang for run-benchmark.
Remove shebang from modules in benchmark_runner.

* Tools/Scripts/run-benchmark:
* Tools/Scripts/webkitpy/benchmark_runner/benchmark_builder.py:
* Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
* Tools/Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py:
* Tools/Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver_factory.py:
* Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:
* Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py:
* Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
* Tools/Scripts/webkitpy/benchmark_runner/generic_factory.py:
* Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:
* Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver.py:
* Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver_factory.py:
* Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:
* Tools/Scripts/webkitpy/benchmark_runner/run_benchmark.py:
* Tools/Scripts/webkitpy/benchmark_runner/utils.py:
* Tools/Scripts/webkitpy/benchmark_runner/webdriver_benchmark_runner.py:
* Tools/Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py:

Canonical link: https://commits.webkit.org/247243@main

Modified Paths

trunk/Tools/Scripts/run-benchmark
trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_builder.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver_factory.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/generic_factory.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver_factory.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/run_benchmark.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/utils.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/webdriver_benchmark_runner.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py




Diff

Modified: trunk/Tools/Scripts/run-benchmark (289772 => 289773)

--- trunk/Tools/Scripts/run-benchmark	2022-02-14 23:13:34 UTC (rev 289772)
+++ trunk/Tools/Scripts/run-benchmark	2022-02-14 23:19:00 UTC (rev 289773)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import logging
 import sys


Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_builder.py (289772 => 289773)

--- trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_builder.py	2022-02-14 23:13:34 UTC (rev 289772)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_builder.py	2022-02-14 23:19:00 UTC (rev 289773)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 import logging
 import tempfile
 import os


Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py (289772 => 289773)

--- trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py	2022-02-14 23:13:34 UTC (rev 289772)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py	2022-02-14 23:19:00 UTC (rev 289773)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 import json
 import logging
 import sys


Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py (289772 => 289773)

--- trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py	2022-02-14 23:13:34 UTC (rev 289772)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py	2022-02-14 23:19:00 UTC (rev 289773)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 from abc import ABCMeta, abstractmethod
 from webkitpy.benchmark_runner.utils import get_driver_binary_path
 


Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver_factory.py (289772 => 289773)

--- trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver_factory.py	2022-02-14 23:13:34 UTC (rev 289772)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver_factory.py	2022-02-14 23:19:00 UTC (rev 289773)
@@ -1,6 +1,3 @@
-#!/usr/bin/env python
-
-
 class BrowserDriverFactory(object):
 
 

[webkit-changes] [287865] trunk/Tools

2022-01-10 Thread dewei_zhu
Title: [287865] trunk/Tools








Revision 287865
Author dewei_...@apple.com
Date 2022-01-10 18:01:49 -0800 (Mon, 10 Jan 2022)


Log Message
Revert r287861.
https://bugs.webkit.org/show_bug.cgi?id=235048


Unreviewed revert.

Temporarily revert r287861(245905@main) which breaks git-webkit script when
invoked outside of a checkout directory.

* Scripts/git-webkit:

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/git-webkit




Diff

Modified: trunk/Tools/ChangeLog (287864 => 287865)

--- trunk/Tools/ChangeLog	2022-01-11 01:36:00 UTC (rev 287864)
+++ trunk/Tools/ChangeLog	2022-01-11 02:01:49 UTC (rev 287865)
@@ -1,3 +1,16 @@
+2022-01-10  Dewei Zhu  
+
+Revert r287861.
+https://bugs.webkit.org/show_bug.cgi?id=235048
+
+
+Unreviewed revert.
+
+Temporarily revert r287861(245905@main) which breaks git-webkit script when
+invoked outside of a checkout directory.
+
+* Scripts/git-webkit:
+
 2022-01-10  Jonathan Bedard  
 
 [git-webkit] Use cwd as default path


Modified: trunk/Tools/Scripts/git-webkit (287864 => 287865)

--- trunk/Tools/Scripts/git-webkit	2022-01-11 01:36:00 UTC (rev 287864)
+++ trunk/Tools/Scripts/git-webkit	2022-01-11 02:01:49 UTC (rev 287865)
@@ -67,6 +67,7 @@
 
 if '__main__' == __name__:
 sys.exit(program.main(
+path=os.path.dirname(__file__),
 identifier_template=is_webkit_filter('Canonical link: https://commits.webkit.org/{}'),
 subversion=is_webkit_filter('https://svn.webkit.org/repository/webkit'),
 additional_setup=is_webkit_filter(additional_setup),






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [287289] trunk/Tools

2021-12-20 Thread dewei_zhu
Title: [287289] trunk/Tools








Revision 287289
Author dewei_...@apple.com
Date 2021-12-20 17:19:32 -0800 (Mon, 20 Dec 2021)


Log Message
'run-benchmark' should launch browsers in a relative clean state.
https://bugs.webkit.org/show_bug.cgi?id=234107

Reviewed by Stephanie Lewis.

Add code to ensure Chrome and Firefox launches in a relative clean state.
Refactor browser drivers for macOS Chrome and Firefox to share more code.

* Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:
Added '--no-first-run', '--no-default-browser-check', '--disable-extensions' flags.
(OSXChromeDriverBase):
(OSXChromeDriverBase.launch_url):
(OSXChromeDriverBase.launch_driver):
(OSXChromeDriverBase._create_chrome_options):
(OSXChromeDriverBase._window_size_arg):
(OSXChromeDriverBase._set_chrome_binary_location):
(OSXChromeDriver):
(OSXChromeDriver._set_chrome_binary_location):
(OSXChromeCanaryDriver._set_chrome_binary_location):
(OSXChromeDriver.launch_url): Deleted.
(OSXChromeDriver.launch_driver): Deleted.
(OSXChromeCanaryDriver.launch_url): Deleted.
(OSXChromeCanaryDriver.launch_driver): Deleted.
(create_args): Deleted.
(create_chrome_options): Deleted.
(create_window_size_arg): Deleted.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py:
Added code to use profiles to suppress default browser check and privacy notice tab.
(OSXFirefoxDriverBase):
(OSXFirefoxDriverBase.__init__):
(OSXFirefoxDriverBase.prepare_env):
(OSXFirefoxDriverBase.restore_env):
(OSXFirefoxDriverBase.launch_url):
(OSXFirefoxDriverBase.launch_driver):
(OSXFirefoxDriverBase._setup_temporary_profile_directory):
(OSXFirefoxDriverBase._teardown_temporary_profile_directory):
(OSXFirefoxDriverBase._set_firefox_binary_location):
(OSXFirefoxDriver):
(OSXFirefoxDriver._set_firefox_binary_location):
(OSXFirefoxNightlyDriver):
(OSXFirefoxNightlyDriver._set_firefox_binary_location):
(OSXFirefoxDriver.launch_url): Deleted.
(OSXFirefoxDriver.launch_driver): Deleted.
(OSXFirefoxNightlyDriver.launch_url): Deleted.
(OSXFirefoxNightlyDriver.launch_driver): Deleted.
(create_args): Deleted.
* Scripts/webkitpy/benchmark_runner/data/firefox_profile/user.js: Added user preferences
so that Firefox can be launched without checking default browser and privacy notice.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py


Added Paths

trunk/Tools/Scripts/webkitpy/benchmark_runner/data/firefox_profile/
trunk/Tools/Scripts/webkitpy/benchmark_runner/data/firefox_profile/user.js




Diff

Modified: trunk/Tools/ChangeLog (287288 => 287289)

--- trunk/Tools/ChangeLog	2021-12-21 00:33:43 UTC (rev 287288)
+++ trunk/Tools/ChangeLog	2021-12-21 01:19:32 UTC (rev 287289)
@@ -1,3 +1,54 @@
+2021-12-20  Dewei Zhu  
+
+'run-benchmark' should launch browsers in a relative clean state.
+https://bugs.webkit.org/show_bug.cgi?id=234107
+
+Reviewed by Stephanie Lewis.
+
+Add code to ensure Chrome and Firefox launches in a relative clean state.
+Refactor browser drivers for macOS Chrome and Firefox to share more code.
+
+* Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:
+Added '--no-first-run', '--no-default-browser-check', '--disable-extensions' flags.
+(OSXChromeDriverBase):
+(OSXChromeDriverBase.launch_url):
+(OSXChromeDriverBase.launch_driver):
+(OSXChromeDriverBase._create_chrome_options):
+(OSXChromeDriverBase._window_size_arg):
+(OSXChromeDriverBase._set_chrome_binary_location):
+(OSXChromeDriver):
+(OSXChromeDriver._set_chrome_binary_location):
+(OSXChromeCanaryDriver._set_chrome_binary_location):
+(OSXChromeDriver.launch_url): Deleted.
+(OSXChromeDriver.launch_driver): Deleted.
+(OSXChromeCanaryDriver.launch_url): Deleted.
+(OSXChromeCanaryDriver.launch_driver): Deleted.
+(create_args): Deleted.
+(create_chrome_options): Deleted.
+(create_window_size_arg): Deleted.
+* Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py:
+Added code to use profiles to suppress default browser check and privacy notice tab.
+(OSXFirefoxDriverBase):
+(OSXFirefoxDriverBase.__init__):
+(OSXFirefoxDriverBase.prepare_env):
+(OSXFirefoxDriverBase.restore_env):
+(OSXFirefoxDriverBase.launch_url):
+(OSXFirefoxDriverBase.launch_driver):
+(OSXFirefoxDriverBase._setup_temporary_profile_directory):
+(OSXFirefoxDriverBase._teardown_temporary_profile_directory):
+(OSXFirefoxDriverBase._set_firefox_binary_location):
+(OSXFirefoxDriver):
+(OSXFirefoxDriver._set_firefox_binary_location):
+(OSXFirefoxNightlyDriver):
+(OSXFirefoxNightlyDriver._set_firefox_binary_location):
+

[webkit-changes] [283153] trunk/Websites/perf.webkit.org

2021-09-27 Thread dewei_zhu
Title: [283153] trunk/Websites/perf.webkit.org








Revision 283153
Author dewei_...@apple.com
Date 2021-09-27 16:33:04 -0700 (Mon, 27 Sep 2021)


Log Message
Summary page should support calculating summary using weighted mean.
https://bugs.webkit.org/show_bug.cgi?id=230810

Reviewed by Ryosuke Niwa.

Add a way to specify weight for a platform or (plafform, metric) which will be used while calculating a summary.

* public/shared/statistics.js: Added 'weightedMean' function.
(Statistics.new.this.weightedMean):
* public/v3/pages/summary-page.js: Added support for specifying a weight for platform or (platform, metric).
(SummaryPage):
(SummaryPage.prototype._createConfigurationGroup):
(SummaryPageConfigurationGroup):
* unit-tests/statistics-tests.js: Added unit tests.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/shared/statistics.js
trunk/Websites/perf.webkit.org/public/v3/pages/summary-page.js
trunk/Websites/perf.webkit.org/unit-tests/statistics-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (283152 => 283153)

--- trunk/Websites/perf.webkit.org/ChangeLog	2021-09-27 23:05:18 UTC (rev 283152)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2021-09-27 23:33:04 UTC (rev 283153)
@@ -1,3 +1,20 @@
+2021-09-26  Dewei Zhu  
+
+Summary page should support calculating summary using weighted mean.
+https://bugs.webkit.org/show_bug.cgi?id=230810
+
+Reviewed by Ryosuke Niwa.
+
+Add a way to specify weight for a platform or (plafform, metric) which will be used while calculating a summary.
+
+* public/shared/statistics.js: Added 'weightedMean' function.
+(Statistics.new.this.weightedMean):
+* public/v3/pages/summary-page.js: Added support for specifying a weight for platform or (platform, metric).
+(SummaryPage):
+(SummaryPage.prototype._createConfigurationGroup):
+(SummaryPageConfigurationGroup):
+* unit-tests/statistics-tests.js: Added unit tests.
+
 2021-07-20  Dewei Zhu  
 
 Use bigint for 'commit_order' field in 'commits' table to support larger range.


Modified: trunk/Websites/perf.webkit.org/public/shared/statistics.js (283152 => 283153)

--- trunk/Websites/perf.webkit.org/public/shared/statistics.js	2021-09-27 23:05:18 UTC (rev 283152)
+++ trunk/Websites/perf.webkit.org/public/shared/statistics.js	2021-09-27 23:33:04 UTC (rev 283153)
@@ -16,6 +16,16 @@
 return this.sum(values) / values.length;
 }
 
+this.weightedMean = function (valuesWithWeights) {
+let totalWeight = 0;
+let sum = 0;
+for (const entry of valuesWithWeights) {
+totalWeight += entry.weight;
+sum += entry.value * entry.weight;
+}
+return sum / totalWeight;
+}
+
 this.median = function (values) {
 return values.sort(function (a, b) { return a - b; })[Math.floor(values.length / 2)];
 }


Modified: trunk/Websites/perf.webkit.org/public/v3/pages/summary-page.js (283152 => 283153)

--- trunk/Websites/perf.webkit.org/public/v3/pages/summary-page.js	2021-09-27 23:05:18 UTC (rev 283152)
+++ trunk/Websites/perf.webkit.org/public/v3/pages/summary-page.js	2021-09-27 23:33:04 UTC (rev 283153)
@@ -14,6 +14,7 @@
 this._renderQueue = [];
 this._configGroups = [];
 this._excludedConfigurations = summarySettings.excludedConfigurations;
+this._weightedConfigurations = summarySettings.weightedConfigurations;
 
 for (var metricGroup of summarySettings.metricGroups) {
 var group = {name: metricGroup.name, rows: []};
@@ -59,7 +60,7 @@
 {
 var platforms = platformIdList.map(function (id) { return Platform.findById(id); }).filter(function (obj) { return !!obj; });
 var metrics = metricIdList.map(function (id) { return Metric.findById(id); }).filter(function (obj) { return !!obj; });
-var configGroup = new SummaryPageConfigurationGroup(platforms, metrics, this._excludedConfigurations);
+var configGroup = new SummaryPageConfigurationGroup(platforms, metrics, this._excludedConfigurations, this._weightedConfigurations);
 this._configGroups.push(configGroup);
 return configGroup;
 }
@@ -247,7 +248,7 @@
 }
 
 class SummaryPageConfigurationGroup {
-constructor(platforms, metrics, excludedConfigurations)
+constructor(platforms, metrics, excludedConfigurations, weightedConfigurations)
 {
 this._measurementSets = [];
 this._configurationList = [];
@@ -258,6 +259,7 @@
 this._platformsWithoutBaseline = new Set;
 this._isFetching = false;
 this._smallerIsBetter = metrics.length ? metrics[0].isSmallerBetter() : null;
+this._weightedConfigurations = weightedConfigurations;
 
 for (const platform of platforms) {
 console.assert(platform instanceof Platform);
@@ -320,12 +322,13 @@
 {
 var ratios = [];
 for (var set of 

[webkit-changes] [280127] trunk/Websites/perf.webkit.org

2021-07-21 Thread dewei_zhu
Title: [280127] trunk/Websites/perf.webkit.org








Revision 280127
Author dewei_...@apple.com
Date 2021-07-21 04:35:17 -0700 (Wed, 21 Jul 2021)


Log Message
Use bigint for 'commit_order' field in 'commits' table to support larger range.
https://bugs.webkit.org/show_bug.cgi?id=228133

Reviewed by Ryosuke Niwa.

'integer' in postgres has range from -2147483648 to +2147483647 which is not big enough.
Use 'bigint' to support wider range (-9223372036854775808 to 9223372036854775807).
SQL query for migration:
`ALTER TABLE commits ALTER commit_order TYPE bigint;`

* init-database.sql: Update 'integer' to 'bigint' for 'commit_order'.
* migrate-database.sql: Added migration SQL for this change.
* server-tests/api-report-commits-tests.js: Add a unit test.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/init-database.sql
trunk/Websites/perf.webkit.org/migrate-database.sql
trunk/Websites/perf.webkit.org/server-tests/api-report-commits-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (280126 => 280127)

--- trunk/Websites/perf.webkit.org/ChangeLog	2021-07-21 05:55:05 UTC (rev 280126)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2021-07-21 11:35:17 UTC (rev 280127)
@@ -1,3 +1,19 @@
+2021-07-20  Dewei Zhu  
+
+Use bigint for 'commit_order' field in 'commits' table to support larger range.
+https://bugs.webkit.org/show_bug.cgi?id=228133
+
+Reviewed by Ryosuke Niwa.
+
+'integer' in postgres has range from -2147483648 to +2147483647 which is not big enough.
+Use 'bigint' to support wider range (-9223372036854775808 to 9223372036854775807).
+SQL query for migration:
+`ALTER TABLE commits ALTER commit_order TYPE bigint;`
+
+* init-database.sql: Update 'integer' to 'bigint' for 'commit_order'.
+* migrate-database.sql: Added migration SQL for this change.
+* server-tests/api-report-commits-tests.js: Add a unit test.
+
 2021-05-03  Dewei Zhu  
 
 [perf dashboard] Add sequential mode for perf dashboard A/B testing.


Modified: trunk/Websites/perf.webkit.org/init-database.sql (280126 => 280127)

--- trunk/Websites/perf.webkit.org/init-database.sql	2021-07-21 05:55:05 UTC (rev 280126)
+++ trunk/Websites/perf.webkit.org/init-database.sql	2021-07-21 11:35:17 UTC (rev 280127)
@@ -106,7 +106,7 @@
 commit_revision_identifier varchar(64) DEFAULT NULL,
 commit_previous_commit integer REFERENCES commits ON DELETE CASCADE,
 commit_time timestamp,
-commit_order integer,
+commit_order bigint,
 commit_committer integer REFERENCES committers ON DELETE CASCADE,
 commit_message text,
 commit_reported boolean NOT NULL DEFAULT FALSE,


Modified: trunk/Websites/perf.webkit.org/migrate-database.sql (280126 => 280127)

--- trunk/Websites/perf.webkit.org/migrate-database.sql	2021-07-21 05:55:05 UTC (rev 280126)
+++ trunk/Websites/perf.webkit.org/migrate-database.sql	2021-07-21 11:35:17 UTC (rev 280127)
@@ -13,6 +13,10 @@
 ALTER TABLE commits DROP CONSTRAINT IF EXISTS commit_string_identifier_in_repository_must_be_unique;
 ALTER TABLE commits ADD CONSTRAINT commit_string_identifier_in_repository_must_be_unique UNIQUE(commit_repository, commit_revision_identifier);
 
+IF EXISTS (SELECT NULL FROM information_schema.columns WHERE TABLE_NAME = 'commits' AND COLUMN_NAME = 'commit_order' AND DATA_TYPE = 'integer') THEN
+ALTER TABLE commits ALTER commit_order TYPE bigint;
+END IF;
+
 CREATE TABLE IF NOT EXISTS platform_groups (
 platformgroup_id serial PRIMARY KEY,
 platformgroup_name varchar(64) NOT NULL,


Modified: trunk/Websites/perf.webkit.org/server-tests/api-report-commits-tests.js (280126 => 280127)

--- trunk/Websites/perf.webkit.org/server-tests/api-report-commits-tests.js	2021-07-21 05:55:05 UTC (rev 280126)
+++ trunk/Websites/perf.webkit.org/server-tests/api-report-commits-tests.js	2021-07-21 11:35:17 UTC (rev 280127)
@@ -812,6 +812,27 @@
 });
 });
 
+const commitWithHugeOrder = {
+"workerName": "someWorker",
+"workerPassword": "somePassword",
+"commits": [
+{
+"repository": "OSX",
+"revision": "Sierra16D32",
+"order": 2147483648
+}
+]
+}
+
+it("should accept interting one commit with a huge commit order", async () => {
+await addWorkerForReport(commitWithHugeOrder);
+const response = await TestServer.remoteAPI().postJSON('/api/report-commits/', commitWithHugeOrder);
+assert.strictEqual(response['status'], 'OK');
+const commits = await TestServer.database().selectAll('commits');
+assert.strictEqual(commits.length, 1);
+assert.strictEqual(parseInt(commits[0].order), 2147483648);
+});
+
 const systemVersionCommitAndOwnedCommitWithTimestamp = {
 "workerName": "someWorker",
 "workerPassword": "somePassword",







[webkit-changes] [278670] trunk/Tools

2021-06-09 Thread dewei_zhu
Title: [278670] trunk/Tools








Revision 278670
Author dewei_...@apple.com
Date 2021-06-09 13:54:31 -0700 (Wed, 09 Jun 2021)


Log Message
HTTP server should run with the same python executable as run-benchmark script.
https://bugs.webkit.org/show_bug.cgi?id=226834

Reviewed by Jonathan Bedard.

'SimpleHTTPServerDriver._ensure_http_server_dependencies' will not work if the
python version used by run-benchmark is not the same as the one invokes http server.

Remove python modules no longer needed by http server.

* Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:
(SimpleHTTPServerDriver.serve):
(SimpleHTTPServerDriver._ensure_http_server_dependencies):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py




Diff

Modified: trunk/Tools/ChangeLog (278669 => 278670)

--- trunk/Tools/ChangeLog	2021-06-09 20:46:24 UTC (rev 278669)
+++ trunk/Tools/ChangeLog	2021-06-09 20:54:31 UTC (rev 278670)
@@ -1,3 +1,19 @@
+2021-06-09  Dewei Zhu  
+
+HTTP server should run with the same python executable as run-benchmark script.
+https://bugs.webkit.org/show_bug.cgi?id=226834
+
+Reviewed by Jonathan Bedard.
+
+'SimpleHTTPServerDriver._ensure_http_server_dependencies' will not work if the
+python version used by run-benchmark is not the same as the one invokes http server.
+
+Remove python modules no longer needed by http server.
+
+* Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:
+(SimpleHTTPServerDriver.serve):
+(SimpleHTTPServerDriver._ensure_http_server_dependencies):
+
 2021-06-09  Fujii Hironori  
 
 CISupport/test-result-archive script reports "SyntaxError: invalid syntax" with Python 3


Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py (278669 => 278670)

--- trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py	2021-06-09 20:46:24 UTC (rev 278669)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py	2021-06-09 20:54:31 UTC (rev 278670)
@@ -4,6 +4,7 @@
 import os
 import re
 import subprocess
+import sys
 import time
 
 from webkitpy.benchmark_runner.http_server_driver.http_server_driver import HTTPServerDriver
@@ -32,7 +33,7 @@
 if self._ip:
 interface_args.extend(['--interface', self._ip])
 self._server_port = 0
-self._server_process = subprocess.Popen(["python", http_server_path, web_root] + interface_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+self._server_process = subprocess.Popen([sys.executable, http_server_path, web_root] + interface_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 max_attempt = 7
 retry_sequence = map(lambda attempt: attempt != max_attempt - 1, range(max_attempt))
 interval = 0.5
@@ -106,5 +107,4 @@
 
 def _ensure_http_server_dependencies(self):
 _log.info('Ensure dependencies of http server is satisfied')
-from pkg_resources import require, VersionConflict, DistributionNotFound
 from webkitpy.autoinstalled import twisted






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [278638] trunk/Tools

2021-06-08 Thread dewei_zhu
Title: [278638] trunk/Tools








Revision 278638
Author dewei_...@apple.com
Date 2021-06-08 18:12:12 -0700 (Tue, 08 Jun 2021)


Log Message
Increase http server launch timeout on run-benchmark script.
https://bugs.webkit.org/show_bug.cgi?id=226801

Reviewed by Ryosuke Niwa.

Installing twisted module in http server may take longer than 7.5 seconds.
Increase the timeout to be 31.5 seconds and add an early terminate if http server
process is not running.

* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:
Removed unused import.
* Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:
(SimpleHTTPServerDriver.serve):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py




Diff

Modified: trunk/Tools/ChangeLog (278637 => 278638)

--- trunk/Tools/ChangeLog	2021-06-09 01:10:32 UTC (rev 278637)
+++ trunk/Tools/ChangeLog	2021-06-09 01:12:12 UTC (rev 278638)
@@ -1,3 +1,19 @@
+2021-06-08  Dewei Zhu  
+
+Increase http server launch timeout on run-benchmark script.
+https://bugs.webkit.org/show_bug.cgi?id=226801
+
+Reviewed by Ryosuke Niwa.
+
+Installing twisted module in http server may take longer than 7.5 seconds.
+Increase the timeout to be 31.5 seconds and add an early terminate if http server
+process is not running.
+
+* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:
+Removed unused import.
+* Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:
+(SimpleHTTPServerDriver.serve):
+
 2021-06-08  Fujii Hironori  
 
 run-webkit-tests: TaskPool reports PicklingError for Windows Python


Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py (278637 => 278638)

--- trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py	2021-06-09 01:10:32 UTC (rev 278637)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py	2021-06-09 01:12:12 UTC (rev 278638)
@@ -11,7 +11,6 @@
 if script_dir not in sys.path:
 sys.path.insert(0, script_dir)
 
-from pkg_resources import require, VersionConflict, DistributionNotFound
 from webkitpy.autoinstalled import twisted
 
 from twisted.web import static, server


Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py (278637 => 278638)

--- trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py	2021-06-09 01:10:32 UTC (rev 278637)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py	2021-06-09 01:12:12 UTC (rev 278638)
@@ -33,15 +33,19 @@
 interface_args.extend(['--interface', self._ip])
 self._server_port = 0
 self._server_process = subprocess.Popen(["python", http_server_path, web_root] + interface_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-max_attempt = 5
+max_attempt = 7
+retry_sequence = map(lambda attempt: attempt != max_attempt - 1, range(max_attempt))
 interval = 0.5
 _log.info('Start to fetching the port number of the http server')
-for attempt in range(max_attempt):
+for retry in retry_sequence:
 self._find_http_server_port()
 if self._server_port:
 _log.info('HTTP Server is serving at port: %d', self._server_port)
 break
-_log.info('Server port is not found this time, retry after %f seconds' % interval)
+assert self._server_process.poll() is None, 'HTTP Server Process is not running'
+if not retry:
+continue
+_log.info('Server port is not found this time, retry after {} seconds'.format(interval))
 time.sleep(interval)
 interval *= 2
 else:






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [277901] trunk/Websites/perf.webkit.org

2021-05-21 Thread dewei_zhu
Title: [277901] trunk/Websites/perf.webkit.org








Revision 277901
Author dewei_...@apple.com
Date 2021-05-21 17:13:39 -0700 (Fri, 21 May 2021)


Log Message
Fix a bug that incorrect timestamp is reported for Git repositories.
https://bugs.webkit.org/show_bug.cgi?id=225987

Reviewed by Ryosuke Niwa.

'datetime.fromtimestamp' will use the current timezone.
However, '/api/report-commits' will interprete it as a timestamp string from UTC.
In order to keep the consistency, we should always use 'datetime.utcfromtimestamp'.

* tools/sync-commits.py: Use 'datetime.utcfromtimestamp' instead of 'datetime.fromtimestamp'.
(GitRepository._revision_from_tokens):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/tools/sync-commits.py




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (277900 => 277901)

--- trunk/Websites/perf.webkit.org/ChangeLog	2021-05-22 00:11:37 UTC (rev 277900)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2021-05-22 00:13:39 UTC (rev 277901)
@@ -1,3 +1,17 @@
+2021-05-19  Dewei Zhu  
+
+Fix a bug that incorrect timestamp is reported for Git repositories.
+https://bugs.webkit.org/show_bug.cgi?id=225987
+
+Reviewed by Ryosuke Niwa.
+
+'datetime.fromtimestamp' will use the current timezone.
+However, '/api/report-commits' will interprete it as a timestamp string from UTC.
+In order to keep the consistency, we should always use 'datetime.utcfromtimestamp'.
+
+* tools/sync-commits.py: Use 'datetime.utcfromtimestamp' instead of 'datetime.fromtimestamp'.
+(GitRepository._revision_from_tokens):
+
 2021-05-20  Zhifei Fang  
 
 Need to use default git pull to remove the fake svn commit when syncing with SVN


Modified: trunk/Websites/perf.webkit.org/tools/sync-commits.py (277900 => 277901)

--- trunk/Websites/perf.webkit.org/tools/sync-commits.py	2021-05-22 00:11:37 UTC (rev 277900)
+++ trunk/Websites/perf.webkit.org/tools/sync-commits.py	2021-05-22 00:13:39 UTC (rev 277901)
@@ -274,7 +274,7 @@
 'revision': current_revision,
 'revisionIdentifier': revision_identifier,
 'previousCommit': previous_revision,
-'time': datetime.fromtimestamp(commit_time).strftime(r'%Y-%m-%dT%H:%M:%S.%f'),
+'time': datetime.utcfromtimestamp(commit_time).strftime(r'%Y-%m-%dT%H:%M:%S.%f'),
 'author': {'account': author_email, 'name': author_name},
 'message': message,
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [275152] trunk/Tools

2021-03-28 Thread dewei_zhu
Title: [275152] trunk/Tools








Revision 275152
Author dewei_...@apple.com
Date 2021-03-28 16:32:03 -0700 (Sun, 28 Mar 2021)


Log Message
Fix a bug that http server for run-benchmark script does not work on python3.
https://bugs.webkit.org/show_bug.cgi?id=223839

Reviewed by Ryosuke Niwa.

Fix encoding issue on run-benchmark http server.
Extract argument parser configure code for run-benchmark so that we can reuse it elsewhere.

* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:
(ServerControl.render_POST):
* Scripts/webkitpy/benchmark_runner/run_benchmark.py:
(config_argument_parser): Extract argument parser configure code so that we can reuse it elsewhere.
(parse_args):
(main):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/run_benchmark.py




Diff

Modified: trunk/Tools/ChangeLog (275151 => 275152)

--- trunk/Tools/ChangeLog	2021-03-28 19:14:20 UTC (rev 275151)
+++ trunk/Tools/ChangeLog	2021-03-28 23:32:03 UTC (rev 275152)
@@ -1,3 +1,20 @@
+2021-03-27  Dewei Zhu  
+
+Fix a bug that http server for run-benchmark script does not work on python3.
+https://bugs.webkit.org/show_bug.cgi?id=223839
+
+Reviewed by Ryosuke Niwa.
+
+Fix encoding issue on run-benchmark http server.
+Extract argument parser configure code for run-benchmark so that we can reuse it elsewhere.
+
+* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:
+(ServerControl.render_POST):
+* Scripts/webkitpy/benchmark_runner/run_benchmark.py:
+(config_argument_parser): Extract argument parser configure code so that we can reuse it elsewhere.
+(parse_args):
+(main):
+
 2021-03-28  Sam Weinig  
 
 Remove ENABLE_INDEXED_DATABASE & ENABLE_INDEXED_DATABASE_IN_WORKERS, it seems like it is on for all ports


Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py (275151 => 275152)

--- trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py	2021-03-28 19:14:20 UTC (rev 275151)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py	2021-03-28 23:32:03 UTC (rev 275152)
@@ -31,7 +31,7 @@
 
 def render_POST(self, request):
 _log.info("Serving request %s" % request)
-sys.stdout.write(request.content.read())
+sys.stdout.write(request.content.read().decode('utf-8'))
 sys.stdout.flush()
 reactor.stop()
 return 'OK'
@@ -45,7 +45,7 @@
 args = parser.parse_args()
 web_root = static.File(args.web_root)
 serverControl = ServerControl()
-web_root.putChild('shutdown', serverControl)
-web_root.putChild('report', serverControl)
+web_root.putChild('shutdown'.encode('utf-8'), serverControl)
+web_root.putChild('report'.encode('utf-8'), serverControl)
 reactor.listenTCP(args.port, server.Site(web_root), interface=args.interface)
 reactor.run()


Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/run_benchmark.py (275151 => 275152)

--- trunk/Tools/Scripts/webkitpy/benchmark_runner/run_benchmark.py	2021-03-28 19:14:20 UTC (rev 275151)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/run_benchmark.py	2021-03-28 23:32:03 UTC (rev 275152)
@@ -31,7 +31,7 @@
 return 'safari'
 
 
-def parse_args():
+def config_argument_parser():
 parser = argparse.ArgumentParser(description='Run browser based performance benchmarks. To run a single benchmark in the recommended way, use run-benchmark --plan. To see the vailable benchmarks, use run-benchmark --list-plans.')
 mutual_group = parser.add_mutually_exclusive_group(required=True)
 mutual_group.add_argument('--plan', help='Run a specific benchmark plan (e.g. speedometer, jetstream).')
@@ -54,6 +54,13 @@
 group.add_argument('--browser-path', help='Specify the path to a non-default copy of the target browser as a path to the .app.')
 group.add_argument('--build-directory', dest='build_dir', help='Path to the browser executable (e.g. WebKitBuild/Release/).')
 
+return parser
+
+
+# FIXME: Remove default arguments when all dependent scripts adopt this change.
+def parse_args(parser=None):
+if parser is None:
+parser = config_argument_parser()
 args = parser.parse_args()
 
 if args.debug:
@@ -126,4 +133,4 @@
 
 
 def main():
-return start(parse_args())
+return start(parse_args(config_argument_parser()))






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [274799] trunk/Websites/perf.webkit.org

2021-03-22 Thread dewei_zhu
Title: [274799] trunk/Websites/perf.webkit.org








Revision 274799
Author dewei_...@apple.com
Date 2021-03-22 14:23:28 -0700 (Mon, 22 Mar 2021)


Log Message
[perf dashboard] Perf dashboard should be compatible with newer version of postgres.
https://bugs.webkit.org/show_bug.cgi?id=223567

Reviewed by Ryosuke Niwa.

Newer version of postgres requires explicit ROW _expression_ while updating a single column
using multi-column update syntax. However, 'ROW' is not supported in postgres < 10. In order
to keep compatibility, using a separate query when only updating one row.

* public/include/db.php: Use 'column = value' when there is only one column to update.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/include/db.php




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (274798 => 274799)

--- trunk/Websites/perf.webkit.org/ChangeLog	2021-03-22 21:21:48 UTC (rev 274798)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2021-03-22 21:23:28 UTC (rev 274799)
@@ -1,3 +1,16 @@
+2021-03-21  Dewei Zhu  
+
+[perf dashboard] Perf dashboard should be compatible with newer version of postgres.
+https://bugs.webkit.org/show_bug.cgi?id=223567
+
+Reviewed by Ryosuke Niwa.
+
+Newer version of postgres requires explicit ROW _expression_ while updating a single column
+using multi-column update syntax. However, 'ROW' is not supported in postgres < 10. In order
+to keep compatibility, using a separate query when only updating one row.
+
+* public/include/db.php: Use 'column = value' when there is only one column to update.
+
 2021-03-06  Ryosuke Niwa  
 
 [perf dashboard] Use async/await in tests for TimeSeriesChart and InteractiveTimeSeriesChart


Modified: trunk/Websites/perf.webkit.org/public/include/db.php (274798 => 274799)

--- trunk/Websites/perf.webkit.org/public/include/db.php	2021-03-22 21:21:48 UTC (rev 274798)
+++ trunk/Websites/perf.webkit.org/public/include/db.php	2021-03-22 21:23:28 UTC (rev 274799)
@@ -231,8 +231,8 @@
 
 if ($insert_params === NULL)
 $insert_params = $select_params;
-$insert_placeholders = array();
-$insert_column_names = $this->prepare_params($insert_params, $insert_placeholders, $values);
+$insert_placeholder_list = array();
+$insert_column_name_list = $this->prepare_params($insert_params, $insert_placeholder_list, $values);
 
 assert(!!$returning);
 assert(!$prefix || ctype_alnum_underscore($prefix));
@@ -241,14 +241,19 @@
 $condition = $this->select_conditions_with_null_columns($prefix, $select_column_names, $select_placeholders, $select_null_columns);
 $query = "SELECT $returning_column_name FROM $table WHERE $condition";
 
-$insert_column_names = $this->prefixed_column_names($insert_column_names, $prefix);
-$insert_placeholders = join(', ', $insert_placeholders);
+$insert_column_names = $this->prefixed_column_names($insert_column_name_list, $prefix);
+$insert_placeholders = join(', ', $insert_placeholder_list);
 
 // http://stackoverflow.com/questions/1109061/insert-on-duplicate-update-in-postgresql
 $rows = NULL;
 if ($should_update) {
-$rows = $this->query_and_fetch_all("UPDATE $table SET ($insert_column_names) = ($insert_placeholders)
-WHERE $condition RETURNING $returning_column_name", $values);
+// FIXME: Remove this special case and use ROW _expression_ when no instance uses Postgres < 10.
+if (count($insert_placeholder_list) == 1 && count($insert_column_name_list) == 1)
+$rows = $this->query_and_fetch_all("UPDATE $table SET $insert_column_names = $insert_placeholders
+WHERE $condition RETURNING $returning_column_name", $values);
+else
+$rows = $this->query_and_fetch_all("UPDATE $table SET ($insert_column_names) = ($insert_placeholders)
+WHERE $condition RETURNING $returning_column_name", $values);
 }
 if (!$rows && $should_insert) {
 $rows = $this->query_and_fetch_all("INSERT INTO $table ($insert_column_names) SELECT $insert_placeholders






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [273118] trunk/Websites/perf.webkit.org

2021-02-18 Thread dewei_zhu
Title: [273118] trunk/Websites/perf.webkit.org








Revision 273118
Author dewei_...@apple.com
Date 2021-02-18 18:10:28 -0800 (Thu, 18 Feb 2021)


Log Message
Fix a bug that a syncing script may try to reuse a delete root.
https://bugs.webkit.org/show_bug.cgi?id=222144

Reviewed by Ryosuke Niwa.

UploadedFile.deletedAt is not returned by API which makes UploadedFile instance always claims
the file it not deleted.
Fix a logical bug in CommitSet.areAllRootsAvailable.

* public/include/uploaded-file-helpers.php: Include 'deletedAt' filed in the API response.
* public/v3/models/commit-set.js:
(CommitSet.prototype.areAllRootsAvailable): Fixed an syntax error and a logical bug.
* server-tests/api-build-requests-tests.js: Added check on 'deletedAt' to be set on deleted files.
* unit-tests/commit-set-tests.js: Added unit tests for CommitSet.areAllRootsAvailable.
* unit-tests/resources/mock-v3-models.js: Cleared static map for UploadedFile.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/include/uploaded-file-helpers.php
trunk/Websites/perf.webkit.org/public/v3/models/commit-set.js
trunk/Websites/perf.webkit.org/server-tests/api-build-requests-tests.js
trunk/Websites/perf.webkit.org/unit-tests/commit-set-tests.js
trunk/Websites/perf.webkit.org/unit-tests/resources/mock-v3-models.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (273117 => 273118)

--- trunk/Websites/perf.webkit.org/ChangeLog	2021-02-19 01:57:08 UTC (rev 273117)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2021-02-19 02:10:28 UTC (rev 273118)
@@ -1,3 +1,21 @@
+2021-02-18  Dewei Zhu  
+
+Fix a bug that a syncing script may try to reuse a delete root.
+https://bugs.webkit.org/show_bug.cgi?id=222144
+
+Reviewed by Ryosuke Niwa.
+
+UploadedFile.deletedAt is not returned by API which makes UploadedFile instance always claims
+the file it not deleted.
+Fix a logical bug in CommitSet.areAllRootsAvailable.
+
+* public/include/uploaded-file-helpers.php: Include 'deletedAt' filed in the API response.
+* public/v3/models/commit-set.js:
+(CommitSet.prototype.areAllRootsAvailable): Fixed an syntax error and a logical bug.
+* server-tests/api-build-requests-tests.js: Added check on 'deletedAt' to be set on deleted files.
+* unit-tests/commit-set-tests.js: Added unit tests for CommitSet.areAllRootsAvailable.
+* unit-tests/resources/mock-v3-models.js: Cleared static map for UploadedFile.
+
 2021-02-16  Dean Johnson  
 
 [perf.webkit.org] Do not schedule jobs to Buildbot if the last job failed


Modified: trunk/Websites/perf.webkit.org/public/include/uploaded-file-helpers.php (273117 => 273118)

--- trunk/Websites/perf.webkit.org/public/include/uploaded-file-helpers.php	2021-02-19 01:57:08 UTC (rev 273117)
+++ trunk/Websites/perf.webkit.org/public/include/uploaded-file-helpers.php	2021-02-19 02:10:28 UTC (rev 273118)
@@ -8,6 +8,7 @@
 'id' => $file_row['file_id'],
 'size' => $file_row['file_size'],
 'createdAt' => Database::to_js_time($file_row['file_created_at']),
+'deletedAt' => Database::to_js_time($file_row['file_deleted_at']),
 'mime' => $file_row['file_mime'],
 'filename' => $file_row['file_filename'],
 'extension' => $file_row['file_extension'],


Modified: trunk/Websites/perf.webkit.org/public/v3/models/commit-set.js (273117 => 273118)

--- trunk/Websites/perf.webkit.org/public/v3/models/commit-set.js	2021-02-19 01:57:08 UTC (rev 273117)
+++ trunk/Websites/perf.webkit.org/public/v3/models/commit-set.js	2021-02-19 02:10:28 UTC (rev 273118)
@@ -76,8 +76,8 @@
 
 areAllRootsAvailable(earliestCreationTime)
 {
-return this.allRootFiles().every(rootFile => (!rootFile.deletedAt() || this.customRoots().find(rootFile))
-&& rootFile.createdAt() >= earliestCreationTime);
+return this.allRootFiles().every(rootFile => this.customRoots().includes(rootFile)
+|| (!rootFile.deletedAt() && rootFile.createdAt() >= earliestCreationTime));
 }
 
 revisionForRepository(repository)


Modified: trunk/Websites/perf.webkit.org/server-tests/api-build-requests-tests.js (273117 => 273118)

--- trunk/Websites/perf.webkit.org/server-tests/api-build-requests-tests.js	2021-02-19 01:57:08 UTC (rev 273117)
+++ trunk/Websites/perf.webkit.org/server-tests/api-build-requests-tests.js	2021-02-19 02:10:28 UTC (rev 273118)
@@ -264,6 +264,7 @@
 assert.deepEqual(content['commitSets'][0].revisionItems, [
 {commit: '87832', commitOwner: null, patch: null, requiresBuild: false, rootFile: null},
 {commit: '93116', commitOwner: null, patch: 100, requiresBuild: true, rootFile: 101}]);
+assert.ok(content['uploadedFiles'][1].deletedAt);
 assert.deepEqual(content['commitSets'][2].revisionItems, [
 {commit: '87832', commitOwner: null, patch: null, requiresBuild: false, 

[webkit-changes] [272814] trunk/Websites/perf.webkit.org

2021-02-12 Thread dewei_zhu
Title: [272814] trunk/Websites/perf.webkit.org








Revision 272814
Author dewei_...@apple.com
Date 2021-02-12 15:03:34 -0800 (Fri, 12 Feb 2021)


Log Message
'sync-commits.py' should be able to limit reporting scope to a specific branch on a Git repository.
https://bugs.webkit.org/show_bug.cgi?id=221799

Reviewed by Ryosuke Niwa.

Fetching git commits with 'git log --all ...' may end up fetching commits from branches created for
pull requests. Add 'branch' variable to allow us to limit to a certain branch.

* tools/sync-commits.py: Added 'branch' variable to GitRepository so that we can fetch from a specific branch.
If branch is not specified, it will still use '--all' to list commits.
(load_repository):
(GitRepository.__init__):
(GitRepository._fetch_all_hashes):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/tools/sync-commits.py




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (272813 => 272814)

--- trunk/Websites/perf.webkit.org/ChangeLog	2021-02-12 22:29:04 UTC (rev 272813)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2021-02-12 23:03:34 UTC (rev 272814)
@@ -1,3 +1,19 @@
+2021-02-11  Dewei Zhu  
+
+'sync-commits.py' should be able to limit reporting scope to a specific branch on a Git repository.
+https://bugs.webkit.org/show_bug.cgi?id=221799
+
+Reviewed by Ryosuke Niwa.
+
+Fetching git commits with 'git log --all ...' may end up fetching commits from branches created for
+pull requests. Add 'branch' variable to allow us to limit to a certain branch.
+
+* tools/sync-commits.py: Added 'branch' variable to GitRepository so that we can fetch from a specific branch.
+If branch is not specified, it will still use '--all' to list commits.
+(load_repository):
+(GitRepository.__init__):
+(GitRepository._fetch_all_hashes):
+
 2021-02-12  Roy Reapor  
 
 perf.webkit.org/tools/js/analysis-results-notifier.js should allow sending of completion emails regardless of test name


Modified: trunk/Websites/perf.webkit.org/tools/sync-commits.py (272813 => 272814)

--- trunk/Websites/perf.webkit.org/tools/sync-commits.py	2021-02-12 22:29:04 UTC (rev 272813)
+++ trunk/Websites/perf.webkit.org/tools/sync-commits.py	2021-02-12 23:03:34 UTC (rev 272814)
@@ -43,7 +43,7 @@
 
 def load_repository(repository):
 if 'gitCheckout' in repository:
-return GitRepository(name=repository['name'], git_url=repository['url'], git_checkout=repository['gitCheckout'])
+return GitRepository(name=repository['name'], git_url=repository['url'], git_checkout=repository['gitCheckout'], git_branch=repository.get('branch'))
 return SVNRepository(name=repository['name'], svn_url=repository['url'], should_trust_certificate=repository.get('trustCertificate', False),
 use_server_auth=repository.get('useServerAuth', False), account_name_script_path=repository.get('accountNameFinderScript'))
 
@@ -192,11 +192,12 @@
 
 class GitRepository(Repository):
 
-def __init__(self, name, git_checkout, git_url):
+def __init__(self, name, git_checkout, git_url, git_branch=None):
 assert(os.path.isdir(git_checkout))
 super(GitRepository, self).__init__(name)
 self._git_checkout = git_checkout
 self._git_url = git_url
+self._git_branch = git_branch
 self._tokenized_hashes = []
 
 def fetch_next_commit(self, server_config, last_fetched):
@@ -245,7 +246,8 @@
 
 def _fetch_all_hashes(self):
 self._run_git_command(['pull', self._git_url])
-lines = self._run_git_command(['log', '--all', '--date-order', '--reverse', '--pretty=%H %ct %ce %P']).split('\n')
+scope = self._git_branch or '--all'
+lines = self._run_git_command(['log', scope, '--date-order', '--reverse', '--pretty=%H %ct %ce %P']).split('\n')
 self._tokenized_hashes = [line.split() for line in lines]
 
 def _run_git_command(self, args):






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [271639] trunk/Websites/perf.webkit.org

2021-01-20 Thread dewei_zhu
Title: [271639] trunk/Websites/perf.webkit.org








Revision 271639
Author dewei_...@apple.com
Date 2021-01-20 00:31:54 -0800 (Wed, 20 Jan 2021)


Log Message
BuildbotTriggerable should not update build requests from another triggerable.
https://bugs.webkit.org/show_bug.cgi?id=220762

Reviewed by Ryosuke Niwa.

BuildbotTriggerable._pullBuildbotOnAllSyncers assumes 'BuildRequest.all()' returns all build requests under current triggerable.
However, this assumption got broken when root reuse change was introduced because build requests under same analysis task are
fetched. Thus, 'BuildRequest.all()' may contain build requests those are not under current triggerable. And those build requests
will be updated to 'failedIfNotCompleted'.
Update 'api/build-requests' so that 'url' and 'status_description' fields are not cleared if update does not specify them.

* public/api/build-requests.php: Added logic to avoid updating 'url' and 'status_description' if they are not specified.
* server-tests/api-build-requests-tests.js: Added an unit test.
* server-tests/resources/mock-data.js:
(MockData.async set addMockBuildRequestsForTwoTriggerablesUnderOneAnalysisTask):
* server-tests/tools-buildbot-triggerable-tests.js: Added an unit test.
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype.async syncOnce): Fixed a typo.
(BuildbotTriggerable._pullBuildbotOnAllSyncers): Instead of iterating over 'BuildRequest.all()', only set 'failedIfNotCompleted'
for build requests those are under current triggerable and satisfy the condition.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/api/build-requests.php
trunk/Websites/perf.webkit.org/server-tests/api-build-requests-tests.js
trunk/Websites/perf.webkit.org/server-tests/resources/mock-data.js
trunk/Websites/perf.webkit.org/server-tests/tools-buildbot-triggerable-tests.js
trunk/Websites/perf.webkit.org/tools/js/buildbot-triggerable.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (271638 => 271639)

--- trunk/Websites/perf.webkit.org/ChangeLog	2021-01-20 08:07:22 UTC (rev 271638)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2021-01-20 08:31:54 UTC (rev 271639)
@@ -1,3 +1,26 @@
+2021-01-20  Dewei Zhu  
+
+BuildbotTriggerable should not update build requests from another triggerable.
+https://bugs.webkit.org/show_bug.cgi?id=220762
+
+Reviewed by Ryosuke Niwa.
+
+BuildbotTriggerable._pullBuildbotOnAllSyncers assumes 'BuildRequest.all()' returns all build requests under current triggerable.
+However, this assumption got broken when root reuse change was introduced because build requests under same analysis task are
+fetched. Thus, 'BuildRequest.all()' may contain build requests those are not under current triggerable. And those build requests
+will be updated to 'failedIfNotCompleted'.
+Update 'api/build-requests' so that 'url' and 'status_description' fields are not cleared if update does not specify them.
+
+* public/api/build-requests.php: Added logic to avoid updating 'url' and 'status_description' if they are not specified.
+* server-tests/api-build-requests-tests.js: Added an unit test.
+* server-tests/resources/mock-data.js:
+(MockData.async set addMockBuildRequestsForTwoTriggerablesUnderOneAnalysisTask):
+* server-tests/tools-buildbot-triggerable-tests.js: Added an unit test.
+* tools/js/buildbot-triggerable.js:
+(BuildbotTriggerable.prototype.async syncOnce): Fixed a typo.
+(BuildbotTriggerable._pullBuildbotOnAllSyncers): Instead of iterating over 'BuildRequest.all()', only set 'failedIfNotCompleted'
+for build requests those are under current triggerable and satisfy the condition.
+
 2020-12-09  Dewei Zhu  
 
 'AnalysisTask._commitSetsInSamePlatformGroup' should not fetch an invalid platform and metric config for a MeasurementSet.


Modified: trunk/Websites/perf.webkit.org/public/api/build-requests.php (271638 => 271639)

--- trunk/Websites/perf.webkit.org/public/api/build-requests.php	2021-01-20 08:07:22 UTC (rev 271638)
+++ trunk/Websites/perf.webkit.org/public/api/build-requests.php	2021-01-20 08:31:54 UTC (rev 271639)
@@ -49,6 +49,13 @@
 $status_description = array_get($info, 'statusDescription');
 $build_request_for_root_reuse_id = array_get($info, 'buildRequestForRootReuse');
 $request_row = $db->select_first_row('build_requests', 'request', array('id' => $id));
+
+$fields_to_update = array();
+if (array_key_exists('url', $info))
+$fields_to_update['url'] = $url;
+if (array_key_exists('statusDescription', $info))
+$fields_to_update['status_description'] = $status_description;
+
 if ($status == 'failedIfNotCompleted') {
 if (!$request_row) {
 $db->rollback_transaction();
@@ -62,13 +69,15 @@
 WHERE request_group = $1 AND 

[webkit-changes] [270714] trunk/Websites/perf.webkit.org

2020-12-11 Thread dewei_zhu
Title: [270714] trunk/Websites/perf.webkit.org








Revision 270714
Author dewei_...@apple.com
Date 2020-12-11 15:34:24 -0800 (Fri, 11 Dec 2020)


Log Message
'AnalysisTask._commitSetsInSamePlatformGroup' should not fetch an invalid platform and metric config for a MeasurementSet.
https://bugs.webkit.org/show_bug.cgi?id=219721

Reviewed by Ryosuke Niwa.

Selected test group on analysis task page may not highlight when 'AnalysisTask._commitSetsInSamePlatformGroup' fetches
an invalid platform and metric config for a MeasurementSet.

* public/v3/models/analysis-task.js: Added a logic to avoid fetching MeasurementSet with an invalid config.
(AnalysisTask.prototype._commitSetsInSamePlatformGroup):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/models/analysis-task.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (270713 => 270714)

--- trunk/Websites/perf.webkit.org/ChangeLog	2020-12-11 23:27:35 UTC (rev 270713)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2020-12-11 23:34:24 UTC (rev 270714)
@@ -1,5 +1,18 @@
 2020-12-09  Dewei Zhu  
 
+'AnalysisTask._commitSetsInSamePlatformGroup' should not fetch an invalid platform and metric config for a MeasurementSet.
+https://bugs.webkit.org/show_bug.cgi?id=219721
+
+Reviewed by Ryosuke Niwa.
+
+Selected test group on analysis task page may not highlight when 'AnalysisTask._commitSetsInSamePlatformGroup' fetches
+an invalid platform and metric config for a MeasurementSet.
+
+* public/v3/models/analysis-task.js: Added a logic to avoid fetching MeasurementSet with an invalid config.
+(AnalysisTask.prototype._commitSetsInSamePlatformGroup):
+
+2020-12-09  Dewei Zhu  
+
 Add max age for a root to be reused.
 https://bugs.webkit.org/show_bug.cgi?id=219628
 


Modified: trunk/Websites/perf.webkit.org/public/v3/models/analysis-task.js (270713 => 270714)

--- trunk/Websites/perf.webkit.org/public/v3/models/analysis-task.js	2020-12-11 23:27:35 UTC (rev 270713)
+++ trunk/Websites/perf.webkit.org/public/v3/models/analysis-task.js	2020-12-11 23:34:24 UTC (rev 270714)
@@ -202,6 +202,8 @@
 return [];
 const otherPlatforms = this.platform().group().platforms().filter((platform) => platform != this.platform());
 return otherPlatforms.map(async (platform) => {
+if (!platform.hasMetric(metric))
+return [];
 const lastModified = platform.lastModified(metric);
 const measurementSet = MeasurementSet.findSet(platform.id(), metric.id(), lastModified);
 await measurementSet.fetchBetween(this.startTime(), this.endTime());






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [270607] trunk/Websites/perf.webkit.org

2020-12-09 Thread dewei_zhu
Title: [270607] trunk/Websites/perf.webkit.org








Revision 270607
Author dewei_...@apple.com
Date 2020-12-09 15:13:28 -0800 (Wed, 09 Dec 2020)


Log Message
Add max age for a root to be reused.
https://bugs.webkit.org/show_bug.cgi?id=219628

Reviewed by Ryosuke Niwa.

In order to prevent reusing a stale root, we should set a limit on the age of a root to be reused.
* public/include/manifest-generator.php: Added 'maxRootReuseAgeInDays' to manifest.
* public/v3/models/build-request.js: Added root age check.
(BuildRequest.prototype.async findBuildRequestWithSameRoots):
* public/v3/models/commit-set.js: Extended 'areAllRootsAvailable' with root age check.
(CommitSet.prototype.areAllRootsAvailable):
* public/v3/models/manifest.js:
(Manifest.fetch): Made it async.
(Manifest.async fetchRawResponse): Extract fetching raw manifest out so that 'maxRootReuseAgeInDays'
can be read without resetting other data models. Also added code to only fetch from API if requesting
/data/manifest.json returns 404.
(Manifest._didFetchManifest):
* server-tests/api-manifest-tests.js: Updated unit tests.
* unit-tests/build-request-tests.js: Updated unit tests and add new tests.
* unit-tests/manifest-test.js: Added unit tests.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/include/manifest-generator.php
trunk/Websites/perf.webkit.org/public/v3/models/build-request.js
trunk/Websites/perf.webkit.org/public/v3/models/commit-set.js
trunk/Websites/perf.webkit.org/public/v3/models/manifest.js
trunk/Websites/perf.webkit.org/server-tests/api-manifest-tests.js
trunk/Websites/perf.webkit.org/unit-tests/build-request-tests.js


Added Paths

trunk/Websites/perf.webkit.org/unit-tests/manifest-test.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (270606 => 270607)

--- trunk/Websites/perf.webkit.org/ChangeLog	2020-12-09 23:08:25 UTC (rev 270606)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2020-12-09 23:13:28 UTC (rev 270607)
@@ -1,3 +1,26 @@
+2020-12-09  Dewei Zhu  
+
+Add max age for a root to be reused.
+https://bugs.webkit.org/show_bug.cgi?id=219628
+
+Reviewed by Ryosuke Niwa.
+
+In order to prevent reusing a stale root, we should set a limit on the age of a root to be reused.
+* public/include/manifest-generator.php: Added 'maxRootReuseAgeInDays' to manifest.
+* public/v3/models/build-request.js: Added root age check.
+(BuildRequest.prototype.async findBuildRequestWithSameRoots):
+* public/v3/models/commit-set.js: Extended 'areAllRootsAvailable' with root age check.
+(CommitSet.prototype.areAllRootsAvailable):
+* public/v3/models/manifest.js:
+(Manifest.fetch): Made it async.
+(Manifest.async fetchRawResponse): Extract fetching raw manifest out so that 'maxRootReuseAgeInDays'
+can be read without resetting other data models. Also added code to only fetch from API if requesting
+/data/manifest.json returns 404.
+(Manifest._didFetchManifest):
+* server-tests/api-manifest-tests.js: Updated unit tests.
+* unit-tests/build-request-tests.js: Updated unit tests and add new tests.
+* unit-tests/manifest-test.js: Added unit tests.
+
 2020-11-20  Dewei Zhu  
 
 'run-analysis' script should schedule retries for A/B tests even after chart analysis failure.


Modified: trunk/Websites/perf.webkit.org/public/include/manifest-generator.php (270606 => 270607)

--- trunk/Websites/perf.webkit.org/public/include/manifest-generator.php	2020-12-09 23:08:25 UTC (rev 270606)
+++ trunk/Websites/perf.webkit.org/public/include/manifest-generator.php	2020-12-09 23:13:28 UTC (rev 270607)
@@ -50,6 +50,7 @@
 'summaryPages' => config('summaryPages'),
 'fileUploadSizeLimit' => config('uploadFileLimitInMB', 0) * 1024 * 1024,
 'testAgeToleranceInHours' => config('testAgeToleranceInHours'),
+'maxRootReuseAgeInDays' => config('maxRootReuseAgeInDays'),
 );
 
 $this->elapsed_time = (microtime(true) - $start_time) * 1000;


Modified: trunk/Websites/perf.webkit.org/public/v3/models/build-request.js (270606 => 270607)

--- trunk/Websites/perf.webkit.org/public/v3/models/build-request.js	2020-12-09 23:08:25 UTC (rev 270606)
+++ trunk/Websites/perf.webkit.org/public/v3/models/build-request.js	2020-12-09 23:13:28 UTC (rev 270607)
@@ -95,6 +95,10 @@
 let runningBuildRequest = null;
 // Set ignoreCache = true as latest status of test groups is expected.
 const allTestGroupsInTask = await TestGroup.fetchForTask(this.analysisTaskId(), true);
+const rawManifest = await Manifest.fetchRawResponse();
+const earliestRootCreatingTimeForReuse = rawManifest.maxRootReuseAgeInDays ?
+Date.now() - rawManifest.maxRootReuseAgeInDays * 24 * 3600 * 1000 : 0;
+
 for (const group of allTestGroupsInTask) {
 if (group.id() == this.testGroupId())
 

[webkit-changes] [270140] trunk/Websites/perf.webkit.org

2020-11-20 Thread dewei_zhu
Title: [270140] trunk/Websites/perf.webkit.org








Revision 270140
Author dewei_...@apple.com
Date 2020-11-20 17:27:13 -0800 (Fri, 20 Nov 2020)


Log Message
'run-analysis' script should schedule retries for A/B tests even after chart analysis failure.
https://bugs.webkit.org/show_bug.cgi?id=219116

Reviewed by Ryosuke Niwa.

Anlyzing charts and schedule retries for A/B tests on run-analysis script are independent task.
It should not skip scheduling retries even when chart analysis part fails.

* tools/run-analysis.js:
(async analysisLoop): Change the logic so that chart analysis failure will not stop scheduling retries.
Fix a typo for 'notificationRemoteAPI'.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/tools/run-analysis.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (270139 => 270140)

--- trunk/Websites/perf.webkit.org/ChangeLog	2020-11-21 01:11:20 UTC (rev 270139)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2020-11-21 01:27:13 UTC (rev 270140)
@@ -1,3 +1,17 @@
+2020-11-20  Dewei Zhu  
+
+'run-analysis' script should schedule retries for A/B tests even after chart analysis failure.
+https://bugs.webkit.org/show_bug.cgi?id=219116
+
+Reviewed by Ryosuke Niwa.
+
+Anlyzing charts and schedule retries for A/B tests on run-analysis script are independent task.
+It should not skip scheduling retries even when chart analysis part fails.
+
+* tools/run-analysis.js:
+(async analysisLoop): Change the logic so that chart analysis failure will not stop scheduling retries.
+Fix a typo for 'notificationRemoteAPI'.
+
 2020-11-18  Dewei Zhu  
 
 Fix a bug that platform groups cannot be updated on 'admin/platform'.


Modified: trunk/Websites/perf.webkit.org/tools/run-analysis.js (270139 => 270140)

--- trunk/Websites/perf.webkit.org/tools/run-analysis.js	2020-11-21 01:11:20 UTC (rev 270139)
+++ trunk/Websites/perf.webkit.org/tools/run-analysis.js	2020-11-21 01:27:13 UTC (rev 270140)
@@ -28,13 +28,11 @@
 
 async function analysisLoop(options)
 {
-let secondsToSleep;
+const secondsToSleep = options['--seconds-to-sleep'];
 try {
 const serverConfig = JSON.parse(fs.readFileSync(options['--server-config-json'], 'utf-8'));
-const notificationConfig = JSON.parse(fs.readFileSync(options['--notification-config-json'], 'utf-8'));
 const analysisRangeInDays = options['--analysis-range-in-days'];
-const maximumRetryFactor = options['--max-retry-factor'];
-secondsToSleep = options['--seconds-to-sleep'];
+
 global.RemoteAPI = new RemoteAPI(serverConfig.server);
 PrivilegedAPI.configure(serverConfig.slave.name, serverConfig.slave.password);
 
@@ -47,19 +45,25 @@
 
 console.log(`Start analyzing last ${analysisRangeInDays} days measurement sets.`);
 await analyzer.analyzeOnce();
+} catch (error) {
+console.error(`Failed to analyze measurement sets due to ${error}`);
+}
 
+try {
+const notificationConfig = JSON.parse(fs.readFileSync(options['--notification-config-json'], 'utf-8'));
+const maximumRetryFactor = options['--max-retry-factor'];
 const testGroupsMayNeedMoreRequests = await TestGroup.fetchAllThatMayNeedMoreRequests();
 await createAdditionalBuildRequestsForTestGroupsWithFailedRequests(testGroupsMayNeedMoreRequests, maximumRetryFactor);
 
 const testGroupsNeedNotification = await TestGroup.fetchAllWithNotificationReady();
-const notificationRemoveAPI = new RemoteAPI(notificationConfig.notificationServerConfig);
+const notificationRemoteAPI = new RemoteAPI(notificationConfig.notificationServerConfig);
 const notificationMessageConfig = notificationConfig.notificationMessageConfig;
 const notifier = new AnalysisResultsNotifier(notificationMessageConfig.messageTemplate, notificationMessageConfig.finalizeScript,
-notificationMessageConfig.messageConstructionRules, notificationRemoveAPI, notificationConfig.notificationServerConfig.path, new Subprocess);
+notificationMessageConfig.messageConstructionRules, notificationRemoteAPI, notificationConfig.notificationServerConfig.path, new Subprocess);
 
 await notifier.sendNotificationsForTestGroups(testGroupsNeedNotification);
-} catch(error) {
-console.error(`Failed analyze measurement sets due to ${error}`);
+} catch (error) {
+console.error(`Failed to retry test groups due to ${error}`);
 }
 
 console.log(`Sleeping for ${secondsToSleep} seconds.`);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [270138] trunk/Websites/perf.webkit.org

2020-11-20 Thread dewei_zhu
Title: [270138] trunk/Websites/perf.webkit.org








Revision 270138
Author dewei_...@apple.com
Date 2020-11-20 16:51:51 -0800 (Fri, 20 Nov 2020)


Log Message
Fix a bug that platform groups cannot be updated on 'admin/platform'.
https://bugs.webkit.org/show_bug.cgi?id=219118

Reviewed by Ryosuke Niwa.

Admins should be able to update platform group on 'admin/platform'.
Update the assertion on BuildbotTriggerable._pullBuildbotOnAllSyncers so that when there is no
corresponding entry in buildRequestByGroup, the test group for the request should be finished.

* public/admin/platforms.php:
* tools/js/buildbot-triggerable.js: Updated the assert statement.
(BuildbotTriggerable.prototype._pullBuildbotOnAllSyncers):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/admin/platforms.php
trunk/Websites/perf.webkit.org/tools/js/buildbot-triggerable.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (270137 => 270138)

--- trunk/Websites/perf.webkit.org/ChangeLog	2020-11-21 00:51:21 UTC (rev 270137)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2020-11-21 00:51:51 UTC (rev 270138)
@@ -1,3 +1,18 @@
+2020-11-18  Dewei Zhu  
+
+Fix a bug that platform groups cannot be updated on 'admin/platform'.
+https://bugs.webkit.org/show_bug.cgi?id=219118
+
+Reviewed by Ryosuke Niwa.
+
+Admins should be able to update platform group on 'admin/platform'.
+Update the assertion on BuildbotTriggerable._pullBuildbotOnAllSyncers so that when there is no
+corresponding entry in buildRequestByGroup, the test group for the request should be finished.
+
+* public/admin/platforms.php:
+* tools/js/buildbot-triggerable.js: Updated the assert statement.
+(BuildbotTriggerable.prototype._pullBuildbotOnAllSyncers):
+
 2020-11-16  Dewei Zhu  
 
 BuildbotTriggerable should not process a completed build request from a completed test group.


Modified: trunk/Websites/perf.webkit.org/public/admin/platforms.php (270137 => 270138)

--- trunk/Websites/perf.webkit.org/public/admin/platforms.php	2020-11-21 00:51:21 UTC (rev 270137)
+++ trunk/Websites/perf.webkit.org/public/admin/platforms.php	2020-11-21 00:51:51 UTC (rev 270138)
@@ -59,9 +59,8 @@
 if ($db) {
 if ($action == 'update') {
 if (update_field('platforms', 'platform', 'name')
-|| update_boolean_field('platforms', 'platform', 'hidden')
-|| update_field('platforms', 'platform', 'hidden')
-|| update_field('platforms', 'platform', 'group'))
+|| update_field('platforms', 'platform', 'group')
+|| update_boolean_field('platforms', 'platform', 'hidden'))
 regenerate_manifest();
 else
 notice('Invalid parameters.');


Modified: trunk/Websites/perf.webkit.org/tools/js/buildbot-triggerable.js (270137 => 270138)

--- trunk/Websites/perf.webkit.org/tools/js/buildbot-triggerable.js	2020-11-21 00:51:21 UTC (rev 270137)
+++ trunk/Websites/perf.webkit.org/tools/js/buildbot-triggerable.js	2020-11-21 00:51:51 UTC (rev 270138)
@@ -179,7 +179,7 @@
 
 const info = buildReqeustsByGroup.get(request.testGroupId());
 if (!info) {
-assert(request.hasFinished());
+assert(request.testGroup().hasFinished());
 continue;
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [269892] trunk/Websites/perf.webkit.org

2020-11-16 Thread dewei_zhu
Title: [269892] trunk/Websites/perf.webkit.org








Revision 269892
Author dewei_...@apple.com
Date 2020-11-16 20:33:06 -0800 (Mon, 16 Nov 2020)


Log Message
BuildbotTriggerable should not process a completed build request from a completed test group.
https://bugs.webkit.org/show_bug.cgi?id=219016

Reviewed by Ryosuke Niwa.

BuildBotTriggerable._pullBuildbotOnAllSyncers relies on buildReqeustsByGroup to contain all build requests found by
BuildRequest.findById. However, since re-use root change is landed, above assumption is no longer valid. BuildRequest.all()
may includes build requests under same analysis task. Thus, `_pullBuildbotOnAllSyncers` will fail due to 'info' is undefined.

* server-tests/tools-buildbot-triggerable-tests.js: Added a unit test.
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype._pullBuildbotOnAllSyncers): Added logic to stop processing the build request if it's not
from incomplete build requests under a triggerable.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/server-tests/tools-buildbot-triggerable-tests.js
trunk/Websites/perf.webkit.org/tools/js/buildbot-triggerable.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (269891 => 269892)

--- trunk/Websites/perf.webkit.org/ChangeLog	2020-11-17 03:15:47 UTC (rev 269891)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2020-11-17 04:33:06 UTC (rev 269892)
@@ -1,3 +1,19 @@
+2020-11-16  Dewei Zhu  
+
+BuildbotTriggerable should not process a completed build request from a completed test group.
+https://bugs.webkit.org/show_bug.cgi?id=219016
+
+Reviewed by Ryosuke Niwa.
+
+BuildBotTriggerable._pullBuildbotOnAllSyncers relies on buildReqeustsByGroup to contain all build requests found by
+BuildRequest.findById. However, since re-use root change is landed, above assumption is no longer valid. BuildRequest.all()
+may includes build requests under same analysis task. Thus, `_pullBuildbotOnAllSyncers` will fail due to 'info' is undefined.
+
+* server-tests/tools-buildbot-triggerable-tests.js: Added a unit test.
+* tools/js/buildbot-triggerable.js:
+(BuildbotTriggerable.prototype._pullBuildbotOnAllSyncers): Added logic to stop processing the build request if it's not
+from incomplete build requests under a triggerable.
+
 2020-10-30  Dewei Zhu  
 
 Performance dashboard should avoid building same configuration under one analysis task.


Modified: trunk/Websites/perf.webkit.org/server-tests/tools-buildbot-triggerable-tests.js (269891 => 269892)

--- trunk/Websites/perf.webkit.org/server-tests/tools-buildbot-triggerable-tests.js	2020-11-17 03:15:47 UTC (rev 269891)
+++ trunk/Websites/perf.webkit.org/server-tests/tools-buildbot-triggerable-tests.js	2020-11-17 04:33:06 UTC (rev 269892)
@@ -947,6 +947,85 @@
 });
 });
 
+it('should skip updating a completed build request whose test group has completed and not listed in a triggerable', async () => {
+await MockData.addMockBuildRequestsWithRoots(TestServer.database(), ['completed', 'completed', 'completed', 'completed', 'pending', 'pending', 'pending', 'pending']);
+await Manifest.fetch();
+const config = MockData.mockTestSyncConfigWithPatchAcceptingBuilder();
+const logger = new MockLogger;
+const slaveInfo = {name: 'sync-slave', password: 'password'};
+const triggerable = new BuildbotTriggerable(config, TestServer.remoteAPI(), MockRemoteAPI, slaveInfo, logger);
+const syncPromise = triggerable.initSyncers().then(() => triggerable.syncOnce());
+assertRequestAndResolve(MockRemoteAPI.requests[0], 'GET', MockData.buildbotBuildersURL(), MockData.mockBuildbotBuilders());
+MockRemoteAPI.reset();
+await MockRemoteAPI.waitForRequest();
+
+assert.equal(BuildRequest.all().length, 4);
+let buildRequest = BuildRequest.findById(900);
+assert.equal(buildRequest.status(), 'pending');
+assert.equal(buildRequest.statusUrl(), null);
+
+assert.equal(MockRemoteAPI.requests.length, 3);
+assert.equal(MockRemoteAPI.requests[0].method, 'GET');
+assert.equal(MockRemoteAPI.requests[0].url, MockData.pendingBuildsUrl('some tester'));
+MockRemoteAPI.requests[0].resolve({});
+assert.equal(MockRemoteAPI.requests[1].method, 'GET');
+assert.equal(MockRemoteAPI.requests[1].url, MockData.pendingBuildsUrl('some-builder-1'));
+MockRemoteAPI.requests[1].resolve({});
+assert.equal(MockRemoteAPI.requests[2].method, 'GET');
+assert.equal(MockRemoteAPI.requests[2].url, MockData.pendingBuildsUrl('some builder 2'));
+MockRemoteAPI.requests[2].resolve({});
+MockRemoteAPI.reset();
+await MockRemoteAPI.waitForRequest();
+
+

[webkit-changes] [269871] trunk/Websites/perf.webkit.org

2020-11-16 Thread dewei_zhu
Title: [269871] trunk/Websites/perf.webkit.org








Revision 269871
Author dewei_...@apple.com
Date 2020-11-16 12:32:08 -0800 (Mon, 16 Nov 2020)


Log Message
Performance dashboard should avoid building same configuration under one analysis task.
https://bugs.webkit.org/show_bug.cgi?id=218413

Reviewed by Ryosuke Niwa.

Add logic in syncing script to reuse already built roots from same build request under current analysis task.
If there is another same build request scheduled/running, will defer scheduling current build request.

* public/admin/platforms.php: Fixed newer version of PHP warns on accessing invalid key in an array.
* public/admin/tests.php: Added a null check against $selected_parent.
* public/api/build-requests.php: Extended this API to allow reusing roots from existing build request.
* public/v3/models/build-request.js:
(BuildRequest.prototype.async findBuildRequestWithSameRoots): Find build type build request with same commit set
which can/will be reused under current analysis task.
* public/v3/models/commit-set.js:
(CommitSet.prototype.equalsIgnoringRoot): Added a helper function which checks commit set equality ignoring the root.
(CommitSet.prototype.equals): Use '_equalsOptionallyIgnoringRoot' as underlying implementation.
(CommitSet.prototype._equalsOptionallyIgnoringRoot): Implementation for both equals and equalsIngnoringRoot.
* server-tests/api-build-requests-tests.js: Added unit tests.
* server-tests/resources/mock-data.js: Added new mock data for new unit tests.
(MockData.addMockConfiguration):
(MockData.addMockData):
(MockData.set addMockBuildRequestsWithRoots):
(MockData.set addTwoMockTestGroupWithOwnedCommits):
(MockData.mockTestSyncConfigWithPatchAcceptingBuilder):
* server-tests/tools-buildbot-triggerable-tests.js: Added unit tests.
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype.async syncOnce):
(BuildbotTriggerable.prototype.async _scheduleRequest): A helper function to reuse the roots if there are built
roots available for same build type build request. If there is another build scheduled for same build request,
will defer scheduling the build request.
* unit-tests/build-request-tests.js: Add unit tests.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/admin/platforms.php
trunk/Websites/perf.webkit.org/public/admin/tests.php
trunk/Websites/perf.webkit.org/public/api/build-requests.php
trunk/Websites/perf.webkit.org/public/v3/models/build-request.js
trunk/Websites/perf.webkit.org/public/v3/models/commit-set.js
trunk/Websites/perf.webkit.org/public/v3/models/platform.js
trunk/Websites/perf.webkit.org/server-tests/api-build-requests-tests.js
trunk/Websites/perf.webkit.org/server-tests/resources/mock-data.js
trunk/Websites/perf.webkit.org/server-tests/tools-buildbot-triggerable-tests.js
trunk/Websites/perf.webkit.org/tools/js/buildbot-triggerable.js
trunk/Websites/perf.webkit.org/unit-tests/build-request-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (269870 => 269871)

--- trunk/Websites/perf.webkit.org/ChangeLog	2020-11-16 20:25:21 UTC (rev 269870)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2020-11-16 20:32:08 UTC (rev 269871)
@@ -1,3 +1,38 @@
+2020-10-30  Dewei Zhu  
+
+Performance dashboard should avoid building same configuration under one analysis task.
+https://bugs.webkit.org/show_bug.cgi?id=218413
+
+Reviewed by Ryosuke Niwa.
+
+Add logic in syncing script to reuse already built roots from same build request under current analysis task.
+If there is another same build request scheduled/running, will defer scheduling current build request.
+
+* public/admin/platforms.php: Fixed newer version of PHP warns on accessing invalid key in an array.
+* public/admin/tests.php: Added a null check against $selected_parent.
+* public/api/build-requests.php: Extended this API to allow reusing roots from existing build request.
+* public/v3/models/build-request.js:
+(BuildRequest.prototype.async findBuildRequestWithSameRoots): Find build type build request with same commit set
+which can/will be reused under current analysis task.
+* public/v3/models/commit-set.js:
+(CommitSet.prototype.equalsIgnoringRoot): Added a helper function which checks commit set equality ignoring the root.
+(CommitSet.prototype.equals): Use '_equalsOptionallyIgnoringRoot' as underlying implementation.
+(CommitSet.prototype._equalsOptionallyIgnoringRoot): Implementation for both equals and equalsIngnoringRoot.
+* server-tests/api-build-requests-tests.js: Added unit tests.
+* server-tests/resources/mock-data.js: Added new mock data for new unit tests.
+(MockData.addMockConfiguration):
+(MockData.addMockData):
+(MockData.set addMockBuildRequestsWithRoots):
+(MockData.set addTwoMockTestGroupWithOwnedCommits):
+

[webkit-changes] [269083] trunk/Websites/perf.webkit.org

2020-10-27 Thread dewei_zhu
Title: [269083] trunk/Websites/perf.webkit.org








Revision 269083
Author dewei_...@apple.com
Date 2020-10-27 18:00:35 -0700 (Tue, 27 Oct 2020)


Log Message
Refactor 'platforms' table to contain group information.
https://bugs.webkit.org/show_bug.cgi?id=193132

Reviewed by Ryosuke Niwa.

Group 'platforms' so that bisecting can use commit sets from other platforms which are in the same platform group.
This will help to enhance the bisecting capability to higher granularity.
Added admin page to manage platform groups.
Updated platform admin page to allow update platform group.
SQL query to update existing database:
'''
BEGIN;
CREATE TABLE platform_groups (
platformgroup_id serial PRIMARY KEY,
platformgroup_name varchar(64) NOT NULL,
CONSTRAINT platform_group_name_must_be_unique UNIQUE (platformgroup_name));

ALTER TABLE platforms ADD COLUMN platform_group integer REFERENCES platform_groups DEFAULT NULL;
END;
'''

* init-database.sql: Added 'platform_group' column to 'platforms' table.
Added 'platform_groups' table.
* migrate-database.sql: Updated migration script accordingly.
* public/admin/platform-groups.php: Added a page to manage platform groups.
* public/admin/platforms.php: Added support to update platform group in admin page.
* public/include/admin-header.php: Added link to page that maneges platform groups.
* public/include/manifest-generator.php: Added 'platformGroup' in manifest.
* public/v3/index.html: Included 'platform-groups.js'.
* public/v3/models/analysis-task.js:
(AnalysisTask.prototype.async.commitSetsFromTestGroupsAndMeasurementSet):
Included measurement commit sets from other platforms in the same platform group.
(AnalysisTask.prototype._commitSetForOtherPlatformsInSameGroup):
Helper function to find measurment commit set for other platforms in same platform group.
* public/v3/models/manifest.js: Added step to build 'PlatformGroup' instances.
* public/v3/models/platform-group.js: Added 'PlatformGroup' to represent entries in 'platform_groups' table.
(PlatformGroup):
(PlatformGroup.prototype.addPlatform):
(PlatformGroup.prototype.platforms):
* public/v3/models/platform.js: Added itself to 'PlatformGroup' in constructor if it belongs
to a group.
(Platform.prototype.group): Return the platform group of current platform.
* public/v3/models/time-series.js: Added helper function to show view between a given time range.
(TimeSeries.prototype.viewBetweenTime):
* server-tests/api-manifest-tests.js: Updated unit test to also test platform group initialization.
* tools/js/database.js: Added prefix for 'platform_groups'.
* tools/js/v3-models.js: Added import for platform group.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/init-database.sql
trunk/Websites/perf.webkit.org/migrate-database.sql
trunk/Websites/perf.webkit.org/public/admin/platforms.php
trunk/Websites/perf.webkit.org/public/include/admin-header.php
trunk/Websites/perf.webkit.org/public/include/manifest-generator.php
trunk/Websites/perf.webkit.org/public/v3/index.html
trunk/Websites/perf.webkit.org/public/v3/models/analysis-task.js
trunk/Websites/perf.webkit.org/public/v3/models/manifest.js
trunk/Websites/perf.webkit.org/public/v3/models/platform.js
trunk/Websites/perf.webkit.org/public/v3/models/time-series.js
trunk/Websites/perf.webkit.org/server-tests/api-manifest-tests.js
trunk/Websites/perf.webkit.org/tools/js/database.js
trunk/Websites/perf.webkit.org/tools/js/v3-models.js


Added Paths

trunk/Websites/perf.webkit.org/public/admin/platform-groups.php
trunk/Websites/perf.webkit.org/public/v3/models/platform-group.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (269082 => 269083)

--- trunk/Websites/perf.webkit.org/ChangeLog	2020-10-28 00:10:14 UTC (rev 269082)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2020-10-28 01:00:35 UTC (rev 269083)
@@ -1,3 +1,53 @@
+2020-10-27  Dewei Zhu  
+
+Refactor 'platforms' table to contain group information.
+https://bugs.webkit.org/show_bug.cgi?id=193132
+
+Reviewed by Ryosuke Niwa.
+
+Group 'platforms' so that bisecting can use commit sets from other platforms which are in the same platform group.
+This will help to enhance the bisecting capability to higher granularity.
+Added admin page to manage platform groups.
+Updated platform admin page to allow update platform group.
+SQL query to update existing database:
+'''
+BEGIN;
+CREATE TABLE platform_groups (
+platformgroup_id serial PRIMARY KEY,
+platformgroup_name varchar(64) NOT NULL,
+CONSTRAINT platform_group_name_must_be_unique UNIQUE (platformgroup_name));
+
+ALTER TABLE platforms ADD COLUMN platform_group integer REFERENCES platform_groups DEFAULT NULL;
+END;
+'''
+
+* init-database.sql: Added 'platform_group' column to 'platforms' table.
+Added 'platform_groups' table.
+* migrate-database.sql: 

[webkit-changes] [269026] trunk/Websites/perf.webkit.org

2020-10-27 Thread dewei_zhu
Title: [269026] trunk/Websites/perf.webkit.org








Revision 269026
Author dewei_...@apple.com
Date 2020-10-27 01:21:48 -0700 (Tue, 27 Oct 2020)


Log Message
Fix and update performance dashboard tests
https://bugs.webkit.org/show_bug.cgi?id=218222

Reviewed by Ryosuke Niwa.

* public/api/upload-root.php: Add a null check against empty array
when accessing invalid key which will show warning since php 7.4.
Per https://wiki.php.net/rfc/notice-for-non-valid-array-container.
* server-tests/tools-sync-buildbot-integration-tests.js:
Fixed a unit test that assumes build request IDs under one test group is
one after another. This assumption is wrong when 'StartServers' under
'mpm_prefork_module' is set more than one in apache config.
Fixed antoher incorrect unit test.
* unit-tests/analysis-results-notifier-tests.js:
Fixed unit tests which incorrectly used 'assert.throws' per
https://nodejs.org/docs/latest-v7.x/api/assert.html#assert_assert_throws_block_error_message.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/api/upload-root.php
trunk/Websites/perf.webkit.org/server-tests/tools-sync-buildbot-integration-tests.js
trunk/Websites/perf.webkit.org/unit-tests/analysis-results-notifier-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (269025 => 269026)

--- trunk/Websites/perf.webkit.org/ChangeLog	2020-10-27 08:01:43 UTC (rev 269025)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2020-10-27 08:21:48 UTC (rev 269026)
@@ -1,3 +1,22 @@
+2020-10-26  Dewei Zhu  
+
+Fix and update performance dashboard tests
+https://bugs.webkit.org/show_bug.cgi?id=218222
+
+Reviewed by Ryosuke Niwa.
+
+* public/api/upload-root.php: Add a null check against empty array
+when accessing invalid key which will show warning since php 7.4.
+Per https://wiki.php.net/rfc/notice-for-non-valid-array-container.
+* server-tests/tools-sync-buildbot-integration-tests.js:
+Fixed a unit test that assumes build request IDs under one test group is
+one after another. This assumption is wrong when 'StartServers' under
+'mpm_prefork_module' is set more than one in apache config.
+Fixed antoher incorrect unit test.
+* unit-tests/analysis-results-notifier-tests.js:
+Fixed unit tests which incorrectly used 'assert.throws' per
+https://nodejs.org/docs/latest-v7.x/api/assert.html#assert_assert_throws_block_error_message.
+
 2020-03-04  Zhifei Fang  
 
 Test-freshness page table heaer misplaced


Modified: trunk/Websites/perf.webkit.org/public/api/upload-root.php (269025 => 269026)

--- trunk/Websites/perf.webkit.org/public/api/upload-root.php	2020-10-27 08:01:43 UTC (rev 269025)
+++ trunk/Websites/perf.webkit.org/public/api/upload-root.php	2020-10-27 08:21:48 UTC (rev 269026)
@@ -27,7 +27,7 @@
 $build_request_id = $arguments['buildRequest'];
 
 $request_row = $db->select_first_row('build_requests', 'request', array('id' => $build_request_id));
-if ($request_row['request_test'] || $request_row['request_order'] >= 0)
+if (!$request_row || $request_row['request_test'] || $request_row['request_order'] >= 0)
 exit_with_error('InvalidBuildRequestType', array('buildRequest' => $build_request_id));
 
 $test_group = $db->select_first_row('analysis_test_groups', 'testgroup', array('id' => $request_row['request_group']));


Modified: trunk/Websites/perf.webkit.org/server-tests/tools-sync-buildbot-integration-tests.js (269025 => 269026)

--- trunk/Websites/perf.webkit.org/server-tests/tools-sync-buildbot-integration-tests.js	2020-10-27 08:01:43 UTC (rev 269025)
+++ trunk/Websites/perf.webkit.org/server-tests/tools-sync-buildbot-integration-tests.js	2020-10-27 08:21:48 UTC (rev 269026)
@@ -243,7 +243,9 @@
 it('should not schedule on another builder if the build was scheduled on one builder before', () => {
 const requests = MockRemoteAPI.requests;
 let firstTestGroup;
+let firstTestGroupFirstBuildRequest;
 let secondTestGroup;
+let secondTestGroupFirstBuildRequest;
 let syncPromise;
 let triggerable;
 let taskId = null;
@@ -254,6 +256,8 @@
 }).then((testGroups) => {
 firstTestGroup = testGroups[0];
 secondTestGroup = testGroups[1];
+firstTestGroupFirstBuildRequest = firstTestGroup.buildRequests()[0].id();
+secondTestGroupFirstBuildRequest = secondTestGroup.buildRequests()[0].id();
 taskId = firstTestGroup.task().id();
 anotherTaskId = secondTestGroup.task().id();
 syncPromise = triggerable.initSyncers().then(() => triggerable.syncOnce());
@@ -262,13 +266,13 @@
 return MockRemoteAPI.waitForRequest();
 }).then(() => {
 assert.equal(requests.length, 2);
-assertAndResolveRequest(requests[0], 'GET', MockData.pendingBuildsUrl('some tester'), 

[webkit-changes] [253220] trunk/Websites/perf.webkit.org

2019-12-06 Thread dewei_zhu
Title: [253220] trunk/Websites/perf.webkit.org








Revision 253220
Author dewei_...@apple.com
Date 2019-12-06 14:49:02 -0800 (Fri, 06 Dec 2019)


Log Message
Custom analysis task page should allow schedule any triggerable accepted tests.
https://bugs.webkit.org/show_bug.cgi?id=204925

Reviewed by Ryosuke Niwa.

Fix a bug that subtest will not show on custom analysis task page if both itself and parent test are
accepted by triggerable.
Order test list in alphabetical order.

* public/v3/components/custom-analysis-task-configurator.js:
(CustomAnalysisTaskConfigurator.prototype._renderTriggerableTests):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/components/custom-analysis-task-configurator.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (253219 => 253220)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-12-06 22:45:38 UTC (rev 253219)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-12-06 22:49:02 UTC (rev 253220)
@@ -1,3 +1,17 @@
+2019-12-05  Dewei Zhu  
+
+Custom analysis task page should allow schedule any triggerable accepted tests.
+https://bugs.webkit.org/show_bug.cgi?id=204925
+
+Reviewed by Ryosuke Niwa.
+
+Fix a bug that subtest will not show on custom analysis task page if both itself and parent test are
+accepted by triggerable.
+Order test list in alphabetical order.
+
+* public/v3/components/custom-analysis-task-configurator.js:
+(CustomAnalysisTaskConfigurator.prototype._renderTriggerableTests):
+
 2019-10-28  Dewei Zhu  
 
 Fix a bug that cannot unhide a platform.


Modified: trunk/Websites/perf.webkit.org/public/v3/components/custom-analysis-task-configurator.js (253219 => 253220)

--- trunk/Websites/perf.webkit.org/public/v3/components/custom-analysis-task-configurator.js	2019-12-06 22:45:38 UTC (rev 253219)
+++ trunk/Websites/perf.webkit.org/public/v3/components/custom-analysis-task-configurator.js	2019-12-06 22:49:02 UTC (rev 253220)
@@ -224,8 +224,11 @@
 for (const test of triggerable.acceptedTests())
 acceptedTests.add(test);
 }
-
-let tests = Test.all().filter((test) => acceptedTests.has(test) && (!test.parentTest() || !acceptedTests.has(test.parentTest(;
+const tests = [...acceptedTests].sort((testA, testB) => {
+if (testA.fullName() == testB.fullName())
+return 0;
+return testA.fullName() < testB.fullName() ? -1 : 1;
+});
 return this._renderRadioButtonList(this.content('test-list'), 'test', tests, this.selectTests.bind(this), (test) => test.fullName());
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [251674] trunk/Websites/perf.webkit.org

2019-10-28 Thread dewei_zhu
Title: [251674] trunk/Websites/perf.webkit.org








Revision 251674
Author dewei_...@apple.com
Date 2019-10-28 14:46:29 -0700 (Mon, 28 Oct 2019)


Log Message
Fix a bug that cannot unhide a platform.
https://bugs.webkit.org/show_bug.cgi?id=203521

Reviewed by Ryosuke Niwa.

Before this change, the there is no value in POST when 'hidden' checkbox is unchecked.
Then the update will fail because platform_hidden cannot be NULL.

* public/admin/platforms.php: Adapted 'update_boolean_field'.
* public/admin/triggerables.php: Adapted 'update_boolean_field'.
* public/include/admin-header.php: Added 'update_boolean_field' helper function to set explict
boolean value for update.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/admin/platforms.php
trunk/Websites/perf.webkit.org/public/admin/triggerables.php
trunk/Websites/perf.webkit.org/public/include/admin-header.php




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (251673 => 251674)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-10-28 21:42:43 UTC (rev 251673)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-10-28 21:46:29 UTC (rev 251674)
@@ -1,3 +1,18 @@
+2019-10-28  Dewei Zhu  
+
+Fix a bug that cannot unhide a platform.
+https://bugs.webkit.org/show_bug.cgi?id=203521
+
+Reviewed by Ryosuke Niwa.
+
+Before this change, the there is no value in POST when 'hidden' checkbox is unchecked.
+Then the update will fail because platform_hidden cannot be NULL.
+
+* public/admin/platforms.php: Adapted 'update_boolean_field'.
+* public/admin/triggerables.php: Adapted 'update_boolean_field'.
+* public/include/admin-header.php: Added 'update_boolean_field' helper function to set explict
+boolean value for update.
+
 2019-10-25  Dewei Zhu  
 
 Add SSL support for peformance dashboard database connection.


Modified: trunk/Websites/perf.webkit.org/public/admin/platforms.php (251673 => 251674)

--- trunk/Websites/perf.webkit.org/public/admin/platforms.php	2019-10-28 21:42:43 UTC (rev 251673)
+++ trunk/Websites/perf.webkit.org/public/admin/platforms.php	2019-10-28 21:46:29 UTC (rev 251674)
@@ -59,7 +59,7 @@
 if ($db) {
 if ($action == 'update') {
 if (update_field('platforms', 'platform', 'name')
-|| update_field('platforms', 'platform', 'hidden'))
+|| update_boolean_field('platforms', 'platform', 'hidden'))
 regenerate_manifest();
 else
 notice('Invalid parameters.');


Modified: trunk/Websites/perf.webkit.org/public/admin/triggerables.php (251673 => 251674)

--- trunk/Websites/perf.webkit.org/public/admin/triggerables.php	2019-10-28 21:42:43 UTC (rev 251673)
+++ trunk/Websites/perf.webkit.org/public/admin/triggerables.php	2019-10-28 21:46:29 UTC (rev 251674)
@@ -13,7 +13,7 @@
 } else if ($action == 'update') {
 if (update_field('build_triggerables', 'triggerable', 'name'))
 regenerate_manifest();
-else if (update_field('build_triggerables', 'triggerable', 'disabled', Database::to_database_boolean(array_get($_POST, 'disabled'
+else if (update_boolean_field('build_triggerables', 'triggerable', 'disabled'))
 regenerate_manifest();
 else
 notice('Invalid parameters.');


Modified: trunk/Websites/perf.webkit.org/public/include/admin-header.php (251673 => 251674)

--- trunk/Websites/perf.webkit.org/public/include/admin-header.php	2019-10-28 21:42:43 UTC (rev 251673)
+++ trunk/Websites/perf.webkit.org/public/include/admin-header.php	2019-10-28 21:46:29 UTC (rev 251674)
@@ -83,6 +83,10 @@
 return TRUE;
 }
 
+function update_boolean_field($table, $prefix, $field_name) {
+return update_field($table, $prefix, $field_name, Database::to_database_boolean(array_get($_POST, $field_name)));
+}
+
 function regenerate_manifest() {
 global $db;
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [251607] trunk/Websites/perf.webkit.org

2019-10-25 Thread dewei_zhu
Title: [251607] trunk/Websites/perf.webkit.org








Revision 251607
Author dewei_...@apple.com
Date 2019-10-25 15:41:27 -0700 (Fri, 25 Oct 2019)


Log Message
Add SSL support for peformance dashboard database connection.
https://bugs.webkit.org/show_bug.cgi?id=203426

Reviewed by Ryosuke Niwa.

Performance dashboard should allow connecting Postgres database with SSL.

* public/include/db.php: Add SSL configuration to connection string if specified.
* tools/js/database.js: Add SSL configuration to connection string if specified.
(Database.prototype._prepareSSLConfig):
(Database.prototype.connect):
* unit-tests/checkconfig.js: Added unit tests for optional ssl fields.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/include/db.php
trunk/Websites/perf.webkit.org/tools/js/database.js
trunk/Websites/perf.webkit.org/unit-tests/checkconfig.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (251606 => 251607)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-10-25 22:37:46 UTC (rev 251606)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-10-25 22:41:27 UTC (rev 251607)
@@ -1,3 +1,18 @@
+2019-10-25  Dewei Zhu  
+
+Add SSL support for peformance dashboard database connection.
+https://bugs.webkit.org/show_bug.cgi?id=203426
+
+Reviewed by Ryosuke Niwa.
+
+Performance dashboard should allow connecting Postgres database with SSL.
+
+* public/include/db.php: Add SSL configuration to connection string if specified.
+* tools/js/database.js: Add SSL configuration to connection string if specified.
+(Database.prototype._prepareSSLConfig):
+(Database.prototype.connect):
+* unit-tests/checkconfig.js: Added unit tests for optional ssl fields.
+
 2019-10-22  Dewei Zhu  
 
 Refactor "builds" table "build_number" row to "build_tag" to fit more generic use cases.


Modified: trunk/Websites/perf.webkit.org/public/include/db.php (251606 => 251607)

--- trunk/Websites/perf.webkit.org/public/include/db.php	2019-10-25 22:37:46 UTC (rev 251606)
+++ trunk/Websites/perf.webkit.org/public/include/db.php	2019-10-25 22:41:27 UTC (rev 251607)
@@ -116,8 +116,33 @@
 
 function connect() {
 $databaseConfig = config('database');
-$this->connection = @pg_connect('host=' . $databaseConfig['host'] . ' port=' . $databaseConfig['port']
-. ' dbname=' . $databaseConfig['name'] . ' user=' . $databaseConfig['username'] . ' password=' . $databaseConfig['password']);
+
+$host = $databaseConfig['host'];
+$port = $databaseConfig['port'];
+$dbname = $databaseConfig['name'];
+$user = $databaseConfig['username'];
+$password = $databaseConfig['password'];
+$connectionString = "host=$host port=$port dbname=$dbname user=$user password=$password";
+
+$sslConfigString = '';
+
+if (array_get($databaseConfig, 'ssl')) {
+$sslConfig = $databaseConfig['ssl'];
+$sslConfigString .= ' sslmode=' . array_get($sslConfig, 'mode', 'require');
+foreach (array('rootcert', 'cert', 'key') as $key) {
+if (!array_get($sslConfig, $key))
+continue;
+
+$path = $sslConfig[$key];
+if (strlen($path) && $path[0] !== '/')
+$path = CONFIG_DIR . '/' . $path;
+
+$sslConfigString .= " ssl$key=$path";
+}
+}
+
+$connectionString .= $sslConfigString;
+$this->connection = @pg_connect($connectionString);
 return $this->connection ? true : false;
 }
 


Modified: trunk/Websites/perf.webkit.org/tools/js/database.js (251606 => 251607)

--- trunk/Websites/perf.webkit.org/tools/js/database.js	2019-10-25 22:37:46 UTC (rev 251606)
+++ trunk/Websites/perf.webkit.org/tools/js/database.js	2019-10-25 22:41:27 UTC (rev 251607)
@@ -10,6 +10,24 @@
 this._databaseName = databaseName || config.value('database.name');
 }
 
+_prepareSSLConfig()
+{
+if (!config.value('database.ssl') || config.value('database.ssl.mode') == 'disable')
+return '';
+
+const certificateConfigs = ['?ssl=true'];
+for(const key of ['cert', 'key', 'rootcert']) {
+const fullKey = `database.ssl.${key}`;
+let path = config.value(fullKey);
+if (!path)
+continue
+if (path[0] != '/')
+path = config.path(fullKey);
+certificateConfigs.push(`${key}=${path}`);
+}
+return certificateConfigs.join('&');
+}
+
 connect(options)
 {
 console.assert(this._client === null);
@@ -20,7 +38,7 @@
 let port = config.value('database.port');
 
 // No need to worry about escaping strings since they are only set by someone who can write to config.json.
-let connectionString = `tcp://${username}:${password}@${host}:${port}/${this._databaseName}`;
+   

[webkit-changes] [251028] trunk/Websites/perf.webkit.org

2019-10-11 Thread dewei_zhu
Title: [251028] trunk/Websites/perf.webkit.org








Revision 251028
Author dewei_...@apple.com
Date 2019-10-11 16:17:52 -0700 (Fri, 11 Oct 2019)


Log Message
Improve test freshness page interaction experience.
https://bugs.webkit.org/show_bug.cgi?id=202684

Reviewed by Ryosuke Niwa.

Change test freshness page show tooltip on click instead of popuping on mouse hover.
And clicking anywhere in 'page-with-heading' section except the tooltip can dismiss tooltip.
Add keyboard support to move focus around including 'Tab' key support.
Add support to use 'Enter' key to show or dismiss tooltip.
Add support to use 'Escape' key to dismiss tooltip.

* public/shared/common-component-base.js: Added support for link to specify 'tabindex'.
(CommonComponentBase.prototype.createLink):
(CommonComponentBase.createLink):
(CommonComponentBase):
* public/v3/components/base.js: Added support for customizing whether or not prevent default and stop propagation
while creating event handler.
(ComponentBase.prototype.createEventHandler):
(ComponentBase.createEventHandler):
(ComponentBase):
* public/v3/components/freshness-indicator.js:
(FreshnessIndicator): Removed 'url' property and removed customization for mouse event.
(FreshnessIndicator.prototype.update):
(FreshnessIndicator.prototype.didConstructShadowTree): Deleted.
* public/v3/pages/test-freshness-page.js:
(TestFreshnessPage): Changed to show tooltip on click and added key board event.
(TestFreshnessPage.prototype.didConstructShadowTree): Added key event support.
(TestFreshnessPage.prototype._findClosestIndicatorAnchorForCoordinate):
(TestFreshnessPage.prototype.render):
(TestFreshnessPage.prototype._renderTooltip):
(TestFreshnessPage.prototype._constructTableCell): Added tabIndex for each cell that contains freshness indicator.
(TestFreshnessPage.prototype._configureAnchorForIndicator):
(TestFreshnessPage.prototype._clearIndicatorState): Changed the color of links in tooltip to a more readable color.
Added styles when anchor for status cell and links on tooltip are focused.
(TestFreshnessPage.cssTemplate):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/shared/common-component-base.js
trunk/Websites/perf.webkit.org/public/v3/components/base.js
trunk/Websites/perf.webkit.org/public/v3/components/freshness-indicator.js
trunk/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (251027 => 251028)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-10-11 21:47:15 UTC (rev 251027)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-10-11 23:17:52 UTC (rev 251028)
@@ -1,3 +1,41 @@
+2019-10-11  Dewei Zhu  
+
+Improve test freshness page interaction experience.
+https://bugs.webkit.org/show_bug.cgi?id=202684
+
+Reviewed by Ryosuke Niwa.
+
+Change test freshness page show tooltip on click instead of popuping on mouse hover.
+And clicking anywhere in 'page-with-heading' section except the tooltip can dismiss tooltip.
+Add keyboard support to move focus around including 'Tab' key support.
+Add support to use 'Enter' key to show or dismiss tooltip.
+Add support to use 'Escape' key to dismiss tooltip.
+
+* public/shared/common-component-base.js: Added support for link to specify 'tabindex'.
+(CommonComponentBase.prototype.createLink):
+(CommonComponentBase.createLink):
+(CommonComponentBase):
+* public/v3/components/base.js: Added support for customizing whether or not prevent default and stop propagation
+while creating event handler.
+(ComponentBase.prototype.createEventHandler):
+(ComponentBase.createEventHandler):
+(ComponentBase):
+* public/v3/components/freshness-indicator.js:
+(FreshnessIndicator): Removed 'url' property and removed customization for mouse event.
+(FreshnessIndicator.prototype.update):
+(FreshnessIndicator.prototype.didConstructShadowTree): Deleted.
+* public/v3/pages/test-freshness-page.js:
+(TestFreshnessPage): Changed to show tooltip on click and added key board event.
+(TestFreshnessPage.prototype.didConstructShadowTree): Added key event support.
+(TestFreshnessPage.prototype._findClosestIndicatorAnchorForCoordinate):
+(TestFreshnessPage.prototype.render):
+(TestFreshnessPage.prototype._renderTooltip):
+(TestFreshnessPage.prototype._constructTableCell): Added tabIndex for each cell that contains freshness indicator.
+(TestFreshnessPage.prototype._configureAnchorForIndicator):
+(TestFreshnessPage.prototype._clearIndicatorState): Changed the color of links in tooltip to a more readable color.
+Added styles when anchor for status cell and links on tooltip are focused.
+(TestFreshnessPage.cssTemplate):
+
 2019-10-04  Zhifei Fang  
 
 [perf dashboard] Test fressness popover sometimes 

[webkit-changes] [250647] trunk/Websites/perf.webkit.org

2019-10-03 Thread dewei_zhu
Title: [250647] trunk/Websites/perf.webkit.org








Revision 250647
Author dewei_...@apple.com
Date 2019-10-03 01:39:53 -0700 (Thu, 03 Oct 2019)


Log Message
Fix a bug that warning icon causes infinite rendering when it has warning message.
https://bugs.webkit.org/show_bug.cgi?id=202502

Reviewed by Ryosuke Niwa.

Fix the problem that a warning icon with a warning message will result in infinite rendering.

* public/v3/components/button-base.js:
(ButtonBase):
(ButtonBase.prototype.setButtonTitle): Fixed a typo in function name and moved the title update to
render function.
(ButtonBase.prototype.render): Added the logic to render title.
* public/v3/components/test-group-revision-table.js: Set warning message by invoking setButtonTitle.
* public/v3/components/warning-icon.js: Removed the warning messge related code and leave the responsibility
to ButtonBase.
(WarningIcon):
(WarningIcon.prototype.render):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/components/button-base.js
trunk/Websites/perf.webkit.org/public/v3/components/test-group-revision-table.js
trunk/Websites/perf.webkit.org/public/v3/components/warning-icon.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (250646 => 250647)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-10-03 08:25:46 UTC (rev 250646)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-10-03 08:39:53 UTC (rev 250647)
@@ -1,3 +1,23 @@
+2019-10-02  Dewei Zhu  
+
+Fix a bug that warning icon causes infinite rendering when it has warning message.
+https://bugs.webkit.org/show_bug.cgi?id=202502
+
+Reviewed by Ryosuke Niwa.
+
+Fix the problem that a warning icon with a warning message will result in infinite rendering.
+
+* public/v3/components/button-base.js:
+(ButtonBase):
+(ButtonBase.prototype.setButtonTitle): Fixed a typo in function name and moved the title update to
+render function.
+(ButtonBase.prototype.render): Added the logic to render title.
+* public/v3/components/test-group-revision-table.js: Set warning message by invoking setButtonTitle.
+* public/v3/components/warning-icon.js: Removed the warning messge related code and leave the responsibility
+to ButtonBase.
+(WarningIcon):
+(WarningIcon.prototype.render):
+
 2019-07-30  Dewei Zhu  
 
 Provide build request status description information on dashboard.


Modified: trunk/Websites/perf.webkit.org/public/v3/components/button-base.js (250646 => 250647)

--- trunk/Websites/perf.webkit.org/public/v3/components/button-base.js	2019-10-03 08:25:46 UTC (rev 250646)
+++ trunk/Websites/perf.webkit.org/public/v3/components/button-base.js	2019-10-03 08:39:53 UTC (rev 250647)
@@ -5,6 +5,7 @@
 {
 super(name);
 this._disabled = false;
+this._title = null;
 }
 
 setDisabled(disabled)
@@ -15,8 +16,8 @@
 
 setButtonTitle(title)
 {
-this.content('button').title = title;
-this.enqueToRender();
+this._title = title;
+this.enqueueToRender();
 }
 
 didConstructShadowTree()
@@ -33,6 +34,10 @@
 this.content('button').setAttribute('disabled', '');
 else
 this.content('button').removeAttribute('disabled');
+if (this._title)
+this.content('button').setAttribute('title', this._title);
+else
+this.content('button').removeAttribute('title');
 }
 
 static htmlTemplate()


Modified: trunk/Websites/perf.webkit.org/public/v3/components/test-group-revision-table.js (250646 => 250647)

--- trunk/Websites/perf.webkit.org/public/v3/components/test-group-revision-table.js	2019-10-03 08:25:46 UTC (rev 250646)
+++ trunk/Websites/perf.webkit.org/public/v3/components/test-group-revision-table.js	2019-10-03 08:39:53 UTC (rev 250647)
@@ -117,8 +117,11 @@
 const element = ComponentBase.createElement;
 const showWarningIcon = request.hasFinished() && request.statusDescription();
 const cellContent = [];
-if (showWarningIcon)
-cellContent.push(element('div', {class: 'warning-icon-container'}, new WarningIcon(`Last status: ${request.statusDescription()}`)));
+if (showWarningIcon) {
+const warningIcon = new WarningIcon;
+warningIcon.setWarning(`Last status: ${request.statusDescription()}`);
+cellContent.push(element('div', {class: 'warning-icon-container'}, warningIcon));
+}
 
 cellContent.push(request.statusUrl() ? link(request.statusLabel(), request.statusDescription(), request.statusUrl()) : request.statusLabel());
 


Modified: trunk/Websites/perf.webkit.org/public/v3/components/warning-icon.js (250646 => 250647)

--- trunk/Websites/perf.webkit.org/public/v3/components/warning-icon.js	2019-10-03 08:25:46 UTC (rev 250646)
+++ trunk/Websites/perf.webkit.org/public/v3/components/warning-icon.js	2019-10-03 08:39:53 

[webkit-changes] [250465] trunk/Websites/perf.webkit.org

2019-09-27 Thread dewei_zhu
Title: [250465] trunk/Websites/perf.webkit.org








Revision 250465
Author dewei_...@apple.com
Date 2019-09-27 15:45:12 -0700 (Fri, 27 Sep 2019)


Log Message
Provide build request status description information on dashboard.
https://bugs.webkit.org/show_bug.cgi?id=199810

Reviewed by Ryosuke Niwa.

Add build request status description to show detailed information for a build and show it in dashboard.
Update SQL for existing instance:
ALTER TABLE build_requests ADD COLUMN IF NOT EXISTS request_status_description varchar(1024) DEFAULT NULL;

* ReadMe.md: Updated instructions for initializing a database to include running 'migrate-database.sql'.
* init-database.sql: Added request_status_description column.
* migrate-database.sql: A file stores migration SQL for existing instance.
* public/api/build-requests.php: Added support for updating request_status_description.
* public/include/build-requests-fetcher.php: Exposed `statusDescription` to API.
* public/v3/components/test-group-revision-table.js: Added UI for showing build request status detail.
(TestGroupRevisionTable.prototype._renderTable):
(TestGroupRevisionTable.prototype._buildDescriptionCell):
(TestGroupRevisionTable.cssTemplate):
* public/v3/components/warning-icon.js: Extended warning icon to be able to customize information on hover.
(WarningIcon):
(WarningIcon.prototype.render):
* public/v3/components/button-base.js: Added a instance method to set button title.
(ButtonBase.prototype.setButtonTitle):
* public/v3/models/build-request.js: Added 'statusDescription' field.
(BuildRequest):
(BuildRequest.prototype.updateSingleton):
(BuildRequest.prototype.statusDescription):
* server-tests/api-build-requests-tests.js: Fixed unit tests.
* server-tests/resources/mock-data.js:
(MockData.set mockTestSyncConfigWithSingleBuilder): Added 'status_description' in buildbot mock data.
(MockData.sampleBuildData):
* server-tests/resources/test-server.js:
(TestServer.prototype.initDatabase): Added code to execute 'migrate-database.sql' on initialization.
* server-tests/tools-sync-buildbot-integration-tests.js: Added unit tests.
* tools/js/buildbot-syncer.js: Added 'statusDescription' field to 'BuildbotBuildEntry'.
(BuildbotBuildEntry.prototype.initialize):
(BuildbotBuildEntry.prototype.statusDescription):
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype._pullBuildbotOnAllSyncers):
* unit-tests/buildbot-syncer-tests.js: Added test code for BuildbotBuildEntry.statusDescription.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/ReadMe.md
trunk/Websites/perf.webkit.org/public/api/build-requests.php
trunk/Websites/perf.webkit.org/public/include/build-requests-fetcher.php
trunk/Websites/perf.webkit.org/public/v3/components/button-base.js
trunk/Websites/perf.webkit.org/public/v3/components/test-group-revision-table.js
trunk/Websites/perf.webkit.org/public/v3/components/warning-icon.js
trunk/Websites/perf.webkit.org/public/v3/models/build-request.js
trunk/Websites/perf.webkit.org/server-tests/api-build-requests-tests.js
trunk/Websites/perf.webkit.org/server-tests/resources/mock-data.js
trunk/Websites/perf.webkit.org/server-tests/resources/test-server.js
trunk/Websites/perf.webkit.org/server-tests/tools-sync-buildbot-integration-tests.js
trunk/Websites/perf.webkit.org/tools/js/buildbot-syncer.js
trunk/Websites/perf.webkit.org/tools/js/buildbot-triggerable.js
trunk/Websites/perf.webkit.org/unit-tests/buildbot-syncer-tests.js


Added Paths

trunk/Websites/perf.webkit.org/migrate-database.sql




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (250464 => 250465)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-09-27 22:42:20 UTC (rev 250464)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-09-27 22:45:12 UTC (rev 250465)
@@ -1,3 +1,46 @@
+2019-07-30  Dewei Zhu  
+
+Provide build request status description information on dashboard.
+https://bugs.webkit.org/show_bug.cgi?id=199810
+
+Reviewed by Ryosuke Niwa.
+
+Add build request status description to show detailed information for a build and show it in dashboard.
+Update SQL for existing instance:
+ALTER TABLE build_requests ADD COLUMN IF NOT EXISTS request_status_description varchar(1024) DEFAULT NULL;
+
+* ReadMe.md: Updated instructions for initializing a database to include running 'migrate-database.sql'.
+* init-database.sql: Added request_status_description column.
+* migrate-database.sql: A file stores migration SQL for existing instance.
+* public/api/build-requests.php: Added support for updating request_status_description.
+* public/include/build-requests-fetcher.php: Exposed `statusDescription` to API.
+* public/v3/components/test-group-revision-table.js: Added UI for showing build request status detail.
+(TestGroupRevisionTable.prototype._renderTable):
+(TestGroupRevisionTable.prototype._buildDescriptionCell):
+

[webkit-changes] [248110] trunk/Websites/perf.webkit.org

2019-08-01 Thread dewei_zhu
Title: [248110] trunk/Websites/perf.webkit.org








Revision 248110
Author dewei_...@apple.com
Date 2019-08-01 11:02:45 -0700 (Thu, 01 Aug 2019)


Log Message
Dashboard should defaults to first dashboard page when summary page is not available.
https://bugs.webkit.org/show_bug.cgi?id=200180

Reviewed by Ryosuke Niwa.

Fix a bug that charts page will become the default when there is no summary page but there
is at least one dashboard page.

* public/v3/main.js: Charts page and analysis category page should not be considered as summay pages.
(main):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/main.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (248109 => 248110)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-08-01 17:55:54 UTC (rev 248109)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-08-01 18:02:45 UTC (rev 248110)
@@ -1,3 +1,16 @@
+2019-07-26  Dewei Zhu  
+
+Dashboard should defaults to first dashboard page when summary page is not available.
+https://bugs.webkit.org/show_bug.cgi?id=200180
+
+Reviewed by Ryosuke Niwa.
+
+Fix a bug that charts page will become the default when there is no summary page but there
+is at least one dashboard page.
+
+* public/v3/main.js: Charts page and analysis category page should not be considered as summay pages.
+(main):
+
 2019-07-30  Dewei Zhu  
 
 Analysis task page should show build request author and creation time.


Modified: trunk/Websites/perf.webkit.org/public/v3/main.js (248109 => 248110)

--- trunk/Websites/perf.webkit.org/public/v3/main.js	2019-08-01 17:55:54 UTC (rev 248109)
+++ trunk/Websites/perf.webkit.org/public/v3/main.js	2019-08-01 18:02:45 UTC (rev 248110)
@@ -38,8 +38,6 @@
 const chartsPage = new ChartsPage(chartsToolbar);
 const analysisCategoryPage = new AnalysisCategoryPage();
 
-summaryPages.push(chartsPage);
-summaryPages.push(analysisCategoryPage);
 if (testFreshnessPage)
 summaryPages.push(testFreshnessPage);
 
@@ -53,7 +51,7 @@
 buildRequestQueuePage.setParentPage(analysisCategoryPage);
 
 const heading = new Heading(manifest.siteTitle);
-heading.addPageGroup(summaryPages);
+heading.addPageGroup([chartsPage, analysisCategoryPage, ...summaryPages]);
 
 heading.setTitle(manifest.siteTitle);
 heading.addPageGroup(dashboardPages);
@@ -61,6 +59,8 @@
 const router = new PageRouter();
 for (const summaryPage of summaryPages)
 router.addPage(summaryPage);
+router.addPage(chartsPage);
+router.addPage(analysisCategoryPage);
 router.addPage(createAnalysisTaskPage);
 router.addPage(analysisTaskPage);
 router.addPage(buildRequestQueuePage);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [248045] trunk/Websites/perf.webkit.org

2019-07-31 Thread dewei_zhu
Title: [248045] trunk/Websites/perf.webkit.org








Revision 248045
Author dewei_...@apple.com
Date 2019-07-31 09:28:02 -0700 (Wed, 31 Jul 2019)


Log Message
Analysis task page should show build request author and creation time.
https://bugs.webkit.org/show_bug.cgi?id=200274

Reviewed by Ryosuke Niwa.

Author and creation time of a build request should be visible in analysis task page.

* public/v3/pages/analysis-task-page.js: Added UI to show build request creation time and author.
(AnalysisTaskTestGroupPane.prototype._renderCurrentTestGroup):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/pages/analysis-task-page.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (248044 => 248045)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-07-31 16:26:57 UTC (rev 248044)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-07-31 16:28:02 UTC (rev 248045)
@@ -1,3 +1,15 @@
+2019-07-30  Dewei Zhu  
+
+Analysis task page should show build request author and creation time.
+https://bugs.webkit.org/show_bug.cgi?id=200274
+
+Reviewed by Ryosuke Niwa.
+
+Author and creation time of a build request should be visible in analysis task page.
+
+* public/v3/pages/analysis-task-page.js: Added UI to show build request creation time and author.
+(AnalysisTaskTestGroupPane.prototype._renderCurrentTestGroup):
+
 2019-07-29  Dewei Zhu  
 
 Should not render latest build information if there is no data points for a config.


Modified: trunk/Websites/perf.webkit.org/public/v3/pages/analysis-task-page.js (248044 => 248045)

--- trunk/Websites/perf.webkit.org/public/v3/pages/analysis-task-page.js	2019-07-31 16:26:57 UTC (rev 248044)
+++ trunk/Websites/perf.webkit.org/public/v3/pages/analysis-task-page.js	2019-07-31 16:28:02 UTC (rev 248045)
@@ -371,12 +371,16 @@
 if (currentGroup) {
 this.part('retry-form').setRepetitionCount(currentGroup.initialRepetitionCount());
 this.part('bisect-form').setRepetitionCount(currentGroup.initialRepetitionCount());
-const summary = `${currentGroup.initialRepetitionCount()} requested, ${currentGroup.repetitionCount() - currentGroup.initialRepetitionCount()} added due to failures.`;
-this.content('status-summary').innerHTML = summary;
+const statusSummary = `${currentGroup.initialRepetitionCount()} requested, ${currentGroup.repetitionCount() - currentGroup.initialRepetitionCount()} added due to failures.`;
+this.content('status-summary').innerHTML = statusSummary;
+
+const authoredBy = currentGroup.author() ? `by "${currentGroup.author()}"` : '';
+this.content('request-summary').innerHTML = `Scheduled ${authoredBy} at ${currentGroup.createdAt()}`
 }
 this.content('retry-form').style.display = currentGroup ? null : 'none';
 this.content('bisect-form').style.display = currentGroup && this._bisectingCommitSetByTestGroup.get(currentGroup) ? null : 'none';
 this.content('status-summary').style.display = currentGroup && currentGroup.repetitionCount() > currentGroup.initialRepetitionCount() ? null : 'none';
+this.content('request-summary').style.display = currentGroup ? null : 'none';
 
 const hideButton = this.content('hide-button');
 hideButton.textContent = currentGroup && currentGroup.isHidden() ? 'Unhide' : 'Hide';
@@ -393,6 +397,7 @@
 
 
 
+
 Retry
 Bisect
 Hide






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [248007] trunk/Websites/perf.webkit.org

2019-07-30 Thread dewei_zhu
Title: [248007] trunk/Websites/perf.webkit.org








Revision 248007
Author dewei_...@apple.com
Date 2019-07-30 09:04:23 -0700 (Tue, 30 Jul 2019)


Log Message
Should not render latest build information if there is no data points for a config.
https://bugs.webkit.org/show_bug.cgi?id=200250

Reviewed by Ryosuke Niwa.

Fix a bug test freshness page that tooltip cannot be rendered when a cell does not have
a data point.

* public/v3/pages/test-freshness-page.js: Added a null check on commit set before rendering
latest build informaiton.
(TestFreshnessPage.prototype._renderTooltip):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (248006 => 248007)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-07-30 15:40:01 UTC (rev 248006)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-07-30 16:04:23 UTC (rev 248007)
@@ -1,3 +1,17 @@
+2019-07-29  Dewei Zhu  
+
+Should not render latest build information if there is no data points for a config.
+https://bugs.webkit.org/show_bug.cgi?id=200250
+
+Reviewed by Ryosuke Niwa.
+
+Fix a bug test freshness page that tooltip cannot be rendered when a cell does not have
+a data point.
+
+* public/v3/pages/test-freshness-page.js: Added a null check on commit set before rendering
+latest build informaiton.
+(TestFreshnessPage.prototype._renderTooltip):
+
 2019-07-25  Dewei Zhu  
 
 Fix a bug that cannot update builder password on builders administrative page.


Modified: trunk/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js (248006 => 248007)

--- trunk/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js	2019-07-30 15:40:01 UTC (rev 248006)
+++ trunk/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js	2019-07-30 16:04:23 UTC (rev 248007)
@@ -171,17 +171,20 @@
 tooltipTable.style.left = rect.left + rect.width / 2 - tooltipTable.offsetWidth / 2 + containerMarginLeft + 'px';
 
 let tableContent = [element('tr', element('td', {colspan: 2}, buildSummary))];
-if (commitSet.repositories().length)
-tableContent.push(element('tr', element('th', {colspan: 2}, 'Latest build information')));
 
-tableContent.push(Repository.sortByNamePreferringOnesWithURL(commitSet.repositories()).map((repository) => {
-const commit = commitSet.commitForRepository(repository);
-return element('tr', [
-element('td', repository.name()),
-element('td', commit.url() ? link(commit.label(), commit.label(), commit.url(), true) : commit.label())
-]);
-}));
+if (commitSet) {
+if (commitSet.repositories().length)
+tableContent.push(element('tr', element('th', {colspan: 2}, 'Latest build information')));
 
+tableContent.push(Repository.sortByNamePreferringOnesWithURL(commitSet.repositories()).map((repository) => {
+const commit = commitSet.commitForRepository(repository);
+return element('tr', [
+element('td', repository.name()),
+element('td', commit.url() ? link(commit.label(), commit.label(), commit.url(), true) : commit.label())
+]);
+}));
+}
+
 if (build) {
 const url = ""
 const buildNumber = build.buildNumber();






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [247865] trunk/Websites/perf.webkit.org

2019-07-26 Thread dewei_zhu
Title: [247865] trunk/Websites/perf.webkit.org








Revision 247865
Author dewei_...@apple.com
Date 2019-07-26 10:58:21 -0700 (Fri, 26 Jul 2019)


Log Message
Fix a bug that cannot update builder password on builders administrative page.
https://bugs.webkit.org/show_bug.cgi?id=200154

Reviewed by Ryosuke Niwa.

'builders' administrative page should be able to update password for a builder.

* public/admin/builders.php: Should be able to update builder password.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/admin/builders.php




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (247864 => 247865)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-07-26 17:18:31 UTC (rev 247864)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-07-26 17:58:21 UTC (rev 247865)
@@ -1,3 +1,14 @@
+2019-07-25  Dewei Zhu  
+
+Fix a bug that cannot update builder password on builders administrative page.
+https://bugs.webkit.org/show_bug.cgi?id=200154
+
+Reviewed by Ryosuke Niwa.
+
+'builders' administrative page should be able to update password for a builder.
+
+* public/admin/builders.php: Should be able to update builder password.
+
 2019-07-23  Dewei Zhu  
 
 Use 12 digits to show a git commit.


Modified: trunk/Websites/perf.webkit.org/public/admin/builders.php (247864 => 247865)

--- trunk/Websites/perf.webkit.org/public/admin/builders.php	2019-07-26 17:18:31 UTC (rev 247864)
+++ trunk/Websites/perf.webkit.org/public/admin/builders.php	2019-07-26 17:58:21 UTC (rev 247865)
@@ -14,7 +14,7 @@
 } else if ($action == 'update') {
 if (update_field('builders', 'builder', 'name') || update_field('builders', 'builder', 'build_url'))
 regenerate_manifest();
-else if (update_field('build_slaves', 'slave', 'password_hash', hash('sha256', $_POST['new_password'])))
+else if (update_field('builders', 'builder', 'password_hash', hash('sha256', $_POST['new_password'])))
 regenerate_manifest();
 else
 notice('Invalid parameters.');






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [247770] trunk/Websites/perf.webkit.org

2019-07-24 Thread dewei_zhu
Title: [247770] trunk/Websites/perf.webkit.org








Revision 247770
Author dewei_...@apple.com
Date 2019-07-24 10:10:28 -0700 (Wed, 24 Jul 2019)


Log Message
Use 12 digits to show a git commit.
https://bugs.webkit.org/show_bug.cgi?id=200067

Reviewed by Ryosuke Niwa.

Use 12 digits to show a git commit to reasonably descrease commit prefix collision probability
for repository with large amount of commits.

* public/v3/models/commit-log.js: Increase digits from 8 to 12 for git SHA.
(CommitLog.prototype.label):
(CommitLog.prototype.diff):
* unit-tests/commit-log-tests.js: Updated unit tests.
* unit-tests/commit-set-tests.js: Updated unit tests.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/models/commit-log.js
trunk/Websites/perf.webkit.org/unit-tests/commit-log-tests.js
trunk/Websites/perf.webkit.org/unit-tests/commit-set-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (247769 => 247770)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-07-24 17:10:19 UTC (rev 247769)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-07-24 17:10:28 UTC (rev 247770)
@@ -1,3 +1,19 @@
+2019-07-23  Dewei Zhu  
+
+Use 12 digits to show a git commit.
+https://bugs.webkit.org/show_bug.cgi?id=200067
+
+Reviewed by Ryosuke Niwa.
+
+Use 12 digits to show a git commit to reasonably descrease commit prefix collision probability
+for repository with large amount of commits.
+
+* public/v3/models/commit-log.js: Increase digits from 8 to 12 for git SHA.
+(CommitLog.prototype.label):
+(CommitLog.prototype.diff):
+* unit-tests/commit-log-tests.js: Updated unit tests.
+* unit-tests/commit-set-tests.js: Updated unit tests.
+
 2019-07-03  Dewei Zhu  
 
 Test freshness page should expose revision information for latest build on tooltip.


Modified: trunk/Websites/perf.webkit.org/public/v3/models/commit-log.js (247769 => 247770)

--- trunk/Websites/perf.webkit.org/public/v3/models/commit-log.js	2019-07-24 17:10:19 UTC (rev 247769)
+++ trunk/Websites/perf.webkit.org/public/v3/models/commit-log.js	2019-07-24 17:10:28 UTC (rev 247770)
@@ -54,7 +54,7 @@
 if (parseInt(revision) == revision) // e.g. r12345
 return 'r' + revision;
 if (revision.length == 40) // e.g. git hash
-return revision.substring(0, 8);
+return revision.substring(0, 12);
 return revision;
 }
 title() { return this._repository.name() + ' at ' + this.label(); }
@@ -74,7 +74,7 @@
 if (parseInt(from) == from)// e.g. r12345.
 label = `r${from}-r${this.revision()}`;
 else if (to.length == 40) // e.g. git hash
-label = `${from.substring(0, 8)}..${to.substring(0, 8)}`;
+label = `${from.substring(0, 12)}..${to.substring(0, 12)}`;
 else
 label = `${from} - ${to}`;
 


Modified: trunk/Websites/perf.webkit.org/unit-tests/commit-log-tests.js (247769 => 247770)

--- trunk/Websites/perf.webkit.org/unit-tests/commit-log-tests.js	2019-07-24 17:10:19 UTC (rev 247769)
+++ trunk/Websites/perf.webkit.org/unit-tests/commit-log-tests.js	2019-07-24 17:10:28 UTC (rev 247770)
@@ -148,7 +148,7 @@
 });
 
 it('should truncate a Git hash at 8th character', function () {
-assert.equal(gitWebKitCommit().label(), '6f8b0dbb');
+assert.equal(gitWebKitCommit().label(), '6f8b0dbbda95');
 });
 
 it('should not modify OS X version', function () {
@@ -162,7 +162,7 @@
 });
 
 it('should truncate a Git hash at 8th character', function () {
-assert.equal(gitWebKitCommit().title(), 'WebKit at 6f8b0dbb');
+assert.equal(gitWebKitCommit().title(), 'WebKit at 6f8b0dbbda95');
 });
 
 it('should not modify OS X version', function () {
@@ -188,7 +188,7 @@
 });
 
 assert.deepEqual(gitWebKitCommit().diff(), {
-label: '6f8b0dbb',
+label: '6f8b0dbbda95',
 url: 'http://trac.webkit.org/changeset/6f8b0dbbda95a440503b88db1dd03dad3a7b07fb',
 repository: MockModels.webkit,
 });
@@ -210,7 +210,7 @@
 
 it('should truncate a Git hash at 8th character', function () {
 assert.deepEqual(gitWebKitCommit().diff(oldGitWebKitCommit()), {
-label: 'ffda14e6..6f8b0dbb',
+label: 'ffda14e6db07..6f8b0dbbda95',
 url: '',
 repository: MockModels.webkit
 });


Modified: trunk/Websites/perf.webkit.org/unit-tests/commit-set-tests.js (247769 => 247770)

--- trunk/Websites/perf.webkit.org/unit-tests/commit-set-tests.js	2019-07-24 17:10:19 UTC (rev 247769)
+++ trunk/Websites/perf.webkit.org/unit-tests/commit-set-tests.js	2019-07-24 17:10:28 UTC (rev 247770)
@@ -410,8 +410,8 @@
 it('should describe commit difference', () => {
 

[webkit-changes] [247168] trunk/Websites/perf.webkit.org

2019-07-05 Thread dewei_zhu
Title: [247168] trunk/Websites/perf.webkit.org








Revision 247168
Author dewei_...@apple.com
Date 2019-07-05 12:19:28 -0700 (Fri, 05 Jul 2019)


Log Message
Test freshness page should expose revision information for latest build on tooltip.
https://bugs.webkit.org/show_bug.cgi?id=199483

Reviewed by Ryosuke Niwa.

Added latest build revision information on test freshness page tooltip.

* public/v3/pages/test-freshness-page.js: Add build revision information on tooltip.
(TestFreshnessPage.prototype.didConstructShadowTree):
(TestFreshnessPage.prototype._fetchTestResults):
(TestFreshnessPage.prototype.render):
(TestFreshnessPage.prototype._renderTooltip):
(TestFreshnessPage.cssTemplate):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (247167 => 247168)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-07-05 19:12:43 UTC (rev 247167)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-07-05 19:19:28 UTC (rev 247168)
@@ -1,3 +1,19 @@
+2019-07-03  Dewei Zhu  
+
+Test freshness page should expose revision information for latest build on tooltip.
+https://bugs.webkit.org/show_bug.cgi?id=199483
+
+Reviewed by Ryosuke Niwa.
+
+Added latest build revision information on test freshness page tooltip.
+
+* public/v3/pages/test-freshness-page.js: Add build revision information on tooltip.
+(TestFreshnessPage.prototype.didConstructShadowTree):
+(TestFreshnessPage.prototype._fetchTestResults):
+(TestFreshnessPage.prototype.render):
+(TestFreshnessPage.prototype._renderTooltip):
+(TestFreshnessPage.cssTemplate):
+
 2019-06-26  Dewei Zhu  
 
 commit api should not return 'AmbiguousRevisionPrefix' if there is an exact revision match


Modified: trunk/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js (247167 => 247168)

--- trunk/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js	2019-07-05 19:12:43 UTC (rev 247167)
+++ trunk/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js	2019-07-05 19:19:28 UTC (rev 247168)
@@ -19,12 +19,12 @@
 
 didConstructShadowTree()
 {
-const tooltipContainer = this.content('tooltip-container');
-tooltipContainer.addEventListener('mouseenter', () => {
+const tooltipTable = this.content('tooltip-table');
+tooltipTable.addEventListener('mouseenter', () => {
 this._hoveringTooltip = true;
 this.enqueueToRender();
 });
-tooltipContainer.addEventListener('mouseleave', () => {
+tooltipTable.addEventListener('mouseleave', () => {
 this._hoveringTooltip = false;
 this.enqueueToRender();
 });
@@ -89,8 +89,9 @@
 const currentTimeSeries = measurementSet.fetchedTimeSeries('current', false, false);
 
 let timeForLatestBuild = startTime;
-let lastBuildLink = null;
+let lastBuild = null;
 let builder = null;
+let commitSetOfLastPoint = null;
 const lastPoint = currentTimeSeries.lastPoint();
 if (lastPoint) {
 timeForLatestBuild = lastPoint.build().buildTime().getTime();
@@ -101,14 +102,15 @@
 continue;
 if (build.buildTime().getTime() >= timeForLatestBuild) {
 timeForLatestBuild = build.buildTime().getTime();
-lastBuildLink = build.url();
+lastBuild = build;
 builder = build.builder();
 }
 }
+commitSetOfLastPoint = lastPoint.commitSet();
 }
 
 lastDataPointByMetric.set(metric, {time: timeForLatestBuild, hasCurrentDataPoint: !!lastPoint,
-lastBuildLink, builder});
+lastBuild, builder, commitSetOfLastPoint});
 this.enqueueToRender();
 });
 }
@@ -122,7 +124,8 @@
 this._renderTableLazily.evaluate(this._platforms, this._metrics);
 
 let buildSummaryForCurrentlyHighlightedIndicator = null;
-let buildLinkForCurrentlyHighlightedIndicator = null;
+let buildForCurrentlyHighlightedIndicator = null;
+let commitSetForCurrentHighlightedIndicator = null;
 const builderForCurrentlyHighlightedIndicator = this._currentlyHighlightedIndicator ? this._builderByIndicator.get(this._currentlyHighlightedIndicator) : null;
 for (const [platform, lastDataPointByMetric] of this._lastDataPointByConfiguration.entries()) {
 for (const [metric, lastDataPoint] of lastDataPointByMetric.entries()) {
@@ -136,36 +139,61 @@
  

[webkit-changes] [246847] trunk/Websites/perf.webkit.org

2019-06-26 Thread dewei_zhu
Title: [246847] trunk/Websites/perf.webkit.org








Revision 246847
Author dewei_...@apple.com
Date 2019-06-26 14:59:41 -0700 (Wed, 26 Jun 2019)


Log Message
commit api should not return 'AmbiguousRevisionPrefix' if there is an exact revision match
https://bugs.webkit.org/show_bug.cgi?id=199227

Reviewed by Ryosuke Niwa.

When prefix match is specified, api should check whether there is an exact match when multiple commits
match the prefix.

* public/include/commit-log-fetcher.php: Added the logic to check if there is an exact match when multiple matches are found.
* server-tests/api-commits-tests.js: Added an unit test.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/include/commit-log-fetcher.php
trunk/Websites/perf.webkit.org/server-tests/api-commits-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (246846 => 246847)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-06-26 19:35:26 UTC (rev 246846)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-06-26 21:59:41 UTC (rev 246847)
@@ -1,3 +1,16 @@
+2019-06-26  Dewei Zhu  
+
+commit api should not return 'AmbiguousRevisionPrefix' if there is an exact revision match
+https://bugs.webkit.org/show_bug.cgi?id=199227
+
+Reviewed by Ryosuke Niwa.
+
+When prefix match is specified, api should check whether there is an exact match when multiple commits
+match the prefix.
+
+* public/include/commit-log-fetcher.php: Added the logic to check if there is an exact match when multiple matches are found.
+* server-tests/api-commits-tests.js: Added an unit test.
+
 2019-06-24  Dean Johnson  
 
 [perf.webkit.org] Update summary page calculations to use mean instead of median


Modified: trunk/Websites/perf.webkit.org/public/include/commit-log-fetcher.php (246846 => 246847)

--- trunk/Websites/perf.webkit.org/public/include/commit-log-fetcher.php	2019-06-26 19:35:26 UTC (rev 246846)
+++ trunk/Websites/perf.webkit.org/public/include/commit-log-fetcher.php	2019-06-26 21:59:41 UTC (rev 246847)
@@ -201,11 +201,14 @@
 }
 
 private function commit_for_revision_prefix($repository_id, $revision_prefix) {
-$rows = $this->db->query_and_fetch_all('SELECT * FROM commits WHERE commit_repository = $1 AND commit_revision LIKE $2 LIMIT 2', array($repository_id, Database::escape_for_like($revision_prefix) . '%'));
+$rows = $this->db->query_and_fetch_all('SELECT * FROM commits WHERE commit_repository = $1 AND commit_revision LIKE $2 ORDER BY commit_revision LIMIT 2', array($repository_id, Database::escape_for_like($revision_prefix) . '%'));
 if (count($rows) == 0)
 exit_with_error('UnknownCommit', array('repository' => $repository_id, 'revision' => $revision_prefix));
-if (count($rows) == 2)
+if (count($rows) == 2) {
+if ($rows[0]['commit_revision'] == $revision_prefix)
+return $rows[0];
 exit_with_error('AmbiguousRevisionPrefix', array('repository' => $repository_id, 'revision' => $revision_prefix));
+}
 return $rows[0];
 }
 


Modified: trunk/Websites/perf.webkit.org/server-tests/api-commits-tests.js (246846 => 246847)

--- trunk/Websites/perf.webkit.org/server-tests/api-commits-tests.js	2019-06-26 19:35:26 UTC (rev 246846)
+++ trunk/Websites/perf.webkit.org/server-tests/api-commits-tests.js	2019-06-26 21:59:41 UTC (rev 246847)
@@ -39,6 +39,27 @@
 ]
 }
 
+const commitsOnePrefixOfTheOther = {
+"slaveName": "someSlave",
+"slavePassword": "somePassword",
+"commits": [
+{
+"repository": "WebKit",
+"revision": "21094",
+"time": "2017-01-20T02:52:34.577Z",
+"author": {"name": "Zalan Bujtas", "account": "za...@apple.com"},
+"message": "a message",
+},
+{
+"repository": "WebKit",
+"revision": "210949",
+"time": "2017-01-20T03:23:50.645Z",
+"author": {"name": "Chris Dumez", "account": "cdu...@apple.com"},
+"message": "some message",
+}
+]
+}
+
 const systemVersionCommits = {
 "slaveName": "someSlave",
 "slavePassword": "somePassword",
@@ -460,6 +481,16 @@
 assert.equal(result['status'], 'AmbiguousRevisionPrefix');
 });
 
+it("should not return 'AmbiguousRevisionPrefix' when there is a commit revision extract matches specified revision prefix", async () => {
+const remote = TestServer.remoteAPI();
+await addSlaveForReport(commitsOnePrefixOfTheOther);
+await remote.postJSONWithStatus('/api/report-commits/', commitsOnePrefixOfTheOther);
+const result = await remote.getJSON('/api/commits/WebKit/21094?prefix-match=true');
+assert.equal(result['status'], 'OK');
+

[webkit-changes] [246663] trunk/Websites/perf.webkit.org

2019-06-20 Thread dewei_zhu
Title: [246663] trunk/Websites/perf.webkit.org








Revision 246663
Author dewei_...@apple.com
Date 2019-06-20 16:53:22 -0700 (Thu, 20 Jun 2019)


Log Message
Fix a bug that 'test_metrics' and 'tests' tables are not joined correctly in CommitLogFetcher.fetch_latest_for_platform
https://bugs.webkit.org/show_bug.cgi?id=199062

Reviewed by Ryosuke Niwa.

'test_metrics' and 'tests' should be joined based on 'metric_test' and 'test_id'.

* public/include/commit-log-fetcher.php: Fix the typo in the query.
* server-tests/api-commits-tests.js: Added a unit test for this change.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/include/commit-log-fetcher.php
trunk/Websites/perf.webkit.org/server-tests/api-commits-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (246662 => 246663)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-06-20 23:13:00 UTC (rev 246662)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-06-20 23:53:22 UTC (rev 246663)
@@ -1,3 +1,15 @@
+2019-06-20  Dewei Zhu  
+
+Fix a bug that 'test_metrics' and 'tests' tables are not joined correctly in CommitLogFetcher.fetch_latest_for_platform
+https://bugs.webkit.org/show_bug.cgi?id=199062
+
+Reviewed by Ryosuke Niwa.
+
+'test_metrics' and 'tests' should be joined based on 'metric_test' and 'test_id'.
+
+* public/include/commit-log-fetcher.php: Fix the typo in the query.
+* server-tests/api-commits-tests.js: Added a unit test for this change.
+
 2019-06-17  Dewei Zhu  
 
 Customizable test group form should allow user to supply a revision prefix of a commit and revision starts with 'r'.


Modified: trunk/Websites/perf.webkit.org/public/include/commit-log-fetcher.php (246662 => 246663)

--- trunk/Websites/perf.webkit.org/public/include/commit-log-fetcher.php	2019-06-20 23:13:00 UTC (rev 246662)
+++ trunk/Websites/perf.webkit.org/public/include/commit-log-fetcher.php	2019-06-20 23:53:22 UTC (rev 246663)
@@ -155,10 +155,10 @@
 function fetch_latest_for_platform($repository_id, $platform_id)
 {
 $query_result = $this->db->query_and_fetch_all("SELECT commits.* FROM test_runs, builds, build_commits, commits
-WHERE run_build = build_id AND NOT EXISTS (SELECT * FROM build_requests WHERE request_build = build_id)
+WHERE run_build = build_id AND NOT EXISTS (SELECT * FROM build_requests WHERE request_build = build_id LIMIT 1)
 AND run_config IN (SELECT config_id FROM test_configurations
 WHERE config_type = 'current' AND config_platform = $2 AND config_metric
-IN (SELECT metric_id FROM test_metrics, tests WHERE metric_id = test_id and test_parent IS NULL))
+IN (SELECT metric_id FROM test_metrics, tests WHERE metric_test = test_id and test_parent IS NULL))
 AND run_build = build_id AND commit_build = build_id AND build_commit = commit_id AND commit_repository = $1
 ORDER BY build_time DESC LIMIT 1;", array($repository_id, $platform_id));
 /* This query is approximation. It finds the commit of the last build instead of the last commit.


Modified: trunk/Websites/perf.webkit.org/server-tests/api-commits-tests.js (246662 => 246663)

--- trunk/Websites/perf.webkit.org/server-tests/api-commits-tests.js	2019-06-20 23:13:00 UTC (rev 246662)
+++ trunk/Websites/perf.webkit.org/server-tests/api-commits-tests.js	2019-06-20 23:53:22 UTC (rev 246663)
@@ -5,6 +5,7 @@
 const TestServer = require('./resources/test-server.js');
 const addSlaveForReport = require('./resources/common-operations.js').addSlaveForReport;
 const prepareServerTest = require('./resources/common-operations.js').prepareServerTest;
+const submitReport = require('./resources/common-operations.js').submitReport;
 
 describe("/api/commits/", function () {
 prepareServerTest(this);
@@ -80,6 +81,21 @@
 time: '2017-01-20T03:56:20.045Z'
 }
 
+const report = [{
+"buildNumber": "124",
+"buildTime": "2015-10-27T15:34:51",
+"builderName": "someBuilder",
+"builderPassword": "somePassword",
+"platform": "some platform",
+"tests": {"Speedometer-2": {"metrics": {"Score": {"current": [[100]],
+"revisions": {
+"WebKit": {
+"timestamp": "2017-01-20T02:52:34.577Z",
+"revision": "210948"
+}
+}
+}];
+
 function assertCommitIsSameAsOneSubmitted(commit, submitted)
 {
 assert.equal(commit['revision'], submitted['revision']);
@@ -238,6 +254,28 @@
 assert.equal(result['commits'][0]['revision'], systemVersionCommits['commits'][0]['revision']);
 });
 });
+
+it("should always return a commit as long as there is an existing 'current' type test run for a given platform", async () => {
+const remote = TestServer.remoteAPI();
+const 

[webkit-changes] [246581] trunk/Websites/perf.webkit.org

2019-06-18 Thread dewei_zhu
Title: [246581] trunk/Websites/perf.webkit.org








Revision 246581
Author dewei_...@apple.com
Date 2019-06-18 22:12:35 -0700 (Tue, 18 Jun 2019)


Log Message
Customizable test group form should allow user to supply a revision prefix of a commit and revision starts with 'r'.
https://bugs.webkit.org/show_bug.cgi?id=198940

Reviewed by Ryosuke Niwa.

Customizable test group form should adapt prefix matching when fetching for a commit.

* browser-tests/customizable-test-group-form-tests.js: Updated and added unit tests.
* public/v3/components/customizable-test-group-form.js: Removed loggings those a unintentionally committed.
* public/v3/models/commit-set.js: Adapted prefix matching API when fetching a commit.
(IntermediateCommitSet.prototype._fetchCommitLogAndOwnedCommits):
* unit-tests/commit-set-tests.js: Updated unit tests accordingly.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/browser-tests/customizable-test-group-form-tests.js
trunk/Websites/perf.webkit.org/public/v3/components/customizable-test-group-form.js
trunk/Websites/perf.webkit.org/public/v3/models/commit-set.js
trunk/Websites/perf.webkit.org/unit-tests/commit-set-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (246580 => 246581)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-06-19 04:44:11 UTC (rev 246580)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-06-19 05:12:35 UTC (rev 246581)
@@ -1,3 +1,18 @@
+2019-06-17  Dewei Zhu  
+
+Customizable test group form should allow user to supply a revision prefix of a commit and revision starts with 'r'.
+https://bugs.webkit.org/show_bug.cgi?id=198940
+
+Reviewed by Ryosuke Niwa.
+
+Customizable test group form should adapt prefix matching when fetching for a commit.
+
+* browser-tests/customizable-test-group-form-tests.js: Updated and added unit tests.
+* public/v3/components/customizable-test-group-form.js: Removed loggings those a unintentionally committed.
+* public/v3/models/commit-set.js: Adapted prefix matching API when fetching a commit.
+(IntermediateCommitSet.prototype._fetchCommitLogAndOwnedCommits):
+* unit-tests/commit-set-tests.js: Updated unit tests accordingly.
+
 2019-06-13  Dewei Zhu  
 
 Custom analysis task configurator should allow supplying commit prefix and revision starts 'r'.


Modified: trunk/Websites/perf.webkit.org/browser-tests/customizable-test-group-form-tests.js (246580 => 246581)

--- trunk/Websites/perf.webkit.org/browser-tests/customizable-test-group-form-tests.js	2019-06-19 04:44:11 UTC (rev 246580)
+++ trunk/Websites/perf.webkit.org/browser-tests/customizable-test-group-form-tests.js	2019-06-19 05:12:35 UTC (rev 246581)
@@ -35,6 +35,18 @@
 "message": "some message",
 };
 
+const commitObjectC = {
+"id": "185336",
+"revision": "210950",
+"repository": 1,
+"previousCommit": null,
+"ownsCommits": false,
+"time": 1541494949682,
+"authorName": "Chris Dumez",
+"authorEmail": "cdu...@apple.com",
+"message": "some message",
+};
+
 function cloneObject(object)
 {
 const clone = {};
@@ -62,8 +74,8 @@
 
 const requests = context.symbols.MockRemoteAPI.requests;
 expect(requests.length).to.be(2);
-expect(requests[0].url).to.be('/api/commits/1/210948');
-expect(requests[1].url).to.be('/api/commits/1/210949');
+expect(requests[0].url).to.be('/api/commits/1/210948?prefix-match=true');
+expect(requests[1].url).to.be('/api/commits/1/210949?prefix-match=true');
 requests[0].resolve({commits: [commitObjectA]});
 requests[1].resolve({commits: [commitObjectB]});
 
@@ -90,6 +102,58 @@
 expect(revisionEditor.value).to.be('210948');
 });
 
+it('should allow user to only provide prefix of a commit as long as the commit is unique in the repository', async () => {
+const context = new BrowsingContext();
+const customizableTestGroupForm = await createCustomizableTestGroupFormWithContext(context);
+const repository = context.symbols.Repository.ensureSingleton(1, {name: 'WebKit'});
+
+const commitA = cloneObject(commitObjectA);
+const commitB = cloneObject(commitObjectB);
+const commitC = cloneObject(commitObjectC);
+commitA.repository = repository;
+commitB.repository = repository;
+commitC.repository = repository;
+const webkitCommitA = context.symbols.CommitLog.ensureSingleton(185326, commitA);
+const webkitCommitB = context.symbols.CommitLog.ensureSingleton(185334, commitB);
+const commitSetA = context.symbols.CommitSet.ensureSingleton(1, {revisionItems: [{commit: webkitCommitA}]});
+const commitSetB = context.symbols.CommitSet.ensureSingleton(2, {revisionItems: [{commit: webkitCommitB}]});
+
+customizableTestGroupForm.setCommitSetMap({A: 

[webkit-changes] [246522] trunk/Websites/perf.webkit.org

2019-06-17 Thread dewei_zhu
Title: [246522] trunk/Websites/perf.webkit.org








Revision 246522
Author dewei_...@apple.com
Date 2019-06-17 16:11:59 -0700 (Mon, 17 Jun 2019)


Log Message
Custom analysis task configurator should allow supplying commit prefix and revision starts 'r'.
https://bugs.webkit.org/show_bug.cgi?id=198847

Reviewed by Ryosuke Niwa.

Custom analysis task configurator should not require full SHA to start an A/B test.
Custom analysis task configurator should accept svn revision starts with 'r'.

* browser-tests/custom-analysis-task-configurator-tests.js: Added a unit test for this change.
* public/api/commits.php: Extend this API to allow prefix matching when fethcing a single commit.
* public/include/commit-log-fetcher.php: Added a function to fetch a commit with prefix.
* public/v3/components/custom-analysis-task-configurator.js: Add UI support for accepting partial revision.
(CustomAnalysisTaskConfigurator.prototype._computeCommitSet):
(CustomAnalysisTaskConfigurator.prototype.async._resolveRevision):
(CustomAnalysisTaskConfigurator.prototype._buildTestabilityList):
* public/v3/models/commit-log.js:
(CommitLog.async.fetchForSingleRevision): Added third argument to specify prefix matching which defaults to false.
* server-tests/api-commits-tests.js: Added unit tests.
* unit-tests/commit-log-tests.js: Added a unit test.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/browser-tests/custom-analysis-task-configurator-tests.js
trunk/Websites/perf.webkit.org/public/api/commits.php
trunk/Websites/perf.webkit.org/public/include/commit-log-fetcher.php
trunk/Websites/perf.webkit.org/public/v3/components/custom-analysis-task-configurator.js
trunk/Websites/perf.webkit.org/public/v3/models/commit-log.js
trunk/Websites/perf.webkit.org/server-tests/api-commits-tests.js
trunk/Websites/perf.webkit.org/unit-tests/commit-log-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (246521 => 246522)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-06-17 23:11:56 UTC (rev 246521)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-06-17 23:11:59 UTC (rev 246522)
@@ -1,3 +1,25 @@
+2019-06-13  Dewei Zhu  
+
+Custom analysis task configurator should allow supplying commit prefix and revision starts 'r'.
+https://bugs.webkit.org/show_bug.cgi?id=198847
+
+Reviewed by Ryosuke Niwa.
+
+Custom analysis task configurator should not require full SHA to start an A/B test.
+Custom analysis task configurator should accept svn revision starts with 'r'.
+
+* browser-tests/custom-analysis-task-configurator-tests.js: Added a unit test for this change.
+* public/api/commits.php: Extend this API to allow prefix matching when fethcing a single commit.
+* public/include/commit-log-fetcher.php: Added a function to fetch a commit with prefix.
+* public/v3/components/custom-analysis-task-configurator.js: Add UI support for accepting partial revision.
+(CustomAnalysisTaskConfigurator.prototype._computeCommitSet):
+(CustomAnalysisTaskConfigurator.prototype.async._resolveRevision):
+(CustomAnalysisTaskConfigurator.prototype._buildTestabilityList):
+* public/v3/models/commit-log.js:
+(CommitLog.async.fetchForSingleRevision): Added third argument to specify prefix matching which defaults to false.
+* server-tests/api-commits-tests.js: Added unit tests.
+* unit-tests/commit-log-tests.js: Added a unit test.
+
 2019-05-15  Dewei Zhu  
 
 Perf dashboard erroneously rejects a build request to build owned components when there are no patches.


Modified: trunk/Websites/perf.webkit.org/browser-tests/custom-analysis-task-configurator-tests.js (246521 => 246522)

--- trunk/Websites/perf.webkit.org/browser-tests/custom-analysis-task-configurator-tests.js	2019-06-17 23:11:56 UTC (rev 246521)
+++ trunk/Websites/perf.webkit.org/browser-tests/custom-analysis-task-configurator-tests.js	2019-06-17 23:11:59 UTC (rev 246522)
@@ -56,7 +56,7 @@
 customAnalysisTaskConfigurator.content('baseline-revision-table').querySelector('input').dispatchEvent(new Event('input'));
 await sleep(context.symbols.CustomAnalysisTaskConfigurator.commitFetchInterval);
 expect(requests.length).to.be(2);
-expect(requests[1].url).to.be('/api/commits/1/123');
+expect(requests[1].url).to.be('/api/commits/1/123?prefix-match=true');
 
 customAnalysisTaskConfigurator._configureComparison();
 await waitForComponentsToRender(context);
@@ -65,7 +65,7 @@
 customAnalysisTaskConfigurator.content('comparison-revision-table').querySelector('input').dispatchEvent(new Event('input'));
 await sleep(context.symbols.CustomAnalysisTaskConfigurator.commitFetchInterval);
 expect(requests.length).to.be(3);
-expect(requests[2].url).to.be('/api/commits/1/456');
+expect(requests[2].url).to.be('/api/commits/1/456?prefix-match=true');
 
 

[webkit-changes] [246303] trunk/Tools

2019-06-10 Thread dewei_zhu
Title: [246303] trunk/Tools








Revision 246303
Author dewei_...@apple.com
Date 2019-06-10 22:05:19 -0700 (Mon, 10 Jun 2019)


Log Message
Extend run-benchmark to allow diagnosing before closing browser on test failure.
https://bugs.webkit.org/show_bug.cgi?id=198729

Reviewed by Ryosuke Niwa.

Add '--diagnose-directory' option to store diagnose information when test failed.

* Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
(BenchmarkRunner.__init__):
* Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py:
(BrowserDriver.diagnose_test_failure): Add default no-op function to base class.
* Scripts/webkitpy/benchmark_runner/run_benchmark.py: Added '--diagnose-directory' option.
(parse_args):
(run_benchmark_plan):
* Scripts/webkitpy/benchmark_runner/webdriver_benchmark_runner.py:
(WebDriverBenchmarkRunner._run_one_test): Added 'diagnose_test_failure' invocation on test failure.
* Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py:
(WebServerBenchmarkRunner.__init__):
(WebServerBenchmarkRunner._run_one_test): Added 'diagnose_test_failure' invocation on test failure.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/run_benchmark.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/webdriver_benchmark_runner.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py




Diff

Modified: trunk/Tools/ChangeLog (246302 => 246303)

--- trunk/Tools/ChangeLog	2019-06-11 01:14:23 UTC (rev 246302)
+++ trunk/Tools/ChangeLog	2019-06-11 05:05:19 UTC (rev 246303)
@@ -1,3 +1,25 @@
+2019-06-10  Dewei Zhu  
+
+Extend run-benchmark to allow diagnosing before closing browser on test failure.
+https://bugs.webkit.org/show_bug.cgi?id=198729
+
+Reviewed by Ryosuke Niwa.
+
+Add '--diagnose-directory' option to store diagnose information when test failed.
+
+* Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
+(BenchmarkRunner.__init__):
+* Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py:
+(BrowserDriver.diagnose_test_failure): Add default no-op function to base class.
+* Scripts/webkitpy/benchmark_runner/run_benchmark.py: Added '--diagnose-directory' option.
+(parse_args):
+(run_benchmark_plan):
+* Scripts/webkitpy/benchmark_runner/webdriver_benchmark_runner.py:
+(WebDriverBenchmarkRunner._run_one_test): Added 'diagnose_test_failure' invocation on test failure.
+* Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py:
+(WebServerBenchmarkRunner.__init__):
+(WebServerBenchmarkRunner._run_one_test): Added 'diagnose_test_failure' invocation on test failure.
+
 2019-06-10  Sam Weinig  
 
 Remove Dashboard support


Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py (246302 => 246303)

--- trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py	2019-06-11 01:14:23 UTC (rev 246302)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py	2019-06-11 05:05:19 UTC (rev 246303)
@@ -23,7 +23,7 @@
 class BenchmarkRunner(object):
 name = 'benchmark_runner'
 
-def __init__(self, plan_file, local_copy, count_override, build_dir, output_file, platform, browser, browser_path, scale_unit=True, show_iteration_values=False, device_id=None):
+def __init__(self, plan_file, local_copy, count_override, build_dir, output_file, platform, browser, browser_path, scale_unit=True, show_iteration_values=False, device_id=None, diagnose_dir=None):
 try:
 plan_file = self._find_plan_file(plan_file)
 with open(plan_file, 'r') as fp:
@@ -38,6 +38,7 @@
 self._browser_driver = BrowserDriverFactory.create(platform, browser)
 self._browser_path = browser_path
 self._build_dir = os.path.abspath(build_dir) if build_dir else None
+self._diagnose_dir = os.path.abspath(diagnose_dir) if diagnose_dir else None
 self._output_file = output_file
 self._scale_unit = scale_unit
 self._show_iteration_values = show_iteration_values


Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py (246302 => 246303)

--- trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py	2019-06-11 01:14:23 UTC (rev 246302)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py	2019-06-11 05:05:19 UTC (rev 246303)
@@ -42,6 +42,9 @@
 def restore_env_after_all_testing(self):
 pass
 
+def diagnose_test_failure(self, debug_directory, error):
+pass
+
 @property
 def webdriver_binary_path(self):
 return get_driver_binary_path(self.browser_name)


Modified: 

[webkit-changes] [245981] trunk/Tools

2019-05-31 Thread dewei_zhu
Title: [245981] trunk/Tools








Revision 245981
Author dewei_...@apple.com
Date 2019-05-31 13:52:31 -0700 (Fri, 31 May 2019)


Log Message
run-benchmark should report an error if the argument to --build-directory is bogus
https://bugs.webkit.org/show_bug.cgi?id=198316

Reviewed by Ryosuke Niwa.

'run-benchmark' should not fallback to system safari when browser or browser build path is
specified but not valid.
Add a run-time check to ensure at least one of the resource from build directory is opened by
Safari when build directory is specified.

* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
(OSXSafariDriver.launch_url): Raise an exception when browser or browser build path is
specified but not valid.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py




Diff

Modified: trunk/Tools/ChangeLog (245980 => 245981)

--- trunk/Tools/ChangeLog	2019-05-31 20:23:31 UTC (rev 245980)
+++ trunk/Tools/ChangeLog	2019-05-31 20:52:31 UTC (rev 245981)
@@ -1,3 +1,19 @@
+2019-05-28  Dewei Zhu  
+
+run-benchmark should report an error if the argument to --build-directory is bogus
+https://bugs.webkit.org/show_bug.cgi?id=198316
+
+Reviewed by Ryosuke Niwa.
+
+'run-benchmark' should not fallback to system safari when browser or browser build path is
+specified but not valid.
+Add a run-time check to ensure at least one of the resource from build directory is opened by
+Safari when build directory is specified.
+
+* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
+(OSXSafariDriver.launch_url): Raise an exception when browser or browser build path is
+specified but not valid.
+
 2019-05-31  Tim Horton  
 
 Optionally respect device management restrictions when loading from the network


Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py (245980 => 245981)

--- trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py	2019-05-31 20:23:31 UTC (rev 245980)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py	2019-05-31 20:52:31 UTC (rev 245981)
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+import itertools
 import logging
 import os
 import subprocess
@@ -27,18 +28,27 @@
 args = ['/Applications/Safari.app/Contents/MacOS/Safari']
 env = {}
 if browser_build_path:
-safari_app_in_build_path = os.path.join(browser_build_path, 'Safari.app/Contents/MacOS/Safari')
-if os.path.exists(safari_app_in_build_path):
+browser_build_absolute_path = os.path.abspath(browser_build_path)
+safari_app_in_build_path = os.path.join(browser_build_absolute_path, 'Safari.app/Contents/MacOS/Safari')
+has_safari_app = os.path.exists(safari_app_in_build_path)
+content_in_path = os.listdir(browser_build_absolute_path)
+contains_frameworks = any(itertools.imap(lambda entry: entry.endswith('.framework'), os.listdir(browser_build_absolute_path)))
+
+if has_safari_app:
 args = [safari_app_in_build_path]
-env = {'DYLD_FRAMEWORK_PATH': browser_build_path, 'DYLD_LIBRARY_PATH': browser_build_path, '__XPC_DYLD_FRAMEWORK_PATH': browser_build_path, '__XPC_DYLD_LIBRARY_PATH': browser_build_path}
-else:
-_log.info('Could not find Safari.app at %s, using the system Safari instead' % safari_app_in_build_path)
+
+if contains_frameworks:
+env = {'DYLD_FRAMEWORK_PATH': browser_build_absolute_path, 'DYLD_LIBRARY_PATH': browser_build_absolute_path,
+'__XPC_DYLD_FRAMEWORK_PATH': browser_build_absolute_path, '__XPC_DYLD_LIBRARY_PATH': browser_build_absolute_path}
+elif not has_safari_app:
+raise Exception('Could not find any framework "{}"'.format(browser_build_path))
+
 elif browser_path:
 safari_app_in_browser_path = os.path.join(browser_path, 'Contents/MacOS/Safari')
 if os.path.exists(safari_app_in_browser_path):
 args = [safari_app_in_browser_path]
 else:
-_log.info('Could not find application at %s, using the system Safari instead' % safari_app_in_browser_path)
+raise Exception('Could not find Safari.app at {}'.format(safari_app_in_browser_path))
 
 args.extend(self._safari_preferences)
 _log.info('Launching safari: %s with url: %s' % (args[0], url))
@@ -47,6 +57,18 @@
 # Stop for initialization of the safari process, otherwise, open
 # command may use the system safari.
 time.sleep(3)
+
+if browser_build_path:
+_log.info('Checking if any open file is from "{}".'.format(browser_build_path))
+# Cannot use 'check_call' here as '+D' option will have non-zero return code 

[webkit-changes] [245826] trunk/Tools

2019-05-28 Thread dewei_zhu
Title: [245826] trunk/Tools








Revision 245826
Author dewei_...@apple.com
Date 2019-05-28 14:55:50 -0700 (Tue, 28 May 2019)


Log Message
Limit run-benchmark http server to specific interface.
https://bugs.webkit.org/show_bug.cgi?id=198247

Reviewed by Ryosuke Niwa.

Add '--interface' option to 'twisted_http_server.py'.
'SimpleHTTPServerDriver' should specify interface for http server.
Update regex that determines http server port from 'lsof' output to support ipv6 address.

* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:
Added '--interface' argument.
* Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:
Limited http server to a specific interfce.
Added '-P' option to 'lsof' invocation to inhibits the conversion of port numbers to port name so script won't
fail if it's listening on a 'well-known' port.
Abstracted '_check_http_server_is_running' to allow potential child class to have its own implementation.
(SimpleHTTPServerDriver.serve): Updated regex that determines http server port from 'lsof' output to support ipv6 address.
(SimpleHTTPServerDriver.kill_server): Added null check for 'self._server_process'.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py




Diff

Modified: trunk/Tools/ChangeLog (245825 => 245826)

--- trunk/Tools/ChangeLog	2019-05-28 21:10:47 UTC (rev 245825)
+++ trunk/Tools/ChangeLog	2019-05-28 21:55:50 UTC (rev 245826)
@@ -1,3 +1,24 @@
+2019-05-25  Dewei Zhu  
+
+Limit run-benchmark http server to specific interface.
+https://bugs.webkit.org/show_bug.cgi?id=198247
+
+Reviewed by Ryosuke Niwa.
+
+Add '--interface' option to 'twisted_http_server.py'.
+'SimpleHTTPServerDriver' should specify interface for http server.
+Update regex that determines http server port from 'lsof' output to support ipv6 address.
+
+* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:
+Added '--interface' argument.
+* Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:
+Limited http server to a specific interfce.
+Added '-P' option to 'lsof' invocation to inhibits the conversion of port numbers to port name so script won't
+fail if it's listening on a 'well-known' port.
+Abstracted '_check_http_server_is_running' to allow potential child class to have its own implementation.
+(SimpleHTTPServerDriver.serve): Updated regex that determines http server port from 'lsof' output to support ipv6 address.
+(SimpleHTTPServerDriver.kill_server): Added null check for 'self._server_process'.
+
 2019-05-28  David Xiong  
 
 webkitpy: Switch run-webkit-tests to tailspin


Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py (245825 => 245826)

--- trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py	2019-05-28 21:10:47 UTC (rev 245825)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py	2019-05-28 21:55:50 UTC (rev 245826)
@@ -40,10 +40,11 @@
 parser = argparse.ArgumentParser(description='python twisted_http_server.py web_root')
 parser.add_argument('web_root')
 parser.add_argument('--port', type=int, default=0)
+parser.add_argument('--interface', default='')
 args = parser.parse_args()
 web_root = static.File(args.web_root)
 serverControl = ServerControl()
 web_root.putChild('shutdown', serverControl)
 web_root.putChild('report', serverControl)
-reactor.listenTCP(args.port, server.Site(web_root))
+reactor.listenTCP(args.port, server.Site(web_root), interface=args.interface)
 reactor.run()


Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py (245825 => 245826)

--- trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py	2019-05-28 21:10:47 UTC (rev 245825)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py	2019-05-28 21:55:50 UTC (rev 245826)
@@ -30,7 +30,10 @@
 def serve(self, web_root):
 _log.info('Launching an http server')
 http_server_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "http_server/twisted_http_server.py")
-self._server_process = subprocess.Popen(["python", http_server_path, web_root], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+interface_args = []
+if self._ip:
+interface_args.extend(['--interface', self._ip])
+self._server_process = subprocess.Popen(["python", http_server_path, web_root] + interface_args, 

[webkit-changes] [245616] trunk/Websites/perf.webkit.org

2019-05-22 Thread dewei_zhu
Title: [245616] trunk/Websites/perf.webkit.org








Revision 245616
Author dewei_...@apple.com
Date 2019-05-21 23:15:58 -0700 (Tue, 21 May 2019)


Log Message
Perf dashboard erroneously rejects a build request to build owned components when there are no patches.
https://bugs.webkit.org/show_bug.cgi?id=197928

Reviewed by Ryosuke Niwa.

Fix a bug that build type build request that only builds owned components failed to pass sanity check when there
is no repository accepts patch in triggerable repository group.
Add a sanity check to throw an error when build request type is build but there is no repository group template.

* tools/js/buildbot-syncer.js:
(BuildbotSyncer.prototype._propertiesForBuildRequest): Changed sanity check the always requires repository accepts patch when there is a build to make it also works for build request only builds owned components.
(BuildbotSyncer._parseRepositoryGroup): Added check for repository group templates not null  when build requiest type is build.
* unit-tests/buildbot-syncer-tests.js: Added unit tests for this change.
* unit-tests/resources/mock-v3-models.js: Added mock date for unit tests.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/tools/js/buildbot-syncer.js
trunk/Websites/perf.webkit.org/unit-tests/buildbot-syncer-tests.js
trunk/Websites/perf.webkit.org/unit-tests/resources/mock-v3-models.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (245615 => 245616)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-05-22 05:54:27 UTC (rev 245615)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-05-22 06:15:58 UTC (rev 245616)
@@ -1,3 +1,20 @@
+2019-05-15  Dewei Zhu  
+
+Perf dashboard erroneously rejects a build request to build owned components when there are no patches.
+https://bugs.webkit.org/show_bug.cgi?id=197928
+
+Reviewed by Ryosuke Niwa.
+
+Fix a bug that build type build request that only builds owned components failed to pass sanity check when there
+is no repository accepts patch in triggerable repository group.
+Add a sanity check to throw an error when build request type is build but there is no repository group template.
+
+* tools/js/buildbot-syncer.js:
+(BuildbotSyncer.prototype._propertiesForBuildRequest): Changed sanity check the always requires repository accepts patch when there is a build to make it also works for build request only builds owned components.
+(BuildbotSyncer._parseRepositoryGroup): Added check for repository group templates not null  when build requiest type is build.
+* unit-tests/buildbot-syncer-tests.js: Added unit tests for this change.
+* unit-tests/resources/mock-v3-models.js: Added mock date for unit tests.
+
 2019-05-14  Dewei Zhu  
 
 Pruning old file logic should not stop after removing 10 files if there are more files to be removed.


Modified: trunk/Websites/perf.webkit.org/tools/js/buildbot-syncer.js (245615 => 245616)

--- trunk/Websites/perf.webkit.org/tools/js/buildbot-syncer.js	2019-05-22 05:54:27 UTC (rev 245615)
+++ trunk/Websites/perf.webkit.org/tools/js/buildbot-syncer.js	2019-05-22 06:15:58 UTC (rev 245616)
@@ -242,6 +242,7 @@
 properties[propertyName] = propertiesTemplate[propertyName];
 
 const repositoryGroupTemplate = buildRequest.isBuild() ? repositoryGroupConfiguration.buildPropertiesTemplate : repositoryGroupConfiguration.testPropertiesTemplate;
+assert(!buildRequest.isBuild() || repositoryGroupTemplate, 'Repository group template cannot be null for build type build request');
 for (let propertyName in repositoryGroupTemplate) {
 let value = repositoryGroupTemplate[propertyName];
 const type = typeof(value) == 'object' ? value.type : 'string';
@@ -464,10 +465,10 @@
 
 let buildPropertiesTemplate = null;
 if ('buildProperties' in group) {
-assert(patchAcceptingRepositoryList.size, `Repository group "${name}" specifies the properties for building but does not accept any patches`);
 assert(group.acceptsRoots, `Repository group "${name}" specifies the properties for building but does not accept roots in testing`);
 const revisionRepositories = new Set;
 const patchRepositories = new Set;
+let hasOwnedRevisions = false;
 buildPropertiesTemplate = this._parseRepositoryGroupPropertyTemplate('build', name, group.buildProperties, (type, value, condition) => {
 assert(type != 'roots', `Repository group "${name}" specifies roots in the properties for building`);
 let repository = null;
@@ -482,6 +483,7 @@
 revisionRepositories.add(repository);
 return {type, repository};
 case 'ownedRevisions':
+hasOwnedRevisions = true;
 return {type, ownerRepository: resolveRepository(value)};
  

[webkit-changes] [245545] trunk/Websites/perf.webkit.org

2019-05-20 Thread dewei_zhu
Title: [245545] trunk/Websites/perf.webkit.org








Revision 245545
Author dewei_...@apple.com
Date 2019-05-20 18:56:17 -0700 (Mon, 20 May 2019)


Log Message
Pruning old file logic should not stop after removing 10 files if there are more files to be removed.
https://bugs.webkit.org/show_bug.cgi?id=197870

Reviewed by Ryosuke Niwa.

Pruning old file logic should keep removing removable files to make enough space for a new file upload.
It should only attempt to remve the files that have not been removed.

* public/include/uploaded-file-helpers.php: Modified 'prune_old_files' to allow to remove more than 10 files.
Fixed a bug that a removed file keep getting removed but never free up new space.
* server-tests/privileged-api-upload-file-tests.js:
(makeRandomAlnumStringForLength): Helper function to generate random content for a given length.
* server-tests/resources/test-server.js: Update total file size limit for this change.
(TestServer.prototype.testConfig):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/include/uploaded-file-helpers.php
trunk/Websites/perf.webkit.org/server-tests/privileged-api-upload-file-tests.js
trunk/Websites/perf.webkit.org/server-tests/resources/test-server.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (245544 => 245545)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-05-21 01:52:52 UTC (rev 245544)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-05-21 01:56:17 UTC (rev 245545)
@@ -1,3 +1,20 @@
+2019-05-14  Dewei Zhu  
+
+Pruning old file logic should not stop after removing 10 files if there are more files to be removed.
+https://bugs.webkit.org/show_bug.cgi?id=197870
+
+Reviewed by Ryosuke Niwa.
+
+Pruning old file logic should keep removing removable files to make enough space for a new file upload.
+It should only attempt to remve the files that have not been removed.
+
+* public/include/uploaded-file-helpers.php: Modified 'prune_old_files' to allow to remove more than 10 files.
+Fixed a bug that a removed file keep getting removed but never free up new space.
+* server-tests/privileged-api-upload-file-tests.js:
+(makeRandomAlnumStringForLength): Helper function to generate random content for a given length.
+* server-tests/resources/test-server.js: Update total file size limit for this change.
+(TestServer.prototype.testConfig):
+
 2019-03-25  Dewei Zhu  
 
 Primary cluster of measurement set should always contain latest point.


Modified: trunk/Websites/perf.webkit.org/public/include/uploaded-file-helpers.php (245544 => 245545)

--- trunk/Websites/perf.webkit.org/public/include/uploaded-file-helpers.php	2019-05-21 01:52:52 UTC (rev 245544)
+++ trunk/Websites/perf.webkit.org/public/include/uploaded-file-helpers.php	2019-05-21 01:56:17 UTC (rev 245545)
@@ -162,7 +162,7 @@
 WHERE file_id = commitset_root_file AND commitset_patch_file IS NOT NULL AND file_deleted_at IS NULL
 AND NOT EXISTS (SELECT request_id FROM build_requests WHERE request_commit_set = commitset_set AND request_status <= 'running')
 $user_filter
-ORDER BY file_created_at LIMIT 10", $params);
+ORDER BY file_created_at", $params);
 if (!$build_product_query)
 return FALSE;
 while ($row = $db->fetch_next_row($build_product_query)) {
@@ -178,8 +178,9 @@
 WHERE NOT EXISTS (SELECT request_id FROM build_requests, commit_set_items
 WHERE (commitset_root_file = file_id OR commitset_patch_file = file_id)
 AND request_commit_set = commitset_set AND request_status <= 'running')
+AND file_deleted_at IS NULL
 $user_filter
-ORDER BY file_created_at LIMIT 10", $params);
+ORDER BY file_created_at", $params);
 if (!$unused_file_query)
 return FALSE;
 while ($row = $db->fetch_next_row($unused_file_query)) {


Modified: trunk/Websites/perf.webkit.org/server-tests/privileged-api-upload-file-tests.js (245544 => 245545)

--- trunk/Websites/perf.webkit.org/server-tests/privileged-api-upload-file-tests.js	2019-05-21 01:52:52 UTC (rev 245544)
+++ trunk/Websites/perf.webkit.org/server-tests/privileged-api-upload-file-tests.js	2019-05-21 01:56:17 UTC (rev 245545)
@@ -13,6 +13,15 @@
 describe('/privileged-api/upload-file', function () {
 prepareServerTest(this);
 TemporaryFile.inject();
+function makeRandomAlnumStringForLength(length)
+{
+let string = '';
+const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
+const charactersLength = characters.length;
+for (let i = 0; i < length; i++)
+string += characters.charAt(Math.floor(Math.random() * charactersLength));
+return string;
+}
 
 it('should return "NotFileSpecified" when newFile not is specified', () => {
 return 

[webkit-changes] [243510] trunk/Websites/perf.webkit.org

2019-03-26 Thread dewei_zhu
Title: [243510] trunk/Websites/perf.webkit.org








Revision 243510
Author dewei_...@apple.com
Date 2019-03-26 12:04:37 -0700 (Tue, 26 Mar 2019)


Log Message
Primary cluster of measurement set should always contain latest point.
https://bugs.webkit.org/show_bug.cgi?id=196243

Reviewed by Ryosuke Niwa.

Fix a bug in measurement-set api that primary cluster may not contain latest data point as
'carry_over' row may not be updated.

* public/api/measurement-set.php: Should always keep 'carry_over' data points up to date.
* server-tests/api-measurement-set-tests.js: Added an unit test for this change.
Fixed a typo.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/api/measurement-set.php
trunk/Websites/perf.webkit.org/server-tests/api-measurement-set-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (243509 => 243510)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-03-26 18:20:22 UTC (rev 243509)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-03-26 19:04:37 UTC (rev 243510)
@@ -1,3 +1,17 @@
+2019-03-25  Dewei Zhu  
+
+Primary cluster of measurement set should always contain latest point.
+https://bugs.webkit.org/show_bug.cgi?id=196243
+
+Reviewed by Ryosuke Niwa.
+
+Fix a bug in measurement-set api that primary cluster may not contain latest data point as
+'carry_over' row may not be updated.
+
+* public/api/measurement-set.php: Should always keep 'carry_over' data points up to date.
+* server-tests/api-measurement-set-tests.js: Added an unit test for this change.
+Fixed a typo.
+
 2019-03-21  Dewei Zhu  
 
 'custom-configuration-test-group-form' should update test name when selected test or platform changes.


Modified: trunk/Websites/perf.webkit.org/public/api/measurement-set.php (243509 => 243510)

--- trunk/Websites/perf.webkit.org/public/api/measurement-set.php	2019-03-26 18:20:22 UTC (rev 243509)
+++ trunk/Websites/perf.webkit.org/public/api/measurement-set.php	2019-03-26 19:04:37 UTC (rev 243510)
@@ -153,9 +153,7 @@
 $reached_end = !$row;
 if ($reached_end)
 $this->queries[$name] = NULL;
-else {
-$this->next_cluster_results[$name] = array_slice($results_by_config[$name], -2);
-}
+$this->next_cluster_results[$name] = array_slice($results_by_config[$name], -2);
 }
 
 return array(


Modified: trunk/Websites/perf.webkit.org/server-tests/api-measurement-set-tests.js (243509 => 243510)

--- trunk/Websites/perf.webkit.org/server-tests/api-measurement-set-tests.js	2019-03-26 18:20:22 UTC (rev 243509)
+++ trunk/Websites/perf.webkit.org/server-tests/api-measurement-set-tests.js	2019-03-26 19:04:37 UTC (rev 243510)
@@ -107,7 +107,7 @@
 },
 }}];
 
-const reportWithAncentRevision = [{
+const reportWithAncientRevision = [{
 "buildNumber": "126",
 "buildTime": "2013-02-28T23:07:25Z",
 "revisions": {
@@ -129,6 +129,116 @@
 },
 }}];
 
+const secondReportWithRevision = [{
+"buildNumber": "127",
+"buildTime": "2013-02-28T23:07:25Z",
+"revisions": {
+"WebKit": {
+"revision": "137794",
+"timestamp": clusterTime(11.1).toISOString()
+},
+},
+"builderName": "someBuilder",
+"builderPassword": "somePassword",
+"platform": "Mountain Lion",
+"tests": {
+"Suite": {
+"tests": {
+"test1": {
+"metrics": {"Time": { "current": [21, 22, 23, 24, 25] }}
+}
+}
+},
+}}];
+
+const thirdReportWithRevision = [{
+"buildNumber": "128",
+"buildTime": "2013-02-28T23:07:25Z",
+"revisions": {
+"WebKit": {
+"revision": "137795",
+"timestamp": clusterTime(11.2).toISOString()
+},
+},
+"builderName": "someBuilder",
+"builderPassword": "somePassword",
+"platform": "Mountain Lion",
+"tests": {
+"Suite": {
+"tests": {
+"test1": {
+"metrics": {"Time": { "current": [21, 22, 23, 24, 25] }}
+}
+}
+},
+}}];
+
+const reportBaselineWithRevision = [{
+"buildNumber": "129",
+"buildTime": "2013-02-28T15:35:51Z",
+"revisions": {
+"WebKit": {
+"revision": "144001",
+"timestamp": clusterTime(13.35645364537).toISOString(),
+},
+},
+"builderName": "someBuilder",
+"builderPassword": "somePassword",
+"platform": "Mountain Lion",
+"tests": {
+"Suite": {
+"tests": {
+"test1": {
+

[webkit-changes] [243358] trunk/Websites/perf.webkit.org

2019-03-21 Thread dewei_zhu
Title: [243358] trunk/Websites/perf.webkit.org








Revision 243358
Author dewei_...@apple.com
Date 2019-03-21 20:34:28 -0700 (Thu, 21 Mar 2019)


Log Message
'custom-configuration-test-group-form' should update test name when selected test or platform changes.
https://bugs.webkit.org/show_bug.cgi?id=196114

Reviewed by Ryosuke Niwa.

r240104 fixes commit sets unnecessarily get updated even there is no change.
However, this made changing test or platform no longer triggers 'commitSetChange' action.
Test name should change not only when 'commitSet' gets change, but also platform or test changes.
Renaming the action name from 'commitSetChange' to a more accurate description 'testConfigChange'.
Dispatch 'testConfigChange' when platform or test changes.

* browser-tests/custom-analysis-task-configurator-tests.js: Changed action name to 'commitSetChange'.
* public/v3/components/custom-analysis-task-configurator.js:
(CustomAnalysisTaskConfigurator.prototype._didUpdateSelectedPlatforms): Should dispatch 'commitSetChange' action.
(CustomAnalysisTaskConfigurator.prototype._updateCommitSetMap): Changed action name to 'commitSetChange'.
* public/v3/components/custom-configuration-test-group-form.js: Added a unit test for this change.
(CustomConfigurationTestGroupForm.prototype.didConstructShadowTree):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/browser-tests/custom-analysis-task-configurator-tests.js
trunk/Websites/perf.webkit.org/public/v3/components/custom-analysis-task-configurator.js
trunk/Websites/perf.webkit.org/public/v3/components/custom-configuration-test-group-form.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (243357 => 243358)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-03-22 03:00:44 UTC (rev 243357)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-03-22 03:34:28 UTC (rev 243358)
@@ -1,3 +1,23 @@
+2019-03-21  Dewei Zhu  
+
+'custom-configuration-test-group-form' should update test name when selected test or platform changes.
+https://bugs.webkit.org/show_bug.cgi?id=196114
+
+Reviewed by Ryosuke Niwa.
+
+r240104 fixes commit sets unnecessarily get updated even there is no change.
+However, this made changing test or platform no longer triggers 'commitSetChange' action.
+Test name should change not only when 'commitSet' gets change, but also platform or test changes.
+Renaming the action name from 'commitSetChange' to a more accurate description 'testConfigChange'.
+Dispatch 'testConfigChange' when platform or test changes.
+
+* browser-tests/custom-analysis-task-configurator-tests.js: Changed action name to 'commitSetChange'.
+* public/v3/components/custom-analysis-task-configurator.js:
+(CustomAnalysisTaskConfigurator.prototype._didUpdateSelectedPlatforms): Should dispatch 'commitSetChange' action.
+(CustomAnalysisTaskConfigurator.prototype._updateCommitSetMap): Changed action name to 'commitSetChange'.
+* public/v3/components/custom-configuration-test-group-form.js: Added a unit test for this change.
+(CustomConfigurationTestGroupForm.prototype.didConstructShadowTree):
+
 2019-03-18  Dewei Zhu  
 
 Fix a bug from r226303 that latest build time is not correctly calculated.


Modified: trunk/Websites/perf.webkit.org/browser-tests/custom-analysis-task-configurator-tests.js (243357 => 243358)

--- trunk/Websites/perf.webkit.org/browser-tests/custom-analysis-task-configurator-tests.js	2019-03-22 03:00:44 UTC (rev 243357)
+++ trunk/Websites/perf.webkit.org/browser-tests/custom-analysis-task-configurator-tests.js	2019-03-22 03:34:28 UTC (rev 243358)
@@ -231,4 +231,69 @@
 await waitForComponentsToRender(context);
 expect(customAnalysisTaskConfigurator.content('baseline-revision-table').querySelector('input').value).to.be('');
 });
+
+it('Should dispatch "testConfigChange" action when selected platform changed', async () => {
+const context = new BrowsingContext();
+const customAnalysisTaskConfigurator = await createCustomAnalysisTaskConfiguratorWithContext(context);
+let testConfigChangeActionCount = 0;
+context.symbols.CustomAnalysisTaskConfigurator.commitFetchInterval = 1;
+
+customAnalysisTaskConfigurator.listenToAction("testConfigChange", () => testConfigChangeActionCount += 1);
+
+const test = new context.symbols.Test(1, {name: 'Speedometer'});
+const mojave = new context.symbols.Platform(1, {
+name: 'Mojave',
+metrics: [
+new context.symbols.Metric(1, {
+name: 'Allocation',
+aggregator: 'Arithmetic',
+test
+})
+],
+lastModifiedByMetric: Date.now(),
+});
+const highSierra = new context.symbols.Platform(2, {
+name: 'High Sierra',
+metrics: [
+

[webkit-changes] [243123] trunk/Websites/perf.webkit.org

2019-03-18 Thread dewei_zhu
Title: [243123] trunk/Websites/perf.webkit.org








Revision 243123
Author dewei_...@apple.com
Date 2019-03-18 18:55:13 -0700 (Mon, 18 Mar 2019)


Log Message
Fix a bug from r226303 that latest build time is not correctly calculated.
https://bugs.webkit.org/show_bug.cgi?id=195912

Reviewed by Ryosuke Niwa.

Time series is ordered by revision time which does not grantee the build time is
monotonically increasing.

* public/v3/pages/test-freshness-page.js: Use the latest build time instead of the build time of
last point on the chart.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (243122 => 243123)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-03-19 01:32:04 UTC (rev 243122)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-03-19 01:55:13 UTC (rev 243123)
@@ -1,3 +1,16 @@
+2019-03-18  Dewei Zhu  
+
+Fix a bug from r226303 that latest build time is not correctly calculated.
+https://bugs.webkit.org/show_bug.cgi?id=195912
+
+Reviewed by Ryosuke Niwa.
+
+Time series is ordered by revision time which does not grantee the build time is
+monotonically increasing.
+
+* public/v3/pages/test-freshness-page.js: Use the latest build time instead of the build time of
+last point on the chart.
+
 2019-03-13  Dewei Zhu  
 
 Test freshness page should improve the ability to correlating issues from same builder.


Modified: trunk/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js (243122 => 243123)

--- trunk/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js	2019-03-19 01:32:04 UTC (rev 243122)
+++ trunk/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js	2019-03-19 01:55:13 UTC (rev 243123)
@@ -88,17 +88,26 @@
 measurementSet.fetchBetween(startTime, this._measurementSetFetchTime).then(() => {
 const currentTimeSeries = measurementSet.fetchedTimeSeries('current', false, false);
 
-let timeForLastDataPoint = startTime;
+let timeForLatestBuild = startTime;
 let lastBuildLink = null;
 let builder = null;
 const lastPoint = currentTimeSeries.lastPoint();
 if (lastPoint) {
-timeForLastDataPoint = lastPoint.build().buildTime();
-lastBuildLink = lastPoint.build().url();
-builder = lastPoint.build().builder();
+timeForLatestBuild = lastPoint.build().buildTime().getTime();
+const view = currentTimeSeries.viewBetweenPoints(currentTimeSeries.firstPoint(), lastPoint);
+for (const point of view) {
+const build = point.build();
+if (!build)
+continue;
+if (build.buildTime().getTime() >= timeForLatestBuild) {
+timeForLatestBuild = build.buildTime().getTime();
+lastBuildLink = build.url();
+builder = build.builder();
+}
+}
 }
 
-lastDataPointByMetric.set(metric, {time: timeForLastDataPoint, hasCurrentDataPoint: !!currentTimeSeries.lastPoint(),
+lastDataPointByMetric.set(metric, {time: timeForLatestBuild, hasCurrentDataPoint: !!lastPoint,
 lastBuildLink, builder});
 this.enqueueToRender();
 });






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [242933] trunk/Websites/perf.webkit.org

2019-03-13 Thread dewei_zhu
Title: [242933] trunk/Websites/perf.webkit.org








Revision 242933
Author dewei_...@apple.com
Date 2019-03-13 20:07:40 -0700 (Wed, 13 Mar 2019)


Log Message
Test freshness page should improve the ability to correlating issues from same builder.
https://bugs.webkit.org/show_bug.cgi?id=195242

Reviewed by Ryosuke Niwa.

Added the ability to highlight indicators with same builder when mouse is hovering over one indicator.
This is a very useful visualization for correlating issues specific to a builder.
Added tooltip with latest build link when hovering over an indicator.

* public/v3/components/freshness-indicator.js:
(FreshnessIndicator): Removed 'summary' field as it's no longer needed.
Added 'highlighted' field.
(FreshnessIndicator.prototype.update): Added 'highlighted' argument.
(FreshnessIndicator.prototype.didConstructShadowTree): Make indicator to dispatch mouse enter and leave
messages so that UI can highlight corresponding cells.
(FreshnessIndicator.prototype.render):
(FreshnessIndicator.cssTemplate):
* public/v3/pages/test-freshness-page.js: Added tooltip to show latest build time and build link.
Added logic to manually compute table body height.
(TestFreshnessPage):
(TestFreshnessPage.prototype.didConstructShadowTree):
(TestFreshnessPage.prototype._fetchTestResults):
(TestFreshnessPage.prototype.render):
(TestFreshnessPage.prototype._renderTooltip):
(TestFreshnessPage.prototype._constructTableCell):
(TestFreshnessPage.cssTemplate):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/components/freshness-indicator.js
trunk/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (242932 => 242933)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-03-14 02:46:16 UTC (rev 242932)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-03-14 03:07:40 UTC (rev 242933)
@@ -1,3 +1,32 @@
+2019-03-13  Dewei Zhu  
+
+Test freshness page should improve the ability to correlating issues from same builder.
+https://bugs.webkit.org/show_bug.cgi?id=195242
+
+Reviewed by Ryosuke Niwa.
+
+Added the ability to highlight indicators with same builder when mouse is hovering over one indicator.
+This is a very useful visualization for correlating issues specific to a builder.
+Added tooltip with latest build link when hovering over an indicator.
+
+* public/v3/components/freshness-indicator.js:
+(FreshnessIndicator): Removed 'summary' field as it's no longer needed.
+Added 'highlighted' field.
+(FreshnessIndicator.prototype.update): Added 'highlighted' argument.
+(FreshnessIndicator.prototype.didConstructShadowTree): Make indicator to dispatch mouse enter and leave
+messages so that UI can highlight corresponding cells.
+(FreshnessIndicator.prototype.render):
+(FreshnessIndicator.cssTemplate):
+* public/v3/pages/test-freshness-page.js: Added tooltip to show latest build time and build link.
+Added logic to manually compute table body height.
+(TestFreshnessPage):
+(TestFreshnessPage.prototype.didConstructShadowTree):
+(TestFreshnessPage.prototype._fetchTestResults):
+(TestFreshnessPage.prototype.render):
+(TestFreshnessPage.prototype._renderTooltip):
+(TestFreshnessPage.prototype._constructTableCell):
+(TestFreshnessPage.cssTemplate):
+
 2019-02-26  Dewei Zhu  
 
 The table head of test freshness page should not scroll with the page.


Modified: trunk/Websites/perf.webkit.org/public/v3/components/freshness-indicator.js (242932 => 242933)

--- trunk/Websites/perf.webkit.org/public/v3/components/freshness-indicator.js	2019-03-14 02:46:16 UTC (rev 242932)
+++ trunk/Websites/perf.webkit.org/public/v3/components/freshness-indicator.js	2019-03-14 03:07:40 UTC (rev 242933)
@@ -3,30 +3,37 @@
 {
 super('freshness-indicator');
 this._lastDataPointDuration = lastDataPointDuration;
-this._summary = summary;
 this._testAgeTolerance = testAgeTolerance;
 this._url = url;
+this._highlighted = false;
 
 this._renderIndicatorLazily = new LazilyEvaluatedFunction(this._renderIndicator.bind(this));
 }
 
-update(lastDataPointDuration, testAgeTolerance, summary, url)
+update(lastDataPointDuration, testAgeTolerance, url, highlighted)
 {
 this._lastDataPointDuration = lastDataPointDuration;
-this._summary = summary;
 this._testAgeTolerance = testAgeTolerance;
 this._url = url;
+this._highlighted = highlighted;
 this.enqueueToRender();
 }
 
+didConstructShadowTree()
+{
+const container = this.content('container');
+container.addEventListener('mouseenter', () => this.dispatchAction('select', this));
+container.addEventListener('mouseleave', () => this.dispatchAction('unselect'));
+}

[webkit-changes] [242721] trunk/Tools

2019-03-11 Thread dewei_zhu
Title: [242721] trunk/Tools








Revision 242721
Author dewei_...@apple.com
Date 2019-03-11 11:45:52 -0700 (Mon, 11 Mar 2019)


Log Message
Add MotionMark-1.1 plan file for run-benchmark script.
https://bugs.webkit.org/show_bug.cgi?id=195481

Rubber-stamped by Darin Adler.

Run-benchmark script should support MontionMark-1.1.

* Scripts/webkitpy/benchmark_runner/data/plans/motionmark1.1.plan: Added.

Modified Paths

trunk/Tools/ChangeLog


Added Paths

trunk/Tools/Scripts/webkitpy/benchmark_runner/data/plans/motionmark1.1.plan




Diff

Modified: trunk/Tools/ChangeLog (242720 => 242721)

--- trunk/Tools/ChangeLog	2019-03-11 18:30:11 UTC (rev 242720)
+++ trunk/Tools/ChangeLog	2019-03-11 18:45:52 UTC (rev 242721)
@@ -1,3 +1,14 @@
+2019-03-08  Dewei Zhu  
+
+Add MotionMark-1.1 plan file for run-benchmark script.
+https://bugs.webkit.org/show_bug.cgi?id=195481
+
+Rubber-stamped by Darin Adler.
+
+Run-benchmark script should support MontionMark-1.1.
+
+* Scripts/webkitpy/benchmark_runner/data/plans/motionmark1.1.plan: Added.
+
 2019-03-11  Aakash Jain  
 
 [ews-app] Add support for submit-to-ews url


Added: trunk/Tools/Scripts/webkitpy/benchmark_runner/data/plans/motionmark1.1.plan (0 => 242721)

--- trunk/Tools/Scripts/webkitpy/benchmark_runner/data/plans/motionmark1.1.plan	(rev 0)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/data/plans/motionmark1.1.plan	2019-03-11 18:45:52 UTC (rev 242721)
@@ -0,0 +1,12 @@
+{
+"timeout": 1800,
+"count": 1,
+"svn_source": "https://svn.webkit.org/repository/webkit/trunk/PerformanceTests/MotionMark/@r234833",
+"webserver_benchmark_patch": "data/patches/webserver/MotionMark.patch",
+"webdriver_benchmark_patch": "data/patches/webdriver/MotionMark.patch",
+"entry_point": "index.html",
+"config": {
+"orientation": "landscape"
+},
+"output_file": "motionmark.result"
+}






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [242126] trunk/Websites/perf.webkit.org

2019-02-26 Thread dewei_zhu
Title: [242126] trunk/Websites/perf.webkit.org








Revision 242126
Author dewei_...@apple.com
Date 2019-02-26 23:33:22 -0800 (Tue, 26 Feb 2019)


Log Message
The table head of test freshness page should not scroll with the page.
https://bugs.webkit.org/show_bug.cgi?id=195092

Reviewed by Ryosuke Niwa.

Fix the location of the freshness table head to make it easier to corelate cell with test.

* public/v3/pages/test-freshness-page.js: Changed some style rules to make the table head fixed.
(TestFreshnessPage.prototype._renderTable):
(TestFreshnessPage.cssTemplate):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (242125 => 242126)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-02-27 07:21:11 UTC (rev 242125)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-02-27 07:33:22 UTC (rev 242126)
@@ -1,3 +1,16 @@
+2019-02-26  Dewei Zhu  
+
+The table head of test freshness page should not scroll with the page.
+https://bugs.webkit.org/show_bug.cgi?id=195092
+
+Reviewed by Ryosuke Niwa.
+
+Fix the location of the freshness table head to make it easier to corelate cell with test.
+
+* public/v3/pages/test-freshness-page.js: Changed some style rules to make the table head fixed.
+(TestFreshnessPage.prototype._renderTable):
+(TestFreshnessPage.cssTemplate):
+
 2019-01-17  Dewei Zhu  
 
 Analyzing a chart that does not exist should not halt whole run-analysis script.


Modified: trunk/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js (242125 => 242126)

--- trunk/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js	2019-02-27 07:21:11 UTC (rev 242125)
+++ trunk/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js	2019-02-27 07:33:22 UTC (rev 242126)
@@ -107,10 +107,10 @@
 {
 const element = ComponentBase.createElement;
 const tableBodyElement = [];
-const tableHeadElements = [element('th',  {class: 'table-corner'}, 'Platform \\ Test')];
+const tableHeadElements = [element('th',  {class: 'table-corner row-head'}, 'Platform \\ Test')];
 
 for (const metric of metrics)
-tableHeadElements.push(element('th', {class: 'diagonal-header'}, element('div', metric.test().fullName(;
+tableHeadElements.push(element('th', {class: 'diagonal-head'}, element('div', metric.test().fullName(;
 
 this._indicatorByConfiguration = new Map;
 for (const platform of platforms) {
@@ -117,7 +117,7 @@
 const indicatorByMetric = new Map;
 this._indicatorByConfiguration.set(platform, indicatorByMetric);
 tableBodyElement.push(element('tr',
-[element('th', platform.label()), ...metrics.map((metric) => this._constructTableCell(platform, metric, indicatorByMetric))]));
+[element('th', {class: 'row-head'}, platform.label()), ...metrics.map((metric) => this._constructTableCell(platform, metric, indicatorByMetric))]));
 }
 
 this.renderReplace(this.content('test-health'), [element('thead', tableHeadElements), element('tbody', tableBodyElement)]);
@@ -157,25 +157,37 @@
 #test-health {
 font-size: 1rem;
 }
+#test-health thead {
+display: block;
+align: right;
+}
 #test-health th.table-corner {
 text-align: right;
 vertical-align: bottom;
 }
+#test-health .row-head {
+min-width: 15.5rem;
+}
 #test-health th {
 text-align: left;
 border-bottom: 0.1rem solid #ccc;
 font-weight: normal;
 }
-#test-health th.diagonal-header {
+#test-health th.diagonal-head {
 white-space: nowrap;
 height: 16rem;
 border-bottom: 0rem;
 }
-#test-health th.diagonal-header > div {
+#test-health th.diagonal-head > div {
 transform: translate(1rem, 7rem) rotate(315deg);
 width: 2rem;
 border: 0rem;
 }
+#test-health tbody {
+display: block;
+overflow: auto;
+height: 75vh;
+}
 #test-health td.status-cell {
 margin: 0;
 padding: 0;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [240319] trunk/Websites/perf.webkit.org

2019-01-22 Thread dewei_zhu
Title: [240319] trunk/Websites/perf.webkit.org








Revision 240319
Author dewei_...@apple.com
Date 2019-01-22 20:28:57 -0800 (Tue, 22 Jan 2019)


Log Message
Analyzing a chart that does not exist should not halt whole run-analysis script.
https://bugs.webkit.org/show_bug.cgi?id=193563

Reviewed by Ryosuke Niwa.

Halting whole run-analysis script while there is any invalid chart specified in Manifest makes the script fragile.
Run-analysis is also responsible for adding retry and sending notification which should not be block by this error.
Skipping analyzing the corresponding configuration seems reasonable.

* public/v3/models/measurement-set.js:
(MeasurementSet.prototype._ensureClusterPromise): Only add callback when callback is specified.
This will help to fix 'UnhandledPromiseRejectionWarning' while running the test.
* tools/js/measurement-set-analyzer.js:
(MeasurementSetAnalyzer.prototype.async._analyzeMeasurementSet): Catch the exception while failing to fetch a measurement set and skip the analysis for this config.
* unit-tests/measurement-set-analyzer-tests.js: Added unit tests for this.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/models/measurement-set.js
trunk/Websites/perf.webkit.org/tools/js/measurement-set-analyzer.js
trunk/Websites/perf.webkit.org/unit-tests/measurement-set-analyzer-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (240318 => 240319)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-01-23 04:17:06 UTC (rev 240318)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-01-23 04:28:57 UTC (rev 240319)
@@ -1,5 +1,23 @@
 2019-01-17  Dewei Zhu  
 
+Analyzing a chart that does not exist should not halt whole run-analysis script.
+https://bugs.webkit.org/show_bug.cgi?id=193563
+
+Reviewed by Ryosuke Niwa.
+
+Halting whole run-analysis script while there is any invalid chart specified in Manifest makes the script fragile.
+Run-analysis is also responsible for adding retry and sending notification which should not be block by this error.
+Skipping analyzing the corresponding configuration seems reasonable.
+
+* public/v3/models/measurement-set.js:
+(MeasurementSet.prototype._ensureClusterPromise): Only add callback when callback is specified.
+This will help to fix 'UnhandledPromiseRejectionWarning' while running the test.
+* tools/js/measurement-set-analyzer.js:
+(MeasurementSetAnalyzer.prototype.async._analyzeMeasurementSet): Catch the exception while failing to fetch a measurement set and skip the analysis for this config.
+* unit-tests/measurement-set-analyzer-tests.js: Added unit tests for this.
+
+2019-01-17  Dewei Zhu  
+
 Updating commit in OSBuildFetcher should respect revision range in config.
 https://bugs.webkit.org/show_bug.cgi?id=193558
 


Modified: trunk/Websites/perf.webkit.org/public/v3/models/measurement-set.js (240318 => 240319)

--- trunk/Websites/perf.webkit.org/public/v3/models/measurement-set.js	2019-01-23 04:17:06 UTC (rev 240318)
+++ trunk/Websites/perf.webkit.org/public/v3/models/measurement-set.js	2019-01-23 04:28:57 UTC (rev 240319)
@@ -62,7 +62,8 @@
 if (!this._primaryClusterPromise)
 this._primaryClusterPromise = this._fetchPrimaryCluster(noCache);
 var self = this;
-this._primaryClusterPromise.catch(callback);
+if (callback)
+this._primaryClusterPromise.catch(callback);
 return this._primaryClusterPromise.then(function () {
 self._allFetches[self._primaryClusterEndTime] = self._primaryClusterPromise;
 return Promise.all(self.findClusters(startTime, endTime).map(function (clusterEndTime) {
@@ -76,12 +77,14 @@
 if (!this._callbackMap.has(clusterEndTime))
 this._callbackMap.set(clusterEndTime, new Set);
 var callbackSet = this._callbackMap.get(clusterEndTime);
-callbackSet.add(callback);
+if (callback)
+callbackSet.add(callback);
 
 var promise = this._allFetches[clusterEndTime];
-if (promise)
-promise.then(callback, callback);
-else {
+if (promise) {
+if (callback)
+promise.then(callback, callback);
+} else {
 promise = this._fetchSecondaryCluster(clusterEndTime);
 for (var existingCallback of callbackSet)
 promise.then(existingCallback, existingCallback);


Modified: trunk/Websites/perf.webkit.org/tools/js/measurement-set-analyzer.js (240318 => 240319)

--- trunk/Websites/perf.webkit.org/tools/js/measurement-set-analyzer.js	2019-01-23 04:17:06 UTC (rev 240318)
+++ trunk/Websites/perf.webkit.org/tools/js/measurement-set-analyzer.js	2019-01-23 04:28:57 UTC (rev 240319)
@@ -49,7 +49,14 @@
 const metric = Metric.findById(measurementSet.metricId());
 const platform = 

[webkit-changes] [240200] trunk/Websites/perf.webkit.org

2019-01-19 Thread dewei_zhu
Title: [240200] trunk/Websites/perf.webkit.org








Revision 240200
Author dewei_...@apple.com
Date 2019-01-19 01:08:11 -0800 (Sat, 19 Jan 2019)


Log Message
Updating commit in OSBuildFetcher should respect revision range in config.
https://bugs.webkit.org/show_bug.cgi?id=193558

Reviewed by Ryosuke Niwa.

OSBuildFetcher._fetchAvailableBuilds should filter out commits those are not in
revision range specified by cofnig.

* server-tests/tools-os-build-fetcher-tests.js: Added a unit test for this change.
* tools/js/os-build-fetcher.js:
(prototype.async._fetchAvailableBuilds): Filter out commits from update list if commit
revision is out of range.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/server-tests/tools-os-build-fetcher-tests.js
trunk/Websites/perf.webkit.org/tools/js/os-build-fetcher.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (240199 => 240200)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-01-19 07:53:14 UTC (rev 240199)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-01-19 09:08:11 UTC (rev 240200)
@@ -1,3 +1,18 @@
+2019-01-17  Dewei Zhu  
+
+Updating commit in OSBuildFetcher should respect revision range in config.
+https://bugs.webkit.org/show_bug.cgi?id=193558
+
+Reviewed by Ryosuke Niwa.
+
+OSBuildFetcher._fetchAvailableBuilds should filter out commits those are not in
+revision range specified by cofnig.
+
+* server-tests/tools-os-build-fetcher-tests.js: Added a unit test for this change.
+* tools/js/os-build-fetcher.js:
+(prototype.async._fetchAvailableBuilds): Filter out commits from update list if commit
+revision is out of range.
+
 2018-12-31  Dewei Zhu  
 
 Test group results notification should not say a build request to build had failed even when it had successfully completed.


Modified: trunk/Websites/perf.webkit.org/server-tests/tools-os-build-fetcher-tests.js (240199 => 240200)

--- trunk/Websites/perf.webkit.org/server-tests/tools-os-build-fetcher-tests.js	2019-01-19 07:53:14 UTC (rev 240199)
+++ trunk/Websites/perf.webkit.org/server-tests/tools-os-build-fetcher-tests.js	2019-01-19 09:08:11 UTC (rev 240200)
@@ -534,7 +534,7 @@
 });
 });
 
-it('should update testability warning for commits', async () => {
+it('should update testability message for commits', async () => {
 const logger = new MockLogger;
 const fetcher = new OSBuildFetcher(config, TestServer.remoteAPI(), slaveAuth, MockSubprocess, logger);
 const db = TestServer.database();
@@ -799,6 +799,49 @@
 assert.equal(result['commits'][0]['order'], 1604003400);
 });
 
+it('should update commits within specified revision range', async () => {
+const logger = new MockLogger;
+const fetcher = new OSBuildFetcher(configWithoutOwnedCommitCommand, TestServer.remoteAPI(), slaveAuth, MockSubprocess, logger);
+const db = TestServer.database();
+const resultsForSierraD = {allRevisions: ["Sierra16D68", "Sierra16D69"], commitsWithTestability: {"Sierra16D1": "Panic"}};
+const resultsForSierraE = {allRevisions: ["Sierra16E32", "Sierra16E33", "Sierra16E33h", "Sierra16E34", "Sierra16E1"], commitsWithTestability: {}};
+
+await addSlaveForReport(emptyReport);
+await Promise.all([
+db.insert('repositories', {'id': 10, 'name': 'OSX'}),
+db.insert('commits', {'repository': 10, 'revision': 'Sierra16D67', 'order': 1603006700, 'reported': true}),
+db.insert('commits', {'repository': 10, 'revision': 'Sierra16D68', 'order': 1603006800, 'reported': true}),
+db.insert('commits', {'repository': 10, 'revision': 'Sierra16D69', 'order': 1603006900, 'reported': false}),
+db.insert('commits', {'repository': 10, 'revision': 'Sierra16E32', 'order': 1604003200, 'reported': true}),
+db.insert('commits', {'repository': 10, 'revision': 'Sierra16E33', 'order': 1604003300, 'reported': true}),
+db.insert('commits', {'repository': 10, 'revision': 'Sierra16E33g', 'order': 1604003307, 'reported': true})]);
+
+let result = await TestServer.remoteAPI().getJSON('/api/commits/OSX/last-reported?from=160300=1603099900');
+assert.equal(result['commits'].length, 1);
+assert.equal(result['commits'][0]['revision'], 'Sierra16D68');
+assert.equal(result['commits'][0]['order'], 1603006800);
+
+result = await TestServer.remoteAPI().getJSON('/api/commits/OSX/last-reported?from=160400=1604099900');
+assert.equal(result['commits'].length, 1);
+assert.equal(result['commits'][0]['revision'], 'Sierra16E33g');
+assert.equal(result['commits'][0]['order'], 1604003307);
+const waitForInvocationPromise = 

[webkit-changes] [240182] trunk/Websites/perf.webkit.org

2019-01-18 Thread dewei_zhu
Title: [240182] trunk/Websites/perf.webkit.org








Revision 240182
Author dewei_...@apple.com
Date 2019-01-18 15:26:52 -0800 (Fri, 18 Jan 2019)


Log Message
Test group results notification should not say a build request to build had failed even when it had successfully completed.
https://bugs.webkit.org/show_bug.cgi?id=193064

Reviewed by Ryosuke Niwa.

Should show 'Build completed' or 'Build failed' for build type build requests.

* browser-tests/test-group-result-page-tests.js: Added a unit test to guard this bug.
* tools/js/test-group-result-page.js: Show 'Build completed' or 'Build failed' for build type build requests.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/browser-tests/test-group-result-page-tests.js
trunk/Websites/perf.webkit.org/tools/js/test-group-result-page.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (240181 => 240182)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-01-18 23:15:56 UTC (rev 240181)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-01-18 23:26:52 UTC (rev 240182)
@@ -1,3 +1,15 @@
+2018-12-31  Dewei Zhu  
+
+Test group results notification should not say a build request to build had failed even when it had successfully completed.
+https://bugs.webkit.org/show_bug.cgi?id=193064
+
+Reviewed by Ryosuke Niwa.
+
+Should show 'Build completed' or 'Build failed' for build type build requests.
+
+* browser-tests/test-group-result-page-tests.js: Added a unit test to guard this bug.
+* tools/js/test-group-result-page.js: Show 'Build completed' or 'Build failed' for build type build requests.
+
 2018-12-21  Dewei Zhu  
 
 Add UI in analysis task page to show commit testability information.


Modified: trunk/Websites/perf.webkit.org/browser-tests/test-group-result-page-tests.js (240181 => 240182)

--- trunk/Websites/perf.webkit.org/browser-tests/test-group-result-page-tests.js	2019-01-18 23:15:56 UTC (rev 240181)
+++ trunk/Websites/perf.webkit.org/browser-tests/test-group-result-page-tests.js	2019-01-18 23:26:52 UTC (rev 240182)
@@ -6,7 +6,7 @@
 'models/data-model.js', 'models/metric.js', '../shared/statistics.js',], 'TestGroupResultPage', 'Metric');
 }
 
-async function prepareTestGroupResultPage(context, resultA, resultB)
+async function prepareTestGroupResultPage(context, buildRequestsA, buildRequestsB)
 {
 const [TestGroupResultPage, Metric] = await importMarkupComponent(context);
 
@@ -20,15 +20,15 @@
 
 const mockTestGroup = {
 requestedCommitSets: () => ['A', 'B'],
-test: () => ({test: () => 'speeodmeter-2', name: () => 'speedometer-2'}),
+test: () => ({test: () => 'speedometer-2', name: () => 'speedometer-2'}),
 labelForCommitSet: (commitSet) => commitSet,
-requestsForCommitSet: (commitSet) => ({'A': resultA, 'B': resultB}[commitSet]),
+requestsForCommitSet: (commitSet) => ({'A': buildRequestsA, 'B': buildRequestsB}[commitSet]),
 compareTestResults: (...args) => ({isStatisticallySignificant: true, changeType: 'worse'}),
 name: () => 'mock-test-group',
 };
 
 const mockAnalysisResults = {
-viewForMetric: (metric) => ({resultForRequest: (buildRequest) => (buildRequest === null ? null : {value: buildRequest})})
+viewForMetric: (metric) => ({resultForRequest: (buildRequest) => (buildRequest.value === null ? null : {value: buildRequest.value})})
 };
 
 const page = new TestGroupResultPage('test');
@@ -40,9 +40,19 @@
 return page;
 }
 
+function prepareBuildRequests(buildRequestValues, isTestBooleanList, hasCompletedBooleanList)
+{
+return Array.from(buildRequestValues.entries()).map((entry) => {
+const [index, value] = entry;
+const isTest = isTestBooleanList ? isTestBooleanList[index] : true;
+const hasCompleted = hasCompletedBooleanList ? hasCompletedBooleanList[index] : true;
+return {value, isTest: () => isTest, isBuild: () => !isTest, hasCompleted: () => hasCompleted};
+});
+}
+
 it('should render failed test group with empty bar', async () => {
 const context = new BrowsingContext();
-const page = await prepareTestGroupResultPage(context, [null, 3, 5], [2, 4, 6]);
+const page = await prepareTestGroupResultPage(context, prepareBuildRequests([null, 3, 5]), prepareBuildRequests([2, 4, 6]));
 await page.enqueueToRender();
 const document = context.document;
 document.open();
@@ -56,7 +66,7 @@
 const context = new BrowsingContext();
 const resultA = [1, 3, 5];
 const resultB = [2, 4, 6];
-const page = await prepareTestGroupResultPage(context, resultA, resultB);
+const page = await prepareTestGroupResultPage(context, prepareBuildRequests(resultA), prepareBuildRequests(resultB));
 

[webkit-changes] [240104] trunk/Websites/perf.webkit.org

2019-01-16 Thread dewei_zhu
Title: [240104] trunk/Websites/perf.webkit.org








Revision 240104
Author dewei_...@apple.com
Date 2019-01-16 21:56:18 -0800 (Wed, 16 Jan 2019)


Log Message
Add UI in analysis task page to show commit testability information.
https://bugs.webkit.org/show_bug.cgi?id=192972

Reviewed by Ryosuke Niwa.

Add UI in custom analysis task configuration and customizable test group form to show testability information.
Fix a bug in 'CustomAnalysisTaskConfigurator._updateCommitSetMap' that 'currentComparison' is incorrectly set.
SQL to update existing database:
ALTER TABLE commits ADD COLUMN IF NOT EXISTS commit_testability varchar(128) DEFAULT NULL;

* browser-tests/custom-analysis-task-configurator-tests.js: Added a unit test for the bug in
'CustomAnalysisTaskConfigurator._updateCommitSetMap'.
Added a unit test to make sure 'CustomAnalysisTaskConfigurator' still works when commit fetching never returns.
* browser-tests/index.html: Imported ''custom-analysis-task-configurator-tests.js'.
* init-database.sql: Increase 'commit_testability' field length from 64 characters to 128.
* public/v3/components/custom-analysis-task-configurator.js: Added UI to show testability information.
(CustomAnalysisTaskConfigurator):
(CustomAnalysisTaskConfigurator.prototype._didUpdateSelectedPlatforms): Should reset related field for corresponding
repositories that user does not specify revision.
(CustomAnalysisTaskConfigurator.prototype._updateMapFromSpecifiedRevisionsForConfiguration): A helper function
to update '_specifiedCommits' and '_invalidRevisionsByConfiguration' per '_specifiedRevisions'.
(CustomAnalysisTaskConfigurator.prototype.render):
(CustomAnalysisTaskConfigurator.prototype._updateCommitSetMap): Fixed a bug that 'currentComparison' is incorrectly set.
(CustomAnalysisTaskConfigurator.prototype._computeCommitSet):
(CustomAnalysisTaskConfigurator.prototype.async._fetchCommitsForConfiguration):
(CustomAnalysisTaskConfigurator.prototype.async._resolveRevision):
(CustomAnalysisTaskConfigurator.prototype._buildRevisionTable):
(CustomAnalysisTaskConfigurator.prototype._buildTestabilityList):
(CustomAnalysisTaskConfigurator.prototype._selectRepositoryGroup):
(CustomAnalysisTaskConfigurator.prototype._buildRevisionInput):
(CustomAnalysisTaskConfigurator.cssTemplate):
* public/v3/components/customizable-test-group-form.js: Added UI to show testability information.
(CustomizableTestGroupForm.prototype._renderCustomRevisionTable):
(CustomizableTestGroupForm.prototype._constructTestabilityRows.):
(CustomizableTestGroupForm.prototype._constructTestabilityRows):
(CustomizableTestGroupForm.prototype._constructRevisionRadioButtons):
Changing either revision editor or radio button should trigger a re-render as testability
information for updated revision may change.
(CustomizableTestGroupForm.cssTemplate):
* public/v3/models/commit-set.js:
(IntermediateCommitSet.prototype.commitsWithTestability): Renamed from 'commitsWithTestabilityWarnings'.
(IntermediateCommitSet.prototype.commitsWithTestabilityWarnings): Deleted.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/browser-tests/index.html
trunk/Websites/perf.webkit.org/init-database.sql
trunk/Websites/perf.webkit.org/public/v3/components/custom-analysis-task-configurator.js
trunk/Websites/perf.webkit.org/public/v3/components/customizable-test-group-form.js
trunk/Websites/perf.webkit.org/public/v3/models/commit-set.js


Added Paths

trunk/Websites/perf.webkit.org/browser-tests/custom-analysis-task-configurator-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (240103 => 240104)

--- trunk/Websites/perf.webkit.org/ChangeLog	2019-01-17 03:19:54 UTC (rev 240103)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2019-01-17 05:56:18 UTC (rev 240104)
@@ -1,3 +1,48 @@
+2018-12-21  Dewei Zhu  
+
+Add UI in analysis task page to show commit testability information.
+https://bugs.webkit.org/show_bug.cgi?id=192972
+
+Reviewed by Ryosuke Niwa.
+
+Add UI in custom analysis task configuration and customizable test group form to show testability information.
+Fix a bug in 'CustomAnalysisTaskConfigurator._updateCommitSetMap' that 'currentComparison' is incorrectly set.
+SQL to update existing database:
+ALTER TABLE commits ADD COLUMN IF NOT EXISTS commit_testability varchar(128) DEFAULT NULL;
+
+* browser-tests/custom-analysis-task-configurator-tests.js: Added a unit test for the bug in
+'CustomAnalysisTaskConfigurator._updateCommitSetMap'.
+Added a unit test to make sure 'CustomAnalysisTaskConfigurator' still works when commit fetching never returns.
+* browser-tests/index.html: Imported ''custom-analysis-task-configurator-tests.js'.
+* init-database.sql: Increase 'commit_testability' field length from 64 characters to 128.
+* public/v3/components/custom-analysis-task-configurator.js: Added UI to show testability information.
+

[webkit-changes] [238167] trunk/Websites/perf.webkit.org

2018-11-13 Thread dewei_zhu
Title: [238167] trunk/Websites/perf.webkit.org








Revision 238167
Author dewei_...@apple.com
Date 2018-11-13 23:36:34 -0800 (Tue, 13 Nov 2018)


Log Message
Add cache for CommitLog objects to avoid refetching same commit.
https://bugs.webkit.org/show_bug.cgi?id=191621

Reviewed by Ryosuke Niwa.

Added a cache for fully fetched commit log objects to avoid refetching.

* public/v3/models/commit-log.js:
(CommitLog): Added assertion for id.
Removed unused 'remoteId' as it has been removed since r198479.
(CommitLog.async.fetchBetweenRevisions): Turned it into async function.
(CommitLog.async.fetchForSingleRevision): Added the logic to check cache before fetching.
(CommitLog._constructFromRawData): Added logic to add entries to cache.
* public/v3/models/commit-set.js: Fixed measurement set not passing commit id while constructing a
commit log object.
* public/v3/models/repository.js: Added the ability to track fetched commit for certain repository.
(Repository.commitForRevision): Returns a commit for given revision.
(Repository.setCommitForRevision): Sets commit for a given revision.
* unit-tests/commit-log-tests.js: Added unit tests for this change.
Fixed existing tests.
* unit-tests/commit-set-range-bisector-tests.js: Fixed unit tests.
* unit-tests/commit-set-tests.js: Fixed unit tests.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/models/commit-log.js
trunk/Websites/perf.webkit.org/public/v3/models/commit-set.js
trunk/Websites/perf.webkit.org/public/v3/models/repository.js
trunk/Websites/perf.webkit.org/unit-tests/commit-log-tests.js
trunk/Websites/perf.webkit.org/unit-tests/commit-set-range-bisector-tests.js
trunk/Websites/perf.webkit.org/unit-tests/commit-set-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (238166 => 238167)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-11-14 06:54:32 UTC (rev 238166)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-11-14 07:36:34 UTC (rev 238167)
@@ -1,3 +1,28 @@
+2018-11-13  Dewei Zhu  
+
+Add cache for CommitLog objects to avoid refetching same commit.
+https://bugs.webkit.org/show_bug.cgi?id=191621
+
+Reviewed by Ryosuke Niwa.
+
+Added a cache for fully fetched commit log objects to avoid refetching.
+
+* public/v3/models/commit-log.js:
+(CommitLog): Added assertion for id.
+Removed unused 'remoteId' as it has been removed since r198479.
+(CommitLog.async.fetchBetweenRevisions): Turned it into async function.
+(CommitLog.async.fetchForSingleRevision): Added the logic to check cache before fetching.
+(CommitLog._constructFromRawData): Added logic to add entries to cache.
+* public/v3/models/repository.js: Added the ability to track fetched commit for certain repository.
+(Repository.commitForRevision): Fixed measurement set not passing commit id while constructing a
+commit log object.
+(Repository.setCommitForRevision): Sets commit for a given revision.
+* public/v3/models/commit-set.js: Fixed unit tests.
+* unit-tests/commit-log-tests.js: Added unit tests for this change.
+Fixed existing tests.
+* unit-tests/commit-set-range-bisector-tests.js: Fixed unit tests.
+* unit-tests/commit-set-tests.js: Fixed unit tests.
+
 2018-11-08  Dewei Zhu  
 
 commit time returned by '/api/measurement-set' should match the one returned by '/api/commits'.


Modified: trunk/Websites/perf.webkit.org/public/v3/models/commit-log.js (238166 => 238167)

--- trunk/Websites/perf.webkit.org/public/v3/models/commit-log.js	2018-11-14 06:54:32 UTC (rev 238166)
+++ trunk/Websites/perf.webkit.org/public/v3/models/commit-log.js	2018-11-14 07:36:34 UTC (rev 238167)
@@ -5,12 +5,10 @@
 {
 console.assert(parseInt(id) == id);
 super(id);
+console.assert(id == rawData.id)
 this._repository = rawData.repository;
 console.assert(this._repository instanceof Repository);
 this._rawData = rawData;
-this._remoteId = rawData.id;
-if (this._remoteId)
-this.ensureNamedStaticMap('remoteId')[this._remoteId] = this;
 this._ownedCommits = null;
 this._ownerCommit = null;
 this._ownedCommitByOwnedRepository = new Map;
@@ -163,26 +161,33 @@
 return difference;
 }
 
-static fetchBetweenRevisions(repository, precedingRevision, lastRevision)
+static async fetchBetweenRevisions(repository, precedingRevision, lastRevision)
 {
 // FIXME: The cache should be smarter about fetching a range within an already fetched range, etc...
-// FIXME: We should evict some entires from the cache in cachedFetch.
-return this.cachedFetch(`/api/commits/${repository.id()}/`, {precedingRevision, lastRevision})
-.then((data) => this._constructFromRawData(data));
+// FIXME: We should evict some entries from the cache in cachedFetch.
+  

[webkit-changes] [238164] trunk/Websites/perf.webkit.org

2018-11-13 Thread dewei_zhu
Title: [238164] trunk/Websites/perf.webkit.org








Revision 238164
Author dewei_...@apple.com
Date 2018-11-13 21:31:45 -0800 (Tue, 13 Nov 2018)


Log Message
commit time returned by '/api/measurement-set' should match the one returned by '/api/commits'.
https://bugs.webkit.org/show_bug.cgi?id=191457

Reviewed by Dean Jackson and Ryosuke Niwa.

Commit time returned by '/api/measurement-set' sometimes is calculated by 'epoch from ..'.
This function will return a floating number with 5 or 6 decimal digits due to double precision limitations.
However, some commits may be reported with 6 decimal decimal.
So the commit time for those commits will be rounded to 5 decimal digits.
In order to avoid front end assertion failure in CommitLog, Database::to_js_time need to
match this behavior.

* public/include/db.php: Change the behavior to match that of postgres.
Added logic to avoid losing precision in php.
* server-tests/api-measurement-set-tests.js: Added unit tests for this bug.
(queryPlatformAndMetric): Fix a bug that arguments are not used at all.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/include/db.php
trunk/Websites/perf.webkit.org/public/include/report-processor.php
trunk/Websites/perf.webkit.org/server-tests/api-measurement-set-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (238163 => 238164)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-11-14 04:58:17 UTC (rev 238163)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-11-14 05:31:45 UTC (rev 238164)
@@ -1,3 +1,21 @@
+2018-11-08  Dewei Zhu  
+
+commit time returned by '/api/measurement-set' should match the one returned by '/api/commits'.
+https://bugs.webkit.org/show_bug.cgi?id=191457
+
+Reviewed by Dean Jackson and Ryosuke Niwa.
+
+Commit time returned by '/api/measurement-set' sometimes is calculated by 'epoch from ..'.
+This function may return a floating number with 5 or 6 decimal digits due to double precision limitations.
+However, some commits may be reported with 6 decimal decimal.
+So the commit time for those commits will sometime be rounded to 5 decimal digits.
+In order to avoid front end assertion failure in CommitLog, Database::to_js_time need to round to 5 digits.
+
+* public/include/db.php: Change the behavior to match that of postgres.
+Added logic to avoid losing precision in php.
+* server-tests/api-measurement-set-tests.js: Added unit tests for this bug.
+(queryPlatformAndMetric): Fix a bug that arguments are not used at all.
+
 2018-11-07  Dewei Zhu  
 
 "/api/report" does not check commit time correctly.


Modified: trunk/Websites/perf.webkit.org/public/include/db.php (238163 => 238164)

--- trunk/Websites/perf.webkit.org/public/include/db.php	2018-11-14 04:58:17 UTC (rev 238163)
+++ trunk/Websites/perf.webkit.org/public/include/db.php	2018-11-14 05:31:45 UTC (rev 238164)
@@ -100,11 +100,14 @@
 }
 
 static function to_js_time($time_str) {
-$timestamp_in_s = strtotime($time_str);
+$timestamp_in_ms = strtotime($time_str) * 1000;
 $dot_index = strrpos($time_str, '.');
-if ($dot_index !== FALSE)
-$timestamp_in_s += floatval(substr($time_str, $dot_index));
-return intval($timestamp_in_s * 1000);
+if ($dot_index !== FALSE) {
+// Keep 5 decimal digits as postgres timestamp may only have 5 decimal digits.
+// Multiply by 1000 ahead to avoid losing precision. 1538041792.670479 will become 1538041792.6705 on php.
+$timestamp_in_ms += round(floatval(substr($time_str, $dot_index)), 5) * 1000;
+}
+return intval($timestamp_in_ms);
 }
 
 static function escape_for_like($string) {


Modified: trunk/Websites/perf.webkit.org/public/include/report-processor.php (238163 => 238164)

--- trunk/Websites/perf.webkit.org/public/include/report-processor.php	2018-11-14 04:58:17 UTC (rev 238163)
+++ trunk/Websites/perf.webkit.org/public/include/report-processor.php	2018-11-14 05:31:45 UTC (rev 238164)
@@ -172,7 +172,7 @@
 if (!$commit_row)
 $this->rollback_with_error('FailedToRecordCommit', $commit_data);
 
-if ($commit_data['time'] && abs(strtotime($commit_row['commit_time']) - strtotime($commit_data['time'])) > 1.0)
+if ($commit_data['time'] && abs(Database::to_js_time($commit_row['commit_time']) - Database::to_js_time($commit_data['time'])) > 1000.0)
 $this->rollback_with_error('MismatchingCommitTime', array('existing' => $commit_row, 'new' => $commit_data));
 
 if (!$this->db->select_or_insert_row('build_commits', null,


Modified: trunk/Websites/perf.webkit.org/server-tests/api-measurement-set-tests.js (238163 => 238164)

--- trunk/Websites/perf.webkit.org/server-tests/api-measurement-set-tests.js	2018-11-14 04:58:17 UTC (rev 238163)
+++ 

[webkit-changes] [237953] trunk/Websites/perf.webkit.org

2018-11-07 Thread dewei_zhu
Title: [237953] trunk/Websites/perf.webkit.org








Revision 237953
Author dewei_...@apple.com
Date 2018-11-07 16:39:38 -0800 (Wed, 07 Nov 2018)


Log Message
"/api/report" does not check commit time correctly.
https://bugs.webkit.org/show_bug.cgi?id=191351

Reviewed by Ryosuke Niwa.

Test result report API does not convert formated time string to timestamp correctly
which result in not checking commit time correctly.

* public/include/report-processor.php: Use 'strtotime' instead of 'floatval'.
Accepts the time delta within 1 seconds.
* server-tests/api-report-tests.js: Added unit tests.
(reportWitMismatchingCommitTime):
(reportWithOneSecondCommitTimeDifference):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/include/report-processor.php
trunk/Websites/perf.webkit.org/server-tests/api-report-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (237952 => 237953)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-11-08 00:36:47 UTC (rev 237952)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-11-08 00:39:38 UTC (rev 237953)
@@ -1,3 +1,19 @@
+2018-11-07  Dewei Zhu  
+
+"/api/report" does not check commit time correctly.
+https://bugs.webkit.org/show_bug.cgi?id=191351
+
+Reviewed by Ryosuke Niwa.
+
+Test result report API does not convert formated time string to timestamp correctly
+which result in not checking commit time correctly.
+
+* public/include/report-processor.php: Use 'strtotime' instead of 'floatval'.
+Accepts the time delta within 1 seconds.
+* server-tests/api-report-tests.js: Added unit tests.
+(reportWitMismatchingCommitTime):
+(reportWithOneSecondCommitTimeDifference):
+
 2018-11-06  Dewei Zhu  
 
 Custom test group form should use commit set map before customization as the behavior of radio buttons.


Modified: trunk/Websites/perf.webkit.org/public/include/report-processor.php (237952 => 237953)

--- trunk/Websites/perf.webkit.org/public/include/report-processor.php	2018-11-08 00:36:47 UTC (rev 237952)
+++ trunk/Websites/perf.webkit.org/public/include/report-processor.php	2018-11-08 00:39:38 UTC (rev 237953)
@@ -171,7 +171,8 @@
 array('repository' => $repository_id, 'revision' => $revision_data['revision']), $commit_data, '*');
 if (!$commit_row)
 $this->rollback_with_error('FailedToRecordCommit', $commit_data);
-if ($commit_data['time'] && abs(floatval($commit_row['commit_time']) - floatval($commit_data['time'])) > 1.0)
+
+if ($commit_data['time'] && abs(strtotime($commit_row['commit_time']) - strtotime($commit_data['time'])) > 1.0)
 $this->rollback_with_error('MismatchingCommitTime', array('existing' => $commit_row, 'new' => $commit_data));
 
 if (!$this->db->select_or_insert_row('build_commits', null,


Modified: trunk/Websites/perf.webkit.org/server-tests/api-report-tests.js (237952 => 237953)

--- trunk/Websites/perf.webkit.org/server-tests/api-report-tests.js	2018-11-08 00:36:47 UTC (rev 237952)
+++ trunk/Websites/perf.webkit.org/server-tests/api-report-tests.js	2018-11-08 00:39:38 UTC (rev 237953)
@@ -33,6 +33,50 @@
 };
 }
 
+function reportWitMismatchingCommitTime()
+{
+return {
+"buildNumber": "124",
+"buildTime": "2013-02-28T10:12:03.388304",
+"builderName": "someBuilder",
+"slaveName": "someSlave",
+"builderPassword": "somePassword",
+"platform": "Mountain Lion",
+"tests": {},
+"revisions": {
+"macOS": {
+"revision": "10.8.2 12C60"
+},
+"WebKit": {
+"revision": "141977",
+"timestamp": "2013-02-06T08:55:10.9Z"
+}
+}
+};
+}
+
+function reportWithOneSecondCommitTimeDifference()
+{
+return {
+"buildNumber": "125",
+"buildTime": "2013-02-28T10:12:03.388304",
+"builderName": "someBuilder",
+"slaveName": "someSlave",
+"builderPassword": "somePassword",
+"platform": "Mountain Lion",
+"tests": {},
+"revisions": {
+"macOS": {
+"revision": "10.8.2 12C60"
+},
+"WebKit": {
+"revision": "141977",
+"timestamp": "2013-02-06T08:55:19.9Z"
+}
+}
+};
+}
+
 function emptySlaveReport()
 {
 return {
@@ -99,6 +143,32 @@
 });
 });
 
+it('should reject report with "MismatchingCommitTime" if time difference is larger than 1 second', async () => {
+await addBuilderForReport(emptyReport());
+let response = await TestServer.remoteAPI().postJSON('/api/report/', 

[webkit-changes] [237950] trunk/Websites/perf.webkit.org

2018-11-07 Thread dewei_zhu
Title: [237950] trunk/Websites/perf.webkit.org








Revision 237950
Author dewei_...@apple.com
Date 2018-11-07 16:30:15 -0800 (Wed, 07 Nov 2018)


Log Message
Custom test group form should use commit set map before customization as the behavior of radio buttons.
https://bugs.webkit.org/show_bug.cgi?id=191347

Reviewed by Ryosuke Niwa.

The radio button behavior should always set the same revision while editing the revision input.
That means we should not use the intermediate commit set map but use the commit set map before
"Customize" link is clicked.

* browser-tests/customizable-test-group-form-tests.js: Added a unit test for this bug.
* public/v3/components/customizable-test-group-form.js: Pass uncustomized commit set so that the radio button
behavoir preserves.
(CustomizableTestGroupForm):
(CustomizableTestGroupForm.prototype.setCommitSetMap):
(CustomizableTestGroupForm.prototype.didConstructShadowTree):
(CustomizableTestGroupForm.prototype.render):
(CustomizableTestGroupForm.prototype._renderCustomRevisionTable):
(CustomizableTestGroupForm.prototype._constructTableBodyList):
(CustomizableTestGroupForm.prototype._constructTableRowForCommitsWithoutOwner):
(CustomizableTestGroupForm.prototype._constructTableRowForCommitsWithOwner):
(CustomizableTestGroupForm.prototype._constructRevisionRadioButtons):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/browser-tests/customizable-test-group-form-tests.js
trunk/Websites/perf.webkit.org/public/v3/components/customizable-test-group-form.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (237949 => 237950)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-11-08 00:15:59 UTC (rev 237949)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-11-08 00:30:15 UTC (rev 237950)
@@ -1,5 +1,29 @@
 2018-11-06  Dewei Zhu  
 
+Custom test group form should use commit set map before customization as the behavior of radio buttons.
+https://bugs.webkit.org/show_bug.cgi?id=191347
+
+Reviewed by Ryosuke Niwa.
+
+The radio button behavior should always set the same revision while editing the revision input.
+That means we should not use the intermediate commit set map but use the commit set map before
+"Customize" link is clicked.
+
+* browser-tests/customizable-test-group-form-tests.js: Added a unit test for this bug.
+* public/v3/components/customizable-test-group-form.js: Pass uncustomized commit set so that the radio button
+behavoir preserves.
+(CustomizableTestGroupForm):
+(CustomizableTestGroupForm.prototype.setCommitSetMap):
+(CustomizableTestGroupForm.prototype.didConstructShadowTree):
+(CustomizableTestGroupForm.prototype.render):
+(CustomizableTestGroupForm.prototype._renderCustomRevisionTable):
+(CustomizableTestGroupForm.prototype._constructTableBodyList):
+(CustomizableTestGroupForm.prototype._constructTableRowForCommitsWithoutOwner):
+(CustomizableTestGroupForm.prototype._constructTableRowForCommitsWithOwner):
+(CustomizableTestGroupForm.prototype._constructRevisionRadioButtons):
+
+2018-11-06  Dewei Zhu  
+
 Customizable test group form should not reset manually edited commit value sometimes.
 https://bugs.webkit.org/show_bug.cgi?id=190863
 


Modified: trunk/Websites/perf.webkit.org/browser-tests/customizable-test-group-form-tests.js (237949 => 237950)

--- trunk/Websites/perf.webkit.org/browser-tests/customizable-test-group-form-tests.js	2018-11-08 00:15:59 UTC (rev 237949)
+++ trunk/Websites/perf.webkit.org/browser-tests/customizable-test-group-form-tests.js	2018-11-08 00:30:15 UTC (rev 237950)
@@ -89,4 +89,54 @@
 revisionEditor = revisionEditors[0];
 expect(revisionEditor.value).to.be('210948');
 });
+
+it('should use the commit set map when customize button is clicked as the behavior of radio buttons', async () => {
+const context = new BrowsingContext();
+const customizableTestGroupForm = await createCustomizableTestGroupFormWithContext(context);
+const repository = context.symbols.Repository.ensureSingleton(1, {name: 'WebKit'});
+
+const commitA = cloneObject(commitObjectA);
+const commitB = cloneObject(commitObjectB);
+commitA.repository = repository;
+commitB.repository = repository;
+const webkitCommitA = context.symbols.CommitLog.ensureSingleton(185326, commitA);
+const webkitCommitB = context.symbols.CommitLog.ensureSingleton(185334, commitB);
+const commitSetA = context.symbols.CommitSet.ensureSingleton(1, {revisionItems: [{commit: webkitCommitA}]});
+const commitSetB = context.symbols.CommitSet.ensureSingleton(2, {revisionItems: [{commit: webkitCommitB}]});
+
+customizableTestGroupForm.setCommitSetMap({A: commitSetA, B: commitSetB});
+customizableTestGroupForm.content('customize-link').click();
+
+const 

[webkit-changes] [237915] trunk/Websites/perf.webkit.org

2018-11-06 Thread dewei_zhu
Title: [237915] trunk/Websites/perf.webkit.org








Revision 237915
Author dewei_...@apple.com
Date 2018-11-06 21:58:15 -0800 (Tue, 06 Nov 2018)


Log Message
Customizable test group form should not reset manually edited commit value sometimes.
https://bugs.webkit.org/show_bug.cgi?id=190863

Reviewed by Ryosuke Niwa.

After changing the radio button and manually editing the commit value, commit value should not be reset
while changing the name of the test group.
Add the logic to prompt warning when manually typed commit does not exist.

* browser-tests/customizable-test-group-form-tests.js: Added a unit test for this bug.
* browser-tests/index.html:
* public/v3/components/customizable-test-group-form.js: Should always update commit set as long as
the repository of that row does not have a owner repository.
(CustomizableTestGroupForm.prototype._constructTableRowForCommitsWithoutOwner):
(CustomizableTestGroupForm.prototype._constructTableRowForCommitsWithOwner):
(CustomizableTestGroupForm.prototype._constructRevisionRadioButtons):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/browser-tests/index.html
trunk/Websites/perf.webkit.org/public/v3/components/customizable-test-group-form.js


Added Paths

trunk/Websites/perf.webkit.org/browser-tests/customizable-test-group-form-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (237914 => 237915)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-11-07 05:06:33 UTC (rev 237914)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-11-07 05:58:15 UTC (rev 237915)
@@ -1,3 +1,22 @@
+2018-11-06  Dewei Zhu  
+
+Customizable test group form should not reset manually edited commit value sometimes.
+https://bugs.webkit.org/show_bug.cgi?id=190863
+
+Reviewed by Ryosuke Niwa.
+
+After changing the radio button and manually editing the commit value, commit value should not be reset
+while changing the name of the test group.
+Add the logic to prompt warning when manually typed commit does not exist.
+
+* browser-tests/customizable-test-group-form-tests.js: Added a unit test for this bug.
+* browser-tests/index.html:
+* public/v3/components/customizable-test-group-form.js: Should always update commit set as long as
+the repository of that row does not have a owner repository.
+(CustomizableTestGroupForm.prototype._constructTableRowForCommitsWithoutOwner):
+(CustomizableTestGroupForm.prototype._constructTableRowForCommitsWithOwner):
+(CustomizableTestGroupForm.prototype._constructRevisionRadioButtons):
+
 2018-10-16  Dewei Zhu  
 
 Unreviewed, rolling out r236996.


Added: trunk/Websites/perf.webkit.org/browser-tests/customizable-test-group-form-tests.js (0 => 237915)

--- trunk/Websites/perf.webkit.org/browser-tests/customizable-test-group-form-tests.js	(rev 0)
+++ trunk/Websites/perf.webkit.org/browser-tests/customizable-test-group-form-tests.js	2018-11-07 05:58:15 UTC (rev 237915)
@@ -0,0 +1,92 @@
+
+describe('CustomizableTestGroupFormTests', () => {
+const scripts = ['instrumentation.js', '../shared/common-component-base.js', 'components/base.js', 'models/data-model.js', 'models/commit-log.js',
+'models/commit-set.js', 'models/repository.js', 'components/test-group-form.js', 'components/customizable-test-group-form.js'];
+
+async function createCustomizableTestGroupFormWithContext(context)
+{
+await context.importScripts(scripts, 'ComponentBase', 'DataModelObject', 'Repository', 'CommitLog', 'CommitSet', 'CustomizableTestGroupForm', 'MockRemoteAPI');
+const customizableTestGroupForm = new context.symbols.CustomizableTestGroupForm;
+context.document.body.appendChild(customizableTestGroupForm.element());
+return customizableTestGroupForm;
+}
+
+const commitObjectA = {
+"id": "185326",
+"revision": "210948",
+"repository": 1,
+"previousCommit": null,
+"ownsCommits": false,
+"time": 1541494949681,
+"authorName": "Zalan Bujtas",
+"authorEmail": "za...@apple.com",
+"message": "a message",
+};
+
+const commitObjectB = {
+"id": "185334",
+"revision": "210949",
+"repository": 1,
+"previousCommit": null,
+"ownsCommits": false,
+"time": 1541494949682,
+"authorName": "Chris Dumez",
+"authorEmail": "cdu...@apple.com",
+"message": "some message",
+};
+
+function cloneObject(object)
+{
+const clone = {};
+for (const [key, value] of Object.entries(object))
+clone[key] = value;
+return clone;
+}
+
+it('Changing the value in revision editor should update corresponding commitSet as long as the repository of that row does not have owner', async () => {
+const context = new BrowsingContext();
+const 

[webkit-changes] [237611] trunk/Source/WebKit

2018-10-30 Thread dewei_zhu
Title: [237611] trunk/Source/WebKit








Revision 237611
Author dewei_...@apple.com
Date 2018-10-30 17:38:00 -0700 (Tue, 30 Oct 2018)


Log Message
Move 'ProcessSwapOnCrossSiteNavigationEnabled' to 'experimental' category.
https://bugs.webkit.org/show_bug.cgi?id=191049

Reviewed by Dean Jackson.

Move the feature flag to experimental feature section.

* Shared/WebPreferences.yaml:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/WebPreferences.yaml




Diff

Modified: trunk/Source/WebKit/ChangeLog (237610 => 237611)

--- trunk/Source/WebKit/ChangeLog	2018-10-31 00:15:41 UTC (rev 237610)
+++ trunk/Source/WebKit/ChangeLog	2018-10-31 00:38:00 UTC (rev 237611)
@@ -1,3 +1,14 @@
+2018-10-30  Dewei Zhu  
+
+Move 'ProcessSwapOnCrossSiteNavigationEnabled' to 'experimental' category.
+https://bugs.webkit.org/show_bug.cgi?id=191049
+
+Reviewed by Dean Jackson.
+
+Move the feature flag to experimental feature section.
+
+* Shared/WebPreferences.yaml:
+
 2018-10-30  Alexey Proskuryakov  
 
 Enable InstallAPI for iOS unconditionally


Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (237610 => 237611)

--- trunk/Source/WebKit/Shared/WebPreferences.yaml	2018-10-31 00:15:41 UTC (rev 237610)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml	2018-10-31 00:38:00 UTC (rev 237611)
@@ -1331,6 +1331,14 @@
   webcoreBinding: RuntimeEnabledFeatures
   category: experimental
 
+ProcessSwapOnCrossSiteNavigationEnabled:
+  type: bool
+  defaultValue: false
+  humanReadableName: "Swap Processes on Cross-Site Navigation"
+  humanReadableDescription: "Swap WebContent processes on cross-site navigations"
+  category: experimental
+  webcoreBinding: none
+
 # For internal features:
 # The type should be boolean.
 # You must provide a humanReadableName and humanReadableDescription for all debug features. They
@@ -1345,14 +1353,6 @@
   webcoreBinding: RuntimeEnabledFeatures
   webcoreName: experimentalPlugInSandboxProfilesEnabled
 
-ProcessSwapOnCrossSiteNavigationEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "Swap Processes on Cross-Site Navigation"
-  humanReadableDescription: "Swap WebContent processes on cross-site navigations"
-  category: experimental
-  webcoreBinding: none
-
 ResourceLoadStatisticsDebugMode:
   type: bool
   defaultValue: false






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [237581] trunk/Tools/Scripts/webkitpy/common/config/contributors.json

2018-10-29 Thread dewei_zhu
Title: [237581] trunk/Tools/Scripts/webkitpy/common/config/contributors.json








Revision 237581
Author dewei_...@apple.com
Date 2018-10-29 21:10:53 -0700 (Mon, 29 Oct 2018)


Log Message
Unreviewed, change my status to be a WebKit reviewer.

* Scripts/webkitpy/common/config/contributors.json:

Modified Paths

trunk/Tools/Scripts/webkitpy/common/config/contributors.json




Diff

Modified: trunk/Tools/Scripts/webkitpy/common/config/contributors.json (237580 => 237581)

--- trunk/Tools/Scripts/webkitpy/common/config/contributors.json	2018-10-30 04:00:17 UTC (rev 237580)
+++ trunk/Tools/Scripts/webkitpy/common/config/contributors.json	2018-10-30 04:10:53 UTC (rev 237581)
@@ -1697,7 +1697,7 @@
   "nicks" : [
  "Dewei"
   ],
-  "status" : "committer"
+  "status" : "reviewer"
},
"Dhi Aurrahman" : {
   "emails" : [






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [237206] trunk/Websites/perf.webkit.org

2018-10-16 Thread dewei_zhu
Title: [237206] trunk/Websites/perf.webkit.org








Revision 237206
Author dewei_...@apple.com
Date 2018-10-16 15:58:03 -0700 (Tue, 16 Oct 2018)


Log Message
Unreviewed, rolling out r236996.

Temporarily rollout to fix a manifest generation bug.
"lastModified" field for certain platform & metric configurations may be missing.

Reverted changeset:

"ManifestGenerator shouldn't need more than 1GB of memory or
run for 30 seconds"
https://bugs.webkit.org/show_bug.cgi?id=190393
https://trac.webkit.org/changeset/236996

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/include/manifest-generator.php




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (237205 => 237206)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-10-16 22:31:00 UTC (rev 237205)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-10-16 22:58:03 UTC (rev 237206)
@@ -1,3 +1,17 @@
+2018-10-16  Dewei Zhu  
+
+Unreviewed, rolling out r236996.
+
+Temporarily rollout to fix a manifest generation bug.
+"lastModified" field for certain platform & metric configurations may be missing.
+
+Reverted changeset:
+
+"ManifestGenerator shouldn't need more than 1GB of memory or
+run for 30 seconds"
+https://bugs.webkit.org/show_bug.cgi?id=190393
+https://trac.webkit.org/changeset/236996
+
 2018-10-12  Ryosuke Niwa  
 
 Perf dashboard: add a test for aggregating subtests without a matching metric in /api/report


Modified: trunk/Websites/perf.webkit.org/public/include/manifest-generator.php (237205 => 237206)

--- trunk/Websites/perf.webkit.org/public/include/manifest-generator.php	2018-10-16 22:31:00 UTC (rev 237205)
+++ trunk/Websites/perf.webkit.org/public/include/manifest-generator.php	2018-10-16 22:58:03 UTC (rev 237206)
@@ -29,6 +29,7 @@
 $tests = (object)$this->tests();
 $metrics = (object)$this->metrics();
 $platforms = (object)$this->platforms($platform_table, false);
+$dashboard = (object)$this->platforms($platform_table, true);
 $repositories = (object)$this->repositories($repositories_table, $repositories_with_commit);
 
 $this->manifest = array(
@@ -36,7 +37,7 @@
 'tests' => &$tests,
 'metrics' => &$metrics,
 'all' => &$platforms,
-'dashboard' => (object)array(), // Only used by v1 UI.
+'dashboard' => &$dashboard,
 'repositories' => &$repositories,
 'builders' => (object)$this->builders(),
 'bugTrackers' => (object)$this->bug_trackers($repositories_table),
@@ -63,11 +64,11 @@
 $tests_table = $this->db->fetch_table('tests');
 if (!$tests_table)
 return $tests;
-foreach ($tests_table as &$test_row) {
+foreach ($tests_table as $test_row) {
 $tests[$test_row['test_id']] = array(
 'name' => $test_row['test_name'],
 'url' => $test_row['test_url'],
-'parentId' => $test_row['test_parent'] ? intval($test_row['test_parent']) : NULL,
+'parentId' => $test_row['test_parent'],
 );
 }
 return $tests;
@@ -78,44 +79,38 @@
 $metrics_table = $this->db->query_and_fetch_all('SELECT * FROM test_metrics LEFT JOIN aggregators ON metric_aggregator = aggregator_id');
 if (!$metrics_table)
 return $metrics;
-foreach ($metrics_table as &$row) {
+foreach ($metrics_table as $row) {
 $metrics[$row['metric_id']] = array(
 'name' => $row['metric_name'],
-'test' => intval($row['metric_test']),
+'test' => $row['metric_test'],
 'aggregator' => $row['aggregator_name']);
 }
 return $metrics;
 }
 
-private function platforms(&$platform_table, $is_dashboard) {
-$config_query = $this->db->query('SELECT config_platform, config_metric,
-extract(epoch from config_runs_last_modified at time zone \'utc\') * 1000 AS last_modified
-FROM test_configurations');
+private function platforms($platform_table, $is_dashboard) {
+$metrics = $this->db->query_and_fetch_all('SELECT config_metric AS metric_id, config_platform AS platform_id,
+extract(epoch from max(config_runs_last_modified) at time zone \'utc\') * 1000 AS last_modified, bool_or(config_is_in_dashboard) AS in_dashboard
+FROM test_configurations GROUP BY config_metric, config_platform ORDER BY config_platform');
 
 $platform_metrics = array();
 
-if ($config_query) {
+if ($metrics) {
 $current_platform_entry = null;
-$last_modified_map = array();
-while (1) {
-$config_row = $this->db->fetch_next_row($config_query);
-if (!$config_row)
-break;
+foreach ($metrics as $metric_row) {
+if 

[webkit-changes] [236997] trunk/Websites/perf.webkit.org

2018-10-09 Thread dewei_zhu
Title: [236997] trunk/Websites/perf.webkit.org








Revision 236997
Author dewei_...@apple.com
Date 2018-10-09 20:43:47 -0700 (Tue, 09 Oct 2018)


Log Message
Performance dashboard should show added iterations due failed build requests.
https://bugs.webkit.org/show_bug.cgi?id=190419

Reviewed by Ryosuke Niwa.

Added UI to show added build requests due to previous failed build requests.
Updated the retry/bisect button to default to initial repetition count when test group is created.

* public/v3/pages/analysis-task-page.js: Added a div to show added build requests.
Retry and bisect button should default to initial repetion count.
(AnalysisTaskTestGroupPane.prototype._renderCurrentTestGroup):
(AnalysisTaskTestGroupPane.cssTemplate):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/pages/analysis-task-page.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (236996 => 236997)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-10-10 03:15:39 UTC (rev 236996)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-10-10 03:43:47 UTC (rev 236997)
@@ -1,3 +1,18 @@
+2018-10-09  Dewei Zhu  
+
+Performance dashboard should show added iterations due failed build requests.
+https://bugs.webkit.org/show_bug.cgi?id=190419
+
+Reviewed by Ryosuke Niwa.
+
+Added UI to show added build requests due to previous failed build requests.
+Updated the retry/bisect button to default to initial repetition count when test group is created.
+
+* public/v3/pages/analysis-task-page.js: Added a div to show added build requests.
+Retry and bisect button should default to initial repetion count.
+(AnalysisTaskTestGroupPane.prototype._renderCurrentTestGroup):
+(AnalysisTaskTestGroupPane.cssTemplate):
+
 2018-10-09  Ryosuke Niwa  
 
 ManifestGenerator shouldn't need more than 1GB of memory or run for 30 seconds


Modified: trunk/Websites/perf.webkit.org/public/v3/pages/analysis-task-page.js (236996 => 236997)

--- trunk/Websites/perf.webkit.org/public/v3/pages/analysis-task-page.js	2018-10-10 03:15:39 UTC (rev 236996)
+++ trunk/Websites/perf.webkit.org/public/v3/pages/analysis-task-page.js	2018-10-10 03:43:47 UTC (rev 236997)
@@ -369,11 +369,14 @@
 this._testGroupMap.get(currentGroup).listItem.classList.add('selected');
 
 if (currentGroup) {
-this.part('retry-form').setRepetitionCount(currentGroup.repetitionCount());
-this.part('bisect-form').setRepetitionCount(currentGroup.repetitionCount());
+this.part('retry-form').setRepetitionCount(currentGroup.initialRepetitionCount());
+this.part('bisect-form').setRepetitionCount(currentGroup.initialRepetitionCount());
+const summary = `${currentGroup.initialRepetitionCount()} requested, ${currentGroup.repetitionCount() - currentGroup.initialRepetitionCount()} added due to failures.`;
+this.content('status-summary').innerHTML = summary;
 }
 this.content('retry-form').style.display = currentGroup ? null : 'none';
 this.content('bisect-form').style.display = currentGroup && this._bisectingCommitSetByTestGroup.get(currentGroup) ? null : 'none';
+this.content('status-summary').style.display = currentGroup && currentGroup.repetitionCount() > currentGroup.initialRepetitionCount() ? null : 'none';
 
 const hideButton = this.content('hide-button');
 hideButton.textContent = currentGroup && currentGroup.isHidden() ? 'Unhide' : 'Hide';
@@ -389,6 +392,7 @@
 
 
 
+
 Retry
 Bisect
 Hide
@@ -451,6 +455,10 @@
 background: #eee;
 }
 
+div.summary {
+padding-left: 1rem;
+}
+
 #test-group-details {
 display: table-cell;
 margin-bottom: 1rem;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [236861] trunk/Websites/perf.webkit.org

2018-10-04 Thread dewei_zhu
Title: [236861] trunk/Websites/perf.webkit.org








Revision 236861
Author dewei_...@apple.com
Date 2018-10-04 17:17:49 -0700 (Thu, 04 Oct 2018)


Log Message
Add retry for test groups with failed build requests.
https://bugs.webkit.org/show_bug.cgi?id=190188

Reviewed by Ryosuke Niwa.

Added retry logic in run-analysis script.
Current retry logic will only be triggered when there is at least one successful build request for each commit set
in a test group.

* init-database.sql: Added 'testgroup_initial_repetition_count' and 'testgroup_may_need_more_requests'.
SQL to update existing database:
'''
BEGIN;
ALTER TABLE analysis_test_groups
ADD COLUMN testgroup_initial_repetition_count integer DEFAULT NULL,
ADD COLUMN testgroup_may_need_more_requests boolean DEFAULT FALSE;
UPDATE analysis_test_groups SET testgroup_initial_repetition_count = (
SELECT DISTINCT(COUNT(*)) FROM build_requests WHERE request_group = testgroup_id AND request_order >= 0 GROUP BY request_commit_set
);
ALTER TABLE analysis_test_groups ALTER COLUMN testgroup_initial_repetition_count DROP DEFAULT, ALTER COLUMN testgroup_may_need_more_requests SET NOT NULL;
END;
'''
'testgroup_initial_repetition_count' represents the number of successful build request for each commit set when
test group is created.
'testgroup_may_need_more_requests' will be set when any build request in test group is set to 'failed'.
* public/api/build-requests.php: Added the logic to set 'testgroup_may_need_more_requests'.
* public/api/test-groups.php: Updated 'ready-for-notification' to 'ready-for-further-processing' so that it returns finished test
groups those either have 'needs_notification' or  'may_need_more_requests' set.
* public/include/commit-sets-helpers.php: Set 'initial_repetition_count' to repetition count.
* public/privileged-api/update-test-group.php: Added APIs to add build request for a test group and
update 'may_need_more_requests' flag.
* public/v3/models/test-group.js:
(TestGroup): Added '_mayNeedMoreRequests' and '_initialRepetitionCount' field.
Refactored code that interacts with '/api/update-test-group'.
(TestGroup.prototype.updateSingleton):
(TestGroup.prototype.mayNeedMoreRequests):
(TestGroup.prototype.initialRepetitionCount):
(TestGroup.prototype.async._updateBuildRequest):
(TestGroup.prototype.updateName):
(TestGroup.prototype.updateHiddenFlag):
(TestGroup.prototype.async.didSendNotification):
(TestGroup.prototype.async.addMoreBuildRequests):
(TestGroup.prototype.async.clearMayNeedMoreBuildRequests): Added API to clear 'may_need_more_requests' flag.
(TestGroup.fetchAllReadyForFurtherProcessing): Refactored 'TestGroup.fetchAllWithNotificationReady' to return test groups either
have 'needs_notification' or  'may_need_more_requests' set.
(TestGroup.fetchAllThatMayNeedMoreRequests): Fetches test groups those may need more build requests.
* server-tests/api-test-groups.js: Added unit tests.
* server-tests/privileged-api-add-build-requests-tests.js: Added unit tests for 'add-build-requests' API.
* server-tests/privileged-api-update-test-group-tests.js: Added unit tests.
* server-tests/resources/mock-data.js:
(MockData.addMockData):
* server-tests/resources/test-server.js:
(TestServer.prototype._determinePgsqlDirectory): Fixed a bug that 'childProcess.execFileSync' may return a buffer.
* tools/run-analysis.js: Added logic to add extra build request before sennding notification.
* tools/js/retry-failed-build-requests.js:
(async.createAdditionalBuildRequestsForTestGroupsWithFailedRequests): Module that add extra build requests.
* unit-tests/retry-failed-build-requests-tests.js: Added.
* unit-tests/test-groups-tests.js: Added unit tests.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/init-database.sql
trunk/Websites/perf.webkit.org/public/api/build-requests.php
trunk/Websites/perf.webkit.org/public/api/test-groups.php
trunk/Websites/perf.webkit.org/public/include/commit-sets-helpers.php
trunk/Websites/perf.webkit.org/public/privileged-api/update-test-group.php
trunk/Websites/perf.webkit.org/public/v3/models/build-request.js
trunk/Websites/perf.webkit.org/public/v3/models/test-group.js
trunk/Websites/perf.webkit.org/server-tests/api-test-groups.js
trunk/Websites/perf.webkit.org/server-tests/privileged-api-update-test-group-tests.js
trunk/Websites/perf.webkit.org/server-tests/resources/mock-data.js
trunk/Websites/perf.webkit.org/server-tests/resources/test-server.js
trunk/Websites/perf.webkit.org/tools/run-analysis.js
trunk/Websites/perf.webkit.org/unit-tests/test-groups-tests.js


Added Paths

trunk/Websites/perf.webkit.org/public/privileged-api/add-build-requests.php
trunk/Websites/perf.webkit.org/server-tests/privileged-api-add-build-requests-tests.js
trunk/Websites/perf.webkit.org/tools/js/retry-failed-build-requests.js
trunk/Websites/perf.webkit.org/unit-tests/retry-failed-build-requests-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (236860 => 

[webkit-changes] [236454] trunk/Websites/perf.webkit.org

2018-09-24 Thread dewei_zhu
Title: [236454] trunk/Websites/perf.webkit.org








Revision 236454
Author dewei_...@apple.com
Date 2018-09-24 22:12:13 -0700 (Mon, 24 Sep 2018)


Log Message
Apache can return a corrupt manifest file while ManifestGenerator::store is running
https://bugs.webkit.org/show_bug.cgi?id=189822

Reviewed by Ryosuke Niwa.

Updating a file on performance dashboard should be transactional between php and apache.
Otherwise, partial content may be served.

* public/api/measurement-set.php: Adapted invocation of 'generate_json_date_with_elapsed_time_if_needed'.
* public/api/runs.php: Adapted invocation of 'generate_json_date_with_elapsed_time_if_needed'.
* public/include/db.php: Make creating file transactionaly by taking advantage of
'move/rename' operation is atomic in OS.
Added logic to avoid overwriting file if all content except specified filed are identical.
* public/include/json-header.php: Added a helper function that added 'status' but does not
convert content to json.
* public/include/manifest-generator.php: Adapted invocation of 'generate_json_date_with_elapsed_time_if_needed'.
* public/shared/statistics.js: Removed unnecessary logging.
(Statistics.new.sampleMeanAndVarianceFromMultipleSamples):
* server-tests/api-manifest-tests.js: Updated one unit test.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/api/measurement-set.php
trunk/Websites/perf.webkit.org/public/api/runs.php
trunk/Websites/perf.webkit.org/public/include/db.php
trunk/Websites/perf.webkit.org/public/include/json-header.php
trunk/Websites/perf.webkit.org/public/include/manifest-generator.php
trunk/Websites/perf.webkit.org/public/shared/statistics.js
trunk/Websites/perf.webkit.org/server-tests/api-manifest-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (236453 => 236454)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-09-25 04:21:32 UTC (rev 236453)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-09-25 05:12:13 UTC (rev 236454)
@@ -1,3 +1,25 @@
+2018-09-21  Dewei Zhu  
+
+Apache can return a corrupt manifest file while ManifestGenerator::store is running
+https://bugs.webkit.org/show_bug.cgi?id=189822
+
+Reviewed by Ryosuke Niwa.
+
+Updating a file on performance dashboard should be transactional between php and apache.
+Otherwise, partial content may be served.
+
+* public/api/measurement-set.php: Adapted invocation of 'generate_json_date_with_elapsed_time_if_needed'.
+* public/api/runs.php: Adapted invocation of 'generate_json_date_with_elapsed_time_if_needed'.
+* public/include/db.php: Make creating file transactionaly by taking advantage of
+'move/rename' operation is atomic in OS.
+Added logic to avoid overwriting file if all content except specified filed are identical.
+* public/include/json-header.php: Added a helper function that added 'status' but does not
+convert content to json.
+* public/include/manifest-generator.php: Adapted invocation of 'generate_json_date_with_elapsed_time_if_needed'.
+* public/shared/statistics.js: Removed unnecessary logging.
+(Statistics.new.sampleMeanAndVarianceFromMultipleSamples):
+* server-tests/api-manifest-tests.js: Updated one unit test.
+
 2018-08-22  Dewei Zhu  
 
 Show t-test results based on individual measurements to analysis task page.


Modified: trunk/Websites/perf.webkit.org/public/api/measurement-set.php (236453 => 236454)

--- trunk/Websites/perf.webkit.org/public/api/measurement-set.php	2018-09-25 04:21:32 UTC (rev 236453)
+++ trunk/Websites/perf.webkit.org/public/api/measurement-set.php	2018-09-25 05:12:13 UTC (rev 236454)
@@ -37,6 +37,7 @@
 }
 
 $cluster_count = 0;
+$elapsed_time = NULL;
 while (!$fetcher->at_end()) {
 $content = $fetcher->fetch_next_cluster();
 $cluster_count++;
@@ -43,12 +44,12 @@
 if ($fetcher->at_end()) {
 $cache_filename = "measurement-set-$platform_id-$metric_id.json";
 $content['clusterCount'] = $cluster_count;
-$content['elapsedTime'] = (microtime(true) - $program_start_time) * 1000;
+$elapsed_time = (microtime(true) - $program_start_time) * 1000;
 } else
 $cache_filename = "measurement-set-$platform_id-$metric_id-{$content['endTime']}.json";
 
-$json = success_json($content);
-generate_data_file($cache_filename, $json);
+set_successful($content);
+$json = generate_json_data_with_elapsed_time_if_needed($cache_filename, $content, $elapsed_time);
 }
 
 echo $json;


Modified: trunk/Websites/perf.webkit.org/public/api/runs.php (236453 => 236454)

--- trunk/Websites/perf.webkit.org/public/api/runs.php	2018-09-25 04:21:32 UTC (rev 236453)
+++ trunk/Websites/perf.webkit.org/public/api/runs.php	2018-09-25 05:12:13 UTC (rev 236454)
@@ -39,9 +39,13 @@
 foreach ($config_rows as $config)
 

[webkit-changes] [235762] trunk/Tools

2018-09-06 Thread dewei_zhu
Title: [235762] trunk/Tools








Revision 235762
Author dewei_...@apple.com
Date 2018-09-06 15:32:15 -0700 (Thu, 06 Sep 2018)


Log Message
BenchmarkResults.format should support specifying depth of tests to show.
https://bugs.webkit.org/show_bug.cgi?id=189135

Reviewed by Ryosuke Niwa.

Added the option to specify the depth of tests to show.

* Scripts/webkitpy/benchmark_runner/benchmark_results.py:
(BenchmarkResults):
(BenchmarkResults.format): Added 'max_depth' option.
(BenchmarkResults._format_tests): Added unit tests for 'max_depth'.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (235761 => 235762)

--- trunk/Tools/ChangeLog	2018-09-06 22:25:59 UTC (rev 235761)
+++ trunk/Tools/ChangeLog	2018-09-06 22:32:15 UTC (rev 235762)
@@ -1,3 +1,18 @@
+2018-09-06  Dewei Zhu  
+
+BenchmarkResults.format should support specifying depth of tests to show.
+https://bugs.webkit.org/show_bug.cgi?id=189135
+
+Reviewed by Ryosuke Niwa.
+
+Added the option to specify the depth of tests to show.
+
+* Scripts/webkitpy/benchmark_runner/benchmark_results.py:
+(BenchmarkResults):
+(BenchmarkResults.format): Added 'max_depth' option.
+(BenchmarkResults._format_tests): Added unit tests for 'max_depth'.
+
+
 2018-09-06  Simon Fraser  
 
 An EWS run that has leak test failures does not correctly add bugzilla comments showing the failures


Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results.py (235761 => 235762)

--- trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results.py	2018-09-06 22:25:59 UTC (rev 235761)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results.py	2018-09-06 22:32:15 UTC (rev 235762)
@@ -23,6 +23,7 @@
 import json
 import math
 import re
+import sys
 
 
 class BenchmarkResults(object):
@@ -48,11 +49,11 @@
 self._lint_results(results)
 self._results = self._aggregate_results(results)
 
-def format(self, scale_unit=True, show_iteration_values=False):
-return self._format_tests(self._results, scale_unit, show_iteration_values)
+def format(self, scale_unit=True, show_iteration_values=False, max_depth=sys.maxsize):
+return self._format_tests(self._results, scale_unit, show_iteration_values, max_depth)
 
 @classmethod
-def _format_tests(cls, tests, scale_unit, show_iteration_values, indent=''):
+def _format_tests(cls, tests, scale_unit, show_iteration_values, max_depth, indent=''):
 output = ''
 config_name = 'current'
 for test_name in sorted(tests.keys()):
@@ -72,8 +73,8 @@
 if aggregator_name:
 output += aggregator_name + ':'
 output += ' ' + cls._format_values(metric_name, metric[aggregator_name][config_name], scale_unit, show_iteration_values) + '\n'
-if 'tests' in test:
-output += cls._format_tests(test['tests'], scale_unit, show_iteration_values, indent=(indent + ' ' * len(test_name)))
+if 'tests' in test and max_depth > 1:
+output += cls._format_tests(test['tests'], scale_unit, show_iteration_values, max_depth - 1, indent=(indent + ' ' * len(test_name)))
 return output
 
 @classmethod


Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results_unittest.py (235761 => 235762)

--- trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results_unittest.py	2018-09-06 22:25:59 UTC (rev 235761)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results_unittest.py	2018-09-06 22:32:15 UTC (rev 235762)
@@ -55,6 +55,17 @@
 SubTest2:Time: 5.0ms stdev=20.0%
 '''[1:])
 
+def test_format_with_depth_limit(self):
+result = BenchmarkResults({'SomeTest': {
+'metrics': {'Time': ['Total', 'Arithmetic']},
+'tests': {
+'SubTest1': {'metrics': {'Time': {'current': [1, 2, 3]}}},
+'SubTest2': {'metrics': {'Time': {'current': [4, 5, 6]}})
+self.assertEqual(result.format(max_depth=1), '''
+SomeTest:Time:Arithmetic: 3.0ms stdev=33.3%
+:Time:Total: 7.0ms stdev=28.6%
+'''[1:])
+
 def test_format_values_with_large_error(self):
 self.assertEqual(BenchmarkResults._format_values('Runs', [1, 2, 3]), '2.0/s stdev=50.0%')
 self.assertEqual(BenchmarkResults._format_values('Runs', [10, 20, 30]), '20/s stdev=50.0%')






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [235755] trunk/Tools

2018-09-06 Thread dewei_zhu
Title: [235755] trunk/Tools








Revision 235755
Author dewei_...@apple.com
Date 2018-09-06 13:47:55 -0700 (Thu, 06 Sep 2018)


Log Message
BenchmarkResults.format should support specifying depth of tests to show.
https://bugs.webkit.org/show_bug.cgi?id=189135

Reviewed by Ryosuke Niwa.

Added the option to specify the depth of tests to show.

* Scripts/webkitpy/benchmark_runner/benchmark_results.py:
(BenchmarkResults):
(BenchmarkResults.format): Added 'max_depth' option.
(BenchmarkResults._format_tests): Added unit tests for 'max_depth'.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (235754 => 235755)

--- trunk/Tools/ChangeLog	2018-09-06 20:42:48 UTC (rev 235754)
+++ trunk/Tools/ChangeLog	2018-09-06 20:47:55 UTC (rev 235755)
@@ -1,3 +1,17 @@
+2018-08-29  Dewei Zhu  
+
+BenchmarkResults.format should support specifying depth of tests to show.
+https://bugs.webkit.org/show_bug.cgi?id=189135
+
+Reviewed by Ryosuke Niwa.
+
+Added the option to specify the depth of tests to show.
+
+* Scripts/webkitpy/benchmark_runner/benchmark_results.py:
+(BenchmarkResults):
+(BenchmarkResults.format): Added 'max_depth' option.
+(BenchmarkResults._format_tests): Added unit tests for 'max_depth'.
+
 2018-09-06  Thomas Denney  
 
 [WHLSL] Call arguments should be copied as soon as they are evaluated


Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results.py (235754 => 235755)

--- trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results.py	2018-09-06 20:42:48 UTC (rev 235754)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results.py	2018-09-06 20:47:55 UTC (rev 235755)
@@ -48,11 +48,13 @@
 self._lint_results(results)
 self._results = self._aggregate_results(results)
 
-def format(self, scale_unit=True, show_iteration_values=False):
-return self._format_tests(self._results, scale_unit, show_iteration_values)
+def format(self, scale_unit=True, show_iteration_values=False, max_depth=None):
+return self._format_tests(self._results, scale_unit, show_iteration_values, max_depth)
 
 @classmethod
-def _format_tests(cls, tests, scale_unit, show_iteration_values, indent=''):
+def _format_tests(cls, tests, scale_unit, show_iteration_values, max_depth, indent=''):
+if max_depth is not None and max_depth <= 0:
+return ''
 output = ''
 config_name = 'current'
 for test_name in sorted(tests.keys()):
@@ -73,7 +75,7 @@
 output += aggregator_name + ':'
 output += ' ' + cls._format_values(metric_name, metric[aggregator_name][config_name], scale_unit, show_iteration_values) + '\n'
 if 'tests' in test:
-output += cls._format_tests(test['tests'], scale_unit, show_iteration_values, indent=(indent + ' ' * len(test_name)))
+output += cls._format_tests(test['tests'], scale_unit, show_iteration_values, max_depth - 1 if max_depth else None, indent=(indent + ' ' * len(test_name)))
 return output
 
 @classmethod


Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results_unittest.py (235754 => 235755)

--- trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results_unittest.py	2018-09-06 20:42:48 UTC (rev 235754)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results_unittest.py	2018-09-06 20:47:55 UTC (rev 235755)
@@ -55,6 +55,18 @@
 SubTest2:Time: 5.0ms stdev=20.0%
 '''[1:])
 
+def test_format_with_depth_limit(self):
+result = BenchmarkResults({'SomeTest': {
+'metrics': {'Time': ['Total', 'Arithmetic']},
+'tests': {
+'SubTest1': {'metrics': {'Time': {'current': [1, 2, 3]}}},
+'SubTest2': {'metrics': {'Time': {'current': [4, 5, 6]}})
+self.assertEqual(result.format(max_depth=1), '''
+SomeTest:Time:Arithmetic: 3.0ms stdev=33.3%
+:Time:Total: 7.0ms stdev=28.6%
+'''[1:])
+self.assertEqual(result.format(max_depth=0), "")
+
 def test_format_values_with_large_error(self):
 self.assertEqual(BenchmarkResults._format_values('Runs', [1, 2, 3]), '2.0/s stdev=50.0%')
 self.assertEqual(BenchmarkResults._format_values('Runs', [10, 20, 30]), '20/s stdev=50.0%')






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [235255] trunk/Websites/perf.webkit.org

2018-08-23 Thread dewei_zhu
Title: [235255] trunk/Websites/perf.webkit.org








Revision 235255
Author dewei_...@apple.com
Date 2018-08-23 16:11:10 -0700 (Thu, 23 Aug 2018)


Log Message
Show t-test results based on individual measurements to analysis task page.
https://bugs.webkit.org/show_bug.cgi?id=188425

Reviewed by Ryosuke Niwa.

Added comparison for individual iterations in analysis task page.
Added comparison for individual iterations for notification on A/B tests completion.
Refactored t-distribution inverse lookup to any degree of freedom with 5 significant figures.

* public/shared/statistics.js: Refactored t-distribution inverse lookup function and adapted this
change to all invocations.
(Statistics.new.this.supportedConfidenceIntervalProbabilities):
(Statistics.new.this.supportedOneSideTTestProbabilities):
(Statistics.new.this.confidenceIntervalDelta):
(Statistics.new.sampleMeanAndVarianceForMultipleSamples):
(Statistics.new.this.probabilityRangeForWelchsT):
(Statistics.new.this.probabilityRangeForWelchsTFromTwoSampleSets):
(Statistics.new.this._determinetwoSidedProbabilityBoundaryForWelchsT):
(Statistics.new.this.computeWelchsT):
(Statistics.new.this._computeWelchsTFromStatistics):
(Statistics.new.this.minimumTForOneSidedProbability): Function that does t-distribution inverse lookup.
* public/v3/components/analysis-results-viewer.js: Adapted TestGroup.compareTestResults change.
(AnalysisResultsViewer.TestGroupStackingBlock.prototype._measurementsForCommitSet):
(AnalysisResultsViewer.TestGroupStackingBlock.prototype._computeTestGroupStatus):
(AnalysisResultsViewer.TestGroupStackingBlock.prototype._valuesForCommitSet): Deleted.
* public/v3/components/test-group-results-viewer.js: Show both comparisions for both individual and mean.
(TestGroupResultsViewer.prototype._renderResultsTable):
(TestGroupResultsViewer.prototype._buildRowForMetric.):
(TestGroupResultsViewer.prototype._buildValueMap):
* public/v3/models/test-group.js:
(TestGroup.compareTestResults): Added comparison for individual iterations.
* tools/js/test-group-result-page.js:
(TestGroupResultPage.prototype._constructTableForMetric):
(TestGroupResultPage.prototype.get styleTemplate):
(TestGroupResultPage):
(TestGroupResultPage.prototype._URLForAnalysisTask): Renamed to '_resultsForTestGroup'
* unit-tests/statistics-tests.js: Updated and added unit tests.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/shared/statistics.js
trunk/Websites/perf.webkit.org/public/v3/components/analysis-results-viewer.js
trunk/Websites/perf.webkit.org/public/v3/components/test-group-results-viewer.js
trunk/Websites/perf.webkit.org/public/v3/models/test-group.js
trunk/Websites/perf.webkit.org/tools/js/test-group-result-page.js
trunk/Websites/perf.webkit.org/unit-tests/statistics-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (235254 => 235255)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-08-23 22:57:09 UTC (rev 235254)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-08-23 23:11:10 UTC (rev 235255)
@@ -1,3 +1,43 @@
+2018-08-22  Dewei Zhu  
+
+Show t-test results based on individual measurements to analysis task page.
+https://bugs.webkit.org/show_bug.cgi?id=188425
+
+Reviewed by Ryosuke Niwa.
+
+Added comparison for individual iterations in analysis task page.
+Added comparison for individual iterations for notification on A/B tests completion.
+Refactored t-distribution inverse lookup to any degree of freedom with 5 significant figures.
+
+* public/shared/statistics.js: Refactored t-distribution inverse lookup function and adapted this
+change to all invocations.
+(Statistics.new.this.supportedConfidenceIntervalProbabilities):
+(Statistics.new.this.supportedOneSideTTestProbabilities):
+(Statistics.new.this.confidenceIntervalDelta):
+(Statistics.new.sampleMeanAndVarianceForMultipleSamples):
+(Statistics.new.this.probabilityRangeForWelchsT):
+(Statistics.new.this.probabilityRangeForWelchsTFromTwoSampleSets):
+(Statistics.new.this._determinetwoSidedProbabilityBoundaryForWelchsT):
+(Statistics.new.this.computeWelchsT):
+(Statistics.new.this._computeWelchsTFromStatistics):
+(Statistics.new.this.minimumTForOneSidedProbability): Function that does t-distribution inverse lookup.
+* public/v3/components/analysis-results-viewer.js: Adapted TestGroup.compareTestResults change.
+(AnalysisResultsViewer.TestGroupStackingBlock.prototype._measurementsForCommitSet):
+(AnalysisResultsViewer.TestGroupStackingBlock.prototype._computeTestGroupStatus):
+(AnalysisResultsViewer.TestGroupStackingBlock.prototype._valuesForCommitSet): Deleted.
+* public/v3/components/test-group-results-viewer.js: Show both comparisions for both individual and mean.
+(TestGroupResultsViewer.prototype._renderResultsTable):
+

[webkit-changes] [233884] trunk/Websites/perf.webkit.org

2018-07-16 Thread dewei_zhu
Title: [233884] trunk/Websites/perf.webkit.org








Revision 233884
Author dewei_...@apple.com
Date 2018-07-16 22:07:34 -0700 (Mon, 16 Jul 2018)


Log Message
CustomConfigurationTestGroupForm should dispatch different arguments based on whether analysis task is created.
https://bugs.webkit.org/show_bug.cgi?id=187675

Reviewed by Ryosuke Niwa.

This change will fix the bug that no notification will be sent for any test groups except the
first one in any custom perf-try A/B task.

* public/v3/components/custom-configuration-test-group-form.js:
(CustomConfigurationTestGroupForm.prototype.startTesting): Conditionally includes taskName based on
whether or not analysis task is created.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/components/custom-configuration-test-group-form.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (233883 => 233884)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-07-17 04:44:23 UTC (rev 233883)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-07-17 05:07:34 UTC (rev 233884)
@@ -1,3 +1,17 @@
+2018-07-13  Dewei Zhu  
+
+CustomConfigurationTestGroupForm should dispatch different arguments based on whether analysis task is created.
+https://bugs.webkit.org/show_bug.cgi?id=187675
+
+Reviewed by Ryosuke Niwa.
+
+This change will fix the bug that no notification will be sent for any test groups except the
+first one in any custom perf-try A/B task.
+
+* public/v3/components/custom-configuration-test-group-form.js:
+(CustomConfigurationTestGroupForm.prototype.startTesting): Conditionally includes taskName based on
+whether or not analysis task is created.
+
 2018-07-03  Dewei Zhu  
 
 MeasurementSet should merge last four segments into two if values are identical.


Modified: trunk/Websites/perf.webkit.org/public/v3/components/custom-configuration-test-group-form.js (233883 => 233884)

--- trunk/Websites/perf.webkit.org/public/v3/components/custom-configuration-test-group-form.js	2018-07-17 04:44:23 UTC (rev 233883)
+++ trunk/Websites/perf.webkit.org/public/v3/components/custom-configuration-test-group-form.js	2018-07-17 05:07:34 UTC (rev 233884)
@@ -38,7 +38,11 @@
 const commitSets = configurator.commitSets();
 const platform = configurator.platform();
 const test = configurator.tests()[0]; // FIXME: Add the support for specifying multiple tests.
-this.dispatchAction('startTesting', this._repetitionCount, testGroupName, commitSets, platform, test, taskName, this._notifyOnCompletion);
+console.assert(!!this._hasTask === !taskName);
+if (!this._hasTask)
+this.dispatchAction('startTesting', this._repetitionCount, testGroupName, commitSets, platform, test, taskName, this._notifyOnCompletion);
+else
+this.dispatchAction('startTesting', this._repetitionCount, testGroupName, commitSets, platform, test, this._notifyOnCompletion);
 }
 
 didConstructShadowTree()






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [233700] trunk/Tools

2018-07-10 Thread dewei_zhu
Title: [233700] trunk/Tools








Revision 233700
Author dewei_...@apple.com
Date 2018-07-10 14:59:37 -0700 (Tue, 10 Jul 2018)


Log Message
Update ARES-6.patch file accordingly for r233631.
https://bugs.webkit.org/show_bug.cgi?id=187534

Reviewed by Saam Barati.

Update ARES-6.patch file acoordingly after ARES-6 plan file change to
avoid warning while applying the patch.

* Scripts/webkitpy/benchmark_runner/data/patches/webserver/ARES-6.patch:

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/benchmark_runner/data/patches/webserver/ARES-6.patch




Diff

Modified: trunk/Tools/ChangeLog (233699 => 233700)

--- trunk/Tools/ChangeLog	2018-07-10 21:56:02 UTC (rev 233699)
+++ trunk/Tools/ChangeLog	2018-07-10 21:59:37 UTC (rev 233700)
@@ -1,3 +1,15 @@
+2018-07-10  Dewei Zhu  
+
+Update ARES-6.patch file accordingly for r233631.
+https://bugs.webkit.org/show_bug.cgi?id=187534
+
+Reviewed by Saam Barati.
+
+Update ARES-6.patch file acoordingly after ARES-6 plan file change to
+avoid warning while applying the patch.
+
+* Scripts/webkitpy/benchmark_runner/data/patches/webserver/ARES-6.patch:
+
 2018-07-10  Tim Horton  
 
 doAfterNextPresentationUpdate should not be called while content is hidden due to animated resize


Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/data/patches/webserver/ARES-6.patch (233699 => 233700)

--- trunk/Tools/Scripts/webkitpy/benchmark_runner/data/patches/webserver/ARES-6.patch	2018-07-10 21:56:02 UTC (rev 233699)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/data/patches/webserver/ARES-6.patch	2018-07-10 21:59:37 UTC (rev 233700)
@@ -1,8 +1,8 @@
 diff --git a/driver.js b/driver.js
-index 26394093758..f6496f970ee 100644
+index 2ef7d63..bbbcc45 100644
 --- a/driver.js
 +++ b/driver.js
-@@ -136,6 +136,32 @@ class Driver {
+@@ -141,6 +141,32 @@ class Driver {
  this._benchmark = this._iterator ? this._iterator.next().value : null;
  if (!this._benchmark) {
  if (!this._numIterations) {
@@ -33,10 +33,10 @@
 +xhr.send(content);
 +
  if (isInBrowser) {
- this._statusCell.innerHTML =
- (this._hadErrors ? "Failures encountered!" : "Restart");
+ this._statusCell.innerHTML = "Restart";
+ this.readyTrigger();
 diff --git a/index.html b/index.html
-index 230657bac24..fb740f7f06d 100644
+index f676bb3..524220f 100644
 --- a/index.html
 +++ b/index.html
 @@ -11,6 +11,8 @@






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [233564] trunk/Websites/perf.webkit.org

2018-07-05 Thread dewei_zhu
Title: [233564] trunk/Websites/perf.webkit.org








Revision 233564
Author dewei_...@apple.com
Date 2018-07-05 22:57:48 -0700 (Thu, 05 Jul 2018)


Log Message
MeasurementSet should merge last four segments into two if values are identical.
https://bugs.webkit.org/show_bug.cgi?id=187311

Reviewed by Ryosuke Niwa.

If last four segments has the same value, MeasurmentSet should merge them.

* public/v3/models/measurement-set.js: Added the logic to conditionally merge last segments.
(MeasurementSet.prototype.fetchSegmentation):
* unit-tests/measurement-set-tests.js: Added a unit test for this change.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/models/measurement-set.js
trunk/Websites/perf.webkit.org/unit-tests/measurement-set-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (233563 => 233564)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-07-06 05:50:17 UTC (rev 233563)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-07-06 05:57:48 UTC (rev 233564)
@@ -1,3 +1,16 @@
+2018-07-03  Dewei Zhu  
+
+MeasurementSet should merge last four segments into two if values are identical.
+https://bugs.webkit.org/show_bug.cgi?id=187311
+
+Reviewed by Ryosuke Niwa.
+
+If last four segments has the same value, MeasurmentSet should merge them.
+
+* public/v3/models/measurement-set.js: Added the logic to conditionally merge last segments.
+(MeasurementSet.prototype.fetchSegmentation):
+* unit-tests/measurement-set-tests.js: Added a unit test for this change.
+
 2018-06-29  Dewei Zhu  
 
 Manifest.reset should clear static map for BugTracker and Bug objects.


Modified: trunk/Websites/perf.webkit.org/public/v3/models/measurement-set.js (233563 => 233564)

--- trunk/Websites/perf.webkit.org/public/v3/models/measurement-set.js	2018-07-06 05:50:17 UTC (rev 233563)
+++ trunk/Websites/perf.webkit.org/public/v3/models/measurement-set.js	2018-07-06 05:57:48 UTC (rev 233564)
@@ -224,22 +224,25 @@
 var self = this;
 return Promise.all(promises).then(function (clusterSegmentations) {
 var segmentationSeries = [];
-var addSegment = function (startingPoint, endingPoint) {
+var addSegmentMergingIdenticalSegments = function (startingPoint, endingPoint) {
 var value = Statistics.mean(timeSeries.valuesBetweenRange(startingPoint.seriesIndex, endingPoint.seriesIndex));
-segmentationSeries.push({value: value, time: startingPoint.time, seriesIndex: startingPoint.seriesIndex, interval: function () { return null; }});
-segmentationSeries.push({value: value, time: endingPoint.time, seriesIndex: endingPoint.seriesIndex, interval: function () { return null; }});
+if (!segmentationSeries.length || value !== segmentationSeries[segmentationSeries.length - 1].value) {
+segmentationSeries.push({value: value, time: startingPoint.time, seriesIndex: startingPoint.seriesIndex, interval: function () { return null; }});
+segmentationSeries.push({value: value, time: endingPoint.time, seriesIndex: endingPoint.seriesIndex, interval: function () { return null; }});
+} else
+segmentationSeries[segmentationSeries.length - 1].seriesIndex = endingPoint.seriesIndex;
 };
 
-var startingIndex = 0;
-for (var segmentation of clusterSegmentations) {
-for (var endingIndex of segmentation) {
-addSegment(timeSeries.findPointByIndex(startingIndex), timeSeries.findPointByIndex(endingIndex));
+let startingIndex = 0;
+for (const segmentation of clusterSegmentations) {
+for (const endingIndex of segmentation) {
+addSegmentMergingIdenticalSegments(timeSeries.findPointByIndex(startingIndex), timeSeries.findPointByIndex(endingIndex));
 startingIndex = endingIndex;
 }
 }
 if (extendToFuture)
 timeSeries.extendToFuture();
-addSegment(timeSeries.findPointByIndex(startingIndex), timeSeries.lastPoint());
+addSegmentMergingIdenticalSegments(timeSeries.findPointByIndex(startingIndex), timeSeries.lastPoint());
 return segmentationSeries;
 });
 }


Modified: trunk/Websites/perf.webkit.org/unit-tests/measurement-set-tests.js (233563 => 233564)

--- trunk/Websites/perf.webkit.org/unit-tests/measurement-set-tests.js	2018-07-06 05:50:17 UTC (rev 233563)
+++ trunk/Websites/perf.webkit.org/unit-tests/measurement-set-tests.js	2018-07-06 05:57:48 UTC (rev 233564)
@@ -956,6 +956,38 @@
 1587.1390, 1594.5451, 1586.2430, 1596.7310, 1548.1423
 ];
 
+const segmentableValuesWithSameValueInTheEnd = [
+58.682259702925, 58.672894300682, 58.631641849076, 58.627144214832, 58.600152967236, 

[webkit-changes] [233456] trunk/Websites/perf.webkit.org

2018-07-02 Thread dewei_zhu
Title: [233456] trunk/Websites/perf.webkit.org








Revision 233456
Author dewei_...@apple.com
Date 2018-07-02 20:55:24 -0700 (Mon, 02 Jul 2018)


Log Message
Manifest.reset should clear static map for BugTracker and Bug objects.
https://bugs.webkit.org/show_bug.cgi?id=187186

Reviewed by Ryosuke Niwa

If static maps of BugTracker and Bug objects are not cleared up, updating singleton
of Bug object will fail assertion.

* public/v3/models/manifest.js: Clear static map for BugTracker and Bug.
(Manifest.reset):
* server-tests/api-manifest-tests.js: Added a unit test for this change.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/models/manifest.js
trunk/Websites/perf.webkit.org/server-tests/api-manifest-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (233455 => 233456)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-07-03 03:55:21 UTC (rev 233455)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-07-03 03:55:24 UTC (rev 233456)
@@ -1,5 +1,19 @@
 2018-06-29  Dewei Zhu  
 
+Manifest.reset should clear static map for BugTracker and Bug objects.
+https://bugs.webkit.org/show_bug.cgi?id=187186
+
+Reviewed by Ryosuke Niwa.
+
+If static maps of BugTracker and Bug objects are not cleared up, updating singleton
+of Bug object will fail assertion.
+
+* public/v3/models/manifest.js: Clear static map for BugTracker and Bug.
+(Manifest.reset):
+* server-tests/api-manifest-tests.js: Added a unit test for this change.
+
+2018-06-29  Dewei Zhu  
+
 Fix a bug in range bisector that start commit may be counted twice.
 https://bugs.webkit.org/show_bug.cgi?id=187205
 


Modified: trunk/Websites/perf.webkit.org/public/v3/models/manifest.js (233455 => 233456)

--- trunk/Websites/perf.webkit.org/public/v3/models/manifest.js	2018-07-03 03:55:21 UTC (rev 233455)
+++ trunk/Websites/perf.webkit.org/public/v3/models/manifest.js	2018-07-03 03:55:24 UTC (rev 233456)
@@ -17,6 +17,8 @@
 Triggerable.clearStaticMap();
 TriggerableRepositoryGroup.clearStaticMap();
 UploadedFile.clearStaticMap();
+BugTracker.clearStaticMap();
+Bug.clearStaticMap();
 }
 
 static fetch()


Modified: trunk/Websites/perf.webkit.org/server-tests/api-manifest-tests.js (233455 => 233456)

--- trunk/Websites/perf.webkit.org/server-tests/api-manifest-tests.js	2018-07-03 03:55:21 UTC (rev 233455)
+++ trunk/Websites/perf.webkit.org/server-tests/api-manifest-tests.js	2018-07-03 03:55:24 UTC (rev 233456)
@@ -57,6 +57,23 @@
 });
 });
 
+it("should clear Bug and BugTracker static maps when reset", async () => {
+await TestServer.database().insert('bug_trackers', bugzillaData);
+const content = await TestServer.remoteAPI().getJSON('/api/manifest');
+assert.deepEqual(content.bugTrackers, {1: {name: 'Bugzilla', bugUrl: 'https://webkit.org/b/$number',
+newBugUrl: 'https://bugs.webkit.org/', repositories: null}});
+
+Manifest._didFetchManifest(content);
+const trackerFromFirstFetch = BugTracker.findById(1);
+
+Manifest.reset();
+assert(!BugTracker.findById(1));
+
+Manifest._didFetchManifest(content);
+const trackerFromSecondFetch = BugTracker.findById(1);
+assert(trackerFromFirstFetch != trackerFromSecondFetch);
+});
+
 it("should generate manifest with bug trackers and repositories", () => {
 let db = TestServer.database();
 return Promise.all([






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [233455] trunk/Websites/perf.webkit.org

2018-07-02 Thread dewei_zhu
Title: [233455] trunk/Websites/perf.webkit.org








Revision 233455
Author dewei_...@apple.com
Date 2018-07-02 20:55:21 -0700 (Mon, 02 Jul 2018)


Log Message
Fix a bug in range bisector that start commit may be counted twice.
https://bugs.webkit.org/show_bug.cgi?id=187205

Reviewed by Darin Adler.

Range bisector counted start commit twice if start commit is the same as end commit.

* public/v3/commit-set-range-bisector.js:
(CommitSetRangeBisector.async.commitSetClosestToMiddleOfAllCommits):
* unit-tests/commit-set-range-bisector-tests.js: Added a unit test for this change.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/commit-set-range-bisector.js
trunk/Websites/perf.webkit.org/unit-tests/commit-set-range-bisector-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (233454 => 233455)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-07-03 01:07:19 UTC (rev 233454)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-07-03 03:55:21 UTC (rev 233455)
@@ -1,3 +1,16 @@
+2018-06-29  Dewei Zhu  
+
+Fix a bug in range bisector that start commit may be counted twice.
+https://bugs.webkit.org/show_bug.cgi?id=187205
+
+Reviewed by Darin Adler.
+
+Range bisector counted start commit twice if start commit is the same as end commit.
+
+* public/v3/commit-set-range-bisector.js:
+(CommitSetRangeBisector.async.commitSetClosestToMiddleOfAllCommits):
+* unit-tests/commit-set-range-bisector-tests.js: Added a unit test for this change.
+
 2018-06-28  Dewei Zhu  
 
 Fix a bug ComponentBase that wrong content template may be used.


Modified: trunk/Websites/perf.webkit.org/public/v3/commit-set-range-bisector.js (233454 => 233455)

--- trunk/Websites/perf.webkit.org/public/v3/commit-set-range-bisector.js	2018-07-03 01:07:19 UTC (rev 233454)
+++ trunk/Websites/perf.webkit.org/public/v3/commit-set-range-bisector.js	2018-07-03 03:55:21 UTC (rev 233455)
@@ -29,10 +29,10 @@
 }
 
 const [startCommit, endCommit] = CommitLog.orderTwoCommits(firstCommit, secondCommit);
-const commits = startCommit === endCommit ? [startCommit] : await CommitLog.fetchBetweenRevisions(repository, startCommit.revision(), endCommit.revision());
+const commitsExcludingStartCommit = startCommit === endCommit ? [] : await CommitLog.fetchBetweenRevisions(repository, startCommit.revision(), endCommit.revision());
 
 if (startCommit.hasCommitTime()) {
-allCommitsWithCommitTime.push(startCommit, ...commits);
+allCommitsWithCommitTime.push(startCommit, ...commitsExcludingStartCommit);
 commitRangeByRepository.set(repository, (commit) =>
 commit.hasCommitTime() && startCommit.time() <= commit.time() && commit.time() <= endCommit.time());
 repositoriesWithCommitTime.add(repository);
@@ -39,7 +39,7 @@
 } else {
 const indexByCommit = new Map;
 indexByCommit.set(startCommit, 0);
-commits.forEach((commit, index) => indexByCommit.set(commit, index + 1));
+commitsExcludingStartCommit.forEach((commit, index) => indexByCommit.set(commit, index + 1));
 indexForAllTimelessCommitsWithOrderByRepository.set(repository, indexByCommit);
 commitRangeByRepository.set(repository, (commit) =>
 commit.hasCommitOrder() && startCommit.order() <= commit.order() && commit.order() <= endCommit.order());


Modified: trunk/Websites/perf.webkit.org/unit-tests/commit-set-range-bisector-tests.js (233454 => 233455)

--- trunk/Websites/perf.webkit.org/unit-tests/commit-set-range-bisector-tests.js	2018-07-03 01:07:19 UTC (rev 233454)
+++ trunk/Websites/perf.webkit.org/unit-tests/commit-set-range-bisector-tests.js	2018-07-03 03:55:21 UTC (rev 233455)
@@ -315,6 +315,36 @@
 ];
 }
 
+function commitSetsWithTime()
+{
+return [
+CommitSet.ensureSingleton(28, {
+revisionItems: [
+{ commit: makeCommit(1, MockModels.webkit, 'webkit-commit-1', 10), requiresBuild: false },
+{ commit: makeCommit(201, MockModels.osx, 'osx-commit-201', 8), requiresBuild: false }
+],
+customRoots: []}),
+CommitSet.ensureSingleton(29, {
+revisionItems: [
+{ commit: makeCommit(1, MockModels.webkit, 'webkit-commit-1', 10), requiresBuild: false },
+{ commit: makeCommit(203, MockModels.osx, 'osx-commit-203', 11), requiresBuild: false }
+],
+customRoots: []}),
+CommitSet.ensureSingleton(30, {
+revisionItems: [
+{ commit: makeCommit(1, MockModels.webkit, 'webkit-commit-1', 10), requiresBuild: false },
+{ commit: makeCommit(204, MockModels.osx, 

[webkit-changes] [233333] trunk/Websites/perf.webkit.org

2018-06-28 Thread dewei_zhu
Title: [23] trunk/Websites/perf.webkit.org








Revision 23
Author dewei_...@apple.com
Date 2018-06-28 15:14:39 -0700 (Thu, 28 Jun 2018)


Log Message
Fix a bug ComponentBase that wrong content template may be used.
https://bugs.webkit.org/show_bug.cgi?id=187159

Reviewed by Ryosuke Niwa.

ComponentBase uses '_parsed' to mark whether content and style templates of a class
is parsed. However, derived class parsing will be skipped as 'Derive._parsed' is available
via prototype chain whenever the base class is parsed.

* browser-tests/component-base-tests.js: Added unit tests.
* public/v3/components/base.js: Added 'hasOwnProperty' to make sure current class is parsed.
(ComponentBase.prototype._ensureShadowTree):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/browser-tests/component-base-tests.js
trunk/Websites/perf.webkit.org/public/v3/components/base.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (22 => 23)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-06-28 22:13:04 UTC (rev 22)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-06-28 22:14:39 UTC (rev 23)
@@ -1,3 +1,18 @@
+2018-06-28  Dewei Zhu  
+
+Fix a bug ComponentBase that wrong content template may be used.
+https://bugs.webkit.org/show_bug.cgi?id=187159
+
+Reviewed by Ryosuke Niwa.
+
+ComponentBase uses '_parsed' to mark whether content and style templates of a class
+is parsed. However, derived class parsing will be skipped as 'Derive._parsed' is available
+via prototype chain whenever the base class is parsed.
+
+* browser-tests/component-base-tests.js: Added unit tests.
+* public/v3/components/base.js: Added 'hasOwnProperty' to make sure current class is parsed.
+(ComponentBase.prototype._ensureShadowTree):
+
 2018-06-25  Dewei Zhu  
 
 MeasurementSetAnalyzer should check triggerable availability before creating confirming A/B tests.


Modified: trunk/Websites/perf.webkit.org/browser-tests/component-base-tests.js (22 => 23)

--- trunk/Websites/perf.webkit.org/browser-tests/component-base-tests.js	2018-06-28 22:13:04 UTC (rev 22)
+++ trunk/Websites/perf.webkit.org/browser-tests/component-base-tests.js	2018-06-28 22:14:39 UTC (rev 23)
@@ -195,6 +195,27 @@
 expect(container.textContent).to.be('hello, world');
 });
 
+it('it must create content using derived class content template', async () => {
+const context = new BrowsingContext();
+const ComponentBase = await importComponentBase(context);
+
+class BaseClass extends ComponentBase { };
+BaseClass.contentTemplate = ['div', {id: 'container'}, 'base-class'];
+const baseInstance = new BaseClass('base-class');
+
+class DerivedClass extends BaseClass {};
+DerivedClass.contentTemplate = ['div', {id: 'container'}, 'derived-class'];
+const derivedInstance = new DerivedClass('derived-class');
+
+const baseContainer = baseInstance.content('container');
+expect(baseContainer).to.be.a(context.global.HTMLDivElement);
+expect(baseContainer.textContent).to.be('base-class');
+
+const derivedContainer = derivedInstance.content('container');
+expect(derivedContainer).to.be.a(context.global.HTMLDivElement);
+expect(derivedContainer.textContent).to.be('derived-class');
+});
+
 it('it must create stylsheet from styleTemplate', async () => {
 const context = new BrowsingContext();
 const ComponentBase = await importComponentBase(context);
@@ -699,4 +720,28 @@
 
 });
 
+describe('_ensureShadowTree', () => {
+it('should parse derived component after parsing base component', async () => {
+const context = new BrowsingContext();
+const ComponentBase = await importComponentBase(context);
+class DerivedComponent extends ComponentBase {};
+const baseInstance = new ComponentBase;
+expect(ComponentBase.hasOwnProperty('_parsed')).to.be(false);
+expect(DerivedComponent.hasOwnProperty('_parsed')).to.be(false);
+
+baseInstance._ensureShadowTree();
+expect(ComponentBase.hasOwnProperty('_parsed')).to.be(true);
+expect(DerivedComponent.hasOwnProperty('_parsed')).to.be(false);
+expect(!!ComponentBase._parsed).to.be(true);
+expect(!!DerivedComponent._parsed).to.be(true);
+
+const derivedInstance = new DerivedComponent;
+derivedInstance._ensureShadowTree();
+expect(ComponentBase.hasOwnProperty('_parsed')).to.be(true);
+expect(DerivedComponent.hasOwnProperty('_parsed')).to.be(true);
+expect(!!ComponentBase._parsed).to.be(true);
+expect(!!DerivedComponent._parsed).to.be(true);
+});
+});
+
 });



[webkit-changes] [233326] trunk/Websites/perf.webkit.org

2018-06-28 Thread dewei_zhu
Title: [233326] trunk/Websites/perf.webkit.org








Revision 233326
Author dewei_...@apple.com
Date 2018-06-28 14:15:48 -0700 (Thu, 28 Jun 2018)


Log Message
MeasurementSetAnalyzer should check triggerable availability before creating confirming A/B tests.
https://bugs.webkit.org/show_bug.cgi?id=187028

Reviewed by Ryosuke Niwa.

If the triggerable is not available, MeasurmentSetAnalyzer should only create analysis task without
confirming A/B tests.

* tools/js/measurement-set-analyzer.js: Added logic to check triggerable availability.
(MeasurementSetAnalyzer.prototype.async._analyzeMeasurementSet):
(MeasurementSetAnalyzer):
* unit-tests/measurement-set-analyzer-tests.js: Updated unit tests and added a new unit test for this change.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/tools/js/measurement-set-analyzer.js
trunk/Websites/perf.webkit.org/unit-tests/measurement-set-analyzer-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (233325 => 233326)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-06-28 21:13:16 UTC (rev 233325)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-06-28 21:15:48 UTC (rev 233326)
@@ -1,3 +1,18 @@
+2018-06-25  Dewei Zhu  
+
+MeasurementSetAnalyzer should check triggerable availability before creating confirming A/B tests.
+https://bugs.webkit.org/show_bug.cgi?id=187028
+
+Reviewed by Ryosuke Niwa.
+
+If the triggerable is not available, MeasurmentSetAnalyzer should only create analysis task without
+confirming A/B tests.
+
+* tools/js/measurement-set-analyzer.js: Added logic to check triggerable availability.
+(MeasurementSetAnalyzer.prototype.async._analyzeMeasurementSet):
+(MeasurementSetAnalyzer):
+* unit-tests/measurement-set-analyzer-tests.js: Updated unit tests and added a new unit test for this change.
+
 2018-06-11  Dewei Zhu  
 
 Extend test group rule to support 'userInitiated' field.


Modified: trunk/Websites/perf.webkit.org/tools/js/measurement-set-analyzer.js (233325 => 233326)

--- trunk/Websites/perf.webkit.org/tools/js/measurement-set-analyzer.js	2018-06-28 21:13:16 UTC (rev 233325)
+++ trunk/Websites/perf.webkit.org/tools/js/measurement-set-analyzer.js	2018-06-28 21:15:48 UTC (rev 233326)
@@ -101,10 +101,11 @@
 const startCommitSet = rangeWithMostSignificantChange.startPoint.commitSet();
 const endCommitSet = rangeWithMostSignificantChange.endPoint.commitSet();
 const summary = `Potential ${rangeWithMostSignificantChange.valueChangeSummary.changeLabel} on ${platform.name()} between ${CommitSet.diff(startCommitSet, endCommitSet)}`;
+const confirmingTaskArguments = Triggerable.findByTestConfiguration(metric.test(), platform) ? ['Confirm', 4, true] : [];
 
 // FIXME: The iteration count should be smarter than hard-coding.
 const analysisTask = await AnalysisTask.create(summary, rangeWithMostSignificantChange.startPoint,
-rangeWithMostSignificantChange.endPoint, 'Confirm', 4, true);
+rangeWithMostSignificantChange.endPoint, ...confirmingTaskArguments);
 
 this._logger.info(`Created analysis task with id "${analysisTask.id()}" to confirm: "${summary}".`);
 }


Modified: trunk/Websites/perf.webkit.org/unit-tests/measurement-set-analyzer-tests.js (233325 => 233326)

--- trunk/Websites/perf.webkit.org/unit-tests/measurement-set-analyzer-tests.js	2018-06-28 21:13:16 UTC (rev 233325)
+++ trunk/Websites/perf.webkit.org/unit-tests/measurement-set-analyzer-tests.js	2018-06-28 21:15:48 UTC (rev 233326)
@@ -148,6 +148,11 @@
 
 it('should not show created analysis task logging if failed to create analysis task', async () => {
 PrivilegedAPI.configure('test', 'password');
+
+Triggerable.ensureSingleton(4, {name: 'some-triggerable',
+repositoryGroups: [MockModels.osRepositoryGroup, MockModels.svnRepositoryGroup, MockModels.gitRepositoryGroup, MockModels.svnRepositoryWithOwnedRepositoryGroup],
+configurations: [{test: MockModels.someMetric.test(), platform: MockModels.somePlatform}]});
+
 const measurementSet = MeasurementSet.findSet(MockModels.somePlatform.id(), MockModels.someMetric.id(), 5000);
 const logger = mockLogger();
 const measurementSetAnalyzer = new MeasurementSetAnalyzer([measurementSet], 4000, 5000, logger);
@@ -202,6 +207,11 @@
 
 it('should analyze if a new regression is detected', async () => {
 PrivilegedAPI.configure('test', 'password');
+
+Triggerable.ensureSingleton(4, {name: 'some-triggerable',
+repositoryGroups: [MockModels.osRepositoryGroup, MockModels.svnRepositoryGroup, MockModels.gitRepositoryGroup, MockModels.svnRepositoryWithOwnedRepositoryGroup],
+configurations: [{test: MockModels.someMetric.test(), platform: MockModels.somePlatform}]});
+
 const 

[webkit-changes] [232740] trunk/Websites/perf.webkit.org

2018-06-11 Thread dewei_zhu
Title: [232740] trunk/Websites/perf.webkit.org








Revision 232740
Author dewei_...@apple.com
Date 2018-06-11 20:27:45 -0700 (Mon, 11 Jun 2018)


Log Message
Extend test group rule to support 'userInitiated' field.
https://bugs.webkit.org/show_bug.cgi?id=186544

Reviewed by Ryosuke Niwa.

Added support for rule specifying whether or not test group is user initiated.

* tools/js/analysis-results-notifier.js: Rule now support 'userInitiated' field.
(AnalysisResultsNotifier.prototype.async.sendNotificationsForTestGroups):
(AnalysisResultsNotifier.prototype._applyRules):
(AnalysisResultsNotifier._matchesRule):
* unit-tests/analysis-results-notifier-tests.js: Added unit tests for this change.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/tools/js/analysis-results-notifier.js
trunk/Websites/perf.webkit.org/unit-tests/analysis-results-notifier-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (232739 => 232740)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-06-12 02:37:17 UTC (rev 232739)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-06-12 03:27:45 UTC (rev 232740)
@@ -1,3 +1,18 @@
+2018-06-11  Dewei Zhu  
+
+Extend test group rule to support 'userInitiated' field.
+https://bugs.webkit.org/show_bug.cgi?id=186544
+
+Reviewed by Ryosuke Niwa.
+
+Added support for rule specifying whether or not test group is user initiated.
+
+* tools/js/analysis-results-notifier.js: Rule now support 'userInitiated' field.
+(AnalysisResultsNotifier.prototype.async.sendNotificationsForTestGroups):
+(AnalysisResultsNotifier.prototype._applyRules):
+(AnalysisResultsNotifier._matchesRule):
+* unit-tests/analysis-results-notifier-tests.js: Added unit tests for this change.
+
 2018-05-29  Dewei Zhu  
 
 CommitSet range bisector should use commits occur in commit sets which specify the range as valid commits for commits without ordering.


Modified: trunk/Websites/perf.webkit.org/tools/js/analysis-results-notifier.js (232739 => 232740)

--- trunk/Websites/perf.webkit.org/tools/js/analysis-results-notifier.js	2018-06-12 02:37:17 UTC (rev 232739)
+++ trunk/Websites/perf.webkit.org/tools/js/analysis-results-notifier.js	2018-06-12 03:27:45 UTC (rev 232740)
@@ -39,7 +39,7 @@
 const title = `"${testGroup.task().name()}" - "${testGroup.name()}" has finished`;
 const message = await AnalysisResultsNotifier._messageForTestGroup(testGroup, title);
 let content = AnalysisResultsNotifier._instantiateNotificationTemplate(this._messageTemplate, title, message);
-content = this._applyRules(testGroup.platform().name(), testGroup.test().path()[0].name(), content);
+content = this._applyRules(testGroup.platform().name(), testGroup.test().path()[0].name(), !!testGroup.author(), content);
 const testGroupInfo = {author: testGroup.author()};
 
 const tempDir = fs.mkdtempSync(os.tmpdir());
@@ -77,16 +77,16 @@
 return instance;
 }
 
-_applyRules(platformName, testName, message)
+_applyRules(platformName, testName, userInitiated, message)
 {
 for (const rule of this._messageConstructionRules) {
-if (AnalysisResultsNotifier._matchesRule(platformName, testName, rule))
+if (AnalysisResultsNotifier._matchesRule(platformName, testName, userInitiated, rule))
 message = AnalysisResultsNotifier._applyUpdate(message, rule.parameters);
 }
 return message;
 }
 
-static _matchesRule(platform, test, rule)
+static _matchesRule(platform, test, userInitiated, rule)
 {
 if (rule.tests && !rule.tests.includes(test))
 return false;
@@ -94,6 +94,9 @@
 if (rule.platforms && !rule.platforms.includes(platform))
 return false;
 
+if ('userInitiated' in rule && userInitiated !== rule.userInitiated)
+return false;
+
 return true;
 }
 


Modified: trunk/Websites/perf.webkit.org/unit-tests/analysis-results-notifier-tests.js (232739 => 232740)

--- trunk/Websites/perf.webkit.org/unit-tests/analysis-results-notifier-tests.js	2018-06-12 02:37:17 UTC (rev 232739)
+++ trunk/Websites/perf.webkit.org/unit-tests/analysis-results-notifier-tests.js	2018-06-12 03:27:45 UTC (rev 232740)
@@ -21,37 +21,67 @@
 
 it('should return a group of matching function based on configuration', () => {
 const rule = {platforms: [trunkMacBook, trunkMacBookPro], tests: [speedometer, speedometer2]};
-assert.ok(AnalysisResultsNotifier._matchesRule(trunkMacBook, speedometer2, rule));
-assert.ok(AnalysisResultsNotifier._matchesRule(trunkMacBookPro, speedometer, rule));
-assert.ok(AnalysisResultsNotifier._matchesRule(trunkMacBookPro, speedometer2, rule));
-assert.ok(!AnalysisResultsNotifier._matchesRule(trunkMacBook, jetStream, rule));
-

[webkit-changes] [232629] trunk/Websites/perf.webkit.org

2018-06-08 Thread dewei_zhu
Title: [232629] trunk/Websites/perf.webkit.org








Revision 232629
Author dewei_...@apple.com
Date 2018-06-08 11:23:17 -0700 (Fri, 08 Jun 2018)


Log Message
CommitSet range bisector should use commits occur in commit sets which specify the range as valid commits for commits without ordering.
https://bugs.webkit.org/show_bug.cgi?id=186062

Reviewed by Ryosuke Niwa.

For commits without ordering, we should use the commits occurs in the commit sets which specify the range as valid commits.
Commit sets in range should only contain those valid commits for corresponding repositories.

* public/v3/commit-set-range-bisector.js: Updated logic to add check on commits without ordering.
(CommitSetRangeBisector.async.commitSetClosestToMiddleOfAllCommits):
* unit-tests/commit-set-range-bisector-tests.js: Added a unit test for this case.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/commit-set-range-bisector.js
trunk/Websites/perf.webkit.org/unit-tests/commit-set-range-bisector-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (232628 => 232629)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-06-08 18:20:44 UTC (rev 232628)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-06-08 18:23:17 UTC (rev 232629)
@@ -1,3 +1,17 @@
+2018-05-29  Dewei Zhu  
+
+CommitSet range bisector should use commits occur in commit sets which specify the range as valid commits for commits without ordering.
+https://bugs.webkit.org/show_bug.cgi?id=186062
+
+Reviewed by Ryosuke Niwa.
+
+For commits without ordering, we should use the commits occurs in the commit sets which specify the range as valid commits.
+Commit sets in range should only contain those valid commits for corresponding repositories.
+
+* public/v3/commit-set-range-bisector.js: Updated logic to add check on commits without ordering.
+(CommitSetRangeBisector.async.commitSetClosestToMiddleOfAllCommits):
+* unit-tests/commit-set-range-bisector-tests.js: Added a unit test for this case.
+
 2018-06-07  Dewei Zhu  
 
 Related task may not have a metric or platform.


Modified: trunk/Websites/perf.webkit.org/public/v3/commit-set-range-bisector.js (232628 => 232629)

--- trunk/Websites/perf.webkit.org/public/v3/commit-set-range-bisector.js	2018-06-08 18:20:44 UTC (rev 232628)
+++ trunk/Websites/perf.webkit.org/public/v3/commit-set-range-bisector.js	2018-06-08 18:23:17 UTC (rev 232629)
@@ -16,18 +16,19 @@
 const commitRangeByRepository = new Map;
 const indexForAllTimelessCommitsWithOrderByRepository = new Map;
 const allCommitsWithCommitTime = [];
-const topLevelRepositoriesWithOrderedCommits = firstCommitSet.topLevelRepositories()
-.filter((repository) => {
-const firstCommit = firstCommitSet.commitForRepository(repository);
-const secondCommit = secondCommitSet.commitForRepository(repository);
-return CommitLog.hasOrdering(firstCommit, secondCommit);
-});
+const repositoriesWithoutOrdering = [];
 
-await Promise.all(topLevelRepositoriesWithOrderedCommits.map(async (repository) => {
+await Promise.all(firstCommitSet.topLevelRepositories().map(async (repository) => {
 const firstCommit = firstCommitSet.commitForRepository(repository);
 const secondCommit = secondCommitSet.commitForRepository(repository);
+
+if (!CommitLog.hasOrdering(firstCommit, secondCommit)) {
+repositoriesWithoutOrdering.push(repository);
+commitRangeByRepository.set((repository), (commit) => commit === firstCommit || commit === secondCommit);
+return;
+}
+
 const [startCommit, endCommit] = CommitLog.orderTwoCommits(firstCommit, secondCommit);
-
 const commits = startCommit === endCommit ? [startCommit] : await CommitLog.fetchBetweenRevisions(repository, startCommit.revision(), endCommit.revision());
 
 if (startCommit.hasCommitTime()) {
@@ -45,11 +46,11 @@
 }
 }));
 
-if (!repositoriesWithCommitTime.size && !indexForAllTimelessCommitsWithOrderByRepository.size)
+if (!repositoriesWithCommitTime.size && !indexForAllTimelessCommitsWithOrderByRepository.size && !repositoriesWithoutOrdering.size)
 return null;
 
 const commitSetsInRange = this._findCommitSetsWithinRange(firstCommitSet, secondCommitSet, availableCommitSets, commitRangeByRepository);
-let sortedCommitSets = this._orderCommitSetsByTimeAndOrderThenDeduplicate(commitSetsInRange, repositoriesWithCommitTime, [...indexForAllTimelessCommitsWithOrderByRepository.keys()]);
+let sortedCommitSets = this._orderCommitSetsByTimeAndOrderThenDeduplicate(commitSetsInRange, repositoriesWithCommitTime, [...indexForAllTimelessCommitsWithOrderByRepository.keys()], repositoriesWithoutOrdering);

[webkit-changes] [232617] trunk/Websites/perf.webkit.org

2018-06-08 Thread dewei_zhu
Title: [232617] trunk/Websites/perf.webkit.org








Revision 232617
Author dewei_...@apple.com
Date 2018-06-07 23:02:47 -0700 (Thu, 07 Jun 2018)


Log Message
Related task may not have a metric or platform.
https://bugs.webkit.org/show_bug.cgi?id=186426

Reviewed by Ryosuke Niwa.

Related task in the related task list can be a custom analysis task which
may not have platform or metric.

* public/v3/pages/analysis-task-page.js: Added null checks for platform and metric.
(AnalysisTaskPage.prototype._renderRelatedTasks):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/pages/analysis-task-page.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (232616 => 232617)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-06-08 05:14:03 UTC (rev 232616)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-06-08 06:02:47 UTC (rev 232617)
@@ -1,5 +1,18 @@
 2018-06-07  Dewei Zhu  
 
+Related task may not have a metric or platform.
+https://bugs.webkit.org/show_bug.cgi?id=186426
+
+Reviewed by Ryosuke Niwa.
+
+Related task in the related task list can be a custom analysis task which
+may not have platform or metric.
+
+* public/v3/pages/analysis-task-page.js: Added null checks for platform and metric.
+(AnalysisTaskPage.prototype._renderRelatedTasks):
+
+2018-06-07  Dewei Zhu  
+
 Fix browser test failed assertions and a bug in 'common-component-base'
 https://bugs.webkit.org/show_bug.cgi?id=186423
 


Modified: trunk/Websites/perf.webkit.org/public/v3/pages/analysis-task-page.js (232616 => 232617)

--- trunk/Websites/perf.webkit.org/public/v3/pages/analysis-task-page.js	2018-06-08 05:14:03 UTC (rev 232616)
+++ trunk/Websites/perf.webkit.org/public/v3/pages/analysis-task-page.js	2018-06-08 06:02:47 UTC (rev 232617)
@@ -704,9 +704,9 @@
 this.renderReplace(this.content('related-tasks-list'), (task && relatedTasks ? relatedTasks : []).map((otherTask) => {
 let suffix = '';
 const taskLabel = otherTask.label();
-if (otherTask.metric() != task.metric() && taskLabel.indexOf(otherTask.metric().label()) < 0)
+if (otherTask.metric() && otherTask.metric() != task.metric() && taskLabel.indexOf(otherTask.metric().label()) < 0)
 suffix += ` with "${otherTask.metric().label()}"`;
-if (otherTask.platform() != task.platform() && taskLabel.indexOf(otherTask.platform().label()) < 0)
+if (otherTask.platform() && otherTask.platform() != task.platform() && taskLabel.indexOf(otherTask.platform().label()) < 0)
 suffix += ` on ${otherTask.platform().label()}`;
 return element('li', [link(taskLabel, this.router().url(`analysis/task/${otherTask.id()}`)), suffix]);
 }));






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [232614] trunk/Websites/perf.webkit.org

2018-06-07 Thread dewei_zhu
Title: [232614] trunk/Websites/perf.webkit.org








Revision 232614
Author dewei_...@apple.com
Date 2018-06-07 21:40:42 -0700 (Thu, 07 Jun 2018)


Log Message
Fix browser test failed assertions and a bug in 'common-component-base'
https://bugs.webkit.org/show_bug.cgi?id=186423

Reviewed by Ryosuke Niwa.

Fixed serveral assertion failures in browser tests.
Fixed a bug in common-component-base that null/undefined as attribute value is not allowed.

* browser-tests/chart-revision-range-tests.js: Should not import 'lazily-evaluated-function.js' twice.
* browser-tests/chart-status-evaluator-tests.js: Should not import 'lazily-evaluated-function.js' twice.
* browser-tests/component-base-tests.js: Added a unit test for element attributes being null or undefined.
* browser-tests/index.html: Make mocked data from makeSampleCluster also contains commit_order.
* public/shared/common-component-base.js: Make it allow to take null as attribute value.
(CommonComponentBase.createElement):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/browser-tests/chart-revision-range-tests.js
trunk/Websites/perf.webkit.org/browser-tests/chart-status-evaluator-tests.js
trunk/Websites/perf.webkit.org/browser-tests/component-base-tests.js
trunk/Websites/perf.webkit.org/browser-tests/index.html
trunk/Websites/perf.webkit.org/public/shared/common-component-base.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (232613 => 232614)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-06-08 03:56:04 UTC (rev 232613)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-06-08 04:40:42 UTC (rev 232614)
@@ -1,3 +1,20 @@
+2018-06-07  Dewei Zhu  
+
+Fix browser test failed assertions and a bug in 'common-component-base'
+https://bugs.webkit.org/show_bug.cgi?id=186423
+
+Reviewed by Ryosuke Niwa.
+
+Fixed serveral assertion failures in browser tests.
+Fixed a bug in common-component-base that null/undefined as attribute value is not allowed.
+
+* browser-tests/chart-revision-range-tests.js: Should not import 'lazily-evaluated-function.js' twice.
+* browser-tests/chart-status-evaluator-tests.js: Should not import 'lazily-evaluated-function.js' twice.
+* browser-tests/component-base-tests.js: Added a unit test for element attributes being null or undefined.
+* browser-tests/index.html: Make mocked data from makeSampleCluster also contains commit_order.
+* public/shared/common-component-base.js: Make it allow to take null as attribute value.
+(CommonComponentBase.createElement):
+
 2018-05-24  Dewei Zhu  
 
 Added sending notification feature when test group finishes.


Modified: trunk/Websites/perf.webkit.org/browser-tests/chart-revision-range-tests.js (232613 => 232614)

--- trunk/Websites/perf.webkit.org/browser-tests/chart-revision-range-tests.js	2018-06-08 03:56:04 UTC (rev 232613)
+++ trunk/Websites/perf.webkit.org/browser-tests/chart-revision-range-tests.js	2018-06-08 04:40:42 UTC (rev 232614)
@@ -5,7 +5,7 @@
 {
 return ChartTest.importChartScripts(context).then(() => {
 ChartTest.makeModelObjectsForSampleCluster(context);
-return context.importScripts(['lazily-evaluated-function.js', 'components/chart-revision-range.js'], 'ChartRevisionRange');
+return context.importScripts(['components/chart-revision-range.js'], 'ChartRevisionRange');
 });
 }
 


Modified: trunk/Websites/perf.webkit.org/browser-tests/chart-status-evaluator-tests.js (232613 => 232614)

--- trunk/Websites/perf.webkit.org/browser-tests/chart-status-evaluator-tests.js	2018-06-08 03:56:04 UTC (rev 232613)
+++ trunk/Websites/perf.webkit.org/browser-tests/chart-status-evaluator-tests.js	2018-06-08 04:40:42 UTC (rev 232614)
@@ -3,9 +3,7 @@
 
 function importEvaluator(context)
 {
-const scripts = [
-'lazily-evaluated-function.js',
-'components/chart-status-evaluator.js'];
+const scripts = ['components/chart-status-evaluator.js'];
 
 return ChartTest.importChartScripts(context).then(() => {
 return context.importScripts(scripts, 'Test', 'Metric', 'ChartStatusEvaluator');


Modified: trunk/Websites/perf.webkit.org/browser-tests/component-base-tests.js (232613 => 232614)

--- trunk/Websites/perf.webkit.org/browser-tests/component-base-tests.js	2018-06-08 03:56:04 UTC (rev 232613)
+++ trunk/Websites/perf.webkit.org/browser-tests/component-base-tests.js	2018-06-08 04:40:42 UTC (rev 232614)
@@ -519,6 +519,19 @@
 });
 });
 
+it('should allow to create an element with attributes to be null or undefined', () => {
+const context = new BrowsingContext();
+return importComponentBase(context).then((ComponentBase) => {
+const input = ComponentBase.createElement('input', {'title': null, 'required': undefined});
+

[webkit-changes] [232142] trunk/Websites/perf.webkit.org

2018-05-23 Thread dewei_zhu
Title: [232142] trunk/Websites/perf.webkit.org








Revision 232142
Author dewei_...@apple.com
Date 2018-05-23 18:18:20 -0700 (Wed, 23 May 2018)


Log Message
OSBuildFetcher should respect maxRevision while finding OS builds to report.
https://bugs.webkit.org/show_bug.cgi?id=185925

Reviewed by Ryosuke Niwa.

* server-tests/tools-os-build-fetcher-tests.js: Fix a typo in the unit tests.
Added unit tests for this change. Aslo convert an existing test using async.
* tools/js/os-build-fetcher.js:
(prototype._fetchAvailableBuilds): It should also use 'maxRevision' to filter builds to be reported.
It should use 'minRevisionOrder' when no commit has ever been submitted.
(prototype._commitsForAvailableBuilds): Takes 'maxOrder' as fifth argument.
'minOrder' and 'maxOrder' should be inclusive.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/server-tests/tools-os-build-fetcher-tests.js
trunk/Websites/perf.webkit.org/tools/js/os-build-fetcher.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (232141 => 232142)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-05-24 01:18:17 UTC (rev 232141)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-05-24 01:18:20 UTC (rev 232142)
@@ -1,3 +1,18 @@
+2018-05-23  Dewei Zhu  
+
+OSBuildFetcher should respect maxRevision while finding OS builds to report.
+https://bugs.webkit.org/show_bug.cgi?id=185925
+
+Reviewed by Ryosuke Niwa.
+
+* server-tests/tools-os-build-fetcher-tests.js: Fix a typo in the unit tests.
+Added unit tests for this change. Aslo convert an existing test using async.
+* tools/js/os-build-fetcher.js:
+(prototype._fetchAvailableBuilds): It should also use 'maxRevision' to filter builds to be reported.
+It should use 'minRevisionOrder' when no commit has ever been submitted.
+(prototype._commitsForAvailableBuilds): Takes 'maxOrder' as fifth argument.
+'minOrder' and 'maxOrder' should be inclusive.
+
 2018-05-11  Dewei Zhu  
 
 Update ChartPane per change r231087.


Modified: trunk/Websites/perf.webkit.org/server-tests/tools-os-build-fetcher-tests.js (232141 => 232142)

--- trunk/Websites/perf.webkit.org/server-tests/tools-os-build-fetcher-tests.js	2018-05-24 01:18:17 UTC (rev 232141)
+++ trunk/Websites/perf.webkit.org/server-tests/tools-os-build-fetcher-tests.js	2018-05-24 01:18:20 UTC (rev 232142)
@@ -77,7 +77,7 @@
 };
 
 
-const configWithoutownedCommitCommand = {
+const configWithoutOwnedCommitCommand = {
 'name': 'OSX',
 'customCommands': [
 {
@@ -95,6 +95,18 @@
 ]
 };
 
+const configTrackingOneOS = {
+'name': 'OSX',
+'customCommands': [
+{
+'command': ['list', 'all osx 16Dxx builds'],
+'linesToIgnore': '^\\.*$',
+'minRevision': 'Sierra16D100',
+'maxRevision': 'Sierra16D999'
+}
+]
+};
+
 describe('OSBuilderFetcher._computeOrder', () => {
 it('should calculate the right order for a given valid revision', () => {
 const fetcher = new OSBuildFetcher({});
@@ -124,9 +136,9 @@
 describe('OSBuilderFetcher._commitsForAvailableBuilds', () => {
 it('should only return commits whose orders are higher than specified order', () => {
 const logger = new MockLogger;
-const fetchter = new OSBuildFetcher({}, null, null, MockSubprocess, logger);
+const fetcher = new OSBuildFetcher({}, null, null, MockSubprocess, logger);
 const waitForInvocationPromise = MockSubprocess.waitForInvocation();
-const fetchCommitsPromise = fetchter._commitsForAvailableBuilds('OSX', ['list', 'build1'], '^\\.*$', 160400);
+const fetchCommitsPromise = fetcher._commitsForAvailableBuilds('OSX', ['list', 'build1'], '^\\.*$', 160400, 160600);
 
 return waitForInvocationPromise.then(() => {
 assert.equal(MockSubprocess.invocations.length, 1);
@@ -139,14 +151,31 @@
 assert.deepEqual(results[1], {repository: 'OSX', order: 1605032100, revision: '16F321'});
 });
 });
+
+it('should only return commits whose orders are higher than minOrder and lower than the maxOrder', () => {
+const logger = new MockLogger;
+const fetcher = new OSBuildFetcher({}, null, null, MockSubprocess, logger);
+const waitForInvocationPromise = MockSubprocess.waitForInvocation();
+const fetchCommitsPromise = fetcher._commitsForAvailableBuilds('OSX', ['list', 'build1'], '^\\.*$', 160400, 160500);
+
+return waitForInvocationPromise.then(() => {
+assert.equal(MockSubprocess.invocations.length, 1);
+assert.deepEqual(MockSubprocess.invocations[0].command, ['list', 'build1']);
+

[webkit-changes] [232141] trunk/Websites/perf.webkit.org

2018-05-23 Thread dewei_zhu
Title: [232141] trunk/Websites/perf.webkit.org








Revision 232141
Author dewei_...@apple.com
Date 2018-05-23 18:18:17 -0700 (Wed, 23 May 2018)


Log Message
Update ChartPane per change r231087.
https://bugs.webkit.org/show_bug.cgi?id=185570

Reviewed by Ryosuke Niwa.

On r231087 we change the return type of AnalysisTask.create, ChartPane needs to adapt
this change.

* public/v3/pages/chart-pane.js: Adapted the change that AnalysisTask.create now returns
an AnalysisTask object.
(ChartPane.prototype.async._analyzeRange):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/pages/chart-pane.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (232140 => 232141)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-05-24 00:53:08 UTC (rev 232140)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-05-24 01:18:17 UTC (rev 232141)
@@ -1,3 +1,17 @@
+2018-05-11  Dewei Zhu  
+
+Update ChartPane per change r231087.
+https://bugs.webkit.org/show_bug.cgi?id=185570
+
+Reviewed by Ryosuke Niwa.
+
+On r231087 we change the return type of AnalysisTask.create, ChartPane needs to adapt
+this change.
+
+* public/v3/pages/chart-pane.js: Adapted the change that AnalysisTask.create now returns
+an AnalysisTask object.
+(ChartPane.prototype.async._analyzeRange):
+
 2018-05-10  Dewei Zhu  
 
 CommitLogViewer._preceedingCommit should not always be null


Modified: trunk/Websites/perf.webkit.org/public/v3/pages/chart-pane.js (232140 => 232141)

--- trunk/Websites/perf.webkit.org/public/v3/pages/chart-pane.js	2018-05-24 00:53:08 UTC (rev 232140)
+++ trunk/Websites/perf.webkit.org/public/v3/pages/chart-pane.js	2018-05-24 01:18:17 UTC (rev 232141)
@@ -239,9 +239,9 @@
 const repetitionCount = this.content('confirm-repetition').value;
 
 try {
-const data = "" (createWithTestGroup ?
+const analysisTask = await (createWithTestGroup ?
 AnalysisTask.create(name, startPoint, endPoint, 'Confirm', repetitionCount) : AnalysisTask.create(name, startPoint, endPoint));
-newWindow.location.href = "" + data['taskId']);
+newWindow.location.href = "" + analysisTask.id());
 this.fetchAnalysisTasks(true);
 } catch(error) {
 newWindow.location.href = "" {error: error});






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [231715] trunk/Websites/perf.webkit.org

2018-05-11 Thread dewei_zhu
Title: [231715] trunk/Websites/perf.webkit.org








Revision 231715
Author dewei_...@apple.com
Date 2018-05-11 13:15:08 -0700 (Fri, 11 May 2018)


Log Message
CommitLogViewer._preceedingCommit should not always be null
https://bugs.webkit.org/show_bug.cgi?id=185540

Reviewed by Ryosuke Niwa.

Fix the bug introduced in r227746 that CommitLogViewer._preceedingCommit is always null.

* browser-tests/index.html: Fix expected measurement-set url.
* public/v3/components/commit-log-viewer.js:
(CommitLogViewer.prototype._fetchCommitLogs): CommitLogViewer._preceedingCommit should be set
when fetching for preceeding revision succeeds.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/browser-tests/index.html
trunk/Websites/perf.webkit.org/public/v3/components/commit-log-viewer.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (231714 => 231715)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-05-11 19:22:34 UTC (rev 231714)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-05-11 20:15:08 UTC (rev 231715)
@@ -1,3 +1,17 @@
+2018-05-10  Dewei Zhu  
+
+CommitLogViewer._preceedingCommit should not always be null
+https://bugs.webkit.org/show_bug.cgi?id=185540
+
+Reviewed by Ryosuke Niwa.
+
+Fix the bug introduced in r227746 that CommitLogViewer._preceedingCommit is always null.
+
+* browser-tests/index.html: Fix expected measurement-set url.
+* public/v3/components/commit-log-viewer.js:
+(CommitLogViewer.prototype._fetchCommitLogs): CommitLogViewer._preceedingCommit should be set
+ when fetching for preceeding revision succeeds.
+
 2018-05-03  Dewei Zhu  
 
 Range bisector should check the commits for repositories without change in specified range.


Modified: trunk/Websites/perf.webkit.org/browser-tests/index.html (231714 => 231715)

--- trunk/Websites/perf.webkit.org/browser-tests/index.html	2018-05-11 19:22:34 UTC (rev 231714)
+++ trunk/Websites/perf.webkit.org/browser-tests/index.html	2018-05-11 20:15:08 UTC (rev 231715)
@@ -363,7 +363,7 @@
 
 respondWithSampleCluster(request, options)
 {
-expect(request.url).to.be('../data/measurement-set-1-1.json');
+expect(request.url).to.be('/data/measurement-set-1-1.json');
 expect(request.method).to.be('GET');
 request.resolve(this.makeSampleCluster(options));
 },


Modified: trunk/Websites/perf.webkit.org/public/v3/components/commit-log-viewer.js (231714 => 231715)

--- trunk/Websites/perf.webkit.org/public/v3/components/commit-log-viewer.js	2018-05-11 19:22:34 UTC (rev 231714)
+++ trunk/Websites/perf.webkit.org/public/v3/components/commit-log-viewer.js	2018-05-11 20:15:08 UTC (rev 231715)
@@ -36,7 +36,6 @@
 }
 
 let promise;
-let precedingCommitPromise;
 const fetchSingleCommit = !precedingRevision || precedingRevision == lastRevision;
 if (fetchSingleCommit) {
 promise = CommitLog.fetchForSingleRevision(repository, lastRevision).then((commits) => {
@@ -55,7 +54,7 @@
 CommitLog.fetchForSingleRevision(repository, precedingRevision).then((precedingCommit) => {
 if (this._fetchingPromise != promise)
 return;
-this._precedingCommit = null;
+this._precedingCommit = precedingCommit[0];
 })
 ]);
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [231593] trunk/Websites/perf.webkit.org

2018-05-09 Thread dewei_zhu
Title: [231593] trunk/Websites/perf.webkit.org








Revision 231593
Author dewei_...@apple.com
Date 2018-05-09 13:58:27 -0700 (Wed, 09 May 2018)


Log Message
Range bisector should check the commits for repositories without change in specified range.
https://bugs.webkit.org/show_bug.cgi?id=185269

Reviewed by Ryosuke Niwa.

For repositories without a change in the specified range, we still need to use them to filter commit
sets. Before this change, code does not apply filtering by those repositories against commit set. As
a result, commit sets with different commits for those repositories may be chosen as bisecting commit set.

* public/v3/commit-set-range-bisector.js: Updated the logic to verify range for repositories without
change in range.
(CommitSetRangeBisector.async.commitSetClosestToMiddleOfAllCommits):
* unit-tests/commit-set-range-bisector-tests.js: Added a unit test to guard against this change.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/commit-set-range-bisector.js
trunk/Websites/perf.webkit.org/unit-tests/commit-set-range-bisector-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (231592 => 231593)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-05-09 20:42:11 UTC (rev 231592)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-05-09 20:58:27 UTC (rev 231593)
@@ -1,3 +1,19 @@
+2018-05-03  Dewei Zhu  
+
+Range bisector should check the commits for repositories without change in specified range.
+https://bugs.webkit.org/show_bug.cgi?id=185269
+
+Reviewed by Ryosuke Niwa.
+
+For repositories without a change in the specified range, we still need to use them to filter commit
+sets. Before this change, code does not apply filtering by those repositories against commit set. As
+a result, commit sets with different commits for those repositories may be chosen as bisecting commit set.
+
+* public/v3/commit-set-range-bisector.js: Updated the logic to verify range for repositories without
+change in range.
+(CommitSetRangeBisector.async.commitSetClosestToMiddleOfAllCommits):
+* unit-tests/commit-set-range-bisector-tests.js: Added a unit test to guard against this change.
+
 2018-05-02  Dewei Zhu  
 
 Create analysis task should sync analysis task status after creation.


Modified: trunk/Websites/perf.webkit.org/public/v3/commit-set-range-bisector.js (231592 => 231593)

--- trunk/Websites/perf.webkit.org/public/v3/commit-set-range-bisector.js	2018-05-09 20:42:11 UTC (rev 231592)
+++ trunk/Websites/perf.webkit.org/public/v3/commit-set-range-bisector.js	2018-05-09 20:58:27 UTC (rev 231593)
@@ -16,18 +16,20 @@
 const commitRangeByRepository = new Map;
 const indexForAllTimelessCommitsWithOrderByRepository = new Map;
 const allCommitsWithCommitTime = [];
-const topLevelRepositoriesWithCommitChange = firstCommitSet.topLevelRepositories()
+const topLevelRepositoriesWithOrderedCommits = firstCommitSet.topLevelRepositories()
 .filter((repository) => {
 const firstCommit = firstCommitSet.commitForRepository(repository);
 const secondCommit = secondCommitSet.commitForRepository(repository);
-return firstCommit !== secondCommit && CommitLog.hasOrdering(firstCommit, secondCommit);
+return CommitLog.hasOrdering(firstCommit, secondCommit);
 });
 
-await Promise.all(topLevelRepositoriesWithCommitChange.map(async (repository) => {
+await Promise.all(topLevelRepositoriesWithOrderedCommits.map(async (repository) => {
 const firstCommit = firstCommitSet.commitForRepository(repository);
 const secondCommit = secondCommitSet.commitForRepository(repository);
 const [startCommit, endCommit] = CommitLog.orderTwoCommits(firstCommit, secondCommit);
-const commits = await CommitLog.fetchBetweenRevisions(repository, startCommit.revision(), endCommit.revision());
+
+const commits = startCommit === endCommit ? [startCommit] : await CommitLog.fetchBetweenRevisions(repository, startCommit.revision(), endCommit.revision());
+
 if (startCommit.hasCommitTime()) {
 allCommitsWithCommitTime.push(startCommit, ...commits);
 commitRangeByRepository.set(repository, (commit) =>


Modified: trunk/Websites/perf.webkit.org/unit-tests/commit-set-range-bisector-tests.js (231592 => 231593)

--- trunk/Websites/perf.webkit.org/unit-tests/commit-set-range-bisector-tests.js	2018-05-09 20:42:11 UTC (rev 231592)
+++ trunk/Websites/perf.webkit.org/unit-tests/commit-set-range-bisector-tests.js	2018-05-09 20:58:27 UTC (rev 231593)
@@ -140,6 +140,54 @@
 ];
 }
 
+function commitSetsWitCommitRollback()
+{
+return [
+CommitSet.ensureSingleton(11, {
+

[webkit-changes] [231296] trunk/Websites/perf.webkit.org

2018-05-03 Thread dewei_zhu
Title: [231296] trunk/Websites/perf.webkit.org








Revision 231296
Author dewei_...@apple.com
Date 2018-05-03 00:06:16 -0700 (Thu, 03 May 2018)


Log Message
Create analysis task should sync analysis task status after creation.
https://bugs.webkit.org/show_bug.cgi?id=185222

Reviewed by Ryosuke Niwa.

* public/v3/models/analysis-task.js:
(AnalysisTask.async.create): Fetch newly-created analysis task right about its creation.
(AnalysisTask):
* tools/js/measurement-set-analyzer.js:
(MeasurementSetAnalyzer.prototype.async._analyzeMeasurementSet): Adjust as 'AnalysisTask.create' now
returns an anlysis task instance.
(MeasurementSetAnalyzer):
* unit-tests/analysis-task-tests.js: Added a unit test for this change.
(async):
* unit-tests/measurement-set-analyzer-tests.js: Update unit tests accordingly.
Fix a typo in one previous unit test.
(async):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/models/analysis-task.js
trunk/Websites/perf.webkit.org/tools/js/measurement-set-analyzer.js
trunk/Websites/perf.webkit.org/unit-tests/analysis-task-tests.js
trunk/Websites/perf.webkit.org/unit-tests/measurement-set-analyzer-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (231295 => 231296)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-05-03 06:05:57 UTC (rev 231295)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-05-03 07:06:16 UTC (rev 231296)
@@ -1,3 +1,23 @@
+2018-05-02  Dewei Zhu  
+
+Create analysis task should sync analysis task status after creation.
+https://bugs.webkit.org/show_bug.cgi?id=185222
+
+Reviewed by Ryosuke Niwa.
+
+* public/v3/models/analysis-task.js:
+(AnalysisTask.async.create): Fetch newly-created analysis task right about its creation.
+(AnalysisTask):
+* tools/js/measurement-set-analyzer.js:
+(MeasurementSetAnalyzer.prototype.async._analyzeMeasurementSet): Adjust as 'AnalysisTask.create' now
+returns an anlysis task instance.
+(MeasurementSetAnalyzer):
+* unit-tests/analysis-task-tests.js: Added a unit test for this change.
+(async):
+* unit-tests/measurement-set-analyzer-tests.js: Update unit tests accordingly.
+Fix a typo in one previous unit test.
+(async):
+
 2018-05-01  Dewei Zhu  
 
 Write a script that detects chart changes by using v3 API.


Modified: trunk/Websites/perf.webkit.org/public/v3/models/analysis-task.js (231295 => 231296)

--- trunk/Websites/perf.webkit.org/public/v3/models/analysis-task.js	2018-05-03 06:05:57 UTC (rev 231295)
+++ trunk/Websites/perf.webkit.org/public/v3/models/analysis-task.js	2018-05-03 07:06:16 UTC (rev 231296)
@@ -303,7 +303,7 @@
 return results;
 }
 
-static create(name, startPoint, endPoint, testGroupName=null, repetitionCount=0)
+static async create(name, startPoint, endPoint, testGroupName=null, repetitionCount=0)
 {
 const parameters = {name, startRun: startPoint.id, endRun: endPoint.id};
 if (testGroupName) {
@@ -312,7 +312,8 @@
 parameters['repetitionCount'] = repetitionCount;
 parameters['testGroupName'] = testGroupName;
 }
-return PrivilegedAPI.sendRequest('create-analysis-task', parameters);
+const response = await PrivilegedAPI.sendRequest('create-analysis-task', parameters);
+return AnalysisTask.fetchById(response.taskId, true);
 }
 }
 


Modified: trunk/Websites/perf.webkit.org/tools/js/measurement-set-analyzer.js (231295 => 231296)

--- trunk/Websites/perf.webkit.org/tools/js/measurement-set-analyzer.js	2018-05-03 06:05:57 UTC (rev 231295)
+++ trunk/Websites/perf.webkit.org/tools/js/measurement-set-analyzer.js	2018-05-03 07:06:16 UTC (rev 231296)
@@ -103,9 +103,10 @@
 const summary = `Potential ${rangeWithMostSignificantChange.valueChangeSummary.changeLabel} on ${platform.name()} between ${CommitSet.diff(startCommitSet, endCommitSet)}`;
 
 // FIXME: The iteration count should be smarter than hard-coding.
-const response = await AnalysisTask.create(summary, rangeWithMostSignificantChange.startPoint,
+const analysisTask = await AnalysisTask.create(summary, rangeWithMostSignificantChange.startPoint,
 rangeWithMostSignificantChange.endPoint, 'Confirm', 4);
-this._logger.info(`Created analysis task with id "${response.taskId}" to confirm: "${summary}".`);
+
+this._logger.info(`Created analysis task with id "${analysisTask.id()}" to confirm: "${summary}".`);
 }
 }
 


Modified: trunk/Websites/perf.webkit.org/unit-tests/analysis-task-tests.js (231295 => 231296)

--- trunk/Websites/perf.webkit.org/unit-tests/analysis-task-tests.js	2018-05-03 06:05:57 UTC (rev 231295)
+++ trunk/Websites/perf.webkit.org/unit-tests/analysis-task-tests.js	2018-05-03 07:06:16 UTC (rev 231296)
@@ -323,6 +323,97 @@
 '22': { revision: 

[webkit-changes] [231225] trunk/Websites/perf.webkit.org

2018-05-02 Thread dewei_zhu
Title: [231225] trunk/Websites/perf.webkit.org








Revision 231225
Author dewei_...@apple.com
Date 2018-05-01 23:16:16 -0700 (Tue, 01 May 2018)


Log Message
Write a script that detects chart changes by using v3 API.
https://bugs.webkit.org/show_bug.cgi?id=184419

Reviewed by Ryosuke Niwa.

Added a script that detects chart changes and schedule confirming analysis task.

* browser-tests/async-task-tests.js: Added a unit test for 'AsyncTask'.
* browser-tests/index.html: Added import for 'AsyncTask' for testing.
* public/shared/statistics.js: Make 'findRangesForChangeDetectionsWithWelchsTTest' defaults to 0.99 one sided possibility.
(Statistics.new.this.findRangesForChangeDetectionsWithWelchsTTest):
* public/v3/async-task.js:
(AsyncTask.isAvailable): Helper function to determine whether AsyncTask is available or not as 'Worker' is
not available in nodejs.
(AsyncTask):
* public/v3/models/bug.js: Export as a module.
* public/v3/models/measurement-set.js:
(MeasurementSet.prototype._invokeSegmentationAlgorithm): Added a check to avoid using AsyncTask when running in NodeJs.
(MeasurementSet):
* server-tests/resources/common-operations.js: Added a helper function to assert certain exception is thrown.
(async.assertThrows):
* tools/js/measurement-set-analyzer.js: Added 'MeasurementSetAnalyzer' module for analyzing measurement set.
(MeasurementSetAnalyzer):
(MeasurementSetAnalyzer.prototype.async.analyzeOnce):
(MeasurementSetAnalyzer.measurementSetListForAnalysis):
(MeasurementSetAnalyzer.prototype.async._analyzeMeasurementSet):
* tools/js/v3-models.js: Added import for 'Bug' object.
* tools/run-analysis.js: Added this script to detect measurement set changes.
(main):
(async.analysisLoop):
* unit-tests/measurement-set-analyzer-tests.js: Added unit tests for 'MeasurementSetAnalyzer'.
* unit-tests/resources/mock-v3-models.js: Reset 'MeasurementSet._set' every time.
Update mock platform to include lastModifiedByMetric information.
(MockModels.inject):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/browser-tests/index.html
trunk/Websites/perf.webkit.org/public/shared/statistics.js
trunk/Websites/perf.webkit.org/public/v3/async-task.js
trunk/Websites/perf.webkit.org/public/v3/models/bug.js
trunk/Websites/perf.webkit.org/public/v3/models/measurement-set.js
trunk/Websites/perf.webkit.org/server-tests/resources/common-operations.js
trunk/Websites/perf.webkit.org/tools/js/v3-models.js
trunk/Websites/perf.webkit.org/unit-tests/resources/mock-v3-models.js


Added Paths

trunk/Websites/perf.webkit.org/browser-tests/async-task-tests.js
trunk/Websites/perf.webkit.org/tools/js/measurement-set-analyzer.js
trunk/Websites/perf.webkit.org/tools/run-analysis.js
trunk/Websites/perf.webkit.org/unit-tests/measurement-set-analyzer-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (231224 => 231225)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-05-02 05:51:33 UTC (rev 231224)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-05-02 06:16:16 UTC (rev 231225)
@@ -1,3 +1,40 @@
+2018-05-01  Dewei Zhu  
+
+Write a script that detects chart changes by using v3 API.
+https://bugs.webkit.org/show_bug.cgi?id=184419
+
+Reviewed by Ryosuke Niwa.
+
+Added a script that detects chart changes and schedule confirming analysis task.
+
+* browser-tests/async-task-tests.js: Added a unit test for 'AsyncTask'.
+* browser-tests/index.html: Added import for 'AsyncTask' for testing.
+* public/shared/statistics.js: Make 'findRangesForChangeDetectionsWithWelchsTTest' defaults to 0.99 one sided possibility.
+(Statistics.new.this.findRangesForChangeDetectionsWithWelchsTTest):
+* public/v3/async-task.js:
+(AsyncTask.isAvailable): Helper function to determine whether AsyncTask is available or not as 'Worker' is
+not available in nodejs.
+(AsyncTask):
+* public/v3/models/bug.js: Export as a module.
+* public/v3/models/measurement-set.js:
+(MeasurementSet.prototype._invokeSegmentationAlgorithm): Added a check to avoid using AsyncTask when running in NodeJs.
+(MeasurementSet):
+* server-tests/resources/common-operations.js: Added a helper function to assert certain exception is thrown.
+(async.assertThrows):
+* tools/js/measurement-set-analyzer.js: Added 'MeasurementSetAnalyzer' module for analyzing measurement set.
+(MeasurementSetAnalyzer):
+(MeasurementSetAnalyzer.prototype.async.analyzeOnce):
+(MeasurementSetAnalyzer.measurementSetListForAnalysis):
+(MeasurementSetAnalyzer.prototype.async._analyzeMeasurementSet):
+* tools/js/v3-models.js: Added import for 'Bug' object.
+* tools/run-analysis.js: Added this script to detect measurement set changes.
+(main):
+(async.analysisLoop):
+* unit-tests/measurement-set-analyzer-tests.js: Added unit tests for 

[webkit-changes] [231169] trunk/Websites/perf.webkit.org

2018-04-30 Thread dewei_zhu
Title: [231169] trunk/Websites/perf.webkit.org








Revision 231169
Author dewei_...@apple.com
Date 2018-04-30 14:06:05 -0700 (Mon, 30 Apr 2018)


Log Message
MeasurementSet._constructUrl should construct absolute url.
https://bugs.webkit.org/show_bug.cgi?id=185137

Reviewed by Ryosuke Niwa.

MeasurementSet._constructUrl should not construct an url with relative path.

* public/v3/models/measurement-set.js: Should use '/api/measurement-set...' and '/data/measurement-set-...'
for uncached and cached fetching.
* unit-tests/measurement-set-tests.js: Updated unit tests.
(const.set MeasurementSet):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/models/measurement-set.js
trunk/Websites/perf.webkit.org/unit-tests/measurement-set-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (231168 => 231169)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-04-30 20:56:39 UTC (rev 231168)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-04-30 21:06:05 UTC (rev 231169)
@@ -1,3 +1,17 @@
+2018-04-30  Dewei Zhu  
+
+MeasurementSet._constructUrl should construct absolute url.
+https://bugs.webkit.org/show_bug.cgi?id=185137
+
+Reviewed by Ryosuke Niwa.
+
+MeasurementSet._constructUrl should not construct an url with relative path.
+
+* public/v3/models/measurement-set.js: Should use '/api/measurement-set...' and '/data/measurement-set-...'
+for uncached and cached fetching.
+* unit-tests/measurement-set-tests.js: Updated unit tests.
+(const.set MeasurementSet):
+
 2018-04-26  Dewei Zhu  
 
 Extend create-analysis-test API to be able to create with confirming test group.


Modified: trunk/Websites/perf.webkit.org/public/v3/models/measurement-set.js (231168 => 231169)

--- trunk/Websites/perf.webkit.org/public/v3/models/measurement-set.js	2018-04-30 20:56:39 UTC (rev 231168)
+++ trunk/Websites/perf.webkit.org/public/v3/models/measurement-set.js	2018-04-30 21:06:05 UTC (rev 231169)
@@ -94,10 +94,10 @@
 _constructUrl(useCache, clusterEndTime)
 {
 if (!useCache) {
-return `../api/measurement-set?platform=${this._platformId}=${this._metricId}`;
+return `/api/measurement-set?platform=${this._platformId}=${this._metricId}`;
 }
 var url;
-url = ""
+url = ""
 if (clusterEndTime)
 url += '-' + +clusterEndTime;
 url += '.json';


Modified: trunk/Websites/perf.webkit.org/unit-tests/measurement-set-tests.js (231168 => 231169)

--- trunk/Websites/perf.webkit.org/unit-tests/measurement-set-tests.js	2018-04-30 20:56:39 UTC (rev 231168)
+++ trunk/Websites/perf.webkit.org/unit-tests/measurement-set-tests.js	2018-04-30 21:06:05 UTC (rev 231169)
@@ -41,7 +41,7 @@
 callCount++;
 });
 assert.equal(requests.length, 1);
-assert.equal(requests[0].url, '../data/measurement-set-1-1.json');
+assert.equal(requests[0].url, '/data/measurement-set-1-1.json');
 
 requests[0].resolve({
 'clusterStart': 94668480,
@@ -67,7 +67,7 @@
 let callCount = 0;
 set.fetchBetween(1000, 2000, () => callCount++);
 assert.equal(requests.length, 1);
-assert.equal(requests[0].url, '../data/measurement-set-1-1.json');
+assert.equal(requests[0].url, '/data/measurement-set-1-1.json');
 assert.equal(callCount, 0);
 });
 
@@ -77,7 +77,7 @@
 set.fetchBetween(1000, 2000, () => callCount++);
 assert.equal(requests.length, 1);
 assert.equal(callCount, 0);
-assert.equal(requests[0].url, '../data/measurement-set-1-1.json');
+assert.equal(requests[0].url, '/data/measurement-set-1-1.json');
 set.fetchBetween(2000, 3000, () => callCount++);
 assert.equal(requests.length, 1);
 assert.equal(callCount, 0);
@@ -88,7 +88,7 @@
 let callCount = 0;
 const promise = set.fetchBetween(2000, 3000, () => callCount++);
 assert.equal(requests.length, 1);
-assert.equal(requests[0].url, '../data/measurement-set-1-1.json');
+assert.equal(requests[0].url, '/data/measurement-set-1-1.json');
 
 requests[0].resolve({
 'clusterStart': 1000,
@@ -112,7 +112,7 @@
 let callCount = 0;
 const promise = set.fetchBetween(1000, 3000, () => callCount++);
 assert.equal(requests.length, 1);
-assert.equal(requests[0].url, '../data/measurement-set-1-1.json');
+assert.equal(requests[0].url, '/data/measurement-set-1-1.json');
 
 requests[0].resolve({
 'clusterStart': 1000,
@@ -128,7 +128,7 @@
 return waitForMeasurementSet().then(() => {
 assert.equal(callCount, 1);
 

[webkit-changes] [231087] trunk/Websites/perf.webkit.org

2018-04-27 Thread dewei_zhu
Title: [231087] trunk/Websites/perf.webkit.org








Revision 231087
Author dewei_...@apple.com
Date 2018-04-26 23:22:00 -0700 (Thu, 26 Apr 2018)


Log Message
Extend create-analysis-test API to be able to create with confirming test group.
https://bugs.webkit.org/show_bug.cgi?id=184958

Reviewed by Ryosuke Niwa.

Extend create-analysis-test API to be able to create an analysis task with confirming test group.
Update create analysis task UI in chart pane to adapt this new API.
Refactored '/privileged-api/create-test-group' API to share some creating test group logic with '/privileged-api/create-analysis-task' API.
Moved the shared logic to commit-sets-helpers.php.

* public/api/analysis-tasks.php: Use 'require_once' instead of 'require'.
* public/include/commit-sets-helpers.php: Added.
(create_test_group_and_build_requests): A helper function that creates test group and build requests for a analysis
task. In long term, this should be a class to avoid passing long argument list around.
(insert_commit_sets_and_construct_configuration_list): Based on commit sets returns build and test configurations.
(insert_build_request_for_configuration): Insert build requests based on configuration.
(commit_sets_from_revision_sets): Returns commit sets from given revision set list.
* public/privileged-api/create-analysis-task.php: Added the ability to create analysis task with confirming test
groups when repetition count is specified.
* public/privileged-api/create-test-group.php: Moved shared function to commit-sets-helpers.php.
* public/v3/models/analysis-task.js:
(AnalysisTask.create): Instead of accepting run ids, it now accepts points and test group name and confirming iterations.
It will conditionally add test group information into parameter when confirming iterations is a positive number.
(AnalysisTask):
* public/v3/models/commit-set.js:
(CommitSet.revisionSetsFromCommitSets): Move 'TestGroup._revisionSetsFromCommitSets' since CommitSet class is more
appropriate place and it will be shared by both TestGroup and AnalysisTask
(CommitSet):
* public/v3/models/test-group.js:
(TestGroup.createWithTask): Adapt 'CommitSet.revisionSetsFromCommitSets'.
(TestGroup.createWithCustomConfiguration): Adapt 'CommitSet.revisionSetsFromCommitSets'.
(TestGroup.createAndRefetchTestGroups): Adapt 'CommitSet.revisionSetsFromCommitSets'.
(TestGroup._revisionSetsFromCommitSets): Deleted and moved to 'CommitSet.revisionSetsFromCommitSets'.
* public/v3/pages/chart-pane.js:
(ChartPane.prototype.didConstructShadowTree): Added the logic to disable options when checkbox for creating confirming
test group is unchecked.
(ChartPane.prototype._analyzeRange): Conditionally create confirming test group from UI.
(ChartPane.cssTemplate):
* server-tests/privileged-api-create-analysis-task-tests.js: Added unit tests. Added a unit test for 'NodePrivilegedAPI'.
* unit-tests/analysis-task-tests.js: Added unit tests.
* unit-tests/commit-set-tests.js: Added unit test for 'CommitSet.revisionSetsFromCommitSets'.
* unit-tests/resources/mock-remote-api.js: Reset csrf token when BrowserPrivilegedAPI is used.
(MockRemoteAPI.inject):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/api/analysis-tasks.php
trunk/Websites/perf.webkit.org/public/privileged-api/create-analysis-task.php
trunk/Websites/perf.webkit.org/public/privileged-api/create-test-group.php
trunk/Websites/perf.webkit.org/public/v3/models/analysis-task.js
trunk/Websites/perf.webkit.org/public/v3/models/commit-set.js
trunk/Websites/perf.webkit.org/public/v3/models/test-group.js
trunk/Websites/perf.webkit.org/public/v3/pages/chart-pane.js
trunk/Websites/perf.webkit.org/server-tests/privileged-api-create-analysis-task-tests.js
trunk/Websites/perf.webkit.org/unit-tests/analysis-task-tests.js
trunk/Websites/perf.webkit.org/unit-tests/commit-set-tests.js
trunk/Websites/perf.webkit.org/unit-tests/resources/mock-remote-api.js


Added Paths

trunk/Websites/perf.webkit.org/public/include/commit-sets-helpers.php




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (231086 => 231087)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-04-27 04:18:32 UTC (rev 231086)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-04-27 06:22:00 UTC (rev 231087)
@@ -1,3 +1,49 @@
+2018-04-26  Dewei Zhu  
+
+Extend create-analysis-test API to be able to create with confirming test group.
+https://bugs.webkit.org/show_bug.cgi?id=184958
+
+Reviewed by Ryosuke Niwa.
+
+Extend create-analysis-test API to be able to create an analysis task with confirming test group.
+Update create analysis task UI in chart pane to adapt this new API.
+Refactored '/privileged-api/create-test-group' API to share some creating test group logic with '/privileged-api/create-analysis-task' API.
+Moved the shared logic to commit-sets-helpers.php.
+
+* public/api/analysis-tasks.php: Use 'require_once' instead of 

[webkit-changes] [230960] trunk/Websites/perf.webkit.org

2018-04-24 Thread dewei_zhu
Title: [230960] trunk/Websites/perf.webkit.org








Revision 230960
Author dewei_...@apple.com
Date 2018-04-24 10:17:42 -0700 (Tue, 24 Apr 2018)


Log Message
Tool scripts should not use PrivilegedAPI from 'public/v3/privileged-api.js'.
https://bugs.webkit.org/show_bug.cgi?id=184766

Reviewed by Ryosuke Niwa.

For tools, we should not use PrivilegedAPI for tools as current PrivilegedAPI
is used by UI and it is unnecessary to generate CSRF token for tools.
Will post a followup patch that creates a PrivilegedAPI used by tools.
Make a change on TestServer.inject and MockRemoteAPI.inject to allow specifying
BrowserPrivilegedAPI or NodePrivilegedAPI in the test. Currently defaults to
BrowserPrivilegedAPI as this is the test behavior before this change.

* server-tests/resources/common-operations.js: Allow passing type of privileged api
information to TestServer.inject.
* server-tests/resources/test-server.js: Conditionally inject PrivilegedAPI based on
type of privileged api.
(TestServer.prototype.inject):
(TestServer):
* server-tests/tools-buildbot-triggerable-tests.js: Updated 'prepareServerTest' invocation.
* server-tests/tools-os-build-fetcher-tests.js: Updated 'prepareServerTest' invocation.
* server-tests/tools-sync-buildbot-integration-tests.js: Temporarily injecting
BrowserPrivilegedAPI for mocking UploadedFile. The actual script does not rely on
BrowserPrivilegedAPI at all.
(async.createTestGroupWihPatch):
(beforeEach):
* tools/js/privileged-api.js: Added NodePrivilegedAPI
(NodePrivilegedAPI.prototype.sendRequest):
(NodePrivilegedAPI.configure): Configure the slave name and password.
(NodePrivilegedAPI):
* tools/js/v3-models.js: Removed the import of PrivilegedAPI.
* unit-tests/privileged-api-tests.js:. Added unit tests for NodePrivilegedAPI.
* unit-tests/resources/mock-remote-api.js: Conditionally inject PrivilegedAPI based on
the type of privileged api.
(MockRemoteAPI.inject):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/server-tests/resources/common-operations.js
trunk/Websites/perf.webkit.org/server-tests/resources/test-server.js
trunk/Websites/perf.webkit.org/server-tests/tools-buildbot-triggerable-tests.js
trunk/Websites/perf.webkit.org/server-tests/tools-os-build-fetcher-tests.js
trunk/Websites/perf.webkit.org/server-tests/tools-sync-buildbot-integration-tests.js
trunk/Websites/perf.webkit.org/tools/js/v3-models.js
trunk/Websites/perf.webkit.org/unit-tests/privileged-api-tests.js
trunk/Websites/perf.webkit.org/unit-tests/resources/mock-remote-api.js


Added Paths

trunk/Websites/perf.webkit.org/tools/js/privileged-api.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (230959 => 230960)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-04-24 16:39:18 UTC (rev 230959)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-04-24 17:17:42 UTC (rev 230960)
@@ -1,5 +1,42 @@
 2018-04-23  Dewei Zhu  
 
+Tool scripts should not use PrivilegedAPI from 'public/v3/privileged-api.js'.
+https://bugs.webkit.org/show_bug.cgi?id=184766
+
+Reviewed by Ryosuke Niwa.
+
+For tools, we should not use PrivilegedAPI for tools as current PrivilegedAPI
+is used by UI and it is unnecessary to generate CSRF token for tools.
+Will post a followup patch that creates a PrivilegedAPI used by tools.
+Make a change on TestServer.inject and MockRemoteAPI.inject to allow specifying
+BrowserPrivilegedAPI or NodePrivilegedAPI in the test. Currently defaults to
+BrowserPrivilegedAPI as this is the test behavior before this change.
+
+* server-tests/resources/common-operations.js: Allow passing type of privileged api
+information to TestServer.inject.
+* server-tests/resources/test-server.js: Conditionally inject PrivilegedAPI based on
+type of privileged api.
+(TestServer.prototype.inject):
+(TestServer):
+* server-tests/tools-buildbot-triggerable-tests.js: Updated 'prepareServerTest' invocation.
+* server-tests/tools-os-build-fetcher-tests.js: Updated 'prepareServerTest' invocation.
+* server-tests/tools-sync-buildbot-integration-tests.js: Temporarily injecting
+BrowserPrivilegedAPI for mocking UploadedFile. The actual script does not rely on
+BrowserPrivilegedAPI at all.
+(async.createTestGroupWihPatch):
+(beforeEach):
+* tools/js/privileged-api.js: Added NodePrivilegedAPI
+(NodePrivilegedAPI.prototype.sendRequest):
+(NodePrivilegedAPI.configure): Configure the slave name and password.
+(NodePrivilegedAPI):
+* tools/js/v3-models.js: Removed the import of PrivilegedAPI.
+* unit-tests/privileged-api-tests.js:. Added unit tests for NodePrivilegedAPI.
+* unit-tests/resources/mock-remote-api.js: Conditionally inject PrivilegedAPI based on
+the type of privileged api.
+(MockRemoteAPI.inject):
+
+2018-04-23  Dewei Zhu 

[webkit-changes] [230940] trunk/Websites/perf.webkit.org

2018-04-23 Thread dewei_zhu
Title: [230940] trunk/Websites/perf.webkit.org








Revision 230940
Author dewei_...@apple.com
Date 2018-04-23 19:34:11 -0700 (Mon, 23 Apr 2018)


Log Message
Revision information returned by querying measurement set api with analysis task id should contain commit order.
https://bugs.webkit.org/show_bug.cgi?id=184902

Reviewed by Ryosuke Niwa

This is a bug fix for r230719 which does not cover the case while querying `measurement-set.php?analysisTask=$task_id`

* public/api/measurement-set.php: AnalysisResultsFetcher.fetch_commits results should contains commit order.
* server-tests/api-measurement-set-tests.js: Added unit test for this change.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/api/measurement-set.php
trunk/Websites/perf.webkit.org/server-tests/api-measurement-set-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (230939 => 230940)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-04-24 02:30:20 UTC (rev 230939)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-04-24 02:34:11 UTC (rev 230940)
@@ -1,3 +1,15 @@
+2018-04-23  Dewei Zhu  
+
+Revision information returned by querying measurement set api with analysis task id should contain commit order.
+https://bugs.webkit.org/show_bug.cgi?id=184902
+
+Reviewed by Ryosuke Niwa.
+
+This is a bug fix for r230719 which does not cover the case while querying `measurement-set.php?analysisTask=$task_id`
+
+* public/api/measurement-set.php: AnalysisResultsFetcher.fetch_commits results should contains commit order.
+* server-tests/api-measurement-set-tests.js: Added unit test for this change.
+
 2018-04-19  Dewei Zhu  
 
 Add a bisect button to automatically schedule bisecting A/B tasks.


Modified: trunk/Websites/perf.webkit.org/public/api/measurement-set.php (230939 => 230940)

--- trunk/Websites/perf.webkit.org/public/api/measurement-set.php	2018-04-24 02:30:20 UTC (rev 230939)
+++ trunk/Websites/perf.webkit.org/public/api/measurement-set.php	2018-04-24 02:34:11 UTC (rev 230940)
@@ -262,7 +262,7 @@
 
 function fetch_commits()
 {
-$query = $this->db->query('SELECT commit_id, commit_build, commit_repository, commit_revision, commit_time
+$query = $this->db->query('SELECT commit_id, commit_build, commit_repository, commit_revision, commit_order, commit_time
 FROM commits, build_commits, build_requests, analysis_test_groups
 WHERE commit_id = build_commit AND commit_build = request_build
 AND request_group = testgroup_id AND testgroup_task = $1', array($this->task_id));
@@ -269,7 +269,7 @@
 while ($row = $this->db->fetch_next_row($query)) {
 $commit_time = Database::to_js_time($row['commit_time']);
 array_push(array_ensure_item_has_array($this->build_to_commits, $row['commit_build']),
-array($row['commit_id'], $row['commit_repository'], $row['commit_revision'], $commit_time));
+array($row['commit_id'], $row['commit_repository'], $row['commit_revision'], $row['commit_order'], $commit_time));
 }
 }
 


Modified: trunk/Websites/perf.webkit.org/server-tests/api-measurement-set-tests.js (230939 => 230940)

--- trunk/Websites/perf.webkit.org/server-tests/api-measurement-set-tests.js	2018-04-24 02:30:20 UTC (rev 230939)
+++ trunk/Websites/perf.webkit.org/server-tests/api-measurement-set-tests.js	2018-04-24 02:34:11 UTC (rev 230940)
@@ -500,4 +500,49 @@
 });
 });
 
+async function reportAfterAddingBuilderAndAggregatorsWithResponse(report)
+{
+await addBuilderForReport(report);
+const db = TestServer.database();
+await Promise.all([
+db.insert('aggregators', {name: 'Arithmetic'}),
+db.insert('aggregators', {name: 'Geometric'}),
+]);
+return await TestServer.remoteAPI().postJSON('/api/report/', [report]);
+}
+
+const reportWithBuildRequest = {
+"buildNumber": "123",
+"buildTime": "2013-02-28T10:12:03.388304",
+"builderName": "someBuilder",
+"builderPassword": "somePassword",
+"platform": "Mountain Lion",
+"buildRequest": "700",
+"tests": {
+"test": {
+"metrics": {"FrameRate": { "current": [[[0, 4], [100, 5], [205, 3]]] }}
+},
+},
+"revisions": {
+"macOS": {
+"revision": "10.8.2 12C60"
+},
+"WebKit": {
+"revision": "141977",
+"timestamp": "2013-02-06T08:55:20.9Z"
+}
+}
+};
+
+it("should allow to report a build request", async () => {
+await MockData.addMockData(TestServer.database());
+let response = await reportAfterAddingBuilderAndAggregatorsWithResponse(reportWithBuildRequest);
+assert.equal(response['status'], 'OK');
+   

[webkit-changes] [230821] trunk/Websites/perf.webkit.org

2018-04-19 Thread dewei_zhu
Title: [230821] trunk/Websites/perf.webkit.org








Revision 230821
Author dewei_...@apple.com
Date 2018-04-19 15:16:23 -0700 (Thu, 19 Apr 2018)


Log Message
Add a bisect button to automatically schedule bisecting A/B tasks.
https://bugs.webkit.org/show_bug.cgi?id=183888

Reviewed by Ryosuke Niwa.

Extended AnalysisTask's ability to figure out bisecting A/B tasks based on existing data points and test groups.
Updated analysis page UI to show bisect button which will only appear when the middle commit set of the range in
test group can be found.

Finding middle commit set algorithm is described as follows:
1. Find all commits from multiple repositories among the ranges specified by two commit sets in test group. In
the meanwhile, merge all commits that have commit time into a single list. For commits only have commit order,
put those commits into separate lists.
2. Filter all the available commit sets in current analysis task by keeping the ones have exact repositories
as the two commit sets in specified test group, and every commit of a commit set is in side the commit range.
After filtering the commit sets, sort the remaining ones and only keep one commit set if multiple commit sets
are equal to each other.
3. Among commits processed by step 2, find the commit sets that have the commit which is closest to the middle of
all commits that have commit time created from step 1.
4. Among commits processed by step 3, find the commit sets that have the commit which is closest to the middle of
commits that only have commit order and categorized by repository. We have to iterate through repository as commit
order is not granted to be comparable between different repositories.
5. If more than one commit sets are found, choose the middle commit set.

* public/v3/commit-set-range-bisector.js: Added.
(CommitSetRangeBisector.async.commitSetClosestToMiddleOfAllCommits): Instead of naively returning the middle of
existing commit set array, this function selects a bisect bisection points that is closest to actually middle of
the revision range based on all revisions reported to performance dashboard.
(CommitSetRangeBisector._findCommitSetsWithinRange): Helper function to find commit sets those are in specified range.
(CommitSetRangeBisector._orderCommitSetsByTimeAndOrderThenDeduplicate): Helper function to sort and deduplicate commit sets.
(CommitSetRangeBisector._closestCommitSetsToBisectingCommitByTime): Helper function to find the commit sets those
are closest to the middle of among all the commits in the range that have commit time.
(CommitSetRangeBisector._findCommitSetsClosestToMiddleOfCommitsWithOrder): Helper function which goes through all
repositories the commit of which has commit order, and find the commit sets those are closest to the middle of
commits for each repository.
(CommitSetRangeBisector._buildCommitToCommitSetMap): Helper function to builder mapping from a commit to commit
sets those contain this commit.
(CommitSetRangeBisector._findCommitClosestToMiddleIndex): Helper function to find closest commit to the middle of index.
(CommitSetRangeBisector):
* public/v3/index.html: Imports 'public/v3/commit-set-range-bisector.js'.
* public/v3/models/analysis-task.js:
(AnalysisTask.prototype.async.commitSetsFromTestGroupsAndMeasurementSet): Aggregates all existing commit sets in
test groups of current analysis tasks.
* public/v3/models/commit-log.js:
(CommitLog.prototype.hasCommitTime): A helper function determine whether a commit has a commit time. For commit
that does not have time, server will return commit time as zero. As it is unrealistic for a commit has commit time
0, it would be safe to assume a valid commit time is greater than 0.
(CommitLog.prototype.hasCommitOrder): Returns whether a commit has a commit oder.
(CommitLog.hasOrdering): Determine whether we can order two commits by commit time or commit order.
(CommitLog.orderTwoCommits): Order two commits incrementally.
* public/v3/models/commit-set.js:
(CommitSet.prototype.hasSameRepositories): A helper function to determine whether a commit set has same repositories
as current repository.
(CommitSet.containsRootOrPatchOrOwnedCommit): A helper function to determine whether current commit set has root,
patch or owned commit.
(CommitSet.commitForRepository): This function defined twice identically, remove one of them.
* public/v3/models/test-group.js: Make '_computeRequestedCommitSets' a static function as it does not use any
instance variables.
* public/v3/pages/analysis-task-page.js: Added bisect button.
(AnalysisTaskTestGroupPane):
(AnalysisTaskTestGroupPane.prototype.didConstructShadowTree):
(AnalysisTaskTestGroupPane.prototype.setTestGroups): Update 'setTestGroups' to update _bisectingCommitSetByTestGroup
when the test groups changes.
(AnalysisTaskTestGroupPane.prototype._renderCurrentTestGroup): Added code to conditionally show bisect button.
Bisect button will only show when there is a middle commit set for that test group.

[webkit-changes] [230719] trunk/Websites/perf.webkit.org

2018-04-17 Thread dewei_zhu
Title: [230719] trunk/Websites/perf.webkit.org








Revision 230719
Author dewei_...@apple.com
Date 2018-04-17 10:23:18 -0700 (Tue, 17 Apr 2018)


Log Message
Commit order should always be returned by api.
https://bugs.webkit.org/show_bug.cgi?id=184674

Reviewed by Ryosuke Niwa.

Commit order sometimes missing in CommitLog object before this change.
This makes ordering commits logic become unnecessarily complicate.
This change will ensure commit order is always fetched for a CommitLog object.
Change measurement-set API to contain commit order information.
Change commits API to contain commit order information.

* public/api/measurement-set.php: Includes commit order information.
* public/include/commit-log-fetcher.php:
* public/v3/models/commit-log.js: Added a function to return order information.
(CommitLog.prototype.updateSingleton): This function should update commit order.
(CommitLog.prototype.order): Returns the order of commit.
* public/v3/models/commit-set.js:
(MeasurementCommitSet): Update MeasurementCommitSet to contain commit order information when creating CommitLog object.
* server-tests/api-measurement-set-tests.js: Updated unit tests.
* unit-tests/analysis-task-tests.js: Update unit tests to contain commit order information in mock data.
(measurementCluster):
* unit-tests/commit-log-tests.js: Added unit tests for CommitLog.order.
* unit-tests/commit-set-tests.js: Added commit order in MeasurementCommitSet.
* unit-tests/measurement-adaptor-tests.js: Updated unit tests to contain commit order information in mock data.
* unit-tests/measurement-set-tests.js: Updated unit tests to contain commit order information in mock data.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/api/measurement-set.php
trunk/Websites/perf.webkit.org/public/include/commit-log-fetcher.php
trunk/Websites/perf.webkit.org/public/v3/models/commit-log.js
trunk/Websites/perf.webkit.org/public/v3/models/commit-set.js
trunk/Websites/perf.webkit.org/server-tests/api-measurement-set-tests.js
trunk/Websites/perf.webkit.org/unit-tests/analysis-task-tests.js
trunk/Websites/perf.webkit.org/unit-tests/commit-log-tests.js
trunk/Websites/perf.webkit.org/unit-tests/commit-set-tests.js
trunk/Websites/perf.webkit.org/unit-tests/measurement-adaptor-tests.js
trunk/Websites/perf.webkit.org/unit-tests/measurement-set-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (230718 => 230719)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-04-17 17:13:01 UTC (rev 230718)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-04-17 17:23:18 UTC (rev 230719)
@@ -1,3 +1,31 @@
+2018-04-16  Dewei Zhu  
+
+Commit order should always be returned by api.
+https://bugs.webkit.org/show_bug.cgi?id=184674
+
+Reviewed by Ryosuke Niwa.
+
+Commit order sometimes missing in CommitLog object before this change.
+This makes ordering commits logic become unnecessarily complicate.
+This change will ensure commit order is always fetched for a CommitLog object.
+Change measurement-set API to contain commit order information.
+Change commits API to contain commit order information.
+
+* public/api/measurement-set.php: Includes commit order information.
+* public/include/commit-log-fetcher.php:
+* public/v3/models/commit-log.js: Added a function to return order information.
+(CommitLog.prototype.updateSingleton): This function should update commit order.
+(CommitLog.prototype.order): Returns the order of commit.
+* public/v3/models/commit-set.js:
+(MeasurementCommitSet): Update MeasurementCommitSet to contain commit order information when creating CommitLog object.
+* server-tests/api-measurement-set-tests.js: Updated unit tests.
+* unit-tests/analysis-task-tests.js: Update unit tests to contain commit order information in mock data.
+(measurementCluster):
+* unit-tests/commit-log-tests.js: Added unit tests for CommitLog.order.
+* unit-tests/commit-set-tests.js: Added commit order in MeasurementCommitSet.
+* unit-tests/measurement-adaptor-tests.js: Updated unit tests to contain commit order information in mock data.
+* unit-tests/measurement-set-tests.js: Updated unit tests to contain commit order information in mock data.
+
 2018-04-15  Ryosuke Niwa  
 
 Make it possible to hide some repository groups


Modified: trunk/Websites/perf.webkit.org/public/api/measurement-set.php (230718 => 230719)

--- trunk/Websites/perf.webkit.org/public/api/measurement-set.php	2018-04-17 17:13:01 UTC (rev 230718)
+++ trunk/Websites/perf.webkit.org/public/api/measurement-set.php	2018-04-17 17:23:18 UTC (rev 230719)
@@ -170,7 +170,7 @@
 function execute_query($config_id) {
 return $this->db->query('
 SELECT test_runs.*, build_id, build_number, build_builder, build_time,
-

[webkit-changes] [230441] trunk/Websites/perf.webkit.org

2018-04-09 Thread dewei_zhu
Title: [230441] trunk/Websites/perf.webkit.org








Revision 230441
Author dewei_...@apple.com
Date 2018-04-09 09:27:52 -0700 (Mon, 09 Apr 2018)


Log Message
Added 'CommitSet.diff' which will be shared between multiple independent incoming changes.
https://bugs.webkit.org/show_bug.cgi?id=184368

Reviewed by Ryosuke Niwa.

'CommitSet.diff' will be used in multiple independent incoming changes.
It would be easier to make this a separate change to parallelize the changes depends on this API.

* public/v3/models/commit-set.js:
(CommitSet.prototype.createNameWithoutCollision): Moved from 'AnalysisTaskPage' and make it more generic.
(CommitSet.prototype.diff): Describe differences between 2 commit sets including commit, root and patch differences.
* public/v3/pages/analysis-task-page.js: Move 'AnalysisTaskPage._createRetryNameForTestGroup' to CommitSet in a more generic form.
(AnalysisTaskPage.prototype._retryCurrentTestGroup): Use 'CommitSet.withoutRootPatchOrOwnedCommit' instead.
(AnalysisTaskPage.prototype._createRetryNameForTestGroup): Moved to CommitSet in a more generic form.
* unit-tests/commit-set-tests.js: Added unit tests for 'CommitSet.diff'.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/models/commit-set.js
trunk/Websites/perf.webkit.org/public/v3/pages/analysis-task-page.js
trunk/Websites/perf.webkit.org/unit-tests/commit-set-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (230440 => 230441)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-04-09 16:10:52 UTC (rev 230440)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-04-09 16:27:52 UTC (rev 230441)
@@ -1,3 +1,21 @@
+2018-04-06  Dewei Zhu  
+
+Added 'CommitSet.diff' which will be shared between multiple independent incoming changes.
+https://bugs.webkit.org/show_bug.cgi?id=184368
+
+Reviewed by Ryosuke Niwa.
+
+'CommitSet.diff' will be used in multiple independent incoming changes.
+It would be easier to make this a separate change to parallelize the changes depends on this API.
+
+* public/v3/models/commit-set.js:
+(CommitSet.prototype.createNameWithoutCollision): Moved from 'AnalysisTaskPage' and make it more generic.
+(CommitSet.prototype.diff): Describe differences between 2 commit sets including commit, root and patch differences.
+* public/v3/pages/analysis-task-page.js: Move 'AnalysisTaskPage._createRetryNameForTestGroup' to CommitSet in a more generic form.
+(AnalysisTaskPage.prototype._retryCurrentTestGroup): Use 'CommitSet.withoutRootPatchOrOwnedCommit' instead.
+(AnalysisTaskPage.prototype._createRetryNameForTestGroup): Moved to CommitSet in a more generic form.
+* unit-tests/commit-set-tests.js: Added unit tests for 'CommitSet.diff'.
+
 2018-04-05  Dewei Zhu  
 
 Fix a bug introduced in r230295 that A/B test result is not shown.


Modified: trunk/Websites/perf.webkit.org/public/v3/models/commit-set.js (230440 => 230441)

--- trunk/Websites/perf.webkit.org/public/v3/models/commit-set.js	2018-04-09 16:10:52 UTC (rev 230440)
+++ trunk/Websites/perf.webkit.org/public/v3/models/commit-set.js	2018-04-09 16:27:52 UTC (rev 230441)
@@ -145,6 +145,82 @@
 }
 return false;
 }
+
+static createNameWithoutCollision(name, existingNameSet)
+{
+console.assert(existingNameSet instanceof Set);
+if (!existingNameSet.has(name))
+return name;
+const nameWithNumberMatch = name.match(/(.+?)\s*\(\s*(\d+)\s*\)\s*$/);
+let number = 1;
+if (nameWithNumberMatch) {
+name = nameWithNumberMatch[1];
+number = parseInt(nameWithNumberMatch[2]);
+}
+
+let newName;
+do {
+number++;
+newName = `${name} (${number})`;
+} while (existingNameSet.has(newName));
+
+return newName;
+}
+
+static diff(firstCommitSet, secondCommitSet)
+{
+console.assert(!firstCommitSet.equals(secondCommitSet));
+const allRepositories = new Set([...firstCommitSet.repositories(), ...secondCommitSet.repositories()]);
+const sortedRepositories = Repository.sortByNamePreferringOnesWithURL([...allRepositories]);
+const nameParts = [];
+const missingCommit = {label: () => 'none'};
+const missingPatch = {filename: () => 'none'};
+const makeNameGenerator = () => {
+const existingNameSet = new Set;
+return (name) => {
+const newName = CommitSet.createNameWithoutCollision(name, existingNameSet);
+existingNameSet.add(newName);
+return newName;
+}
+};
+
+for (const repository of sortedRepositories) {
+const firstCommit = firstCommitSet.commitForRepository(repository) || missingCommit;
+const secondCommit = 

[webkit-changes] [230322] trunk/Websites/perf.webkit.org

2018-04-05 Thread dewei_zhu
Title: [230322] trunk/Websites/perf.webkit.org








Revision 230322
Author dewei_...@apple.com
Date 2018-04-05 20:18:07 -0700 (Thu, 05 Apr 2018)


Log Message
Fix a bug introduced in r230295 that A/B test result is not shown.
https://bugs.webkit.org/show_bug.cgi?id=184350

Reviewed by Ryosuke Niwa.

result.label should be assigned in `TestGroup._computeRequestedCommitSets`.

* public/v3/models/test-group.js:
(TestGroup.prototype._computeRequestedCommitSets):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/models/test-group.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (230321 => 230322)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-04-06 03:10:20 UTC (rev 230321)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-04-06 03:18:07 UTC (rev 230322)
@@ -1,3 +1,15 @@
+2018-04-05  Dewei Zhu  
+
+Fix a bug introduced in r230295 that A/B test result is not shown.
+https://bugs.webkit.org/show_bug.cgi?id=184350
+
+Reviewed by Ryosuke Niwa.
+
+result.label should be assigned in `TestGroup._computeRequestedCommitSets`.
+
+* public/v3/models/test-group.js:
+(TestGroup.prototype._computeRequestedCommitSets):
+
 2018-03-29  Dewei Zhu  
 
 Added UI to show potential regressions in chart with t-testing against segmentations.


Modified: trunk/Websites/perf.webkit.org/public/v3/models/test-group.js (230321 => 230322)

--- trunk/Websites/perf.webkit.org/public/v3/models/test-group.js	2018-04-06 03:10:20 UTC (rev 230321)
+++ trunk/Websites/perf.webkit.org/public/v3/models/test-group.js	2018-04-06 03:18:07 UTC (rev 230322)
@@ -146,7 +146,7 @@
 if (beforeValues.length && afterValues.length) {
 const summary = metric.labelForDifference(beforeMean, afterMean, 'better', 'worse');
 result.changeType = summary.changeType;
-result.changeLabel = summary.changeLabel;
+result.label = summary.changeLabel;
 var isSignificant = Statistics.testWelchsT(beforeValues, afterValues);
 var significanceLabel = isSignificant ? 'significant' : 'insignificant';
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [230295] trunk/Websites/perf.webkit.org

2018-04-04 Thread dewei_zhu
Title: [230295] trunk/Websites/perf.webkit.org








Revision 230295
Author dewei_...@apple.com
Date 2018-04-04 21:49:21 -0700 (Wed, 04 Apr 2018)


Log Message
Added UI to show potential regressions in chart with t-testing against segmentations.
https://bugs.webkit.org/show_bug.cgi?id=184131

Reviewed by Ryosuke Niwa.

Added UI in the chart-pane so that user can use new option in trendline which not only
shows the segmentation, but also t-test against potential changes indicated by segmentation.

Fix a bug in AnalysisTaskPage that chart is not updated when change type of task changes.

* public/shared/statistics.js: Added a function to t-test certain range based on segmentation results.
(Statistics.supportedOneSideTTestProbabilities):
(Statistics.findRangesForChangeDetectionsWithWelchsTTest): The argument `segmentations`, every 2 items in the list defines
segmentation, that is why the index incremental is 2 in this funcion.
* public/v3/components/chart-pane-base.js: Will select the range if user clicks on a suggested annotation.
(ChartPaneBase.prototype.configure):
(ChartPaneBase.prototype._didClickAnnotation):
* public/v3/components/chart-styles.js:
(ChartStyles.annotationFillStyleForTask): Added 'annotationFillStyleForTask' to determine the fillStyle for annotation based on change type of a analysis task.
* public/v3/components/interactive-time-series-chart.js:
(InteractiveTimeSeriesChart.prototype._findAnnotation): Also need to search among suggested annotaions.
* public/v3/components/time-series-chart.js: Introduced 'suggested annotaion' which does not have an existing task and is suggested by t-test based on segmentation.
(TimeSeriesChart):
(TimeSeriesChart.prototype.setSuggestedAnnotations):
(TimeSeriesChart.prototype.allAnnotations): Returns both annotations with and without analysis task.
(TimeSeriesChart.prototype._layoutAnnotationBars): Should take all annotations in the calculation.
* public/v3/models/measurement-set.js:
(MeasurementSet.prototype.metricId): Returns metric id.
* public/v3/models/metric.js:
(Metric.prototype.summarizeForValues): Added helper function to summarize a given value
* public/v3/models/test-group.js:
(TestGroup.prototype.compareTestResults): Adapted to use 'Metric.summarizeForValues'.
* public/v3/pages/chart-pane.js: Added 'Segmentation with t-test analysis' to 'ChartTrendLineTypes'.
(ChartPane.prototype._renderTrendLinePopover):
(ChartPane.prototype.async._updateTrendLine): make it an async function.
* unit-tests/statistics-tests.js: Added unit tests for 'findRangesForChangeDetectionsWithWelchsTTest'.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/browser-tests/interactive-time-series-chart-tests.js
trunk/Websites/perf.webkit.org/browser-tests/time-series-chart-tests.js
trunk/Websites/perf.webkit.org/public/shared/statistics.js
trunk/Websites/perf.webkit.org/public/v3/components/chart-pane-base.js
trunk/Websites/perf.webkit.org/public/v3/components/chart-styles.js
trunk/Websites/perf.webkit.org/public/v3/components/interactive-time-series-chart.js
trunk/Websites/perf.webkit.org/public/v3/models/measurement-set.js
trunk/Websites/perf.webkit.org/public/v3/models/metric.js
trunk/Websites/perf.webkit.org/public/v3/models/test-group.js
trunk/Websites/perf.webkit.org/public/v3/pages/analysis-task-page.js
trunk/Websites/perf.webkit.org/public/v3/pages/chart-pane.js
trunk/Websites/perf.webkit.org/unit-tests/statistics-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (230294 => 230295)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-04-05 04:30:17 UTC (rev 230294)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-04-05 04:49:21 UTC (rev 230295)
@@ -1,3 +1,44 @@
+2018-03-29  Dewei Zhu  
+
+Added UI to show potential regressions in chart with t-testing against segmentations.
+https://bugs.webkit.org/show_bug.cgi?id=184131
+
+Reviewed by Ryosuke Niwa.
+
+Added UI in the chart-pane so that user can use new option in trendline which not only
+shows the segmentation, but also t-test against potential changes indicated by segmentation.
+
+Fix a bug in AnalysisTaskPage that chart is not updated when change type of task changes.
+
+* browser-tests/interactive-time-series-chart-tests.js: Fix a unit tests.
+* browser-tests/time-series-chart-tests.js: Fix a unit tests.
+* public/shared/statistics.js: Added a function to t-test certain range based on segmentation results.
+(Statistics.supportedOneSideTTestProbabilities):
+(Statistics.findRangesForChangeDetectionsWithWelchsTTest): The argument `segmentations`, every 2 items in the list defines 
+segmentation, that is why the index incremental is 2 in this funcion.
+* public/v3/components/chart-pane-base.js: Will select the range if user clicks on a suggested annotation.
+(ChartPaneBase.prototype.configure):
+

[webkit-changes] [229501] trunk/Websites/perf.webkit.org

2018-03-09 Thread dewei_zhu
Title: [229501] trunk/Websites/perf.webkit.org








Revision 229501
Author dewei_...@apple.com
Date 2018-03-09 20:44:56 -0800 (Fri, 09 Mar 2018)


Log Message
Create analysis task should use build time as fallback when commit time is not available.
https://bugs.webkit.org/show_bug.cgi?id=183309

Reviewed by Ryosuke Niwa.

Added the ability to schedule analysis task for the range without commit time.

* public/privileged-api/create-analysis-task.php: Use build time as fallback.
* server-tests/privileged-api-create-analysis-task-tests.js: Added a unit test for this change.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/privileged-api/create-analysis-task.php
trunk/Websites/perf.webkit.org/server-tests/privileged-api-create-analysis-task-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (229500 => 229501)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-03-10 03:53:41 UTC (rev 229500)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-03-10 04:44:56 UTC (rev 229501)
@@ -1,3 +1,15 @@
+2018-03-04  Dewei Zhu  
+
+Create analysis task should use build time as fallback when commit time is not available.
+https://bugs.webkit.org/show_bug.cgi?id=183309
+
+Reviewed by Ryosuke Niwa.
+
+Added the ability to schedule analysis task for the range without commit time.
+
+* public/privileged-api/create-analysis-task.php: Use build time as fallback.
+* server-tests/privileged-api-create-analysis-task-tests.js: Added a unit test for this change.
+
 2018-03-04  Aakash Jain  
 
 BuildbotBuildEntry for buildbot 0.9 uses incorrect buildrequestid


Modified: trunk/Websites/perf.webkit.org/public/privileged-api/create-analysis-task.php (229500 => 229501)

--- trunk/Websites/perf.webkit.org/public/privileged-api/create-analysis-task.php	2018-03-10 03:53:41 UTC (rev 229500)
+++ trunk/Websites/perf.webkit.org/public/privileged-api/create-analysis-task.php	2018-03-10 04:44:56 UTC (rev 229501)
@@ -88,12 +88,14 @@
 }
 
 function time_for_run($db, $run_id) {
-$result = $db->query_and_fetch_all('SELECT max(commit_time) as time
+$result = $db->query_and_fetch_all('SELECT max(commit_time) as time, max(build_time) as build_time
 FROM test_runs JOIN builds ON run_build = build_id
 JOIN build_commits ON commit_build = build_id
 JOIN commits ON build_commit = commit_id
 WHERE run_id = $1', array($run_id));
-return $result ? $result[0]['time'] : null;
+
+$first_result = array_get($result, 0, array());
+return $first_result['time'] ? $first_result['time'] : $first_result['build_time'];
 }
 
 main();


Modified: trunk/Websites/perf.webkit.org/server-tests/privileged-api-create-analysis-task-tests.js (229500 => 229501)

--- trunk/Websites/perf.webkit.org/server-tests/privileged-api-create-analysis-task-tests.js	2018-03-10 03:53:41 UTC (rev 229500)
+++ trunk/Websites/perf.webkit.org/server-tests/privileged-api-create-analysis-task-tests.js	2018-03-10 04:44:56 UTC (rev 229501)
@@ -32,6 +32,30 @@
 },
 }}];
 
+const reportWithRevisionNoTimestamp = [{
+"buildNumber": "124",
+"buildTime": "2015-10-27T15:34:51",
+"revisions": {
+"WebKit": {
+"revision": "191622",
+},
+},
+"builderName": "someBuilder",
+"builderPassword": "somePassword",
+"platform": "some platform",
+"tests": {
+"Suite": {
+"metrics": {
+"Time": ["Arithmetic"],
+},
+"tests": {
+"test1": {
+"metrics": {"Time": { "current": [11] }},
+}
+}
+},
+}}];
+
 const anotherReportWithRevision = [{
 "buildNumber": "125",
 "buildTime": "2015-10-27T17:27:41",
@@ -57,6 +81,30 @@
 },
 }}];
 
+const anotherReportWithRevisionNoTimestamp = [{
+"buildNumber": "125",
+"buildTime": "2015-10-27T17:27:41",
+"revisions": {
+"WebKit": {
+"revision": "191623",
+},
+},
+"builderName": "someBuilder",
+"builderPassword": "somePassword",
+"platform": "some platform",
+"tests": {
+"Suite": {
+"metrics": {
+"Time": ["Arithmetic"],
+},
+"tests": {
+"test1": {
+"metrics": {"Time": { "current": [12] }},
+}
+}
+},
+}}];
+
 describe('/privileged-api/create-analysis-task', function () {
 prepareServerTest(this);
 
@@ -180,6 +228,40 @@
 });
 });
 
+it('should create an analysis task and use build time as fallback when commit time is not available', () => {
+const db = TestServer.database();
+return addBuilderForReport(reportWithRevisionNoTimestamp[0]).then(() => {
+return TestServer.remoteAPI().postJSON('/api/report/', 

[webkit-changes] [227938] trunk/Websites/perf.webkit.org

2018-01-31 Thread dewei_zhu
Title: [227938] trunk/Websites/perf.webkit.org








Revision 227938
Author dewei_...@apple.com
Date 2018-01-31 15:41:37 -0800 (Wed, 31 Jan 2018)


Log Message
Should chose the best match during 'route' if there are multiple matches.
https://bugs.webkit.org/show_bug.cgi?id=182326

Reviewed by Ryosuke Niwa.

r227749 made a change that 'analysisCategoryPage' will be added before 'analysisTaskPage'.
As route names for both pages starts with 'analysis', whichever added first will be chosen.
For a route like 'analysis/task/1'. As a result, 'analysisCategoryPage' will be chosen and
this is not expected behavior. Adding the logic on the cases when route name does not extact
match the route name, always choose the longest mathcing route name.

Also modernized the code of 'page-router.js' to use const & let instead of var.

Added a browser test to guard against this bug.

* browser-tests/index.html: Import 'page-router-tests.js'.
* browser-tests/page-router-tests.js: Added unit test to guard against this bug.
* public/v3/pages/page-router.js:
(PageRouter.prototype.route): Added logic to find best matching in the case of inexact match.
(PageRouter.prototype.pageDidOpen):
(PageRouter.prototype._updateURLState):
(PageRouter.prototype._serializeToHash):
(PageRouter.prototype._deserializeFromHash):
(PageRouter.prototype._serializeHashQueryValue):
(PageRouter.prototype._deserializeHashQueryValue):
(PageRouter.prototype._countOccurrences):
(PageRouter):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/browser-tests/index.html
trunk/Websites/perf.webkit.org/public/v3/pages/page-router.js


Added Paths

trunk/Websites/perf.webkit.org/browser-tests/page-router-tests.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (227937 => 227938)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-01-31 23:32:36 UTC (rev 227937)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-01-31 23:41:37 UTC (rev 227938)
@@ -1,3 +1,33 @@
+2018-01-31  Dewei Zhu  
+
+Should chose the best match during 'route' if there are multiple matches.
+https://bugs.webkit.org/show_bug.cgi?id=182326
+
+Reviewed by Ryosuke Niwa.
+
+r227749 made a change that 'analysisCategoryPage' will be added before 'analysisTaskPage'.
+As route names for both pages starts with 'analysis', whichever added first will be chosen.
+For a route like 'analysis/task/1'. As a result, 'analysisCategoryPage' will be chosen and
+this is not expected behavior. Adding the logic on the cases when route name does not extact
+match the route name, always choose the longest mathcing route name.
+
+Also modernized the code of 'page-router.js' to use const & let instead of var.
+
+Added a browser test to guard against this bug.
+
+* browser-tests/index.html: Import 'page-router-tests.js'.
+* browser-tests/page-router-tests.js: Added unit test to guard against this bug.
+* public/v3/pages/page-router.js:
+(PageRouter.prototype.route): Added logic to find best matching in the case of inexact match.
+(PageRouter.prototype.pageDidOpen):
+(PageRouter.prototype._updateURLState):
+(PageRouter.prototype._serializeToHash):
+(PageRouter.prototype._deserializeFromHash):
+(PageRouter.prototype._serializeHashQueryValue):
+(PageRouter.prototype._deserializeHashQueryValue):
+(PageRouter.prototype._countOccurrences):
+(PageRouter):
+
 2018-01-29  Dewei Zhu  
 
 Should fetch owner commits in build-requests-fetcher.


Modified: trunk/Websites/perf.webkit.org/browser-tests/index.html (227937 => 227938)

--- trunk/Websites/perf.webkit.org/browser-tests/index.html	2018-01-31 23:32:36 UTC (rev 227937)
+++ trunk/Websites/perf.webkit.org/browser-tests/index.html	2018-01-31 23:41:37 UTC (rev 227938)
@@ -17,6 +17,7 @@
 
 

[webkit-changes] [227777] trunk/Websites/perf.webkit.org

2018-01-30 Thread dewei_zhu
Title: [22] trunk/Websites/perf.webkit.org








Revision 22
Author dewei_...@apple.com
Date 2018-01-30 02:07:04 -0800 (Tue, 30 Jan 2018)


Log Message
Should fetch owner commits in build-requests-fetcher.
https://bugs.webkit.org/show_bug.cgi?id=182266

Reviewed by Ryosuke Niwa.

In a build request, owner commit of a commit is not always one of a commit in the commit set.
Build request api should contain owner commits in the 'commits' field of the return value.

* public/include/build-requests-fetcher.php: Added logic to fetch owner commits and added them into 'commits'.
* server-tests/api-build-requests-tests.js: Added a unit test.
* server-tests/resources/mock-data.js:
(MockData.set addTestGroupWithOwnerCommitNotInCommitSet): Added a test group with a build request, the commit set of which does
not contain owner commit of one commit.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/include/build-requests-fetcher.php
trunk/Websites/perf.webkit.org/server-tests/api-build-requests-tests.js
trunk/Websites/perf.webkit.org/server-tests/resources/mock-data.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (227776 => 22)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-01-30 09:01:28 UTC (rev 227776)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-01-30 10:07:04 UTC (rev 22)
@@ -1,3 +1,19 @@
+2018-01-29  Dewei Zhu  
+
+Should fetch owner commits in build-requests-fetcher.
+https://bugs.webkit.org/show_bug.cgi?id=182266
+
+Reviewed by Ryosuke Niwa.
+
+In a build request, owner commit of a commit is not always one of a commit in the commit set.
+Build request api should contain owner commits in the 'commits' field of the return value.
+
+* public/include/build-requests-fetcher.php: Added logic to fetch owner commits and added them into 'commits'.
+* server-tests/api-build-requests-tests.js: Added a unit test.
+* server-tests/resources/mock-data.js:
+(MockData.set addTestGroupWithOwnerCommitNotInCommitSet): Added a test group with a build request, the commit set of which does
+not contain owner commit of one commit.
+
 2018-01-29  Ryosuke Niwa  
 
 Add the support for reporting Speedometer 2.0 results to perf dashboard


Modified: trunk/Websites/perf.webkit.org/public/include/build-requests-fetcher.php (227776 => 22)

--- trunk/Websites/perf.webkit.org/public/include/build-requests-fetcher.php	2018-01-30 09:01:28 UTC (rev 227776)
+++ trunk/Websites/perf.webkit.org/public/include/build-requests-fetcher.php	2018-01-30 10:07:04 UTC (rev 22)
@@ -144,6 +144,25 @@
 
 $this->commit_sets_by_id[$commit_set_id] = TRUE;
 
+$owner_commits_rows = $this->db->query_and_fetch_all('SELECT * FROM commits, repositories
+WHERE commit_repository = repository_id AND  commit_id
+IN (SELECT DISTINCT(commitset_commit_owner) FROM commit_set_items
+  WHERE commitset_set = $1 AND commitset_commit_owner IS NOT NULL)', array($commit_set_id));
+
+foreach ($owner_commits_rows as $row) {
+$commit_id = $row['commit_id'];
+if (array_key_exists($commit_id, $this->commits_by_id))
+continue;
+
+array_push($this->commits, array(
+'id' => $commit_id,
+'repository' => $resolve_ids ? $row['repository_name'] : $row['repository_id'],
+'commitOwner' => NULL,
+'revision' => $row['commit_revision'],
+'time' => Database::to_js_time($row['commit_time'])));
+$this->commits_by_id[$commit_id] = TRUE;
+}
+
 array_push($this->commit_sets, array('id' => $commit_set_id, 'revisionItems' => $revision_items, 'customRoots' => $custom_roots));
 }
 


Modified: trunk/Websites/perf.webkit.org/server-tests/api-build-requests-tests.js (227776 => 22)

--- trunk/Websites/perf.webkit.org/server-tests/api-build-requests-tests.js	2018-01-30 09:01:28 UTC (rev 227776)
+++ trunk/Websites/perf.webkit.org/server-tests/api-build-requests-tests.js	2018-01-30 10:07:04 UTC (rev 22)
@@ -281,6 +281,50 @@
 });
 });
 
+it('a repository group of a build request should accepts the commit set of the same build request', async () => {
+await MockData.addTestGroupWithOwnerCommitNotInCommitSet(TestServer.database());
+await Manifest.fetch();
+const buildRequests = await BuildRequest.fetchForTriggerable('build-webkit');
+assert.equal(buildRequests.length, 1);
+
+const test = Test.findById(200);
+assert(test);
+
+const platform = Platform.findById(65);
+assert(platform);
+
+const buildRequest = buildRequests[0];
+
+assert.equal(buildRequest.id(), 704);
+assert.equal(buildRequest.testGroupId(), 900);
+assert.equal(buildRequest.test(), test);
+

[webkit-changes] [227573] trunk/Websites/perf.webkit.org

2018-01-24 Thread dewei_zhu
Title: [227573] trunk/Websites/perf.webkit.org








Revision 227573
Author dewei_...@apple.com
Date 2018-01-24 14:35:39 -0800 (Wed, 24 Jan 2018)


Log Message
Check existence of 'node_modules_dir' before creating it.
https://bugs.webkit.org/show_bug.cgi?id=182040

Reviewed by Aakash Jain.

Fix the bug introduced in r227395.

* tools/run-tests.py: Added directory existence check.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/tools/run-tests.py




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (227572 => 227573)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-01-24 22:26:17 UTC (rev 227572)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-01-24 22:35:39 UTC (rev 227573)
@@ -1,3 +1,14 @@
+2018-01-24  Dewei Zhu  
+
+Check existence of 'node_modules_dir' before creating it.
+https://bugs.webkit.org/show_bug.cgi?id=182040
+
+Reviewed by Aakash Jain.
+
+Fix the bug introduced in r227395.
+
+* tools/run-tests.py: Added directory existence check.
+
 2018-01-22  Dewei Zhu  
 
 Fix the bug that 'TestGroupResultsViewer' creates unnecessary rows.


Modified: trunk/Websites/perf.webkit.org/tools/run-tests.py (227572 => 227573)

--- trunk/Websites/perf.webkit.org/tools/run-tests.py	2018-01-24 22:26:17 UTC (rev 227572)
+++ trunk/Websites/perf.webkit.org/tools/run-tests.py	2018-01-24 22:35:39 UTC (rev 227573)
@@ -10,7 +10,8 @@
 root_dir = os.path.abspath(os.path.join(tools_dir, '..'))
 node_modules_dir = os.path.join(root_dir, 'node_modules')
 
-os.makedirs(node_modules_dir)
+if not os.path.exists(node_modules_dir):
+os.makedirs(node_modules_dir)
 packages = ['mocha', 'pg', 'form-data']
 for package_name in packages:
 target_dir = os.path.join(node_modules_dir, package_name)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


  1   2   >