+2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
+
+ Update ReadMe.md and Install.md per database changes
+ https://bugs.webkit.org/show_bug.cgi?id=146076
+
+ Reviewed by Darin Adler.
+
+ Updated.
+
+ * Install.md:
+ * ReadMe.md:
+
2015-06-17 Ryosuke Niwa <rniwa@webkit.org>
Increase the popup dismissal time from 100ms to 500ms
1. Change DocumentRoot to `/Volumes/Data/perf.webkit.org/public/`
2. Uncomment `"LoadModule php5_module libexec/apache2/libphp5.so"`
- 3. Disable directives for CGI-Executables
- 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/`
We recommend protection via Digest Auth on https connection.
-Generate a password file via `htdigest -c <path> <realm> <username>`, and then create admin/.htaccess with:
-
- AuthType Digest
- AuthName "<Realm>"
- AuthDigestProvider file
- AuthUserFile "<Realm>"
- Require valid-user
-
-where <Realm> is replaced with the realm of your choice, which will be displayed on the username/password input box.
+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
+```
# Configuring PostgreSQL
1. Create database: `/Applications/Server.app/Contents/ServerRoot/usr/bin/initdb /Volumes/Data/perf.webkit.org/PostgresSQL`
-2. Start database:
- `/Applications/Server.app/Contents/ServerRoot/usr/bin/pg_ctl -D /Volumes/Data/perf.webkit.org/PostgresSQL
- -l logfile -o "-k /Volumes/Data/perf.webkit.org/PostgresSQL" start`
+2. Start database: `/Applications/Server.app/Contents/ServerRoot/usr/bin/pg_ctl -D /Volumes/Data/perf.webkit.org/PostgresSQL -l logfile -o "-k /Volumes/Data/perf.webkit.org/PostgresSQL" start`
## Creating a Database and a User
The binaries located in PostgreSQL's directory, or if you're using Server.app in /Applications/Server.app/Contents/ServerRoot/usr/bin/
-1. Create a database: `createdb webkit-perf-db -h localhost`
-2. Create a user: `createuser -P -S -e webkit-perf-db-user -h localhost`
-3. Connect to database: `psql webkit-perf-db -h localhost`
+1. Create a database: `/Applications/Server.app/Contents/ServerRoot/usr/bin/createdb webkit-perf-db -h localhost`
+2. Create a user: `/Applications/Server.app/Contents/ServerRoot/usr/bin/createuser -P -S -e webkit-perf-db-user -h localhost`
+3. Connect to database: `/Applications/Server.app/Contents/ServerRoot/usr/bin/psql webkit-perf-db -h localhost`
4. Grant all permissions to the new user: `grant all privileges on database "webkit-perf-db" to "webkit-perf-db-user";`
5. Update database/config.json.
## Initializing the Database
Run `database/init-database.sql` in psql as `webkit-perf-db-user`:
-`psql webkit-perf-db -h localhost --username webkit-perf-db-user -f init-database.sql`
+`/Applications/Server.app/Contents/ServerRoot/usr/bin/psql webkit-perf-db -h localhost --username webkit-perf-db-user -f init-database.sql`
## Making a Backup of the Database
-Run `/Applications/Server.app/Contents/ServerRoot/usr/bin/pg_dump -h localhost --no-owner -f <filepath> safari-perf-db`
+Run `/Applications/Server.app/Contents/ServerRoot/usr/bin/pg_dump -h localhost --no-owner -f <filepath> webkit-perf-db | gzip > backup.gz`
+
+To restore, setup a new database and run `gunzip backup.gz | /Applications/Server.app/Contents/ServerRoot/usr/bin/psql webkit-perf-db -h localhost --username webkit-perf-db-user`
To submit the results of a new test to an instance of the app, you need the following:
- - A builder already added on `/admin/builders`
+ - A slave on `/admin/slaves`
- A script that submits a JSON payload of the supported format via a HTTP/HTTPS request to `/api/report`
JSON Format
The JSON submitted to `/api/report` should be an array of dictionaries, each of which should
contain the following key-value pairs representing a single run of tests on a single build:
-- `builderName` - The name of a builder present on `/admin/builders`.
-- `builderPassword` - The password associated with the builder.
+- `builderName` - The name of a builder. A single slave may submit to multiple builders.
+- `slaveName` - The name of a slave present on `/admin/slaves`.
+- `slavePassword` - The password associated with the slave.
- `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.
in the application.
- `tests` - A dictionary of tests; the same format as this dictionary.
-A sample JSON:
+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": "bot-111",
- "builderPassword": "********",
+ "builderName": "Trunk Mountain Lion Performance Tests",
+ "slaveName": "bot-111",
+ "slavePassword": "somePassword",
"platform": "Mountain Lion",
"revisions": {
"OS X": {
}
},
"tests": {
- "PageLoadingTest": {
+ "PageLoadTime": {
"metrics": {
- "Time": [
- "Arithmetic",
- "Geometric"
- ]
- },
+ "Time": ["Arithmetic"],
+ "FrameRate": {
+ "current": [31, 24, 29]
+ }
+ }
"tests": {
"webkit.org": {
"metrics": {
"Time": {
- "current": [
- 629.1,
- 654.8,
- 598.9
- ]
+ "current": [629.1, 654.8, 598.9]
}
- }
+ },
+ "url": "https://webkit.org/"
},
- "url": "http://www.webkit.org/"
- }
- }
+ "www.w3.org": {
+ "metrics": {
+ "Time": {
+ "current": [1302.1, 1307.9, 1295.4]
+ }
+ },
+ "url": "https://www.w3.org/"
+ },
+ },
+ },
}
}]
+```
FIXME: Add a section describing how the application is structured.