haikuwebkit/Websites/perf.webkit.org/ReadMe.md

304 lines
19 KiB
Markdown
Raw Permalink Normal View History

# WebKit Performance Dashboard
The WebKit performane dashboard is a website to track various performance metrics of WebKit: https://perf.webkit.org/
## 1. Checking Out the Code and Installing Required Applications
The instructions assume you're using macOS as the host server and installing this application at `/Volumes/Data/perf.webkit.org`.
You can choose between using Server.app or install the required tools separately.
1. Install Server.app but do **NOT** launch/open it. (if you don't want to use Server.app, install PostgreSQL: http://www.postgresql.org/download/macosx/)
2. Install node.
3. Install Xcode with command line tools (only needed for svn)
4. `svn co https://svn.webkit.org/repository/webkit/trunk/Websites/perf.webkit.org /Volumes/Data/perf.webkit.org`
5. Inside `/Volumes/Data/perf.webkit.org`, run `npm install pg` and `mkdir -m 755 public/data/`
## 2. Testing Local UI Changes with Production Data
The front end has the capability to pull data from a production server without replicating the database locally on OS X Yosemite and later.
To use this feature to test local UI changes, modify `config.json`'s `remoteServer` entry so that "remoteServer.url" points to your production server,
and "remoteServer.basicAuth" specifies the username and the password that is used by the production sever.
Remove "basicAuth" entry for production servers that doesn't require a basic authentication (e.g. perf.webkit.org).
```json
{
"url": "http://perf.webkit.org",
"basicAuth": {
"username": "webkitten",
"password": "webkitten's secret password"
}
}
```
Then run `tools/remote-cache-server.py start`. This launches a httpd server on port 8080.
The script caches remote server's responses under `public/data/remote-cache` and never revalidates them (to allow offline work).
If you needed the latest content, delete caches stored in this directory by running `tools/remote-cache-server.py reset`.
## 3. Running Tests
There are three kinds of tests in directories of the same name: `unit-tests`, `server tests`, and `browser-tests`.
- `unit-tests`: These tests various models and common JS code used in v3 UI and tools. They mock JSON APIs and model object.
- `server-tests`: Server tests use a real Apache server in accordance with `testServer` in `config.json` and a Postgres database by the name of `testDatabaseName` specified in `config.json`. They're functional tests and may test both the backend database schema, PHP, and corresponding front-end code although many of them directly queries and modifies the database.
- `browser-tests`: These are tests to be ran inside a Web browser, and tests v3 UI's interaction with browser's DOM API.
To run `unit-tests` and `server-tests`, simply run `./tools/run-tests.py` after installing dependencies (1) and configuring the PostgreSQL (4).
If you've previously setup a remote cache server (3), then you have to stop the server before running the tests.
To run `browser-tests`, open `browser-tests/index.html` inside a Web browser.
## 4. Configuring PostgreSQL
Run the following command to setup a Postgres server at `/Volumes/Data/perf.webkit.org/PostgresSQL` (or wherever you'd prefer):
`python ./tools/setup-database.py /Volumes/Data/perf.webkit.org/PostgresSQL`
It automatically retrieves the database name, the username, and the password from `config.json`. Create one from `config.json.sample`
### Starting PostgreSQL
The setup script automatically starts the database but you may need to run the following command to manually start the database after reboot.
- Starting the database: `/Applications/Server.app/Contents/ServerRoot/usr/bin/pg_ctl -D /Volumes/Data/perf.webkit.org/PostgresSQL -l /Volumes/Data/perf.webkit.org/PostgresSQL/logfile -o "-k /Volumes/Data/perf.webkit.org/PostgresSQL" start`
- Stopping the database: `/Applications/Server.app/Contents/ServerRoot/usr/bin/pg_ctl -D /Volumes/Data/perf.webkit.org/PostgresSQL -l /Volumes/Data/perf.webkit.org/PostgresSQL/logfile -o "-k /Volumes/Data/perf.webkit.org/PostgresSQL" stop`
### Initializing the Database
Run `database/init-database.sql` in psql as `webkit-perf-db-user`:
`/Applications/Server.app/Contents/ServerRoot/usr/bin/psql webkit-perf-db -h localhost --username webkit-perf-db-user -f init-database.sql`
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. Canonical link: https://commits.webkit.org/215881@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-09-27 22:45:12 +00:00
Then run:
`/Applications/Server.app/Contents/ServerRoot/usr/bin/psql webkit-perf-db -h localhost --username webkit-perf-db-user -f migrate-database.sql`
### Making a Backup and Restoring
Use `pg_dump` and `pg_restore` to backup and restore the database. If you're replicating the production database for development purposes, you may consider excluding `run_iterations` table, which takes up 2/3 of the storage space, to reduce the size of the database for your local copy. Adjust the number of concurrent processes to use by `--jobs` and adjust the compression level by `--compress` (0 is no compression, 9 is most compressed).
Add the UI for scheduling a A/B testing with a custom root https://bugs.webkit.org/show_bug.cgi?id=170622 Reviewed by Anders Carlsson. This patch adds the support for creating a new analysis task with a custom darwinup roots. A follow up patch would update the syncing script to schedule such an A/B testing job to a buildbot instance. * ReadMe.md: Updated instructions for backing up and restoring the database so that it's easier to replace the file path for the backup. * init-database.sql: Make task_platform and task_metric optional in each analysis task. Also added a column to store the root file in commit_set_relationships. * public/api/build-requests.php: (main): Include the uploaded files. * public/api/commits.php: (main): Added the support for querying the latest commits for a given platform. This is used in a new page to create a custom analysis task to autofill the latest revisions for a given platform. * public/api/test-groups.php: (main): Include the uploaded files. * public/include/build-requests-fetcher.php: (BuildRequestsFetcher::__construct): Added a list of uploaded_files and a map from its id. (BuildRequestsFetcher::uploaded_files): Added. (BuildRequestsFetcher::fetch_commits_for_set_if_needed): Added the support for including custom roots' id in each commit set, and inserting its meta data in the list of uplaoded files. * public/include/commit-log-fetcher.php: (CommitLogFetcher::fetch_latest_for_platform): Added. Finds the latest commit for a given platform. Ideally, we should be finding the latest commit for a given platform, but this is very slow so instead find the commit of the latest build for a given platform. * public/privileged-api/create-test-group.php: (main): Added the support for creating an analysis task along with a group. (commit_sets_from_revision_sets): Added the support for custom roots. Verify the specified uploaded file exists and include it in commit_set_relationships. Because commits and upload files are stored in a different column in commit_set_relationships, this function now stores the information for each row of commit_set_relationships except the commit set ID, which is unknown until the set is created, instead of a commit ID. (ensure_commit_sets): Made the each entry in a commit set a row instead of a commit ID as done. As this format is only by v2 UI and detect-changes.js, we don't add the support for specifying custom roots here. * public/privileged-api/upload-file.php: (main): Fixed a typo. Also added one more error check. * public/v3/components/custom-analysis-task-configurator.js: Added. The UI for selecting a test, a platform, and a set of revisions, as well as custom roots for a custom A/B testing job. The first set of revision with custom roots is referred as "baseline", and the second configuration is referred as "comparison" in this class. (CustomAnalysisTaskConfigurator): (CustomAnalysisTaskConfigurator.prototype.tests): Added. (CustomAnalysisTaskConfigurator.prototype.platform): Added. (CustomAnalysisTaskConfigurator.prototype.commitSets): Added. Returns a pair of baseline and comparsion if both have been configured by the user. (CustomAnalysisTaskConfigurator.prototype.didConstructShadowTree): Added. (CustomAnalysisTaskConfigurator.prototype._configureComparison): Added. Called when the user is to configu the "comparison" configuration. (CustomAnalysisTaskConfigurator.prototype.render): Added. (CustomAnalysisTaskConfigurator.prototype._renderTriggerableTests): Added. Renders the list of top-level tests that can be scheduled by a triggerable. (CustomAnalysisTaskConfigurator.prototype._renderTriggerablePlatforms): Added. Renders the list of platforms that can be schedule with the currently selected list of tests by a triggerable. Note that the current UI only lets the user select a single test but the intent is to allow multiple tests to be selected in the near future. (CustomAnalysisTaskConfigurator.prototype._buildCheckboxList): Added. Creates a list of radio boxes to select an item with a callback for each. It automatically sets "selected" class on the selected item. It's used to render both the list of tests and platforms. (CustomAnalysisTaskConfigurator.prototype._updateTriggerable): Added. Finds the triggerable for a given list of tests and platforms. Returns an error when some tests belong to another triggearalbe. (CustomAnalysisTaskConfigurator.prototype._updateRepositoryGroups): Added. Finds a repository group to use when the current triggerable has changed. We try to use the repository group of the same name if there is any, and defaults to the first repository group if there is none. This allows the set of repositories to be specified to more or less persist across different triggerables. For example, if iOS platforms and Mac platforms use two distinct triggerables , and both triggerables have two repository groups: one that only specify the OS and the other that specifies both teh OS and WebKit revision, then this code allows the choice the user had made to specify either just the OS or the OS and WebKit will be preserved when the user switches from an iOS platform to a Mac platform. (CustomAnalysisTaskConfigurator.prototype._updateCommitSetMap): Added. Create a commit set map, the format that TestGroup.createWithTask accepts given "baseline" and "comparison" commit sets. Pretend "comparison" is not set if two sets are identical since it makes no sense to schedule an A/B testing job when A and B are identical. (CustomAnalysisTaskConfigurator.prototype._computeCommitSet): Added. Creates a commit set using the revisions and the csutom roots the user had specified. (CustomAnalysisTaskConfigurator.prototype._renderRepositoryPanes): Added. Renders the pane to specify revisions and custom roots for "baseline" and "comparison". (CustomAnalysisTaskConfigurator.prototype._renderBaselineRevisionTable): Added. (CustomAnalysisTaskConfigurator.prototype._renderComparisonRevisionTable): Added. (CustomAnalysisTaskConfigurator.prototype._optionalRepositoryList): Added. (CustomAnalysisTaskConfigurator.prototype._buildRevisionTable): Added. Creates a table for specifying revisions and custom roots along with a list of repository groups to pick. The set of repositories and custom roots are shown at the all if all repository groups require them. Otherwise, they are grouped at the bottom as optional. (CustomAnalysisTaskConfigurator.prototype._buildRepositoryGroupList): Added. (CustomAnalysisTaskConfigurator.prototype._selectRepositoryGroup): Added. (CustomAnalysisTaskConfigurator.prototype._buildRevisionInput): Added. Creates an input element to specify a revision for a given repository. Autofills it with the latest commit for the currently selected platform if the user had not modified the field by the time the revisions are fetched. (CustomAnalysisTaskConfigurator.htmlTemplate): Added. (CustomAnalysisTaskConfigurator.cssTemplate): Added. * public/v3/components/instant-file-uploader.js: Added. A form to upload a custom darwinup root in "baseline" or "comparison" configurations of CustomAnalysisTaskConfigurator. It's "instant" because it auto-detects when a file to be uploaded had already been uploaded elsewhere by checking its SHA-256 hash. (InstantFileUploader): (InstantFileUploader.prototype.hasFileToUpload): Added. (InstantFileUploader.prototype.uploadedFiles): Added. (InstantFileUploader.prototype.addUploadedFile): Added. It's called on the uploader for "comparison" configuration when the uploader for "baseline" configuration dipsatches "uploadedFile" action to automatically mirror the newly uploaded custom root to "comparision" configuration. (InstantFileUploader.prototype.didConstructShadowTree): Added. (InstantFileUploader.prototype.render): Added. (InstantFileUploader.prototype._renderUploadedFiles): Added. Renders the list of the uploaded files. (InstantFileUploader.prototype._renderPreuploadFiles): Added. Renders the list of the files to be uploaded with a progress bar. (InstantFileUploader.prototype._updateUploadStatus): Added. Updates the progress bar for uploading the file. (InstantFileUploader.prototype._formatUploadError): Added. (InstantFileUploader.prototype._didFileInputChange): Added. Called when the user picks a file to uploaded on the input element. Fetch the meta data for the uploaded file with the same SHA-256 hash if there is any, and start uploading the file if there isn't one. (InstantFileUploader.prototype._removeUploadedFile): Added. (InstantFileUploader.prototype._didUploadFile): Added. Move a file from the list of files to be uploaded to the list of uploaded files. (InstantFileUploader.htmlTemplate): Added. (InstantFileUploader.cssTemplate): Added. * public/v3/index.html: * public/v3/models/analysis-task.js: (AnalysisTask): Made platform and metric optional as it is now. (AnalysisTask.findByPlatformAndMetric): Skip analysis tasks without a platform or a metric. (AnalysisTask.prototype.isCustom): Added. Returns true for a custom analysis task. (AnalysisTask.fetchRelatedTasks): Skip custom analysis tasks. (AnalysisTask._constructAnalysisTasksFromRawData): Construct analysis tasks even if they were missing a metric or a platform instead of silently skipping them. * public/v3/models/build-request.js: (BuildRequest.constructBuildRequestsFromData): Construct uploaded file objects returned by /api/build-requests. * public/v3/models/commit-log.js: (CommitLog.fetchLatestCommitForPlatform): Added. * public/v3/models/commit-set.js: (CommitSet): Added this._customRoots. (CommitSet.prototype.customRoots): Returns this._customRoots. (CommitSet.prototype.equals): Returns false when the set of custom roots are not equal. (CommitSet.areCustomRootsEqual): Added. (CustomCommitSet): (CustomCommitSet.prototype.equals): Added. (CustomCommitSet.prototype.customRoots): Added. (CustomCommitSet.prototype.addCustomRoot): Added. * public/v3/models/manifest.js: (Manifest._didFetchManifest): Store fileUploadSizeLimit in the manifest as UploadedFile.fileUploadSizeLimit. This allows a file size check in the client size instead of uploading it to the server and receiving an error. * public/v3/models/metric.js: (Metric.formatTime): Moved from ChartPaneStatusView to be also used by InstantFileUploader._renderUploadedFiles. * public/v3/models/test-group.js: (TestGroup.prototype.createWithTask): Added. (TestGroup.prototype.createAndRefetchTestGroups): (TestGroup.prototype._revisionSetsFromCommitSets): Added. Extracted from createAndRefetchTestGroups. (TestGroup.prototype._fetchTestGroupsForTask): Added. Extracted from createAndRefetchTestGroups. * public/v3/models/triggerable.js: (Triggerable.triggerablePlatformsForTests): Added. (Triggerable.sortByNamePreferringSmallerRepositories): Added. * public/v3/models/uploaded-file.js: (UploadedFile.prototype.createdAt): Added. (UploadedFile.prototype.filename): Added. (UploadedFile.prototype.author): Added. (UploadedFile.prototype.size): Added. (UploadedFile.uploadFile): Added a client-side check for the file size using UploadedFile.fileUploadSizeLimit. (UploadedFile.fetchUnloadedFileWithIdenticalHash): Ditto. Also fixed a bug that 404 was resulting in a rejected promise instead of a resolved promise with null. * public/v3/pages/analysis-category-page.js: (AnalysisCategoryPage.prototype._reconstructTaskList): Modernized the code. Added the support for platform and metric being null for some analysis tasks. * public/v3/pages/analysis-task-page.js: (AnalysisTaskPage.prototype._didFetchTask): Don't fetch the measurement set or create a chart for custom tasks. (AnalysisTaskPage.prototype.render): Don't display the charts or the stacking table for custom tasks. (AnalysisTaskPage.prototype._renderTaskNameAndStatus): Don't try to show the full test name for custom tasks since it's not associated with exactly one pair. * public/v3/pages/chart-pane-status-view.js: (ChartPaneStatusView.prototype._renderBuildRevisionTable): (ChartPaneStatusView.prototype._formatTime): Moved to Metric.formatTime. * public/v3/pages/chart-pane.js: (ChartPane.prototype._analyzeRange): Set inProgress to true to hide CustomAnalysisTaskConfigurator in CreateAnalysisTaskPage when creating a non-custom analysis task for a specific range. * public/v3/pages/create-analysis-task-page.js: (CreateAnalysisTaskPage): This page now shows CustomAnalysisTaskConfigurator by default, and lets a user create a custom analysis task by picking a test, a platform, and a set of revisions and custom darwinup roots. (CreateAnalysisTaskPage.prototype.updateFromSerializedState): Show a message when inProgress is set. This is the old behavior of this page. (CreateAnalysisTaskPage.prototype.didConstructShadowTree): Added. (CreateAnalysisTaskPage.prototype._createAnalysisTaskWithGroup): Added. (CreateAnalysisTaskPage.prototype.render): (CreateAnalysisTaskPage.prototype._renderMessage): Added. Hides CustomAnalysisTaskConfigurator and the select element to specify the numebr of iterations when a message is set. (CreateAnalysisTaskPage.htmlTemplate): (CreateAnalysisTaskPage.cssTemplate): * public/v3/pages/page-router.js: (PageRouter.prototype.route): Always enqueue the page to re-render when the route has changed. * server-tests/api-build-requests-tests.js: Updated test cases now that the response contains a list of uploaded files associated with build requests. * server-tests/privileged-api-create-test-group-tests.js: Added test cases for creating a custom analysis task and a test group with custom roots. * server-tests/resources/mock-data.js: (MockData.addMockData): Updated the mock data to satisfy new constraint on analysis-tasks table. * tools/js/remote.js: Include global.FormData from form-data.js. * unit-tests/build-request-tests.js: (sampleBuildRequestData): Updated the mock response. * unit-tests/buildbot-syncer-tests.js: (createSampleBuildRequest): Ditto. * unit-tests/test-groups-tests.js: (sampleTestGroup): Ditto. Canonical link: https://commits.webkit.org/187631@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-10 21:45:11 +00:00
- Making the fullbackup of the database: `/Applications/Server.app/Contents/ServerRoot/usr/bin/pg_dump -h localhost webkit-perf-db --format=directory --jobs=4 --no-owner --compress=7 --file=<path to backup directory>`
Add the UI for scheduling a A/B testing with a custom root https://bugs.webkit.org/show_bug.cgi?id=170622 Reviewed by Anders Carlsson. This patch adds the support for creating a new analysis task with a custom darwinup roots. A follow up patch would update the syncing script to schedule such an A/B testing job to a buildbot instance. * ReadMe.md: Updated instructions for backing up and restoring the database so that it's easier to replace the file path for the backup. * init-database.sql: Make task_platform and task_metric optional in each analysis task. Also added a column to store the root file in commit_set_relationships. * public/api/build-requests.php: (main): Include the uploaded files. * public/api/commits.php: (main): Added the support for querying the latest commits for a given platform. This is used in a new page to create a custom analysis task to autofill the latest revisions for a given platform. * public/api/test-groups.php: (main): Include the uploaded files. * public/include/build-requests-fetcher.php: (BuildRequestsFetcher::__construct): Added a list of uploaded_files and a map from its id. (BuildRequestsFetcher::uploaded_files): Added. (BuildRequestsFetcher::fetch_commits_for_set_if_needed): Added the support for including custom roots' id in each commit set, and inserting its meta data in the list of uplaoded files. * public/include/commit-log-fetcher.php: (CommitLogFetcher::fetch_latest_for_platform): Added. Finds the latest commit for a given platform. Ideally, we should be finding the latest commit for a given platform, but this is very slow so instead find the commit of the latest build for a given platform. * public/privileged-api/create-test-group.php: (main): Added the support for creating an analysis task along with a group. (commit_sets_from_revision_sets): Added the support for custom roots. Verify the specified uploaded file exists and include it in commit_set_relationships. Because commits and upload files are stored in a different column in commit_set_relationships, this function now stores the information for each row of commit_set_relationships except the commit set ID, which is unknown until the set is created, instead of a commit ID. (ensure_commit_sets): Made the each entry in a commit set a row instead of a commit ID as done. As this format is only by v2 UI and detect-changes.js, we don't add the support for specifying custom roots here. * public/privileged-api/upload-file.php: (main): Fixed a typo. Also added one more error check. * public/v3/components/custom-analysis-task-configurator.js: Added. The UI for selecting a test, a platform, and a set of revisions, as well as custom roots for a custom A/B testing job. The first set of revision with custom roots is referred as "baseline", and the second configuration is referred as "comparison" in this class. (CustomAnalysisTaskConfigurator): (CustomAnalysisTaskConfigurator.prototype.tests): Added. (CustomAnalysisTaskConfigurator.prototype.platform): Added. (CustomAnalysisTaskConfigurator.prototype.commitSets): Added. Returns a pair of baseline and comparsion if both have been configured by the user. (CustomAnalysisTaskConfigurator.prototype.didConstructShadowTree): Added. (CustomAnalysisTaskConfigurator.prototype._configureComparison): Added. Called when the user is to configu the "comparison" configuration. (CustomAnalysisTaskConfigurator.prototype.render): Added. (CustomAnalysisTaskConfigurator.prototype._renderTriggerableTests): Added. Renders the list of top-level tests that can be scheduled by a triggerable. (CustomAnalysisTaskConfigurator.prototype._renderTriggerablePlatforms): Added. Renders the list of platforms that can be schedule with the currently selected list of tests by a triggerable. Note that the current UI only lets the user select a single test but the intent is to allow multiple tests to be selected in the near future. (CustomAnalysisTaskConfigurator.prototype._buildCheckboxList): Added. Creates a list of radio boxes to select an item with a callback for each. It automatically sets "selected" class on the selected item. It's used to render both the list of tests and platforms. (CustomAnalysisTaskConfigurator.prototype._updateTriggerable): Added. Finds the triggerable for a given list of tests and platforms. Returns an error when some tests belong to another triggearalbe. (CustomAnalysisTaskConfigurator.prototype._updateRepositoryGroups): Added. Finds a repository group to use when the current triggerable has changed. We try to use the repository group of the same name if there is any, and defaults to the first repository group if there is none. This allows the set of repositories to be specified to more or less persist across different triggerables. For example, if iOS platforms and Mac platforms use two distinct triggerables , and both triggerables have two repository groups: one that only specify the OS and the other that specifies both teh OS and WebKit revision, then this code allows the choice the user had made to specify either just the OS or the OS and WebKit will be preserved when the user switches from an iOS platform to a Mac platform. (CustomAnalysisTaskConfigurator.prototype._updateCommitSetMap): Added. Create a commit set map, the format that TestGroup.createWithTask accepts given "baseline" and "comparison" commit sets. Pretend "comparison" is not set if two sets are identical since it makes no sense to schedule an A/B testing job when A and B are identical. (CustomAnalysisTaskConfigurator.prototype._computeCommitSet): Added. Creates a commit set using the revisions and the csutom roots the user had specified. (CustomAnalysisTaskConfigurator.prototype._renderRepositoryPanes): Added. Renders the pane to specify revisions and custom roots for "baseline" and "comparison". (CustomAnalysisTaskConfigurator.prototype._renderBaselineRevisionTable): Added. (CustomAnalysisTaskConfigurator.prototype._renderComparisonRevisionTable): Added. (CustomAnalysisTaskConfigurator.prototype._optionalRepositoryList): Added. (CustomAnalysisTaskConfigurator.prototype._buildRevisionTable): Added. Creates a table for specifying revisions and custom roots along with a list of repository groups to pick. The set of repositories and custom roots are shown at the all if all repository groups require them. Otherwise, they are grouped at the bottom as optional. (CustomAnalysisTaskConfigurator.prototype._buildRepositoryGroupList): Added. (CustomAnalysisTaskConfigurator.prototype._selectRepositoryGroup): Added. (CustomAnalysisTaskConfigurator.prototype._buildRevisionInput): Added. Creates an input element to specify a revision for a given repository. Autofills it with the latest commit for the currently selected platform if the user had not modified the field by the time the revisions are fetched. (CustomAnalysisTaskConfigurator.htmlTemplate): Added. (CustomAnalysisTaskConfigurator.cssTemplate): Added. * public/v3/components/instant-file-uploader.js: Added. A form to upload a custom darwinup root in "baseline" or "comparison" configurations of CustomAnalysisTaskConfigurator. It's "instant" because it auto-detects when a file to be uploaded had already been uploaded elsewhere by checking its SHA-256 hash. (InstantFileUploader): (InstantFileUploader.prototype.hasFileToUpload): Added. (InstantFileUploader.prototype.uploadedFiles): Added. (InstantFileUploader.prototype.addUploadedFile): Added. It's called on the uploader for "comparison" configuration when the uploader for "baseline" configuration dipsatches "uploadedFile" action to automatically mirror the newly uploaded custom root to "comparision" configuration. (InstantFileUploader.prototype.didConstructShadowTree): Added. (InstantFileUploader.prototype.render): Added. (InstantFileUploader.prototype._renderUploadedFiles): Added. Renders the list of the uploaded files. (InstantFileUploader.prototype._renderPreuploadFiles): Added. Renders the list of the files to be uploaded with a progress bar. (InstantFileUploader.prototype._updateUploadStatus): Added. Updates the progress bar for uploading the file. (InstantFileUploader.prototype._formatUploadError): Added. (InstantFileUploader.prototype._didFileInputChange): Added. Called when the user picks a file to uploaded on the input element. Fetch the meta data for the uploaded file with the same SHA-256 hash if there is any, and start uploading the file if there isn't one. (InstantFileUploader.prototype._removeUploadedFile): Added. (InstantFileUploader.prototype._didUploadFile): Added. Move a file from the list of files to be uploaded to the list of uploaded files. (InstantFileUploader.htmlTemplate): Added. (InstantFileUploader.cssTemplate): Added. * public/v3/index.html: * public/v3/models/analysis-task.js: (AnalysisTask): Made platform and metric optional as it is now. (AnalysisTask.findByPlatformAndMetric): Skip analysis tasks without a platform or a metric. (AnalysisTask.prototype.isCustom): Added. Returns true for a custom analysis task. (AnalysisTask.fetchRelatedTasks): Skip custom analysis tasks. (AnalysisTask._constructAnalysisTasksFromRawData): Construct analysis tasks even if they were missing a metric or a platform instead of silently skipping them. * public/v3/models/build-request.js: (BuildRequest.constructBuildRequestsFromData): Construct uploaded file objects returned by /api/build-requests. * public/v3/models/commit-log.js: (CommitLog.fetchLatestCommitForPlatform): Added. * public/v3/models/commit-set.js: (CommitSet): Added this._customRoots. (CommitSet.prototype.customRoots): Returns this._customRoots. (CommitSet.prototype.equals): Returns false when the set of custom roots are not equal. (CommitSet.areCustomRootsEqual): Added. (CustomCommitSet): (CustomCommitSet.prototype.equals): Added. (CustomCommitSet.prototype.customRoots): Added. (CustomCommitSet.prototype.addCustomRoot): Added. * public/v3/models/manifest.js: (Manifest._didFetchManifest): Store fileUploadSizeLimit in the manifest as UploadedFile.fileUploadSizeLimit. This allows a file size check in the client size instead of uploading it to the server and receiving an error. * public/v3/models/metric.js: (Metric.formatTime): Moved from ChartPaneStatusView to be also used by InstantFileUploader._renderUploadedFiles. * public/v3/models/test-group.js: (TestGroup.prototype.createWithTask): Added. (TestGroup.prototype.createAndRefetchTestGroups): (TestGroup.prototype._revisionSetsFromCommitSets): Added. Extracted from createAndRefetchTestGroups. (TestGroup.prototype._fetchTestGroupsForTask): Added. Extracted from createAndRefetchTestGroups. * public/v3/models/triggerable.js: (Triggerable.triggerablePlatformsForTests): Added. (Triggerable.sortByNamePreferringSmallerRepositories): Added. * public/v3/models/uploaded-file.js: (UploadedFile.prototype.createdAt): Added. (UploadedFile.prototype.filename): Added. (UploadedFile.prototype.author): Added. (UploadedFile.prototype.size): Added. (UploadedFile.uploadFile): Added a client-side check for the file size using UploadedFile.fileUploadSizeLimit. (UploadedFile.fetchUnloadedFileWithIdenticalHash): Ditto. Also fixed a bug that 404 was resulting in a rejected promise instead of a resolved promise with null. * public/v3/pages/analysis-category-page.js: (AnalysisCategoryPage.prototype._reconstructTaskList): Modernized the code. Added the support for platform and metric being null for some analysis tasks. * public/v3/pages/analysis-task-page.js: (AnalysisTaskPage.prototype._didFetchTask): Don't fetch the measurement set or create a chart for custom tasks. (AnalysisTaskPage.prototype.render): Don't display the charts or the stacking table for custom tasks. (AnalysisTaskPage.prototype._renderTaskNameAndStatus): Don't try to show the full test name for custom tasks since it's not associated with exactly one pair. * public/v3/pages/chart-pane-status-view.js: (ChartPaneStatusView.prototype._renderBuildRevisionTable): (ChartPaneStatusView.prototype._formatTime): Moved to Metric.formatTime. * public/v3/pages/chart-pane.js: (ChartPane.prototype._analyzeRange): Set inProgress to true to hide CustomAnalysisTaskConfigurator in CreateAnalysisTaskPage when creating a non-custom analysis task for a specific range. * public/v3/pages/create-analysis-task-page.js: (CreateAnalysisTaskPage): This page now shows CustomAnalysisTaskConfigurator by default, and lets a user create a custom analysis task by picking a test, a platform, and a set of revisions and custom darwinup roots. (CreateAnalysisTaskPage.prototype.updateFromSerializedState): Show a message when inProgress is set. This is the old behavior of this page. (CreateAnalysisTaskPage.prototype.didConstructShadowTree): Added. (CreateAnalysisTaskPage.prototype._createAnalysisTaskWithGroup): Added. (CreateAnalysisTaskPage.prototype.render): (CreateAnalysisTaskPage.prototype._renderMessage): Added. Hides CustomAnalysisTaskConfigurator and the select element to specify the numebr of iterations when a message is set. (CreateAnalysisTaskPage.htmlTemplate): (CreateAnalysisTaskPage.cssTemplate): * public/v3/pages/page-router.js: (PageRouter.prototype.route): Always enqueue the page to re-render when the route has changed. * server-tests/api-build-requests-tests.js: Updated test cases now that the response contains a list of uploaded files associated with build requests. * server-tests/privileged-api-create-test-group-tests.js: Added test cases for creating a custom analysis task and a test group with custom roots. * server-tests/resources/mock-data.js: (MockData.addMockData): Updated the mock data to satisfy new constraint on analysis-tasks table. * tools/js/remote.js: Include global.FormData from form-data.js. * unit-tests/build-request-tests.js: (sampleBuildRequestData): Updated the mock response. * unit-tests/buildbot-syncer-tests.js: (createSampleBuildRequest): Ditto. * unit-tests/test-groups-tests.js: (sampleTestGroup): Ditto. Canonical link: https://commits.webkit.org/187631@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-10 21:45:11 +00:00
- Making an abridged backup without `run_iterations` table: `/Applications/Server.app/Contents/ServerRoot/usr/bin/pg_dump -h localhost webkit-perf-db --format=directory --jobs=4 --no-owner --compress=7 --exclude-table=run_iterations --file=<path to backup directory>`
Add the UI for scheduling a A/B testing with a custom root https://bugs.webkit.org/show_bug.cgi?id=170622 Reviewed by Anders Carlsson. This patch adds the support for creating a new analysis task with a custom darwinup roots. A follow up patch would update the syncing script to schedule such an A/B testing job to a buildbot instance. * ReadMe.md: Updated instructions for backing up and restoring the database so that it's easier to replace the file path for the backup. * init-database.sql: Make task_platform and task_metric optional in each analysis task. Also added a column to store the root file in commit_set_relationships. * public/api/build-requests.php: (main): Include the uploaded files. * public/api/commits.php: (main): Added the support for querying the latest commits for a given platform. This is used in a new page to create a custom analysis task to autofill the latest revisions for a given platform. * public/api/test-groups.php: (main): Include the uploaded files. * public/include/build-requests-fetcher.php: (BuildRequestsFetcher::__construct): Added a list of uploaded_files and a map from its id. (BuildRequestsFetcher::uploaded_files): Added. (BuildRequestsFetcher::fetch_commits_for_set_if_needed): Added the support for including custom roots' id in each commit set, and inserting its meta data in the list of uplaoded files. * public/include/commit-log-fetcher.php: (CommitLogFetcher::fetch_latest_for_platform): Added. Finds the latest commit for a given platform. Ideally, we should be finding the latest commit for a given platform, but this is very slow so instead find the commit of the latest build for a given platform. * public/privileged-api/create-test-group.php: (main): Added the support for creating an analysis task along with a group. (commit_sets_from_revision_sets): Added the support for custom roots. Verify the specified uploaded file exists and include it in commit_set_relationships. Because commits and upload files are stored in a different column in commit_set_relationships, this function now stores the information for each row of commit_set_relationships except the commit set ID, which is unknown until the set is created, instead of a commit ID. (ensure_commit_sets): Made the each entry in a commit set a row instead of a commit ID as done. As this format is only by v2 UI and detect-changes.js, we don't add the support for specifying custom roots here. * public/privileged-api/upload-file.php: (main): Fixed a typo. Also added one more error check. * public/v3/components/custom-analysis-task-configurator.js: Added. The UI for selecting a test, a platform, and a set of revisions, as well as custom roots for a custom A/B testing job. The first set of revision with custom roots is referred as "baseline", and the second configuration is referred as "comparison" in this class. (CustomAnalysisTaskConfigurator): (CustomAnalysisTaskConfigurator.prototype.tests): Added. (CustomAnalysisTaskConfigurator.prototype.platform): Added. (CustomAnalysisTaskConfigurator.prototype.commitSets): Added. Returns a pair of baseline and comparsion if both have been configured by the user. (CustomAnalysisTaskConfigurator.prototype.didConstructShadowTree): Added. (CustomAnalysisTaskConfigurator.prototype._configureComparison): Added. Called when the user is to configu the "comparison" configuration. (CustomAnalysisTaskConfigurator.prototype.render): Added. (CustomAnalysisTaskConfigurator.prototype._renderTriggerableTests): Added. Renders the list of top-level tests that can be scheduled by a triggerable. (CustomAnalysisTaskConfigurator.prototype._renderTriggerablePlatforms): Added. Renders the list of platforms that can be schedule with the currently selected list of tests by a triggerable. Note that the current UI only lets the user select a single test but the intent is to allow multiple tests to be selected in the near future. (CustomAnalysisTaskConfigurator.prototype._buildCheckboxList): Added. Creates a list of radio boxes to select an item with a callback for each. It automatically sets "selected" class on the selected item. It's used to render both the list of tests and platforms. (CustomAnalysisTaskConfigurator.prototype._updateTriggerable): Added. Finds the triggerable for a given list of tests and platforms. Returns an error when some tests belong to another triggearalbe. (CustomAnalysisTaskConfigurator.prototype._updateRepositoryGroups): Added. Finds a repository group to use when the current triggerable has changed. We try to use the repository group of the same name if there is any, and defaults to the first repository group if there is none. This allows the set of repositories to be specified to more or less persist across different triggerables. For example, if iOS platforms and Mac platforms use two distinct triggerables , and both triggerables have two repository groups: one that only specify the OS and the other that specifies both teh OS and WebKit revision, then this code allows the choice the user had made to specify either just the OS or the OS and WebKit will be preserved when the user switches from an iOS platform to a Mac platform. (CustomAnalysisTaskConfigurator.prototype._updateCommitSetMap): Added. Create a commit set map, the format that TestGroup.createWithTask accepts given "baseline" and "comparison" commit sets. Pretend "comparison" is not set if two sets are identical since it makes no sense to schedule an A/B testing job when A and B are identical. (CustomAnalysisTaskConfigurator.prototype._computeCommitSet): Added. Creates a commit set using the revisions and the csutom roots the user had specified. (CustomAnalysisTaskConfigurator.prototype._renderRepositoryPanes): Added. Renders the pane to specify revisions and custom roots for "baseline" and "comparison". (CustomAnalysisTaskConfigurator.prototype._renderBaselineRevisionTable): Added. (CustomAnalysisTaskConfigurator.prototype._renderComparisonRevisionTable): Added. (CustomAnalysisTaskConfigurator.prototype._optionalRepositoryList): Added. (CustomAnalysisTaskConfigurator.prototype._buildRevisionTable): Added. Creates a table for specifying revisions and custom roots along with a list of repository groups to pick. The set of repositories and custom roots are shown at the all if all repository groups require them. Otherwise, they are grouped at the bottom as optional. (CustomAnalysisTaskConfigurator.prototype._buildRepositoryGroupList): Added. (CustomAnalysisTaskConfigurator.prototype._selectRepositoryGroup): Added. (CustomAnalysisTaskConfigurator.prototype._buildRevisionInput): Added. Creates an input element to specify a revision for a given repository. Autofills it with the latest commit for the currently selected platform if the user had not modified the field by the time the revisions are fetched. (CustomAnalysisTaskConfigurator.htmlTemplate): Added. (CustomAnalysisTaskConfigurator.cssTemplate): Added. * public/v3/components/instant-file-uploader.js: Added. A form to upload a custom darwinup root in "baseline" or "comparison" configurations of CustomAnalysisTaskConfigurator. It's "instant" because it auto-detects when a file to be uploaded had already been uploaded elsewhere by checking its SHA-256 hash. (InstantFileUploader): (InstantFileUploader.prototype.hasFileToUpload): Added. (InstantFileUploader.prototype.uploadedFiles): Added. (InstantFileUploader.prototype.addUploadedFile): Added. It's called on the uploader for "comparison" configuration when the uploader for "baseline" configuration dipsatches "uploadedFile" action to automatically mirror the newly uploaded custom root to "comparision" configuration. (InstantFileUploader.prototype.didConstructShadowTree): Added. (InstantFileUploader.prototype.render): Added. (InstantFileUploader.prototype._renderUploadedFiles): Added. Renders the list of the uploaded files. (InstantFileUploader.prototype._renderPreuploadFiles): Added. Renders the list of the files to be uploaded with a progress bar. (InstantFileUploader.prototype._updateUploadStatus): Added. Updates the progress bar for uploading the file. (InstantFileUploader.prototype._formatUploadError): Added. (InstantFileUploader.prototype._didFileInputChange): Added. Called when the user picks a file to uploaded on the input element. Fetch the meta data for the uploaded file with the same SHA-256 hash if there is any, and start uploading the file if there isn't one. (InstantFileUploader.prototype._removeUploadedFile): Added. (InstantFileUploader.prototype._didUploadFile): Added. Move a file from the list of files to be uploaded to the list of uploaded files. (InstantFileUploader.htmlTemplate): Added. (InstantFileUploader.cssTemplate): Added. * public/v3/index.html: * public/v3/models/analysis-task.js: (AnalysisTask): Made platform and metric optional as it is now. (AnalysisTask.findByPlatformAndMetric): Skip analysis tasks without a platform or a metric. (AnalysisTask.prototype.isCustom): Added. Returns true for a custom analysis task. (AnalysisTask.fetchRelatedTasks): Skip custom analysis tasks. (AnalysisTask._constructAnalysisTasksFromRawData): Construct analysis tasks even if they were missing a metric or a platform instead of silently skipping them. * public/v3/models/build-request.js: (BuildRequest.constructBuildRequestsFromData): Construct uploaded file objects returned by /api/build-requests. * public/v3/models/commit-log.js: (CommitLog.fetchLatestCommitForPlatform): Added. * public/v3/models/commit-set.js: (CommitSet): Added this._customRoots. (CommitSet.prototype.customRoots): Returns this._customRoots. (CommitSet.prototype.equals): Returns false when the set of custom roots are not equal. (CommitSet.areCustomRootsEqual): Added. (CustomCommitSet): (CustomCommitSet.prototype.equals): Added. (CustomCommitSet.prototype.customRoots): Added. (CustomCommitSet.prototype.addCustomRoot): Added. * public/v3/models/manifest.js: (Manifest._didFetchManifest): Store fileUploadSizeLimit in the manifest as UploadedFile.fileUploadSizeLimit. This allows a file size check in the client size instead of uploading it to the server and receiving an error. * public/v3/models/metric.js: (Metric.formatTime): Moved from ChartPaneStatusView to be also used by InstantFileUploader._renderUploadedFiles. * public/v3/models/test-group.js: (TestGroup.prototype.createWithTask): Added. (TestGroup.prototype.createAndRefetchTestGroups): (TestGroup.prototype._revisionSetsFromCommitSets): Added. Extracted from createAndRefetchTestGroups. (TestGroup.prototype._fetchTestGroupsForTask): Added. Extracted from createAndRefetchTestGroups. * public/v3/models/triggerable.js: (Triggerable.triggerablePlatformsForTests): Added. (Triggerable.sortByNamePreferringSmallerRepositories): Added. * public/v3/models/uploaded-file.js: (UploadedFile.prototype.createdAt): Added. (UploadedFile.prototype.filename): Added. (UploadedFile.prototype.author): Added. (UploadedFile.prototype.size): Added. (UploadedFile.uploadFile): Added a client-side check for the file size using UploadedFile.fileUploadSizeLimit. (UploadedFile.fetchUnloadedFileWithIdenticalHash): Ditto. Also fixed a bug that 404 was resulting in a rejected promise instead of a resolved promise with null. * public/v3/pages/analysis-category-page.js: (AnalysisCategoryPage.prototype._reconstructTaskList): Modernized the code. Added the support for platform and metric being null for some analysis tasks. * public/v3/pages/analysis-task-page.js: (AnalysisTaskPage.prototype._didFetchTask): Don't fetch the measurement set or create a chart for custom tasks. (AnalysisTaskPage.prototype.render): Don't display the charts or the stacking table for custom tasks. (AnalysisTaskPage.prototype._renderTaskNameAndStatus): Don't try to show the full test name for custom tasks since it's not associated with exactly one pair. * public/v3/pages/chart-pane-status-view.js: (ChartPaneStatusView.prototype._renderBuildRevisionTable): (ChartPaneStatusView.prototype._formatTime): Moved to Metric.formatTime. * public/v3/pages/chart-pane.js: (ChartPane.prototype._analyzeRange): Set inProgress to true to hide CustomAnalysisTaskConfigurator in CreateAnalysisTaskPage when creating a non-custom analysis task for a specific range. * public/v3/pages/create-analysis-task-page.js: (CreateAnalysisTaskPage): This page now shows CustomAnalysisTaskConfigurator by default, and lets a user create a custom analysis task by picking a test, a platform, and a set of revisions and custom darwinup roots. (CreateAnalysisTaskPage.prototype.updateFromSerializedState): Show a message when inProgress is set. This is the old behavior of this page. (CreateAnalysisTaskPage.prototype.didConstructShadowTree): Added. (CreateAnalysisTaskPage.prototype._createAnalysisTaskWithGroup): Added. (CreateAnalysisTaskPage.prototype.render): (CreateAnalysisTaskPage.prototype._renderMessage): Added. Hides CustomAnalysisTaskConfigurator and the select element to specify the numebr of iterations when a message is set. (CreateAnalysisTaskPage.htmlTemplate): (CreateAnalysisTaskPage.cssTemplate): * public/v3/pages/page-router.js: (PageRouter.prototype.route): Always enqueue the page to re-render when the route has changed. * server-tests/api-build-requests-tests.js: Updated test cases now that the response contains a list of uploaded files associated with build requests. * server-tests/privileged-api-create-test-group-tests.js: Added test cases for creating a custom analysis task and a test group with custom roots. * server-tests/resources/mock-data.js: (MockData.addMockData): Updated the mock data to satisfy new constraint on analysis-tasks table. * tools/js/remote.js: Include global.FormData from form-data.js. * unit-tests/build-request-tests.js: (sampleBuildRequestData): Updated the mock response. * unit-tests/buildbot-syncer-tests.js: (createSampleBuildRequest): Ditto. * unit-tests/test-groups-tests.js: (sampleTestGroup): Ditto. Canonical link: https://commits.webkit.org/187631@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-10 21:45:11 +00:00
- Restoring the database: `/Applications/Server.app/Contents/ServerRoot/usr/bin/pg_restore --format=directory --jobs=4 --no-owner --host localhost --username=webkit-perf-db-user --dbname=webkit-perf-db <path to backup directory>`
## 5. Configuring Apache
### Instructions if you've never launched Server.app as instructed
Add the UI for scheduling a A/B testing with a custom root https://bugs.webkit.org/show_bug.cgi?id=170622 Reviewed by Anders Carlsson. This patch adds the support for creating a new analysis task with a custom darwinup roots. A follow up patch would update the syncing script to schedule such an A/B testing job to a buildbot instance. * ReadMe.md: Updated instructions for backing up and restoring the database so that it's easier to replace the file path for the backup. * init-database.sql: Make task_platform and task_metric optional in each analysis task. Also added a column to store the root file in commit_set_relationships. * public/api/build-requests.php: (main): Include the uploaded files. * public/api/commits.php: (main): Added the support for querying the latest commits for a given platform. This is used in a new page to create a custom analysis task to autofill the latest revisions for a given platform. * public/api/test-groups.php: (main): Include the uploaded files. * public/include/build-requests-fetcher.php: (BuildRequestsFetcher::__construct): Added a list of uploaded_files and a map from its id. (BuildRequestsFetcher::uploaded_files): Added. (BuildRequestsFetcher::fetch_commits_for_set_if_needed): Added the support for including custom roots' id in each commit set, and inserting its meta data in the list of uplaoded files. * public/include/commit-log-fetcher.php: (CommitLogFetcher::fetch_latest_for_platform): Added. Finds the latest commit for a given platform. Ideally, we should be finding the latest commit for a given platform, but this is very slow so instead find the commit of the latest build for a given platform. * public/privileged-api/create-test-group.php: (main): Added the support for creating an analysis task along with a group. (commit_sets_from_revision_sets): Added the support for custom roots. Verify the specified uploaded file exists and include it in commit_set_relationships. Because commits and upload files are stored in a different column in commit_set_relationships, this function now stores the information for each row of commit_set_relationships except the commit set ID, which is unknown until the set is created, instead of a commit ID. (ensure_commit_sets): Made the each entry in a commit set a row instead of a commit ID as done. As this format is only by v2 UI and detect-changes.js, we don't add the support for specifying custom roots here. * public/privileged-api/upload-file.php: (main): Fixed a typo. Also added one more error check. * public/v3/components/custom-analysis-task-configurator.js: Added. The UI for selecting a test, a platform, and a set of revisions, as well as custom roots for a custom A/B testing job. The first set of revision with custom roots is referred as "baseline", and the second configuration is referred as "comparison" in this class. (CustomAnalysisTaskConfigurator): (CustomAnalysisTaskConfigurator.prototype.tests): Added. (CustomAnalysisTaskConfigurator.prototype.platform): Added. (CustomAnalysisTaskConfigurator.prototype.commitSets): Added. Returns a pair of baseline and comparsion if both have been configured by the user. (CustomAnalysisTaskConfigurator.prototype.didConstructShadowTree): Added. (CustomAnalysisTaskConfigurator.prototype._configureComparison): Added. Called when the user is to configu the "comparison" configuration. (CustomAnalysisTaskConfigurator.prototype.render): Added. (CustomAnalysisTaskConfigurator.prototype._renderTriggerableTests): Added. Renders the list of top-level tests that can be scheduled by a triggerable. (CustomAnalysisTaskConfigurator.prototype._renderTriggerablePlatforms): Added. Renders the list of platforms that can be schedule with the currently selected list of tests by a triggerable. Note that the current UI only lets the user select a single test but the intent is to allow multiple tests to be selected in the near future. (CustomAnalysisTaskConfigurator.prototype._buildCheckboxList): Added. Creates a list of radio boxes to select an item with a callback for each. It automatically sets "selected" class on the selected item. It's used to render both the list of tests and platforms. (CustomAnalysisTaskConfigurator.prototype._updateTriggerable): Added. Finds the triggerable for a given list of tests and platforms. Returns an error when some tests belong to another triggearalbe. (CustomAnalysisTaskConfigurator.prototype._updateRepositoryGroups): Added. Finds a repository group to use when the current triggerable has changed. We try to use the repository group of the same name if there is any, and defaults to the first repository group if there is none. This allows the set of repositories to be specified to more or less persist across different triggerables. For example, if iOS platforms and Mac platforms use two distinct triggerables , and both triggerables have two repository groups: one that only specify the OS and the other that specifies both teh OS and WebKit revision, then this code allows the choice the user had made to specify either just the OS or the OS and WebKit will be preserved when the user switches from an iOS platform to a Mac platform. (CustomAnalysisTaskConfigurator.prototype._updateCommitSetMap): Added. Create a commit set map, the format that TestGroup.createWithTask accepts given "baseline" and "comparison" commit sets. Pretend "comparison" is not set if two sets are identical since it makes no sense to schedule an A/B testing job when A and B are identical. (CustomAnalysisTaskConfigurator.prototype._computeCommitSet): Added. Creates a commit set using the revisions and the csutom roots the user had specified. (CustomAnalysisTaskConfigurator.prototype._renderRepositoryPanes): Added. Renders the pane to specify revisions and custom roots for "baseline" and "comparison". (CustomAnalysisTaskConfigurator.prototype._renderBaselineRevisionTable): Added. (CustomAnalysisTaskConfigurator.prototype._renderComparisonRevisionTable): Added. (CustomAnalysisTaskConfigurator.prototype._optionalRepositoryList): Added. (CustomAnalysisTaskConfigurator.prototype._buildRevisionTable): Added. Creates a table for specifying revisions and custom roots along with a list of repository groups to pick. The set of repositories and custom roots are shown at the all if all repository groups require them. Otherwise, they are grouped at the bottom as optional. (CustomAnalysisTaskConfigurator.prototype._buildRepositoryGroupList): Added. (CustomAnalysisTaskConfigurator.prototype._selectRepositoryGroup): Added. (CustomAnalysisTaskConfigurator.prototype._buildRevisionInput): Added. Creates an input element to specify a revision for a given repository. Autofills it with the latest commit for the currently selected platform if the user had not modified the field by the time the revisions are fetched. (CustomAnalysisTaskConfigurator.htmlTemplate): Added. (CustomAnalysisTaskConfigurator.cssTemplate): Added. * public/v3/components/instant-file-uploader.js: Added. A form to upload a custom darwinup root in "baseline" or "comparison" configurations of CustomAnalysisTaskConfigurator. It's "instant" because it auto-detects when a file to be uploaded had already been uploaded elsewhere by checking its SHA-256 hash. (InstantFileUploader): (InstantFileUploader.prototype.hasFileToUpload): Added. (InstantFileUploader.prototype.uploadedFiles): Added. (InstantFileUploader.prototype.addUploadedFile): Added. It's called on the uploader for "comparison" configuration when the uploader for "baseline" configuration dipsatches "uploadedFile" action to automatically mirror the newly uploaded custom root to "comparision" configuration. (InstantFileUploader.prototype.didConstructShadowTree): Added. (InstantFileUploader.prototype.render): Added. (InstantFileUploader.prototype._renderUploadedFiles): Added. Renders the list of the uploaded files. (InstantFileUploader.prototype._renderPreuploadFiles): Added. Renders the list of the files to be uploaded with a progress bar. (InstantFileUploader.prototype._updateUploadStatus): Added. Updates the progress bar for uploading the file. (InstantFileUploader.prototype._formatUploadError): Added. (InstantFileUploader.prototype._didFileInputChange): Added. Called when the user picks a file to uploaded on the input element. Fetch the meta data for the uploaded file with the same SHA-256 hash if there is any, and start uploading the file if there isn't one. (InstantFileUploader.prototype._removeUploadedFile): Added. (InstantFileUploader.prototype._didUploadFile): Added. Move a file from the list of files to be uploaded to the list of uploaded files. (InstantFileUploader.htmlTemplate): Added. (InstantFileUploader.cssTemplate): Added. * public/v3/index.html: * public/v3/models/analysis-task.js: (AnalysisTask): Made platform and metric optional as it is now. (AnalysisTask.findByPlatformAndMetric): Skip analysis tasks without a platform or a metric. (AnalysisTask.prototype.isCustom): Added. Returns true for a custom analysis task. (AnalysisTask.fetchRelatedTasks): Skip custom analysis tasks. (AnalysisTask._constructAnalysisTasksFromRawData): Construct analysis tasks even if they were missing a metric or a platform instead of silently skipping them. * public/v3/models/build-request.js: (BuildRequest.constructBuildRequestsFromData): Construct uploaded file objects returned by /api/build-requests. * public/v3/models/commit-log.js: (CommitLog.fetchLatestCommitForPlatform): Added. * public/v3/models/commit-set.js: (CommitSet): Added this._customRoots. (CommitSet.prototype.customRoots): Returns this._customRoots. (CommitSet.prototype.equals): Returns false when the set of custom roots are not equal. (CommitSet.areCustomRootsEqual): Added. (CustomCommitSet): (CustomCommitSet.prototype.equals): Added. (CustomCommitSet.prototype.customRoots): Added. (CustomCommitSet.prototype.addCustomRoot): Added. * public/v3/models/manifest.js: (Manifest._didFetchManifest): Store fileUploadSizeLimit in the manifest as UploadedFile.fileUploadSizeLimit. This allows a file size check in the client size instead of uploading it to the server and receiving an error. * public/v3/models/metric.js: (Metric.formatTime): Moved from ChartPaneStatusView to be also used by InstantFileUploader._renderUploadedFiles. * public/v3/models/test-group.js: (TestGroup.prototype.createWithTask): Added. (TestGroup.prototype.createAndRefetchTestGroups): (TestGroup.prototype._revisionSetsFromCommitSets): Added. Extracted from createAndRefetchTestGroups. (TestGroup.prototype._fetchTestGroupsForTask): Added. Extracted from createAndRefetchTestGroups. * public/v3/models/triggerable.js: (Triggerable.triggerablePlatformsForTests): Added. (Triggerable.sortByNamePreferringSmallerRepositories): Added. * public/v3/models/uploaded-file.js: (UploadedFile.prototype.createdAt): Added. (UploadedFile.prototype.filename): Added. (UploadedFile.prototype.author): Added. (UploadedFile.prototype.size): Added. (UploadedFile.uploadFile): Added a client-side check for the file size using UploadedFile.fileUploadSizeLimit. (UploadedFile.fetchUnloadedFileWithIdenticalHash): Ditto. Also fixed a bug that 404 was resulting in a rejected promise instead of a resolved promise with null. * public/v3/pages/analysis-category-page.js: (AnalysisCategoryPage.prototype._reconstructTaskList): Modernized the code. Added the support for platform and metric being null for some analysis tasks. * public/v3/pages/analysis-task-page.js: (AnalysisTaskPage.prototype._didFetchTask): Don't fetch the measurement set or create a chart for custom tasks. (AnalysisTaskPage.prototype.render): Don't display the charts or the stacking table for custom tasks. (AnalysisTaskPage.prototype._renderTaskNameAndStatus): Don't try to show the full test name for custom tasks since it's not associated with exactly one pair. * public/v3/pages/chart-pane-status-view.js: (ChartPaneStatusView.prototype._renderBuildRevisionTable): (ChartPaneStatusView.prototype._formatTime): Moved to Metric.formatTime. * public/v3/pages/chart-pane.js: (ChartPane.prototype._analyzeRange): Set inProgress to true to hide CustomAnalysisTaskConfigurator in CreateAnalysisTaskPage when creating a non-custom analysis task for a specific range. * public/v3/pages/create-analysis-task-page.js: (CreateAnalysisTaskPage): This page now shows CustomAnalysisTaskConfigurator by default, and lets a user create a custom analysis task by picking a test, a platform, and a set of revisions and custom darwinup roots. (CreateAnalysisTaskPage.prototype.updateFromSerializedState): Show a message when inProgress is set. This is the old behavior of this page. (CreateAnalysisTaskPage.prototype.didConstructShadowTree): Added. (CreateAnalysisTaskPage.prototype._createAnalysisTaskWithGroup): Added. (CreateAnalysisTaskPage.prototype.render): (CreateAnalysisTaskPage.prototype._renderMessage): Added. Hides CustomAnalysisTaskConfigurator and the select element to specify the numebr of iterations when a message is set. (CreateAnalysisTaskPage.htmlTemplate): (CreateAnalysisTaskPage.cssTemplate): * public/v3/pages/page-router.js: (PageRouter.prototype.route): Always enqueue the page to re-render when the route has changed. * server-tests/api-build-requests-tests.js: Updated test cases now that the response contains a list of uploaded files associated with build requests. * server-tests/privileged-api-create-test-group-tests.js: Added test cases for creating a custom analysis task and a test group with custom roots. * server-tests/resources/mock-data.js: (MockData.addMockData): Updated the mock data to satisfy new constraint on analysis-tasks table. * tools/js/remote.js: Include global.FormData from form-data.js. * unit-tests/build-request-tests.js: (sampleBuildRequestData): Updated the mock response. * unit-tests/buildbot-syncer-tests.js: (createSampleBuildRequest): Ditto. * unit-tests/test-groups-tests.js: (sampleTestGroup): Ditto. Canonical link: https://commits.webkit.org/187631@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-10 21:45:11 +00:00
- Edit `/private/etc/apache2/httpd.conf`
1. Change DocumentRoot to `/Volumes/Data/perf.webkit.org/public/`
2. Uncomment `LoadModule php5_module libexec/apache2/libphp5.so`
3. Uncomment `LoadModule rewrite_module libexec/apache2/mod_rewrite.so`
4. Uncomment `LoadModule deflate_module libexec/apache2/mod_deflate.so`
- In Mavericks and later, copy php.ini to load pdo_pgsql.so pgsql.so.
`sudo cp /Applications/Server.app/Contents/ServerRoot/etc/php.ini /etc/`
- In El Capitan and later, you may need to comment out the `LockFile` directive in `/private/etc/apache2/extra/httpd-mpm.conf`
as the directive has been superseded by `Mutex` directive.
### Instructions if you've accidentally launched Server.app
- Enable PHP web applications
- Go to Server Website / Store Site Files In, change it to `/Volumes/Data/perf.webkit.org/public/`
- Go to Server Website / Edit advanced settings, enable Allow overrides using .htaccess files
- httpd config file is located at `/Library/Server/Web/Config/apache2/sites/0000_any_80.conf` (and/or 0000_any_`PORT#`.conf)
### Starting Apache
You can use apachectl to start/stop/restart apache server from the command line:
- Starting httpd: `sudo apachectl start`
- Stopping httpd: `sudo apachectl stop`
- Restarting httpd: `sudo apachectl restart`
The apache logs are located at `/private/var/log/apache2`.
### Production Configurations
1. Update ServerAdmin to your email address
2. Add the following directives to enable gzip:
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/xml text/javascript application/javascript text/plain application/json application/xml application/xhtml+xml
</IfModule>
3. Add the following directives to enable zlib compression and MultiViews on DocumentRoot (perf.webkit.org/public):
Options Indexes MultiViews
php_flag zlib.output_compression on
ComponentBase should enqueue itself to render when it becomes connected https://bugs.webkit.org/show_bug.cgi?id=169905 Reviewed by Antti Koivisto. When a component becomes connected to a document, enqueue itself to render automatically. Also added the support for boolean attribute to ComponentBase.createElement. * ReadMe.md: Added an instruction to raise the upload limit per r214065. * browser-tests/component-base-tests.js: Added tests for the new behavior and createElement. Also moved the tests related to enqueueToRenderOnResize out of defineElement tests. * browser-tests/index.html: (BrowsingContext.prototype.constructor): Override requestAnimationFrame so that the callback would be involved immediately durign testing. * public/v3/components/base.js: (ComponentBase): Enqueue itself to render during construction if custom elements is not available. (ComponentBase.defineElement): (ComponentBase.defineElement.elementClass.prototype.connectedCallback): Enqueue itself to render when the component's element became connected. (ComponentBase.createElement): Use Array.isArray instead of instanceof to make it work with arrays made in other realms (global objects) during testing. Added the support for boolean attributes. Setting an attribute value to true would set the attribute, and setting it to false would not set the attribute. (ComponentBase.useNativeCustomElements): Added. True iff window.customElements is defined. * public/v3/components/chart-pane-base.js: (ChartPaneBase.prototype.render): No longer need to call enqueueToRender on the commit log viewer. * public/v3/components/commit-log-viewer.js: (CommitLogViewer.prototype.render): No longer need to call enqueueToRender on the spinner icon. * public/v3/models/time-series.js: (TimeSeries): Made this a proper class declaration now that we don't include data.js after r213300. * public/v3/pages/chart-pane.js: (ChartPane.prototype._renderActionToolbar): No longer need to call enqueueToRender on the close icon. * public/v3/pages/summary-page.js: (SummaryPage.prototype._renderCell): No longer need to call enqueueToRender on the spinner icon. Canonical link: https://commits.webkit.org/186907@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-22 22:50:57 +00:00
4. Increase the maximum upload size as needed for accepting custom roots:
<IfModule php5_module>
php_value upload_max_filesize 100M
php_value post_max_size 100M
</IfModule>
### Protecting the Administrative Pages to Prevent Execution of Arbitrary Code
By default, the application gives the administrative privilege to everyone. Anyone can add, remove, or edit tests,
builders, and other entities in the database.
We recommend protecting the administrative pages via Digest Auth on https connection.
Generate a password file via `htdigest -c <path> <realm> <username>`, and then create admin/.htaccess with the following directives
where `<Realm>` is replaced with the realm of your choice, which will be displayed on the username/password input box:
```
AuthType Digest
AuthName "<Realm>"
AuthDigestProvider file
AuthUserFile "<Realm>"
Require valid-user
```
## 6. Concepts
- **Test** - A test is a collection of metrics such as frame rate and malloced bytes. It can have a children and a parent and form a tree of tests.
- **Metric** - A specific metric of a test such as frame rate, runs per second, and time. The list of supported metrics are:
- *FrameRate* - Frame rate per second
- *Runs* - Runs per second
- *Time* and *Duration* - Duration measured in milliseconds
- *Size* - Bytes
- *Score* - Unit-less scores for benchmarks. Unit is pt or points.
Metrics can also be an aggreagte of child tests' metrics of the same name. For example, Speedometer benchmark's Time metric is the sum total of subtests' time. The list of supported aggregation types are:
- *Arithmetic* - [The arithmetic mean](https://en.wikipedia.org/wiki/Arithmetic_mean)
- *Geometric* - [The geometric mean](https://en.wikipedia.org/wiki/Geometric_mean)
- *Harmonic* - [The harmonic mean](https://en.wikipedia.org/wiki/Harmonic_mean)
- *Total* - [The sum](https://en.wikipedia.org/wiki/Summation)
- **Platform** - A platform is an environmental configuration under which performance tests run. This is typically an operating system such as Lion, Mountain Lion, or Windows 7, or a combination of an operating system, a particular device, and a configuration: e.g. macOS Sierra MacBookAir7,1.
- **Repository** - A repository refers to the name of a collection of software whose verions or revisions need to be associated with a particular data point submitted to the dashboard. For example, WebKit is a repository because each data point submitted to the dashboard has to identify its WebKit revision. Operating systems such as macOS could also be considered as a repository if its version may change over time if an operating system may get updated across data points.
- **Commit** - A commit is a specific revision or a version of a repository. e.g. r211196 of WebKit.
- **Committer** - A committer is the author of the change in a given repository for a specific commit. e.g. the author of r211196 in WebKit is Ryosuke Niwa.
- **Builder** - Like a builder in buildbot, a builder submits data points to the dashboard in terms of a sequence of builds. For example, a builder named "El Capitan MacBookAir7,1" may submit data points for benchmarks ran on MacBookAir7,1 with El Capitan.
[perf dashboard] Remove non-inclusive words from perf dashboard. https://bugs.webkit.org/show_bug.cgi?id=223505 Reviewed by Ryosuke Niwa. Removed most of non-inclusive terminology and replaced it with 'worker'. Make impacted APIs backward compatible during transition. The non-inclusive terminology will be removed after transition. * ReadMe.md: Removed non-inclusive words. * init-database.sql: Rename tables with non-inclusive words. * migrate-database.sql: Added migration SQL for existing database. * public/admin/build-workers.php: Renamed from Websites/perf.webkit.org/public/admin/build-slaves.php. * public/api/build-requests.php: * public/api/measurement-set.php: * public/api/report-commits.php: * public/api/runs.php: * public/api/update-triggerable.php: * public/api/upload-root.php: * public/include/admin-header.php: * public/include/json-header.php: * public/include/report-processor.php: * public/privileged-api/add-build-requests.php: * public/privileged-api/create-analysis-task.php: * public/privileged-api/create-test-group.php: * public/privileged-api/update-test-group.php: * public/v2/js/ember.js: * server-tests/api-build-requests-tests.js: * server-tests/api-commits-tests.js: * server-tests/api-report-commits-tests.js: * server-tests/api-report-tests.js: (emptyReport): (reportWitMismatchingCommitTime): (reportWithOneSecondCommitTimeDifference): (emptyWorkerReport): (emptySlaveReport): Deleted. * server-tests/api-test-groups.js: * server-tests/api-update-triggerable-tests.js: (updateWithOSXRepositoryGroup): (updateWithMacWebKitRepositoryGroups): * server-tests/api-upload-root-tests.js: (makeReport): (addWorkerAndCreateRootFile): * server-tests/privileged-api-add-build-requests-tests.js: (async createAnalysisTask): (async addTriggerableAndCreateTask): * server-tests/privileged-api-create-analysis-task-tests.js: * server-tests/privileged-api-create-test-group-tests.js: (createAnalysisTask): * server-tests/privileged-api-update-test-group-tests.js: (async createAnalysisTask): (async addTriggerableAndCreateTask): * server-tests/resources/common-operations.js: * server-tests/resources/mock-data.js: (MockData.addMockConfiguration): (MockData.set mockTestSyncConfigWithSingleBuilder): (MockData.sampleBuildData): * server-tests/resources/test-server.js: (TestServer.prototype.testConfig): * server-tests/tools-buildbot-triggerable-tests.js: * server-tests/tools-os-build-fetcher-tests.js: * server-tests/tools-sync-buildbot-integration-tests.js: (createTriggerable): * tools/detect-changes.js: (loadServerConfig): * tools/js/buildbot-syncer.js: (BuildbotBuildEntry.prototype.buildTag): (BuildbotSyncer): (BuildbotSyncer.prototype.scheduleRequest): (BuildbotSyncer.prototype.scheduleRequestInGroupIfAvailable): (BuildbotSyncer.prototype.pullBuildbot): (BuildbotSyncer._loadConfig): (BuildbotSyncer._validateAndMergeConfig): (BuildbotBuildEntry.prototype.slaveName): Deleted. * tools/js/buildbot-triggerable.js: (BuildbotTriggerable): (BuildbotTriggerable.prototype.updateTriggerable): (BuildbotTriggerable.prototype.async syncOnce): (BuildbotTriggerable.prototype.async _scheduleRequest): (BuildbotTriggerable.prototype._scheduleRequestIfWorkerIsAvailable): (BuildbotTriggerable.prototype._scheduleRequestWithLog): (BuildbotTriggerable._testGroupMapForBuildRequests): (BuildbotTriggerable.prototype._scheduleRequestIfSlaveIsAvailable): Deleted. * tools/js/database.js: * tools/js/os-build-fetcher.js: (prototype.async _reportCommits): * tools/js/privileged-api.js: (NodePrivilegedAPI.prototype.sendRequest): (NodePrivilegedAPI.configure): (NodePrivilegedAPI): * tools/pull-os-versions.py: (OSBuildFetcher.fetch_and_report_new_builds): * tools/run-analysis.js: (async analysisLoop): * tools/sync-buildbot.js: (syncLoop.const.makeTriggerable): (syncLoop): * tools/sync-commits.py: (Repository.fetch_commits_and_submit): * tools/sync-os-versions.js: (syncLoop): * tools/util.py: (submit_commits): * unit-tests/analysis-task-tests.js: * unit-tests/buildbot-syncer-tests.js: (sampleiOSConfig): (sampleBuildData): (async const): * unit-tests/checkconfig.js: * unit-tests/measurement-set-analyzer-tests.js: * unit-tests/privileged-api-tests.js: * unit-tests/retry-failed-build-requests-tests.js: * unit-tests/test-groups-tests.js: Canonical link: https://commits.webkit.org/235601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274800 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-22 21:23:38 +00:00
- (Build) **Worker** - Like a buildlsave in buildbot, a worker is a physical machine that submit data points to the dashboard. e.g. it could be a bot205 which submits data points as either "El Capitan MacBookAir7,1" or "Sierra MacBookAir7,1".
- **Build** - A build represents a set of data points reported by a specific builder. e.g. "El Capitan MacBookAir7,1" may report Speedometer score along with its subtests' results. All those data points being to a single build. This is a different concept from a build of software. A single build of WebKit, for example, could be ran on multiple builders (e.g. one MacBookAir and another MacBookPro) to generate two builds in the dashboard.
- **Bug Tracker** - A bug or an issue tracking tool such as Bugzilla and Radar.
- **Bug** - A bug number associated with a particular bug tracker.
- **Analysis Task** - An analysis task is created to analyze a progression or a regression across a range of data points for a specific test metric on a specific platform. Each analysis task can have multiple test groups.
- **Test Group** - A specific set of A/B testing tasks. Each group may have multiple build requests for each set A and B.
- **Build Request** - A specific testing task in a test group.
See [init-database.sql](init-database.sql) for the complete database schema.
## 7. Data Models for Test Results
In the performance dashboard, each test can have a parent test or arbitrary many child tests or subtests. Each test can then have multiple metrics to measure a specific unit'ed value. For example, Speedometer benchmark has the top level score, which is computed by the total time of running subtests. As such, the top level test has two metrics: *Score* and *Time* which is the aggregated total sum of *Time* metrics of the subtests:
**Speedometer** (A test)
+ *Score* (A metric of "Speedometer")
+ *Time : Total* (An aggregated metric of "Speedometer"; total sum of "Time" metrics of all subtests)
+ **AngularJS-TodoMVC** (A subtest of "Speedometer")
- *Time* (A metric of "AngularJS-TodoMVC")
+ **BackboneJS-TodoMVC** (A subtest of "Speedometer")
- *Time* (A metric of "BackboneJS-TodoMVC")
+ ...
Since each test metric can be measured on arbitrarily platforms (e.g. MacBookAir7,1 on macOS Sierra), the dashboard supports showing the *baseline* results (e.g. benchmark scores on Safari 10) in addition to the results from the *current* sofware (the trunk WebKit build), we use a triple (test metric, platform, type) called a *test configuration* to group a collection of data points reported to the dashboard.
Then each test configuration has arbitrary *test runs*. A test run represents the score or more broadly the result of a single test metric on a specific platform at a particular time. For example, running Speedometer once and reporting the results to the performance dashboard results in the creation of a test run for each of *Score* and *Time : Total* metrics as well as *Time* metrics of all subtests (e.g. AngularJS-TodoMVC). Each test run can then have arbitrarily many *iteration values* which are indivisual measurement of some test metric within the benchmark. For example, Speedometer runs the same test twenty times and uses the average time and the score of those twenty iterations to compute the final score. Each one of twenty iterations constitutes a single iteration value.
Each *test run* are related to one another via *builds* which is uniquely identified by its *builder* and a *build number*. For example in the following sample data points for Speedometer, two test runs 789 and 791 are reported by a build 1001, and test runs 876 and 878 are reported by build 1002. Because Speedometer's total score is computed using the time took to run subtests, a builder reported both values in a single build as expected.
(Speedometer's Score, Sierra MacBookAir7,1, "current")
+ Test run 789 - Mean: 154, Build: 1001
+ Iteration 1: 150
+ Iteration 2: 159
+ ...
+ Test run 876 - Mean: 153, Build: 1002
+ Iteration 1: 152
+ Iteration 2: 157
+ ...
(AngularJS-TodoMVC's Time, Sierra MacBookAir7,1, "current")
+ Test run 791 - Mean: 373, Build: 1001
+ Iteration 1: 450
+ Iteration 2: 380
+ ...
+ Test run 878 - Mean: 380, Build: 1002
+ Iteration 1: 448
+ Iteration 2: 395
+ ...
## 8. Reporting Results
To submit a new *build*, or a set of data points to an instance of the performance dashboard, you need to do the following:
[perf dashboard] Remove non-inclusive words from perf dashboard. https://bugs.webkit.org/show_bug.cgi?id=223505 Reviewed by Ryosuke Niwa. Removed most of non-inclusive terminology and replaced it with 'worker'. Make impacted APIs backward compatible during transition. The non-inclusive terminology will be removed after transition. * ReadMe.md: Removed non-inclusive words. * init-database.sql: Rename tables with non-inclusive words. * migrate-database.sql: Added migration SQL for existing database. * public/admin/build-workers.php: Renamed from Websites/perf.webkit.org/public/admin/build-slaves.php. * public/api/build-requests.php: * public/api/measurement-set.php: * public/api/report-commits.php: * public/api/runs.php: * public/api/update-triggerable.php: * public/api/upload-root.php: * public/include/admin-header.php: * public/include/json-header.php: * public/include/report-processor.php: * public/privileged-api/add-build-requests.php: * public/privileged-api/create-analysis-task.php: * public/privileged-api/create-test-group.php: * public/privileged-api/update-test-group.php: * public/v2/js/ember.js: * server-tests/api-build-requests-tests.js: * server-tests/api-commits-tests.js: * server-tests/api-report-commits-tests.js: * server-tests/api-report-tests.js: (emptyReport): (reportWitMismatchingCommitTime): (reportWithOneSecondCommitTimeDifference): (emptyWorkerReport): (emptySlaveReport): Deleted. * server-tests/api-test-groups.js: * server-tests/api-update-triggerable-tests.js: (updateWithOSXRepositoryGroup): (updateWithMacWebKitRepositoryGroups): * server-tests/api-upload-root-tests.js: (makeReport): (addWorkerAndCreateRootFile): * server-tests/privileged-api-add-build-requests-tests.js: (async createAnalysisTask): (async addTriggerableAndCreateTask): * server-tests/privileged-api-create-analysis-task-tests.js: * server-tests/privileged-api-create-test-group-tests.js: (createAnalysisTask): * server-tests/privileged-api-update-test-group-tests.js: (async createAnalysisTask): (async addTriggerableAndCreateTask): * server-tests/resources/common-operations.js: * server-tests/resources/mock-data.js: (MockData.addMockConfiguration): (MockData.set mockTestSyncConfigWithSingleBuilder): (MockData.sampleBuildData): * server-tests/resources/test-server.js: (TestServer.prototype.testConfig): * server-tests/tools-buildbot-triggerable-tests.js: * server-tests/tools-os-build-fetcher-tests.js: * server-tests/tools-sync-buildbot-integration-tests.js: (createTriggerable): * tools/detect-changes.js: (loadServerConfig): * tools/js/buildbot-syncer.js: (BuildbotBuildEntry.prototype.buildTag): (BuildbotSyncer): (BuildbotSyncer.prototype.scheduleRequest): (BuildbotSyncer.prototype.scheduleRequestInGroupIfAvailable): (BuildbotSyncer.prototype.pullBuildbot): (BuildbotSyncer._loadConfig): (BuildbotSyncer._validateAndMergeConfig): (BuildbotBuildEntry.prototype.slaveName): Deleted. * tools/js/buildbot-triggerable.js: (BuildbotTriggerable): (BuildbotTriggerable.prototype.updateTriggerable): (BuildbotTriggerable.prototype.async syncOnce): (BuildbotTriggerable.prototype.async _scheduleRequest): (BuildbotTriggerable.prototype._scheduleRequestIfWorkerIsAvailable): (BuildbotTriggerable.prototype._scheduleRequestWithLog): (BuildbotTriggerable._testGroupMapForBuildRequests): (BuildbotTriggerable.prototype._scheduleRequestIfSlaveIsAvailable): Deleted. * tools/js/database.js: * tools/js/os-build-fetcher.js: (prototype.async _reportCommits): * tools/js/privileged-api.js: (NodePrivilegedAPI.prototype.sendRequest): (NodePrivilegedAPI.configure): (NodePrivilegedAPI): * tools/pull-os-versions.py: (OSBuildFetcher.fetch_and_report_new_builds): * tools/run-analysis.js: (async analysisLoop): * tools/sync-buildbot.js: (syncLoop.const.makeTriggerable): (syncLoop): * tools/sync-commits.py: (Repository.fetch_commits_and_submit): * tools/sync-os-versions.js: (syncLoop): * tools/util.py: (submit_commits): * unit-tests/analysis-task-tests.js: * unit-tests/buildbot-syncer-tests.js: (sampleiOSConfig): (sampleBuildData): (async const): * unit-tests/checkconfig.js: * unit-tests/measurement-set-analyzer-tests.js: * unit-tests/privileged-api-tests.js: * unit-tests/retry-failed-build-requests-tests.js: * unit-tests/test-groups-tests.js: Canonical link: https://commits.webkit.org/235601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274800 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-22 21:23:38 +00:00
- Add a worker on `/admin/workers` if the worker used in the report has not already been added.
- Make a HTTP POST request to `/api/report`.
### Format of Results JSON
The JSON submitted to `/api/report` should be an array of dictionaries, and each dictionary should must contain the following key-value pairs representing a single run of tests and its subtests on a single build:
[perf dashboard] Remove non-inclusive words from perf dashboard. https://bugs.webkit.org/show_bug.cgi?id=223505 Reviewed by Ryosuke Niwa. Removed most of non-inclusive terminology and replaced it with 'worker'. Make impacted APIs backward compatible during transition. The non-inclusive terminology will be removed after transition. * ReadMe.md: Removed non-inclusive words. * init-database.sql: Rename tables with non-inclusive words. * migrate-database.sql: Added migration SQL for existing database. * public/admin/build-workers.php: Renamed from Websites/perf.webkit.org/public/admin/build-slaves.php. * public/api/build-requests.php: * public/api/measurement-set.php: * public/api/report-commits.php: * public/api/runs.php: * public/api/update-triggerable.php: * public/api/upload-root.php: * public/include/admin-header.php: * public/include/json-header.php: * public/include/report-processor.php: * public/privileged-api/add-build-requests.php: * public/privileged-api/create-analysis-task.php: * public/privileged-api/create-test-group.php: * public/privileged-api/update-test-group.php: * public/v2/js/ember.js: * server-tests/api-build-requests-tests.js: * server-tests/api-commits-tests.js: * server-tests/api-report-commits-tests.js: * server-tests/api-report-tests.js: (emptyReport): (reportWitMismatchingCommitTime): (reportWithOneSecondCommitTimeDifference): (emptyWorkerReport): (emptySlaveReport): Deleted. * server-tests/api-test-groups.js: * server-tests/api-update-triggerable-tests.js: (updateWithOSXRepositoryGroup): (updateWithMacWebKitRepositoryGroups): * server-tests/api-upload-root-tests.js: (makeReport): (addWorkerAndCreateRootFile): * server-tests/privileged-api-add-build-requests-tests.js: (async createAnalysisTask): (async addTriggerableAndCreateTask): * server-tests/privileged-api-create-analysis-task-tests.js: * server-tests/privileged-api-create-test-group-tests.js: (createAnalysisTask): * server-tests/privileged-api-update-test-group-tests.js: (async createAnalysisTask): (async addTriggerableAndCreateTask): * server-tests/resources/common-operations.js: * server-tests/resources/mock-data.js: (MockData.addMockConfiguration): (MockData.set mockTestSyncConfigWithSingleBuilder): (MockData.sampleBuildData): * server-tests/resources/test-server.js: (TestServer.prototype.testConfig): * server-tests/tools-buildbot-triggerable-tests.js: * server-tests/tools-os-build-fetcher-tests.js: * server-tests/tools-sync-buildbot-integration-tests.js: (createTriggerable): * tools/detect-changes.js: (loadServerConfig): * tools/js/buildbot-syncer.js: (BuildbotBuildEntry.prototype.buildTag): (BuildbotSyncer): (BuildbotSyncer.prototype.scheduleRequest): (BuildbotSyncer.prototype.scheduleRequestInGroupIfAvailable): (BuildbotSyncer.prototype.pullBuildbot): (BuildbotSyncer._loadConfig): (BuildbotSyncer._validateAndMergeConfig): (BuildbotBuildEntry.prototype.slaveName): Deleted. * tools/js/buildbot-triggerable.js: (BuildbotTriggerable): (BuildbotTriggerable.prototype.updateTriggerable): (BuildbotTriggerable.prototype.async syncOnce): (BuildbotTriggerable.prototype.async _scheduleRequest): (BuildbotTriggerable.prototype._scheduleRequestIfWorkerIsAvailable): (BuildbotTriggerable.prototype._scheduleRequestWithLog): (BuildbotTriggerable._testGroupMapForBuildRequests): (BuildbotTriggerable.prototype._scheduleRequestIfSlaveIsAvailable): Deleted. * tools/js/database.js: * tools/js/os-build-fetcher.js: (prototype.async _reportCommits): * tools/js/privileged-api.js: (NodePrivilegedAPI.prototype.sendRequest): (NodePrivilegedAPI.configure): (NodePrivilegedAPI): * tools/pull-os-versions.py: (OSBuildFetcher.fetch_and_report_new_builds): * tools/run-analysis.js: (async analysisLoop): * tools/sync-buildbot.js: (syncLoop.const.makeTriggerable): (syncLoop): * tools/sync-commits.py: (Repository.fetch_commits_and_submit): * tools/sync-os-versions.js: (syncLoop): * tools/util.py: (submit_commits): * unit-tests/analysis-task-tests.js: * unit-tests/buildbot-syncer-tests.js: (sampleiOSConfig): (sampleBuildData): (async const): * unit-tests/checkconfig.js: * unit-tests/measurement-set-analyzer-tests.js: * unit-tests/privileged-api-tests.js: * unit-tests/retry-failed-build-requests-tests.js: * unit-tests/test-groups-tests.js: Canonical link: https://commits.webkit.org/235601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274800 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-22 21:23:38 +00:00
- `builderName` - The name of a builder. A single worker may submit to multiple builders.
- `workerName` - The name of a worker present on `/admin/workers`.
- `workerPassword` - The password associated with the worker.
- `buildNumber` - The string that uniquely identifies a given build on the builder.
- `buildTime` - The time at which this build started in **UTC** (Use ISO time format such as `2013-01-31T22:22:12.121051`). This is completely independent of timestamp of repository revisions.
- `platform` - The human-readable name of a platform such as `Mountain Lion` or `Windows 7`.
- `revisions` - A dictionary that maps a repository name to a dictionary with "revision" and optionally "timestamp" as keys each of which maps to, respectively, the revision in **string** associated with the build and the times at which the revision was committed to the repository respectively. e.g. `{"WebKit": {"revision": "123", "timestamp": "2001-09-10T17:53:19.000000Z"}}`
- `tests` - A dictionary that maps a test name to a dictionary that represents a test. The value of a test
itself is a dictionary with the following keys:
- `metrics` - A dictionary that maps a metric name to a dictionary of configuration types to an array of iteration values. e.g. `{"Time": {"current": [629.1, 654.8, 598.9], "target": [544, 585.1, 556]}}`
When a metric represents an aggregated value, it should be an array of aggregator names instead. e.g. `{"Time": ["Arithmetic", "Geometric"]}` **This format may change in near future**.
- `url` - The URL of the test. This value should not change over time as only the latest value is stored in the application.
- `tests` - A dictionary of tests; the same format as this dictionary.
In the example below, we have the top-level test named "PageLoadTime". It measures two metrics: `Time` and `FrameRate`.
`Time` metric is the arithmetic mean of each subtest's `Time` metric (webkit.org and www.w3.org).
The computed arithmetic means are `[965.6, 981.35, 947.15]` in this case.
The test also reports `FrameRate` but this metric is measured only for the entire suite not per each subtest.
```json
[{
"buildNumber": "651",
"buildTime": "2013-01-31T22:22:12.121051",
"builderName": "Trunk Mountain Lion Performance Tests",
[perf dashboard] Remove non-inclusive words from perf dashboard. https://bugs.webkit.org/show_bug.cgi?id=223505 Reviewed by Ryosuke Niwa. Removed most of non-inclusive terminology and replaced it with 'worker'. Make impacted APIs backward compatible during transition. The non-inclusive terminology will be removed after transition. * ReadMe.md: Removed non-inclusive words. * init-database.sql: Rename tables with non-inclusive words. * migrate-database.sql: Added migration SQL for existing database. * public/admin/build-workers.php: Renamed from Websites/perf.webkit.org/public/admin/build-slaves.php. * public/api/build-requests.php: * public/api/measurement-set.php: * public/api/report-commits.php: * public/api/runs.php: * public/api/update-triggerable.php: * public/api/upload-root.php: * public/include/admin-header.php: * public/include/json-header.php: * public/include/report-processor.php: * public/privileged-api/add-build-requests.php: * public/privileged-api/create-analysis-task.php: * public/privileged-api/create-test-group.php: * public/privileged-api/update-test-group.php: * public/v2/js/ember.js: * server-tests/api-build-requests-tests.js: * server-tests/api-commits-tests.js: * server-tests/api-report-commits-tests.js: * server-tests/api-report-tests.js: (emptyReport): (reportWitMismatchingCommitTime): (reportWithOneSecondCommitTimeDifference): (emptyWorkerReport): (emptySlaveReport): Deleted. * server-tests/api-test-groups.js: * server-tests/api-update-triggerable-tests.js: (updateWithOSXRepositoryGroup): (updateWithMacWebKitRepositoryGroups): * server-tests/api-upload-root-tests.js: (makeReport): (addWorkerAndCreateRootFile): * server-tests/privileged-api-add-build-requests-tests.js: (async createAnalysisTask): (async addTriggerableAndCreateTask): * server-tests/privileged-api-create-analysis-task-tests.js: * server-tests/privileged-api-create-test-group-tests.js: (createAnalysisTask): * server-tests/privileged-api-update-test-group-tests.js: (async createAnalysisTask): (async addTriggerableAndCreateTask): * server-tests/resources/common-operations.js: * server-tests/resources/mock-data.js: (MockData.addMockConfiguration): (MockData.set mockTestSyncConfigWithSingleBuilder): (MockData.sampleBuildData): * server-tests/resources/test-server.js: (TestServer.prototype.testConfig): * server-tests/tools-buildbot-triggerable-tests.js: * server-tests/tools-os-build-fetcher-tests.js: * server-tests/tools-sync-buildbot-integration-tests.js: (createTriggerable): * tools/detect-changes.js: (loadServerConfig): * tools/js/buildbot-syncer.js: (BuildbotBuildEntry.prototype.buildTag): (BuildbotSyncer): (BuildbotSyncer.prototype.scheduleRequest): (BuildbotSyncer.prototype.scheduleRequestInGroupIfAvailable): (BuildbotSyncer.prototype.pullBuildbot): (BuildbotSyncer._loadConfig): (BuildbotSyncer._validateAndMergeConfig): (BuildbotBuildEntry.prototype.slaveName): Deleted. * tools/js/buildbot-triggerable.js: (BuildbotTriggerable): (BuildbotTriggerable.prototype.updateTriggerable): (BuildbotTriggerable.prototype.async syncOnce): (BuildbotTriggerable.prototype.async _scheduleRequest): (BuildbotTriggerable.prototype._scheduleRequestIfWorkerIsAvailable): (BuildbotTriggerable.prototype._scheduleRequestWithLog): (BuildbotTriggerable._testGroupMapForBuildRequests): (BuildbotTriggerable.prototype._scheduleRequestIfSlaveIsAvailable): Deleted. * tools/js/database.js: * tools/js/os-build-fetcher.js: (prototype.async _reportCommits): * tools/js/privileged-api.js: (NodePrivilegedAPI.prototype.sendRequest): (NodePrivilegedAPI.configure): (NodePrivilegedAPI): * tools/pull-os-versions.py: (OSBuildFetcher.fetch_and_report_new_builds): * tools/run-analysis.js: (async analysisLoop): * tools/sync-buildbot.js: (syncLoop.const.makeTriggerable): (syncLoop): * tools/sync-commits.py: (Repository.fetch_commits_and_submit): * tools/sync-os-versions.js: (syncLoop): * tools/util.py: (submit_commits): * unit-tests/analysis-task-tests.js: * unit-tests/buildbot-syncer-tests.js: (sampleiOSConfig): (sampleBuildData): (async const): * unit-tests/checkconfig.js: * unit-tests/measurement-set-analyzer-tests.js: * unit-tests/privileged-api-tests.js: * unit-tests/retry-failed-build-requests-tests.js: * unit-tests/test-groups-tests.js: Canonical link: https://commits.webkit.org/235601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274800 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-22 21:23:38 +00:00
"workerName": "bot-111",
"workerPassword": "somePassword",
"platform": "Mountain Lion",
"revisions": {
"OS X": {
"revision": "10.8.2"
},
"WebKit": {
"revision": "141469",
"timestamp": "2013-01-31T20:55:15.452267Z"
}
},
"tests": {
"PageLoadTime": {
"metrics": {
"Time": ["Arithmetic"],
"FrameRate": {
"current": [31, 24, 29]
}
},
"tests": {
"webkit.org": {
"metrics": {
"Time": {
"current": [629.1, 654.8, 598.9]
}
},
"url": "https://webkit.org/"
},
"www.w3.org": {
"metrics": {
"Time": {
"current": [1302.1, 1307.9, 1295.4]
}
},
"url": "https://www.w3.org/"
}
}
}
}
}]
```