Merge branch 'main' into install-script
This commit is contained in:
commit
3d229378d2
|
|
@ -5,3 +5,4 @@
|
|||
!LICENSE
|
||||
!npm-shrinkwrap.json
|
||||
!docker
|
||||
!tools/postinstall.js
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
docs/*
|
||||
docker/*
|
||||
assets/*
|
||||
sitespeed-result/*
|
||||
lib/plugins/yslow/scripts/*
|
||||
lib/plugins/html/assets/js/*
|
||||
bin/browsertimeWebPageReplay.js
|
||||
test/data/*
|
||||
test/prepostscripts/*
|
||||
|
|
@ -22,12 +22,20 @@ jobs:
|
|||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Get the tag
|
||||
id: tag
|
||||
uses: dawidd6/action-get-tag@v1
|
||||
with:
|
||||
strip_v: true
|
||||
- name: Extract version
|
||||
id: extract_version
|
||||
run: |
|
||||
VERSION_TAG=${GITHUB_REF#refs/tags/}
|
||||
echo "Git tag: $VERSION_TAG"
|
||||
|
||||
VERSION=${VERSION_TAG#v}
|
||||
echo "Full version without 'v': $VERSION"
|
||||
|
||||
MAJOR_VERSION=${VERSION%%.*}
|
||||
echo "Major version: $MAJOR_VERSION"
|
||||
|
||||
echo "SITESPEED_VERSION=$VERSION" >> $GITHUB_OUTPUT
|
||||
echo "SITESPEED_MAJOR_VERSION=$MAJOR_VERSION" >> $GITHUB_OUTPUT
|
||||
-
|
||||
name: Build and push sitespeed.io
|
||||
uses: docker/build-push-action@v5
|
||||
|
|
@ -36,7 +44,10 @@ jobs:
|
|||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
provenance: false
|
||||
tags: sitespeedio/sitespeed.io:${{steps.tag.outputs.tag}},sitespeedio/sitespeed.io:latest
|
||||
tags: |
|
||||
sitespeedio/sitespeed.io:${{ steps.extract_version.outputs.SITESPEED_VERSION }}
|
||||
sitespeedio/sitespeed.io:${{ steps.extract_version.outputs.SITESPEED_MAJOR_VERSION }}
|
||||
sitespeedio/sitespeed.io:latest
|
||||
-
|
||||
name: Build and push sitespeed.io+1
|
||||
uses: docker/build-push-action@v5
|
||||
|
|
@ -44,21 +55,12 @@ jobs:
|
|||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
file: ./docker/Dockerfile-plus1
|
||||
build-args: version=${{steps.tag.outputs.tag}}
|
||||
build-args: version=${{ steps.extract_version.outputs.SITESPEED_VERSION }}
|
||||
push: true
|
||||
provenance: false
|
||||
tags: sitespeedio/sitespeed.io:${{steps.tag.outputs.tag}}-plus1
|
||||
-
|
||||
name: Build and push sitespeed.io+wpt
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
file: ./docker/Dockerfile-webpagetest
|
||||
build-args: version=${{steps.tag.outputs.tag}}
|
||||
push: true
|
||||
provenance: false
|
||||
tags: sitespeedio/sitespeed.io:${{steps.tag.outputs.tag}}-webpagetest
|
||||
tags: |
|
||||
sitespeedio/sitespeed.io:${{ steps.extract_version.outputs.SITESPEED_VERSION }}-plus1
|
||||
sitespeedio/sitespeed.io:${{ steps.extract_version.outputs.SITESPEED_MAJOR_VERSION }}-plus1
|
||||
-
|
||||
name: Build and push sitespeed.io-slim
|
||||
uses: docker/build-push-action@v5
|
||||
|
|
@ -66,7 +68,9 @@ jobs:
|
|||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
file: ./Dockerfile-slim
|
||||
build-args: version=${{steps.tag.outputs.tag}}
|
||||
build-args: version=${{ steps.extract_version.outputs.SITESPEED_VERSION }}
|
||||
push: true
|
||||
provenance: false
|
||||
tags: sitespeedio/sitespeed.io:${{steps.tag.outputs.tag}}-slim
|
||||
tags: |
|
||||
sitespeedio/sitespeed.io:${{ steps.extract_version.outputs.SITESPEED_VERSION }}-slim
|
||||
sitespeedio/sitespeed.io:${{ steps.extract_version.outputs.SITESPEED_MAJOR_VERSION }}-slim
|
||||
|
|
@ -35,7 +35,7 @@ jobs:
|
|||
#with:
|
||||
# firefox-version: '94.0'
|
||||
- name: Setup environment
|
||||
run: docker-compose -f test/docker-compose.yml up -d
|
||||
run: docker compose -f test/docker-compose.yml up -d
|
||||
- name: Browser versions
|
||||
run: |
|
||||
google-chrome --version
|
||||
|
|
@ -71,9 +71,9 @@ jobs:
|
|||
- name: Run test without a CLI
|
||||
run: xvfb-run node test/runWithoutCli.js
|
||||
- name: Run test with Influx 1.8
|
||||
run: bin/sitespeed.js http://127.0.0.1:3001/simple/ -n 1 --influxdb.host 127.0.0.1 --xvfb --logToFile
|
||||
run: bin/sitespeed.js http://127.0.0.1:3001/simple/ -n 1 --influxdb.host 127.0.0.1 --xvfb --logToFile --resultBaseUrl https://result.sitespeed.io --influxdb.annotationScreenshot=true
|
||||
- name: Run test with Influx 2.6.1
|
||||
run: bin/sitespeed.js http://127.0.0.1:3001/simple/ -n 1 --influxdb.host 127.0.0.1 --influxdb.port 8087 --influxdb.version 2 --influxdb.organisation sitespeed --influxdb.token sitespeed --xvfb
|
||||
run: bin/sitespeed.js http://127.0.0.1:3001/simple/ -n 1 --influxdb.host 127.0.0.1 --influxdb.port 8087 --influxdb.version 2 --influxdb.organisation sitespeed --influxdb.token sitespeed --xvfb --resultBaseUrl https://result.sitespeed.io --influxdb.annotationScreenshot=true
|
||||
- name: Run Chrome test with config
|
||||
run: node bin/sitespeed.js --config test/exampleConfig.json http://127.0.0.1:3001/simple/ --xvfb
|
||||
- name: Run Chrome test using compare plugin
|
||||
|
|
|
|||
369
CHANGELOG.md
369
CHANGELOG.md
|
|
@ -1,5 +1,374 @@
|
|||
# CHANGELOG - sitespeed.io (we use [semantic versioning](https://semver.org))
|
||||
|
||||
## 35.7.5 - 2024-12-23
|
||||
### Fixed
|
||||
* Update to faststat 0.0.7 [#4347](https://github.com/sitespeedio/sitespeed.io/pull/4347).
|
||||
* Update dev dependencies [#4345](https://github.com/sitespeedio/sitespeed.io/pull/4345).
|
||||
* Let analysisstorer know about webpagereplay so that correct information is displayed [#4349](https://github.com/sitespeedio/sitespeed.io/pull/4349).
|
||||
* Pass on webpagereplay flag to browsertime [#4350](https://github.com/sitespeedio/sitespeed.io/pull/4350).
|
||||
* Update to Browsertime 23.5.0 [#4351](https://github.com/sitespeedio/sitespeed.io/pull/4351)
|
||||
|
||||
## 35.7.4 - 2024-12-20
|
||||
### Fixed
|
||||
* Updated to Browsertime 23.4.5 that have a fix for visual metrics running videos from mobile [#4343](https://github.com/sitespeedio/sitespeed.io/pull/4343).
|
||||
|
||||
## 35.7.3 - 2024-12-18
|
||||
### Fixed
|
||||
* Add validation for dataset lengths for the Wilcoxon test. Thank you [Pavel Bairov](https://github.com/Amerousful) for PR [4341](https://github.com/sitespeedio/sitespeed.io/pull/4341).
|
||||
* Updated to Browsertime 23.4.4 that has a more robust check for gnirehtet configuration [#4342](https://github.com/sitespeedio/sitespeed.io/pull/4342).
|
||||
|
||||
## 35.7.2 - 2024-12-14
|
||||
### Fixed
|
||||
* Added extra logs if the compare plugin fails when using Python so we easily can see the input parameters.
|
||||
|
||||
## 35.7.1 - 2024-12-11
|
||||
### Fixed
|
||||
* Updated to Browsertime 23.4.3 [#4336](https://github.com/sitespeedio/sitespeed.io/pull/4336).
|
||||
* Make sure Firefox displays power consumption in mWH [#4334](https://github.com/sitespeedio/sitespeed.io/pull/4334).
|
||||
|
||||
## 35.7.0 - 2024-11-30
|
||||
### Added
|
||||
* Firefox 133 in the Docker container [#4327](https://github.com/sitespeedio/sitespeed.io/pull/4327).
|
||||
|
||||
### Fixed
|
||||
* Axe Core 4.10.2 [#3328](https://github.com/sitespeedio/sitespeed.io/pull/4328)
|
||||
* Fix security warnings in the Docker container.
|
||||
|
||||
## 35.6.1 - 2024-11-23
|
||||
### Fixed
|
||||
* Make sure the compare plugin can handle if your run Firefox with CPU options [#4324](https://github.com/sitespeedio/sitespeed.io/pull/4324).
|
||||
|
||||
## 35.6.0 - 2024-11-23
|
||||
### Added
|
||||
* Updated to Firefox 132 and Edge 131 in the Docketr container. The performance regression in Firefox 132 [#2211](https://github.com/sitespeedio/browsertime/issues/2211) has been fixed.
|
||||
* Browsertime has been updated to [23.4.1](https://github.com/sitespeedio/browsertime/blob/main/CHANGELOG.md#2341----2024-11-23). There's a couple of notable additions:
|
||||
* If you use `--enableProfileRun` for Firefox the trace will include HTTP requests
|
||||
* If you collect the Chrome timeline, we will automatically add some more timings and a custom timeline to devtools,inspired by [
|
||||
Andy Davies](https://github.com/andydavies) and the cool [https://github.com/andydavies/perf-timeline-to-devtools-profile](https://github.com/andydavies/perf-timeline-to-devtools-profile).
|
||||
|
||||
|
||||
## 35.5.0 - 2024-11-08
|
||||
### Added
|
||||
* Upgraded Chrome/Chromedriver to 131 (with a [new Browsertime](https://github.com/sitespeedio/browsertime/blob/main/CHANGELOG.md#2330---2024-11-12)) [#4316](https://github.com/sitespeedio/sitespeed.io/pull/4316).
|
||||
|
||||
## 35.4.1 - 2024-11-08
|
||||
### Fixed
|
||||
* It seems to be a [problem](https://bugzilla.mozilla.org/show_bug.cgi?id=1930110) with Firefox 132 inside of Docker. Lets return to 131 for some time [#4313](https://github.com/sitespeedio/sitespeed.io/pull/4313).
|
||||
|
||||
## 35.4.0 - 2024-11-08
|
||||
### Added
|
||||
* Firefox 132 [#4309](https://github.com/sitespeedio/sitespeed.io/pull/4309).
|
||||
|
||||
## 35.3.1 - 2024-11-04
|
||||
### Fixed
|
||||
* Fix compare plugin when you run visual metrics contentful and perceptual metrics [#4308](https://github.com/sitespeedio/sitespeed.io/pull/4308).
|
||||
|
||||
## 35.3.0 - 2024-10-20
|
||||
### Added
|
||||
* Update to Chrome 130 in the Docker container [#4299](https://github.com/sitespeedio/sitespeed.io/pull/4299).
|
||||
* Updated to Browsertime [23.2.0](https://github.com/sitespeedio/browsertime/blob/main/CHANGELOG.md#2320---2024-10-20) that has a fix for installting Geckodriver on ARM containers [#4303](https://github.com/sitespeedio/sitespeed.io/pull/4303).
|
||||
* Updated Chromium from 107 to 130 in the ARM Docker container. This was possible by using the Chromium built by Microsoft (M$) in Playwright [#4304](https://github.com/sitespeedio/sitespeed.io/pull/4304).
|
||||
|
||||
## 35.2.0 - 2024-10-14
|
||||
### Added
|
||||
From this release we release a new Docker container with the major version tag! This means that there will be a 35.2.0 and a 35 tag from this release. We follow [semantic versioning](https://semver.org) so you can safely stay and update the major version tag.
|
||||
|
||||
## 35.1.4 - 2024-10-13
|
||||
### Fixed
|
||||
* Changed `--help` message for `--firefox.includeResponseBodies`. Include response bodies for Firefox stopped to work when we updated how we get the HAR (changed to bidi HAR). See [#4295](https://github.com/sitespeedio/sitespeed.io/issues/4295).
|
||||
|
||||
## 35.1.3 - 2024-10-11
|
||||
### Fixed
|
||||
* Updated to Browsertim 23.1.2 [#4294](https://github.com/sitespeedio/sitespeed.io/pull/4294) that includes an update Chrome-HAR that swallows if an timing is broken from the Chrome trace.
|
||||
|
||||
## 35.1.2 - 2024-10-09
|
||||
### Fixed
|
||||
* Make sure crux setup messages are skipt for analysisstorer [4291](https://github.com/sitespeedio/sitespeed.io/pull/4291).
|
||||
|
||||
## 35.1.1 - 2024-10-08
|
||||
### Fixed
|
||||
* Updated to [Browsertime 23.1.1](https://github.com/sitespeedio/browsertime/blob/main/CHANGELOG.md#2311---2024-10-08) that fixes the Firefox HAR timing problem [#4289](https://github.com/sitespeedio/sitespeed.io/pull/4289).
|
||||
|
||||
|
||||
## 35.1.0 - 2024-10-08
|
||||
### Added
|
||||
* Browsertime [23.1.0](https://github.com/sitespeedio/browsertime/blob/main/CHANGELOG.md#2310---2024-10-08) [#4287](https://github.com/sitespeedio/sitespeed.io/pull/4287).
|
||||
* Firefox 131 and Edge 129 in the Docker container [#4284](https://github.com/sitespeedio/sitespeed.io/pull/4284).
|
||||
|
||||
## 35.0.0 - 2024-09-24
|
||||
### Breaking
|
||||
* Disable camel case configuration that comes automatically with yargs [#4251](https://github.com/sitespeedio/sitespeed.io/pull/4251). This is a breaking change ONLY if you didn't follow our doecumentation/help and used internal YARGS configuration names for our CLI configuration.
|
||||
|
||||
### Fixed
|
||||
* Updated to [Browsertime 23.0.0](https://github.com/sitespeedio/browsertime/blob/main/CHANGELOG.md#2300---2024-09-23).
|
||||
* Fixes the internal configuration object for android. The old solution created an array with objects instead of just keys on the object.[#4282](https://github.com/sitespeedio/sitespeed.io/pull/4282).
|
||||
|
||||
## 34.14.0 - 2024-09-19
|
||||
### Added
|
||||
* Chrome 129 in the Docker container [#4281](https://github.com/sitespeedio/sitespeed.io/pull/4281).
|
||||
|
||||
## 34.13.0 - 2024-09-18
|
||||
### Added
|
||||
* Add support for `--ignoreExtends` that remove extends from your configuration file. This is useful when you want to test configuration locally on your machine and your test server extends configurations like uploading data to a data storage [#4280](https://github.com/sitespeedio/sitespeed.io/pull/4280).
|
||||
|
||||
### Fixed
|
||||
* Fixed support gnirehtet when using `--preWarmServer` [#4277](https://github.com/sitespeedio/sitespeed.io/pull/4277).
|
||||
* Fix broken log message when using the compare plugin, comparing tests with different amount of runs. Thank you [Roel Vreuls](https://github.com/roelvv) for PR [#4279](https://github.com/sitespeedio/sitespeed.io/pull/4279).
|
||||
|
||||
## 34.12.1 - 2024-09-13
|
||||
### Fixed
|
||||
* Updated to [Browsertime 22.10.2](https://github.com/sitespeedio/browsertime/blob/main/CHANGELOG.md#22102---2024-09-13) that fixes a bug in the wait.byIdAndVisible command.
|
||||
|
||||
## 34.12.0 - 2024-09-11
|
||||
### Added
|
||||
* Firefox 130 [#4266](https://github.com/sitespeedio/sitespeed.io/pull/4266) and Edge 128 [#4267](https://github.com/sitespeedio/sitespeed.io/pull/4267) in the Docker container.
|
||||
|
||||
### Fixed
|
||||
* Removed First input delay (FID) from Crux since Crux already stopped using FID [#4273](https://github.com/sitespeedio/sitespeed.io/pull/4273).
|
||||
* Visual change graph is in ms [#4271](https://github.com/sitespeedio/sitespeed.io/pull/4271)
|
||||
* Fix x-axis label collision on visual change graph, thank you [Anshuman Tripathi](https://github.com/4nshuman) for PR [#4269](https://github.com/sitespeedio/sitespeed.io/pull/4269).
|
||||
|
||||
## 34.11.1 - 2024-09-04
|
||||
### Fixed
|
||||
* Updated to Browsertime 22.10.1 that fixes generating HARs for Firefox 130 [#4265](https://github.com/sitespeedio/sitespeed.io/pull/4265).
|
||||
|
||||
|
||||
## 34.11.0 - 2024-08-27
|
||||
### Added
|
||||
* Updated the Docker container to use Chrome 128 [#4261](https://github.com/sitespeedio/sitespeed.io/pull/4261).
|
||||
|
||||
## 34.10.0 - 2024-08-27
|
||||
### Added
|
||||
* Updated Docker container to use Firefox 129 and Edge 127 [#4254](https://github.com/sitespeedio/sitespeed.io/pull/4254).
|
||||
* Browsertime [22.9.0](https://github.com/sitespeedio/browsertime/blob/main/CHANGELOG.md#2290---2024-08-26) [#4260](https://github.com/sitespeedio/sitespeed.io/pull/4260).
|
||||
|
||||
### Fixed
|
||||
* Make sure requestheaders and cookies are sent when you use prewarm the server [#4259](https://github.com/sitespeedio/sitespeed.io/pull/4259).
|
||||
|
||||
## 34.9.0 - 2024-07-30
|
||||
### Added
|
||||
* Browsertime 22.8.0 that disables the choose search engine screen on Chrome 127 and updated Edgedriver to 126 [#4244](https://github.com/sitespeedio/sitespeed.io/pull/4244).
|
||||
|
||||
### Fixed
|
||||
* Added extra guard when you disables screenshots [#4245](https://github.com/sitespeedio/sitespeed.io/pull/4245).
|
||||
* Axe core 4.10.0 [#4246](https://github.com/sitespeedio/sitespeed.io/pull/4246).
|
||||
|
||||
## 34.8.2 - 2024-07-29
|
||||
### Fixed
|
||||
* WebPageReplay: Fix for reading configuration. Reading a saved configuration didn't handle camel case correctly, creating arrays for single values [#4242](https://github.com/sitespeedio/sitespeed.io/pull/4242).
|
||||
|
||||
## 34.8.1 - 2024-07-27
|
||||
### Fixed
|
||||
* Add missing slug for influxdb, thank you [pavel bairov](https://github.com/Amerousful) for PR [#4240](https://github.com/sitespeedio/sitespeed.io/pull/4240).
|
||||
|
||||
## 34.8.0 - 2024-07-26
|
||||
### Added
|
||||
* Chrome 127, Chromedriver 127 and Browsertime 22.7.0 [#4239](https://github.com/sitespeedio/sitespeed.io/pull/4239).
|
||||
|
||||
### Fixed
|
||||
* InfluxDB 2.x, Annotations. Send tags for filtering, thank you [pavel bairov](https://github.com/Amerousful) for PR [#4197](https://github.com/sitespeedio/sitespeed.io/pull/4197).
|
||||
|
||||
## 34.7.1 - 2024-07-20
|
||||
### Fixed
|
||||
* Fix so the link to the geckoprofiler data works/shows again [#4234](https://github.com/sitespeedio/sitespeed.io/pull/4234).
|
||||
|
||||
## 34.7.0 - 2024-07-15
|
||||
### Added
|
||||
* Update to Browsertime [22.6.0](https://github.com/sitespeedio/browsertime/blob/main/CHANGELOG.md#2260---2024-07-15) [#4226](https://github.com/sitespeedio/sitespeed.io/pull/4226).
|
||||
* Crux: Push navigation types and form factor data by default to TSDB [#4227](https://github.com/sitespeedio/sitespeed.io/pull/4227).
|
||||
|
||||
## 34.6.0 - 2024-07-12
|
||||
### Added
|
||||
* Crux: Include RTT p75 [#4225](https://github.com/sitespeedio/sitespeed.io/pull/4225).
|
||||
|
||||
## 34.5.0 - 2024-07-12
|
||||
### Added
|
||||
* Crux: Add navigation types, and form factors. Fix colors to align with Grafana colors and fix broken legend colors [#4223](https://github.com/sitespeedio/sitespeed.io/pull/4223).
|
||||
* Sustainable: Make it possible to choose sustainable model version (for model swd). To use the latest version for add: `--sustainable.model swd --sustainable.modelVersion 4` [#4224](https://github.com/sitespeedio/sitespeed.io/pull/4224).
|
||||
|
||||
## 34.4.0 - 2024-07-09
|
||||
### Added
|
||||
* Upgraded to Firefox 128 and Edge 126 in the Docker container [#4222](https://github.com/sitespeedio/sitespeed.io/pull/4222).
|
||||
|
||||
### Fixed
|
||||
* Show correct LCP and CLS image in each run page [#4221](https://github.com/sitespeedio/sitespeed.io/pull/4221).
|
||||
* Update Browsertime [#4210](https://github.com/sitespeedio/sitespeed.io/pull/4210).
|
||||
* Update minor dependencies and developer dependencies: co2.js [#4206](https://github.com/sitespeedio/sitespeed.io/pull/4206), uuid [#4207](https://github.com/sitespeedio/sitespeed.io/pull/4207), s3 [#4208](https://github.com/sitespeedio/sitespeed.io/pull/4208), eslint [#4211](https://github.com/sitespeedio/sitespeed.io/pull/4211), ava, jsdoc, sass [#4212](https://github.com/sitespeedio/sitespeed.io/pull/4212), dayjs [#4214](https://github.com/sitespeedio/sitespeed.io/pull/4214), p-limit [#4215](https://github.com/sitespeedio/sitespeed.io/pull/4215), os-name [#4216](https://github.com/sitespeedio/sitespeed.io/pull/4216), tape [#4219](https://github.com/sitespeedio/sitespeed.io/pull/4219) and p-limit [#4220](https://github.com/sitespeedio/sitespeed.io/pull/4220).
|
||||
|
||||
## 34.3.5 - 2024-07-02
|
||||
### Fixed
|
||||
* The fix for CLS and LCP in 34.3.4 faulty set those to false by default, changing the default behaviour. Fixed in [#4205](https://github.com/sitespeedio/sitespeed.io/pull/4205)
|
||||
|
||||
## 34.3.4 - 2024-06-25
|
||||
### Fixed
|
||||
* Expose command line parameters to disable CLS and LCP screenshots [#4201](https://github.com/sitespeedio/sitespeed.io/pull/4201).
|
||||
|
||||
## 34.3.3 - 2024-06-24
|
||||
### Fixed
|
||||
* Updated to Browsertime 25.5.2 that has updated versions of Selenium WebDriver and correct export for scripting.
|
||||
* API: Copy Browsertime setting from the option object to the API. There cases where you use a configuration file, override it with CLI parameters and the cli parameters didn't override the configuration file. That is fixed now for Browsertime configurations [#4200](https://github.com/sitespeedio/sitespeed.io/pull/4200).
|
||||
|
||||
## 34.3.2 - 2024-06-23
|
||||
### Fixed
|
||||
* API: Remove extends from the configuration to make sure that testrunners ddo not try to extend configuration [#4198](https://github.com/sitespeedio/sitespeed.io/pull/4198).
|
||||
|
||||
## 34.3.1 - 2024-06-20
|
||||
### Fixed
|
||||
* The docker hub has had some problem and started to publish old images (as new!). That broke our latest tag to include chrome/edge//firefox 111. This release auto publish the latest one again.
|
||||
|
||||
## 34.3.0 - 2024-06-20
|
||||
### Added
|
||||
* API: Show the URL/script name in the API call [#4195](https://github.com/sitespeedio/sitespeed.io/pull/4195)
|
||||
* Update WebPageReplay binaries [#4196](https://github.com/sitespeedio/sitespeed.io/pull/4196).
|
||||
|
||||
## 34.2.2 - 2024-06-18
|
||||
### Fixed
|
||||
* Make it possible to disable the API. In some cases where you extends another configuration file, you could end up in a API loop where the API calls the API [#4191](https://github.com/sitespeedio/sitespeed.io/pull/4191).
|
||||
|
||||
## 34.2.1 - 2024-06-17
|
||||
### Fixed
|
||||
* API: safer parsing if something fail to get better error messages [#4188](https://github.com/sitespeedio/sitespeed.io/pull/4188).
|
||||
|
||||
## 34.2.0 - 2024-06-14
|
||||
|
||||
### Added
|
||||
* Updated to Browsertime 22.5.0 [#4187](https://github.com/sitespeedio/sitespeed.io/pull/4187).
|
||||
* Updated to Firefox 127 and Chrome/Chromedriver 126 [#4185](https://github.com/sitespeedio/sitespeed.io/pull/4185)
|
||||
|
||||
### Fixed
|
||||
* Fix for InfluxDBv2 to send annotations. Thank you [pavel bairov](https://github.com/Amerousful) for PR [#4175](https://github.com/sitespeedio/sitespeed.io/pull/4175).
|
||||
|
||||
* Fix log output when using `--preWarmServer`, thank you [ThimoCap](https://github.com/ThimoCap) for PR [#4183](https://github.com/sitespeedio/sitespeed.io/pull/4183)
|
||||
|
||||
## 34.1.2 - 2024-06-12
|
||||
### Fixed
|
||||
* Using `--preWarmServer` resulted in trying to use an Android phone to prewarm. Fixed in [#4182](https://github.com/sitespeedio/sitespeed.io/pull/4182).
|
||||
|
||||
## 34.1.1 - 2024-06-07
|
||||
### Fixed
|
||||
* Enabling extra profile run/video run didn't stop the Browsertime engine in the correct place. PR [#4179](https://github.com/sitespeedio/sitespeed.io/pull/4179) fixes that.
|
||||
|
||||
## 34.1.0 - 2024-06-06
|
||||
### Added
|
||||
* Add `--enableVideoRun`. You can use it together with `--video false --visualMetrics true` to do one extra run where the video is kept. This is useful for tests against replay proxies [#4177](https://github.com/sitespeedio/sitespeed.io/pull/4177).
|
||||
|
||||
## 34.0.3 - 2024-06-05
|
||||
|
||||
### Fixed
|
||||
* Make sure extra options are passed on to S3 [#4176](https://github.com/sitespeedio/sitespeed.io/pull/4176).
|
||||
|
||||
## 34.0.2 - 2024-06-04
|
||||
|
||||
### Fixed
|
||||
* Update to Pug 3.0.3 [#4172](https://github.com/sitespeedio/sitespeed.io/pull/4172).
|
||||
|
||||
## 34.0.1 - 2024-05-30
|
||||
|
||||
### Fixed
|
||||
* The +1 container has updated to code to take care of if GPSI is missing metrics [GPSI #56](https://github.com/sitespeedio/plugin-gpsi/pull/56).
|
||||
|
||||
## 34.0.0 - 2024-05-29
|
||||
|
||||
### Breaking
|
||||
|
||||
* Woho! There's now a way to deploy your own version of sitespeed.io online for your own testing using [onlinetest][https://github.com/sitespeedio/onlinetest]! It has a HTML GUI and an API that you can use using sitespeed.io command line. There's one server part (the frontend and the API) and a testrunner part. You can run desktop, emulated mobile and Android test. I do not host a global version but I worked hard to make it easy to host yourself. I still work on the documentation but feel free to start to try it out before all documentation is finished :) If you have quick question and need help, please use the [Slack channel](https://join.slack.com/t/sitespeedio/shared_invite/zt-296jzr7qs-d6DId2KpEnMPJSQ8_R~WFw). If you have more complicated problems, please feel free to create issues [here](https://github.com/sitespeedio/onlinetest/issues/new).
|
||||
|
||||
* With this release we remove all dependencies to WebPageTest [#4085](https://github.com/sitespeedio/sitespeed.io/pull/4085). You are only affected if you used the [plugin-webpagetest](https://github.com/sitespeedio/plugin-webpagetest) or the +webpagetest Docker container. If you still want to use WebPageTest with sitespeed.io you can build something on the archived [plugin-webpagetest](https://github.com/sitespeedio/plugin-webpagetest).
|
||||
|
||||
* The S3 plugin has been upgraded to @aws-sdk/client-s3 v3 [#4138](https://github.com/sitespeedio/sitespeed.io/pull/4138). If you are using the S3 plugin and not set region, that will now fail. The v2 version of the aws-sdk used us-east-1 region as default, but v3 has removed the default setting. If you didn't used to set region you can add `--s3.region us-east-1` and it will work as before. If you do not do that, the uploads to S3 will fail. With v3 your `endpoint` need to start with http/https.
|
||||
|
||||
* The -plus1 Docker container now has plugin-lighthouse and plugin-gpsi installed from npm instead of the git repository. It will work as before, but if you want to disable one of them, that has changed. To not run the GPSI plugin add `--plugins.remove @sitespeed.io/plugin-gpsi` and to disble Lighthouse you add `--plugins.remove @sitespeed.io/plugin-lighthouse`.
|
||||
|
||||
* Updated to [Browsertime 22](https://github.com/sitespeedio/browsertime/blob/main/CHANGELOG.md#2200---2024-05-16). This version of Browsertime drops the Browsertime extension and start use the kind of new HAR exporter using Bidi as the default HAR exporter! If you add request headers to your Firefox test or clear the cache inside of your script using Firefox, this will stop to work for now until support is added in Firefox (request headers are coming soon!).
|
||||
|
||||
### Added
|
||||
* Updated to Chrome 125, Firefox 126 and Edge 124 in the Docker container [#4156](https://github.com/sitespeedio/sitespeed.io/pull/4156).
|
||||
|
||||
### Fixed
|
||||
* Fix loading globally installed plugins [#4167](https://github.com/sitespeedio/sitespeed.io/pull/4167).
|
||||
* Fix configurations documentation for scp, thank you [Arash Hatam](https://github.com/hatamiarash7) for [#4166](https://github.com/sitespeedio/sitespeed.io/pull/4166).
|
||||
|
||||
|
||||
## 33.6.1 - 2024-05-13
|
||||
### Fixed
|
||||
* The plus1 container was updated with the latest version of the gpsi-plugin, since the old version broke when GPSI was updated to Lighthouse 12.
|
||||
|
||||
## 33.6.0 - 2024-04-17
|
||||
### Added
|
||||
* Updated to Chrome 124 and Firefox 125 in the Docker container [#4142](https://github.com/sitespeedio/sitespeed.io/pull/4142) and [#4142](https://github.com/sitespeedio/sitespeed.io/pull/4141).
|
||||
|
||||
### Fixed
|
||||
* Add new tag: axeType for axe data in InfluxDB [#4139](https://github.com/sitespeedio/sitespeed.io/pull/4139). Before the fix there was no way to query some of the Axe data.
|
||||
|
||||
## 33.5.0 - 2024-04-04
|
||||
### Added
|
||||
* Updated to Edge 123 in the Docker container [#4135](https://github.com/sitespeedio/sitespeed.io/pull/4135).
|
||||
* Added missing default green/yellow/red limits for CLS and TTFB on the start page [#4120](https://github.com/sitespeedio/sitespeed.io/pull/4120).
|
||||
* Browsertime 21.7.0 with Edgedriver 123.
|
||||
|
||||
### Fixed
|
||||
* The summary page alway showed blue color for AXE violations. This PR makes them green/yellow/red [#4123](https://github.com/sitespeedio/sitespeed.io/pull/4123).
|
||||
* Updated dependencies:
|
||||
* Axe-core 4.9.0 [#4126](https://github.com/sitespeedio/sitespeed.io/pull/4126)
|
||||
* CO2 0.14.4 [#4127](https://github.com/sitespeedio/sitespeed.io/pull/4127)
|
||||
* import-global 1.1.0 [#4129](https://github.com/sitespeedio/sitespeed.io/pull/4129)
|
||||
* AWS SDK 2.1591.0 [#4130](https://github.com/sitespeedio/sitespeed.io/pull/4130)
|
||||
* dayjs 1.11.10, fs-extra 11.2.0, uuid 9.0.1, junit-report-builder 3.2.1, [#4131](https://github.com/sitespeedio/sitespeed.io/pull/4131).
|
||||
* cli-color 2.0.4, node-scp 0.0.23, ora 8.0.1, os-name 5.0.0 and p-limit 5.0.0 [#4132](https://github.com/sitespeedio/sitespeed.io/pull/4132).
|
||||
* tape 5.7.5, find-up 7.0.0, sass 1.72.0 and clean-css-cli 5.6.3 [#4133](https://github.com/sitespeedio/sitespeed.io/pull/4133)
|
||||
|
||||
## 33.4.0 - 2024-03-20
|
||||
### Added
|
||||
* Chrome 123, Firefox 124 and Edge 122 in the Docker container [#4114](https://github.com/sitespeedio/sitespeed.io/pull/4114).
|
||||
* Browsertime [21.6.0](https://github.com/sitespeedio/browsertime/blob/main/CHANGELOG.md#2160---2024-03-20) with updated Chrome/Edgedriver and a fix for running `.stopAsError`.
|
||||
|
||||
## 33.3.0 - 2024-03-16
|
||||
### Added
|
||||
* Show Long Animation frames (enabled in Chrome 123) [#4180](https://github.com/sitespeedio/sitespeed.io/pull/4108). Using the timeline/profiling is still best doing your tests but long animation frames can help you if you do not have it turned on or familiar with thart data in RUM. Please create an issue if you have any ideas on how we shoudl display the metrics/information!
|
||||
* Show CPU power consumption (when using Firefox) [#4104](https://github.com/sitespeedio/sitespeed.io/pull/4104). You can try it with: `sitespeed.io -b firefox -n 1 --firefox.geckoProfiler --firefox.geckoProfilerParams.features "power" --firefox.powerConsumption https://www.sitespeed.io/`
|
||||
|
||||
### Fixed
|
||||
* Updated to [Browsertime 21.5.3](https://github.com/sitespeedio/browsertime/blob/main/CHANGELOG.md#2153---2024-03-12) containing various bug fixes.
|
||||
|
||||
## 33.2.0 - 2024-03-12
|
||||
### Added
|
||||
* Updated to Browsertime 21.5.0 in [#4103](https://github.com/sitespeedio/sitespeed.io/pull/4103) also included changes released in 21.4.0.
|
||||
* Firefox:
|
||||
* Move injectJS functionality to Bidi [#2088](https://github.com/sitespeedio/browsertime/pull/2088). This makes it possible to inject JS in Firefox on mobile.
|
||||
* Expose Bidi in commands [#2091](https://github.com/sitespeedio/browsertime/pull/2091). You can now use webdriver bidi direct in your commands.
|
||||
* Fixed command action.clear() that actually didn't clear the command [#2095](https://github.com/sitespeedio/browsertime/pull/2095).
|
||||
* Added the following trace categories for Chrome that now is used by default when you turn on the timeline: 'disabled-by-default-devtools.timeline.frame', 'disabled-by-default-devtools.timeline.invalidationTracking','loading', 'latencyInfo' - done in [#2086](https://github.com/sitespeedio/browsertime/pull/2086).
|
||||
* Added a simple Loaf-script to get the 10 largest loaf. Lets iterate over the script and see how we can get the most useful information from it [#2087](https://github.com/sitespeedio/browsertime/pull/2087).
|
||||
|
||||
## 33.1.1 - 2024-02-26
|
||||
### Fixed
|
||||
* Updateds to Browsertime 21.3.1 that has an updated version of the Chromedriver isntaller that fixes the bug installing on Windows [#4096](https://github.com/sitespeedio/sitespeed.io/pull/4096).
|
||||
|
||||
## 33.1.0 - 2024-02-21
|
||||
### Added
|
||||
* Firefox 123 and Chrome 122 in the Docker container [#4090](https://github.com/sitespeedio/sitespeed.io/pull/4090) and [#4089](https://github.com/sitespeedio/sitespeed.io/pull/4089).
|
||||
* Chromedriver 122 and Edgedriver 121
|
||||
* [Browsertime 21.3.0](https://github.com/sitespeedio/sitespeed.io/pull/4091).
|
||||
|
||||
## 33.0.0 - 2024-02-11
|
||||
|
||||
*Announcement*: In the next major release we will remove all support for WebPageTest. If you still plan to use WebPageTest you can probaly still use the [plugin](https://github.com/sitespeedio/plugin-webpagetest) for a while if your WebPageTest installation works.
|
||||
|
||||
### Breaking
|
||||
This is a breaking change if you use the compare plugin and do not set an id (`--compare.id`) for your test.
|
||||
* If you auto generate the id for your compare test, this PR add browser, connectivity name and slug to the file name where the compare metrics is stored [#4083](https://github.com/sitespeedio/sitespeed.io/pull/4083).
|
||||
|
||||
|
||||
### Added
|
||||
* Updated to [Browsertime 21.2.0](https://github.com/sitespeedio/browsertime/blob/main/CHANGELOG.md#2120---2024-02-11) that adds a new way to stop your measureemnts if your navigation fails `measure.stopAsError(failureMessage, optionalURL)`. Perfect to use in a try/catch.
|
||||
* Use darkmode for result HTML by adding `--html.darkMode`, thank you [petemyron](https://github.com/petemyron) for PR [#4081](https://github.com/sitespeedio/sitespeed.io/pull/4081).
|
||||
|
||||
### Fixed
|
||||
* Update co2.js to 0.14.2 [#4074](https://github.com/sitespeedio/sitespeed.io/pull/4074)
|
||||
* More solid error handling if one page fail in scripting. This fixes so that the HTML for the rest of pages should be generated [#4079](https://github.com/sitespeedio/sitespeed.io/pull/4079).
|
||||
* Remove console.errors of errors (they have already been reported in the log) [#4080](https://github.com/sitespeedio/sitespeed.io/pull/4080).
|
||||
* Fix automatically switch to Throttle as engine on Mac and Linux if you add -c THROTTLING[#4082](https://github.com/sitespeedio/sitespeed.io/pull/4082).
|
||||
|
||||
## 32.2.0 - 2024-01-24
|
||||
### Added
|
||||
* Chrome and Chromedriver 121 in the Docker container [#4069](https://github.com/sitespeedio/sitespeed.io/pull/4069).
|
||||
|
|
|
|||
|
|
@ -28,6 +28,13 @@ We encourage everyone to participate and are committed to building a community f
|
|||
Although this list cannot be exhaustive, we explicitly honor diversity in age, gender, gender identity or expression, culture, ethnicity, language, national origin, political beliefs, profession, race, religion, sexual orientation, socioeconomic status, and technical ability. We will not tolerate discrimination based on any of the protected
|
||||
characteristics above, including participants with disabilities.
|
||||
|
||||
### No Unsolicited Advertising or Job Postings
|
||||
We strive to maintain a collaborative and focused community. As such, advertising for companies/products or posting job advertisements without prior approval is strictly prohibited.
|
||||
|
||||
If you engage in unsolicited advertising or recruitment activities, your account will be deleted without warning.
|
||||
|
||||
If you're unsure whether your content falls under this policy, please reach out to an admin before posting.
|
||||
|
||||
### Reporting Issues
|
||||
|
||||
If you experience or witness unacceptable behavior—or have any other concerns—please report it by contacting us via [peter@soulgalore.com)](mailto:peter@soulgalore.com). All reports will be handled with discretion. In your report please include:
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ Many many many thanks to:
|
|||
* [Eike](https://github.com/EikeDawid)
|
||||
* [Jesse Zoldak](https://github.com/jzoldak)
|
||||
* [Devrim Tufan](https://github.com/tufandevrim)
|
||||
* [Dileep Ponna](https://github.com/aiw-dileep)
|
||||
* [Keith Cirkel](https://github.com/keithamus)
|
||||
* [Jonathan Lee](https://github.com/beenanner)
|
||||
* [Pavel Bairov](https://github.com/Amerousful)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM sitespeedio/webbrowsers:chrome-121.0-firefox-122.0-edge-120.0
|
||||
FROM sitespeedio/webbrowsers:chrome-131.0-firefox-133.0-edge-131.0
|
||||
|
||||
ARG TARGETPLATFORM=linux/amd64
|
||||
|
||||
|
|
@ -11,7 +11,6 @@ COPY docker/webpagereplay/wpr_key.pem /webpagereplay/certs/
|
|||
COPY docker/webpagereplay/deterministic.js /webpagereplay/scripts/deterministic.js
|
||||
COPY docker/webpagereplay/LICENSE /webpagereplay/
|
||||
|
||||
|
||||
RUN sudo apt-get update && sudo apt-get install libnss3-tools python2 \
|
||||
net-tools \
|
||||
build-essential \
|
||||
|
|
@ -28,7 +27,8 @@ WORKDIR /usr/src/app
|
|||
|
||||
COPY package.json /usr/src/app/
|
||||
COPY npm-shrinkwrap.json /usr/src/app/
|
||||
RUN npm install --production && npm cache clean --force
|
||||
COPY tools/postinstall.js /usr/src/app/tools/postinstall.js
|
||||
RUN DOWNLOAD_URL2GREEN=true npm install --production && npm cache clean --force
|
||||
COPY . /usr/src/app
|
||||
|
||||
COPY docker/scripts/start.sh /start.sh
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@ FROM node:20.9.0-bookworm-slim
|
|||
|
||||
ARG TARGETPLATFORM=linux/amd64
|
||||
|
||||
ENV SITESPEED_IO_BROWSERTIME__DOCKER true
|
||||
ENV SITESPEED_IO_BROWSERTIME__VIDEO false
|
||||
ENV SITESPEED_IO_BROWSERTIME__BROWSER firefox
|
||||
ENV SITESPEED_IO_BROWSERTIME__VISUAL_METRICS false
|
||||
ENV SITESPEED_IO_BROWSERTIME__HEADLESS true
|
||||
ENV SITESPEED_IO_BROWSERTIME__DOCKER=true
|
||||
ENV SITESPEED_IO_BROWSERTIME__VIDEO=false
|
||||
ENV SITESPEED_IO_BROWSERTIME__BROWSER=firefox
|
||||
ENV SITESPEED_IO_BROWSERTIME__VISUAL_METRICS=false
|
||||
ENV SITESPEED_IO_BROWSERTIME__HEADLESS=true
|
||||
|
||||
ENV PATH="/usr/local/bin:${PATH}"
|
||||
|
||||
|
|
@ -21,7 +21,9 @@ RUN echo "deb http://deb.debian.org/debian/ unstable main contrib non-free" >> /
|
|||
RUN mkdir -p /usr/src/app
|
||||
WORKDIR /usr/src/app
|
||||
COPY . /usr/src/app
|
||||
RUN CHROMEDRIVER_SKIP_DOWNLOAD=true EGDEDRIVER_SKIP_DOWNLOAD=true npm install --production && npm cache clean --force && npm uninstall npm -g
|
||||
COPY tools/postinstall.js /usr/src/app/tools/postinstall.js
|
||||
RUN CHROMEDRIVER_SKIP_DOWNLOAD=true EGDEDRIVER_SKIP_DOWNLOAD=true npm install --production && npm cache clean --force && npm uninstall npm npx -g
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
COPY docker/scripts/start-slim.sh /start.sh
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@
|
|||
[![Changelog #212][changelog-image]][changelog-url]
|
||||
|
||||
|
||||
[Website](https://www.sitespeed.io/) | [Documentation](https://www.sitespeed.io/documentation/sitespeed.io/) | [Changelog](https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md) | [Mastodon](https://fosstodon.org/@sitespeedio)
|
||||
[Website](https://www.sitespeed.io/) | [Documentation](https://www.sitespeed.io/documentation/sitespeed.io/) | [Changelog](https://github.com/sitespeedio/sitespeed.io/blob/main/CHANGELOG.md) | [Bluesky](https://bsky.app/profile/sitespeed.io) | [Mastodon](https://fosstodon.org/@sitespeedio)
|
||||
|
||||
|
||||
|
||||
# Table of Contents
|
||||
|
|
@ -209,7 +210,7 @@ We welcome contributions from the community! Whether you're fixing a bug, adding
|
|||
5. **Test**: Run tests to ensure everything works as expected.
|
||||
6. **Submit a Pull Request**: Push your changes to your fork and submit a pull request to the main repository.
|
||||
|
||||
Before contributing, please read our [CONTRIBUTING.md](.gitub/CONTRIBUTING.md) for more detailed information on how to contribute.
|
||||
Before contributing, please read our [CONTRIBUTING.md](.github/CONTRIBUTING.md) for more detailed information on how to contribute.
|
||||
|
||||
# Reporting Issues
|
||||
Found a bug or have a feature request? Please use the [GitHub Issues](https://github.com/sitespeedio/sitespeed.io/issues) to report them. Be sure to check existing issues to avoid duplicates.
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ let config;
|
|||
|
||||
try {
|
||||
config = configPath ? JSON.parse(readFileSync(configPath)) : {};
|
||||
|
||||
} catch (e) {
|
||||
if (e instanceof SyntaxError) {
|
||||
/* eslint no-console: off */
|
||||
|
|
@ -150,6 +151,7 @@ async function runBrowsertime() {
|
|||
' to increase the level of detail.',
|
||||
type: 'count'
|
||||
})
|
||||
.parserConfiguration({ 'camel-case-expansion': false, 'deep-merge-config': true })
|
||||
.config(config);
|
||||
|
||||
const defaultConfig = {
|
||||
|
|
|
|||
|
|
@ -5,8 +5,9 @@
|
|||
import { writeFileSync } from 'node:fs';
|
||||
import { execSync } from 'node:child_process';
|
||||
import { platform } from 'node:os';
|
||||
import { resolve, basename } from 'node:path';
|
||||
import path from 'node:path';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { EventEmitter } from 'node:events';
|
||||
|
||||
import merge from 'lodash.merge';
|
||||
import ora from 'ora';
|
||||
|
|
@ -15,6 +16,10 @@ import { parseCommandLine } from '../lib/cli/cli.js';
|
|||
import { run } from '../lib/sitespeed.js';
|
||||
import { addTest, waitAndGetResult, get } from '../lib/api/send.js';
|
||||
|
||||
// This is due to CDP do no have (or has it) a way to remove listeners
|
||||
// and default 10 is quite small number.
|
||||
EventEmitter.defaultMaxListeners = 30;
|
||||
|
||||
async function api(options) {
|
||||
const action = options.api.action ?? 'addAndGetResult';
|
||||
|
||||
|
|
@ -33,10 +38,10 @@ async function api(options) {
|
|||
// Add support for running multi tests
|
||||
if (options.multi) {
|
||||
const scripting = await readFileSync(
|
||||
new URL(resolve(process.cwd(), options._[0]), import.meta.url)
|
||||
new URL(path.resolve(process.cwd(), options._[0]), import.meta.url)
|
||||
);
|
||||
apiOptions.api.scripting = scripting.toString();
|
||||
apiOptions.api.scriptingName = basename(options._[0]);
|
||||
apiOptions.api.scriptingName = path.basename(options._[0]);
|
||||
}
|
||||
|
||||
if (apiOptions.mobile) {
|
||||
|
|
@ -52,16 +57,21 @@ async function api(options) {
|
|||
if (options.config) {
|
||||
const config = JSON.parse(
|
||||
await readFileSync(
|
||||
new URL(resolve(process.cwd(), options.config), import.meta.url)
|
||||
new URL(path.resolve(process.cwd(), options.config), import.meta.url)
|
||||
)
|
||||
);
|
||||
apiOptions = merge(options.explicitOptions, config);
|
||||
delete apiOptions.config;
|
||||
delete apiOptions.extends;
|
||||
}
|
||||
|
||||
// We copy all browsertime settings to fix the problem when we use --config
|
||||
// and then try to ovverride some configurations using command line
|
||||
apiOptions.browsertime = options.browsertime;
|
||||
|
||||
if (action === 'add' || action === 'addAndGetResult') {
|
||||
const spinner = ora({
|
||||
text: `Send test to ${hostname}`,
|
||||
text: `Send test to ${hostname} testing ${options._[0]}`,
|
||||
isSilent: options.api.silent
|
||||
}).start();
|
||||
|
||||
|
|
@ -69,10 +79,10 @@ async function api(options) {
|
|||
const data = await addTest(hostname, apiOptions);
|
||||
const testId = JSON.parse(data).id;
|
||||
spinner.color = 'yellow';
|
||||
spinner.text = `Added test with id ${testId}`;
|
||||
spinner.text = `Added test ${options._[0]} with id ${testId}`;
|
||||
|
||||
if (action === 'add') {
|
||||
spinner.succeed(`Added test with id ${testId}`);
|
||||
spinner.succeed(`Added test ${options._[0]} with id ${testId}`);
|
||||
console.log(testId);
|
||||
process.exit();
|
||||
} else if (action === 'addAndGetResult') {
|
||||
|
|
@ -91,6 +101,9 @@ async function api(options) {
|
|||
}
|
||||
} else if (result.status === 'failed') {
|
||||
spinner.fail('Test failed');
|
||||
if (options.api.json) {
|
||||
console.log(JSON.stringify(result));
|
||||
}
|
||||
process.exitCode = 1;
|
||||
process.exit();
|
||||
}
|
||||
|
|
@ -124,7 +137,7 @@ async function start() {
|
|||
|
||||
let options = parsed.options;
|
||||
|
||||
if (options.api && options.api.hostname) {
|
||||
if (options.api && options.api.hostname && !options.disableAPI) {
|
||||
api(options);
|
||||
} else {
|
||||
try {
|
||||
|
|
@ -174,12 +187,10 @@ async function start() {
|
|||
}
|
||||
|
||||
if (result.errors.length > 0) {
|
||||
console.log('Errors while running:\n' + result.errors.join('\n'));
|
||||
throw new Error('Errors while running:\n' + result.errors.join('\n'));
|
||||
}
|
||||
} catch (error) {
|
||||
} catch {
|
||||
process.exitCode = 1;
|
||||
console.log(error);
|
||||
} finally {
|
||||
process.exit();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,18 +3,14 @@ FROM sitespeedio/sitespeed.io:${version}
|
|||
|
||||
ENV SITESPEED_IO_BROWSERTIME__XVFB true
|
||||
ENV SITESPEED_IO_BROWSERTIME__DOCKER true
|
||||
ENV SITESPEED_IO_PLUGINS__ADD /lighthouse/index.js,/gpsi/lib/index.js
|
||||
ENV SITESPEED_IO_PLUGINS__ADD @sitespeed.io/plugin-lighthouse,@sitespeed.io/plugin-gpsi
|
||||
|
||||
RUN sudo apt-get update && sudo apt-get install git -y
|
||||
RUN node --version
|
||||
RUN npm --version
|
||||
WORKDIR /gpsi
|
||||
RUN git clone https://github.com/sitespeedio/plugin-gpsi.git .
|
||||
RUN npm install --production
|
||||
|
||||
WORKDIR /lighthouse
|
||||
RUN git clone https://github.com/sitespeedio/plugin-lighthouse.git .
|
||||
RUN npm install --production
|
||||
RUN npm install @sitespeed.io/plugin-lighthouse -g --production
|
||||
RUN npm install @sitespeed.io/plugin-gpsi -g --production
|
||||
|
||||
VOLUME /sitespeed.io
|
||||
WORKDIR /sitespeed.io
|
||||
WORKDIR /sitespeed.io
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
ARG version
|
||||
FROM sitespeedio/sitespeed.io:${version}
|
||||
|
||||
ENV SITESPEED_IO_BROWSERTIME__XVFB true
|
||||
ENV SITESPEED_IO_BROWSERTIME__DOCKER true
|
||||
|
||||
RUN sudo apt-get update && sudo apt-get install git -y
|
||||
|
||||
WORKDIR /webpagetest
|
||||
RUN git clone https://github.com/sitespeedio/plugin-webpagetest.git .
|
||||
RUN npm install --production
|
||||
|
||||
VOLUME /sitespeed.io
|
||||
WORKDIR /sitespeed.io
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
version: '3'
|
||||
services:
|
||||
grafana:
|
||||
image: grafana/grafana:10.0.2
|
||||
image: grafana/grafana:11.0.0
|
||||
hostname: grafana
|
||||
depends_on:
|
||||
- graphite
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# Example file that you can use for sitespeed.io
|
||||
# Schema definitions for Whisper files. Entries are scanned in order,
|
||||
# and first match wins. This file is scanned for changes every 60 seconds.
|
||||
#
|
||||
|
|
@ -7,18 +8,18 @@
|
|||
|
||||
# Carbon's internal metrics. This entry should match what is specified in
|
||||
# CARBON_METRIC_PREFIX and CARBON_METRIC_INTERVAL settings
|
||||
[carbon]
|
||||
pattern = ^carbon\.
|
||||
retentions = 60:1d
|
||||
|
||||
# Store crux data, collect the data ones per day and save it for 2 years.
|
||||
[sitespeed_crux]
|
||||
pattern = ^sitespeed_io\.crux\.
|
||||
retentions = 60m:40d
|
||||
retentions = 1d:2y
|
||||
|
||||
# Run data, every ten seconds but only for 8 days
|
||||
[sitespeed_run]
|
||||
pattern = ^sitespeed_io\.(.*)\.(.*)\.run\.
|
||||
retentions = 10s:8d
|
||||
|
||||
# Summary data, ones per hour for 65 days
|
||||
[sitespeed]
|
||||
pattern = ^sitespeed_io\.
|
||||
retentions = 10m:40d
|
||||
|
||||
[catch_them_all]
|
||||
pattern = .*
|
||||
retentions = 5m:1d,15m:30d
|
||||
retentions = 1h:65d
|
||||
|
|
@ -89,7 +89,7 @@ function runWebPageReplay() {
|
|||
record_pid=$!
|
||||
sleep $RECORD_WAIT
|
||||
|
||||
execNode $BROWSERTIME --browsertime.chrome.webPageReplayHostResolver --browsertime.chrome.webPageReplayHTTPPort $WPR_HTTP_PORT --browsertime.chrome.webPageReplayHTTPSPort $WPR_HTTPS_PORT --browsertime.chrome.webPageReplayRecord true --browsertime.firefox.preference network.dns.forceResolve:127.0.0.1 --browsertime.connectivity.engine throttle --browsertime.connectivity.throttle.localhost --browsertime.connectivity.profile custom --browsertime.connectivity.latency $LATENCY "$@"
|
||||
execNode $BROWSERTIME --browsertime.chrome.webPageReplayHostResolver --browsertime.chrome.webPageReplayHTTPPort $WPR_HTTP_PORT --browsertime.chrome.webPageReplayHTTPSPort $WPR_HTTPS_PORT --browsertime.chrome.webPageReplayRecord true --browsertime.firefox.preference network.dns.forceResolve:127.0.0.1 --browsertime.firefox.acceptInsecureCerts true --browsertime.connectivity.engine throttle --browsertime.connectivity.throttle.localhost --browsertime.connectivity.profile custom --browsertime.connectivity.latency $LATENCY "$@"
|
||||
RESULT+=$?
|
||||
|
||||
kill -2 $record_pid
|
||||
|
|
@ -105,7 +105,7 @@ function runWebPageReplay() {
|
|||
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
execNode --max-old-space-size=$MAX_OLD_SPACE_SIZE $SITESPEEDIO --browsertime.firefox.preference security.OCSP.enabled:0 --browsertime.firefox.preference network.dns.forceResolve:127.0.0.1 --browsertime.chrome.webPageReplayHostResolver --browsertime.chrome.webPageReplayHTTPPort $WPR_HTTP_PORT --browsertime.chrome.webPageReplayHTTPSPort $WPR_HTTPS_PORT --browsertime.connectivity.engine throttle --browsertime.connectivity.throttle.localhost --replay --browsertime.connectivity.profile custom --browsertime.connectivity.rtt $LATENCY "$@" &
|
||||
execNode --max-old-space-size=$MAX_OLD_SPACE_SIZE $SITESPEEDIO --browsertime.firefox.preference security.OCSP.enabled:0 --browsertime.firefox.acceptInsecureCerts true --browsertime.firefox.preference network.dns.forceResolve:127.0.0.1 --browsertime.chrome.webPageReplayHostResolver --browsertime.chrome.webPageReplayHTTPPort $WPR_HTTP_PORT --browsertime.chrome.webPageReplayHTTPSPort $WPR_HTTPS_PORT --browsertime.connectivity.engine throttle --browsertime.connectivity.throttle.localhost --replay --browsertime.connectivity.profile custom --browsertime.connectivity.rtt $LATENCY "$@" &
|
||||
|
||||
PID=$!
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -1,2 +1,3 @@
|
|||
source "https://rubygems.org"
|
||||
gem 'github-pages', group: :jekyll_plugins
|
||||
ruby '3.0.0'
|
||||
|
|
|
|||
|
|
@ -27,9 +27,10 @@
|
|||
<div class="col-1-5">
|
||||
<h3>Connect</h3>
|
||||
<ul>
|
||||
<li><a rel="me" href="https://fosstodon.org/@sitespeedio">Mastodon</a></li>
|
||||
<li><a rel="me" href="https://bsky.app/profile/sitespeed.io">Bluesky</a></li>
|
||||
<li><a href="https://github.com/sitespeedio">GitHub</a></li>
|
||||
<li><a href="https://join.slack.com/t/sitespeedio/shared_invite/zt-296jzr7qs-d6DId2KpEnMPJSQ8_R~WFw">Slack</a></li>
|
||||
<li><a rel="me" href="https://fosstodon.org/@sitespeedio">Mastodon</a></li>
|
||||
</div>
|
||||
<div class="col-1-5">
|
||||
<h3>sitespeed.io</h3>
|
||||
|
|
@ -45,7 +46,7 @@
|
|||
<div class="col-1-5">
|
||||
<h3><span class="red">♥</span> Open Source <span class="red">♥</span></h3>
|
||||
<ul>
|
||||
<li><a href="http://www.seleniumhq.org/">Selenium</a></li>
|
||||
<li><a href="http://www.selenium.dev/">Selenium</a></li>
|
||||
<li><a href="https://github.com/micmro/PerfCascade">PerfCascade</a></li>
|
||||
<li><a href="http://getskeleton.com/">Skeleton</a></li>
|
||||
<li><a href="https://github.com/cgiffard/node-simplecrawler">Simplecrawler</a></li>
|
||||
|
|
|
|||
|
|
@ -14,10 +14,11 @@
|
|||
<a href="{{site.baseurl}}/documentation/" {% if page.nav=='documentation' %}class="active" {% endif %}>Documentation</a>
|
||||
<ul>
|
||||
<li><a href="{{site.baseurl}}/documentation/sitespeed.io/">sitespeed.io</a></li>
|
||||
<li><a href="{{site.baseurl}}/documentation/coach/">Coach</a></li>
|
||||
<li><a href="{{site.baseurl}}/documentation/browsertime/">Browsertime</a></li>
|
||||
<li><a href="{{site.baseurl}}/documentation/pagexray/">PageXray</a></li>
|
||||
<li><a href="{{site.baseurl}}/documentation/onlinetest/">OnlineTest</a></li>
|
||||
<li><a href="{{site.baseurl}}/documentation/throttle/">Throttle</a></li>
|
||||
<li><a href="{{site.baseurl}}/documentation/coach/">Coach</a></li>
|
||||
<li><a href="{{site.baseurl}}/documentation/pagexray/">PageXray</a></li>
|
||||
<li><a href="{{site.baseurl}}/documentation/humble/">Humble</a></li>
|
||||
<li><a href="{{site.baseurl}}/documentation/compare/">Compare</a></li>
|
||||
<li><a href="{{site.baseurl}}/documentation/chrome-har/">Chrome HAR</a></li>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
We are incredibly grateful for the Open Source tools that form the foundation of Sitespeed.io. Our hearts are filled with appreciation for these amazing projects and the communities that support them. We would like to extend a special thank you to ([see the full list]({{site.baseurl}}/documentation/sitespeed.io/developers/#built-upon-open-source)):
|
||||
|
||||
* [Selenium](http://www.seleniumhq.org/)
|
||||
* [Selenium](http://www.selenium.dev/)
|
||||
* [VisualMetrics](https://github.com/WPO-Foundation/visualmetrics)
|
||||
* [PerfCascade](https://github.com/micmro/PerfCascade)
|
||||
* [Skeleton](http://getskeleton.com)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
21.1.0
|
||||
23.5.0
|
||||
|
|
@ -1 +1 @@
|
|||
0.13.2
|
||||
1.0.1
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
1.0.1
|
||||
|
|
@ -1 +1 @@
|
|||
32.2.0
|
||||
35.7.5
|
||||
|
|
@ -0,0 +1 @@
|
|||
1.0.3
|
||||
|
|
@ -1 +1 @@
|
|||
5.0.0
|
||||
5.0.1
|
||||
|
|
|
|||
|
|
@ -26,11 +26,6 @@ Michael Mrowetz has updated [PerfCascade](https://github.com/micmro/PerfCascade)
|
|||
|
||||
The video now uses video.js making it easier to slow the video down.
|
||||
|
||||
## Slack and WebPageTest
|
||||
If you slack after a run we now default sends firstVisualChange, lastVisualChange and fullyLoaded metrics. You can also choose which metric that will decide if your slack will be a warning or error message (and set the limit).
|
||||
|
||||
Finally we support custom metrics for WebPageTest. You will see them on the HTML pages and the metrics will automatically be sent to Graphite. Thank you [jpvincent](https://github.com/jpvincent) for the initial PR!
|
||||
|
||||
## Important bug fixes
|
||||
* Running multiple URLs in WebPageTest failed because of a "feature" in the WebPageTest NodeJS API where options in s are change to ms.
|
||||
|
||||
|
|
|
|||
|
|
@ -94,15 +94,7 @@ We have updated all the default dashboards, you [download them from here](https:
|
|||
|
||||
|
||||
## Run your tests on Kubernetes
|
||||
One of the most asked question the last years has been how do we test using Kubernetes? The problem has been that there is no way to limit the connectivity. We fixed that by integrating [TSProxy](https://github.com/WPO-Foundation/tsproxy) (a Traffic-shaping SOCKS5 proxy built by [Patrick Meenan](https://twitter.com/patmeenan)). This is actually the second time we done it, but this time there's been a major fix on TSProxy that makes it work as it should on Linux.
|
||||
|
||||
You need Python 2.7 to run TSProxy and you enable it like this:
|
||||
|
||||
~~~bash
|
||||
sitespeed.io --browsertime.connectivity.engine tsproxy -c cable https://www.sitespeed.io/
|
||||
~~~
|
||||
|
||||
Stay tuned for a more in depth follow up on running Sitespeed in Kubernetes or drop into [our slack](https://sitespeedio.herokuapp.com) and tell us about how you are running it!
|
||||
One of the most asked question the last years has been how do we test using Kubernetes? The problem has been that there is no way to limit the connectivity. You should try out the [bandwith plugin](https://www.cni.dev/plugins/current/meta/bandwidth/) that could help you with that.
|
||||
|
||||
## Breaking changes
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,70 @@
|
|||
---
|
||||
layout: default
|
||||
title: Deploying your own version of sitespeed.io online
|
||||
description: Today, I have some exciting news to share! I have built a frontend for sitespeed.io to add another way to run your performance tests.
|
||||
authorimage: /img/aboutus/peter.jpg
|
||||
intro: Today, I have some exciting news to share! I have built a frontend for sitespeed.io to add another way to run your performance tests.
|
||||
keywords: sitespeed.io, webperf
|
||||
image: https://www.sitespeed.io/img/8bit.png
|
||||
nav: blog
|
||||
---
|
||||
|
||||
# Deploying your own version of sitespeed.io online
|
||||
Today, I have some exciting news to share! I have built a frontend for sitespeed.io to add another way to run your performance tests. My focus has been on making it easy to set up/deploy (though you need to be able to follow instructions) and ensuring it works both for large enterprise companies and for you.
|
||||
|
||||

|
||||
{: .img-thumbnail}
|
||||
|
||||
There are many great features I want to share, but I'll start by asking for your help in testing the new project: I've tested it extensively, but there might still be bugs and minor issues that need fixing. You can find the project [here](https://github.com/sitespeedio/onlinetest) and read the documentation [here](https://www.sitespeed.io/documentation/onlinetest/). Please create [an issue](https://github.com/sitespeedio/onlinetest/issues/new) if you find something and feel free to submit a PR to fix the problem :)
|
||||
|
||||
You need three components to set it all up:
|
||||
* a **sitespeed.io server** with GUI, API, and search functionality. It receives your tests and forwards them.
|
||||
* one (or more) **test runners** that run the sitespeed.io tests. It uses either sitespeed.io in a Docker container or installed via npm.
|
||||
* **dependencies**: a database, a message broker, and somewhere to store the results (HTML/images/videos). We have [pre-made docker compose file](https://github.com/sitespeedio/onlinetest/blob/main/docker-compose.yml) you can use to get them up and running.
|
||||
|
||||
The setup looks like this:
|
||||
|
||||

|
||||
{: .img-thumbnail}
|
||||
|
||||
Ok, that's what it looks like. I would like to share some aspects of the project that I am particularly proud of.
|
||||
|
||||
## Run your tests via command line
|
||||
|
||||
One feature that played out really well is that you can create tests both via the GUI and the regular command line using sitespeed.io. By using the parameters `--api.hostname` and `--api.location`, sitespeed.io will call the API. The rest of your parameters (and config file) are forwarded to the server, which then forwards them to the test runners. This makes it easy to first test everything locally and then add the extra parameters to send it to the server.
|
||||
|
||||
It also makes it easy to migrate the tests you run today to the new setup by adding a few parameters. Why would you want migrate? You don't need to but it will add the meta data to the database and that will add another way for you to find the actual tests.
|
||||
|
||||
## Quality made simple
|
||||
|
||||
Ok, maybe it's not very nice to be frank, but I'm quite tired of the commercial web performance testing products that show regressions in their graphs, and when they show an example of a regression, the unit in the graph is seconds. You probably want the axis to be in milliseconds or at least in 0.1-second intervals :) Why do they do that? One reason is that they often run their tests on shared virtual machines that interfere with each other, making it hard to see performance regressions accurately.
|
||||
|
||||
If you run sitespeed.io and deploy your testrunner on a bare metal server, you've come a long way (you can for example use [Hetzner](https://www.hetzner.com) and there are also other providers you can use). Or if you choose to host it yourself, you connect some Android phones to your testrunner. This makes it easy for you to measure accurately under controlled conditions.
|
||||
|
||||
But won't it be much more maintenance if you manage everything yourself? There are setups where you can minimize the work you need to do, please join the [sitespeed.io Slack channel](https://join.slack.com/t/sitespeedio/shared_invite/zt-296jzr7qs-d6DId2KpEnMPJSQ8_R~WFw) and we can discuss it there. And on the other hand, if you can choose between unstable measurements or taking care of the setup yourself, what do you choose?
|
||||
|
||||
## Configuring sitespeed.io
|
||||
|
||||
Another thing I like is that sitespeed.io configuration can extend and override each other. It works so that you can set up a default configuration on the server (default on how you want to run sitespeed.io).It is then merged with what comes in through the GUI or API, and you can also have specific configurations on the test runner.
|
||||
|
||||
Ok, it may sound a bit complicated, but it makes the whole system very powerful. You can have specific configurations for certain test runners (e.g., send data to your time series database), some generic configurations on the server and then override it per test you set.
|
||||
|
||||
|
||||
## Your own style, form, and language
|
||||
|
||||
Yes, I know many like to be able to style the appearance of the pages, and you can! You can brand the pages to match your own company/organisation. You can override the CSS and change logos by modifying the configuration.
|
||||
|
||||
You can also change the language from English to your preferred language (you need to translate the texts yourself, though).
|
||||
|
||||
## Tested using GitHub actions
|
||||
One extra thing that I am proud of is that I have set up [some GitHub Actions](https://github.com/sitespeedio/onlinetest/tree/main/.github/workflows) that test the entire flow both through the API and GUI and run tests so that it will be easier to make fixes in the future without breaking anything. In sitespeed.io and Browsertime, we rely heavily on our actions, and it works here too!
|
||||
|
||||
## License
|
||||
|
||||
This time, I used the AGPL-3.0 license. That means you can use, modify, and share the code, as long as you keep any changes under the same license and contribute those changes back to the community. I love open source, so feel free to contribute and make this project even better!
|
||||
|
||||
I'm excited to see how you use this new frontend for your performance testing. Your feedback is invaluable, so please don't hesitate to [share your thoughts](https://join.slack.com/t/sitespeedio/shared_invite/zt-296jzr7qs-d6DId2KpEnMPJSQ8_R~WFw), [report issues](https://github.com/sitespeedio/onlinetest/issues/new), or contribute improvements.
|
||||
|
||||
Happy testing, and I look forward to seeing what we can achieve together!
|
||||
|
||||
Peter
|
||||
|
|
@ -25,7 +25,9 @@ chrome
|
|||
--chrome.enableTraceScreenshots, --enableTraceScreenshots Include screenshots in the trace log (enabling the trace category disabled-by-default-devtools.screenshot). [boolean]
|
||||
--chrome.enableChromeDriverLog Log Chromedriver communication to a log file. [boolean]
|
||||
--chrome.enableVerboseChromeDriverLog Log verboose Chromedriver communication to a log file. [boolean]
|
||||
--chrome.enableVideoAutoplay Allow videos to autoplay. [boolean]
|
||||
--chrome.timeline, --chrome.trace Collect the timeline data. Drag and drop the JSON in your Chrome detvools timeline panel or check out the CPU metrics in the Browsertime.json [boolean]
|
||||
--chrome.timelineExtras If you collect the timeline using --chrome.timeline or --enableProfileRun this will add some extra timings and tracks to your timeline. [boolean] [default: true]
|
||||
--chrome.timelineRecordingType, --chrome.traceRecordingType Expose the start/stop commands for the chrome trace [string] [choices: "pageload", "custom"] [default: "pageload"]
|
||||
--chrome.collectPerfLog Collect performance log from Chrome with Page and Network events and save to disk. [boolean]
|
||||
--chrome.collectNetLog Collect network log from Chrome and save to disk. [boolean]
|
||||
|
|
@ -42,6 +44,7 @@ chrome
|
|||
|
||||
android
|
||||
--android.powerTesting, --androidPower Enables android power testing - charging must be disabled for this.(You have to disable charging yourself for this - it depends on the phone model). [boolean]
|
||||
--android.usbPowerTesting, --androidUsbPower Enables android power testing using usb-power-profiling. Assumes that a valid device is attached to the phone. See here for supported devices: https://github.com/fqueze/usb-power-profiling?tab=readme-ov-file#supported-devices [boolean]
|
||||
--android.ignoreShutdownFailures, --ignoreShutdownFailures If set, shutdown failures will be ignored on Android. [boolean] [default: false]
|
||||
--android.rooted, --androidRooted If your phone is rooted you can use this to set it up following Mozillas best practice for stable metrics. [boolean] [default: false]
|
||||
--android.pinCPUSpeed, --androidPinCPUSpeed Using a Samsung A51 or Moto G5 you can choose how to pin the CPU to better align the speed with your users. This only works on rooted phones and together with --android.rooted [choices: "min", "middle", "max"] [default: "min"]
|
||||
|
|
@ -66,7 +69,6 @@ firefox
|
|||
--firefox.includeResponseBodies Include response bodies in HAR [choices: "none", "all", "html"] [default: "none"]
|
||||
--firefox.appconstants Include Firefox AppConstants information in the results [boolean] [default: false]
|
||||
--firefox.acceptInsecureCerts Accept insecure certs [boolean]
|
||||
--firefox.bidihar Use the new bidi HAR generator [boolean] [default: false]
|
||||
--firefox.windowRecorder Use the internal compositor-based Firefox window recorder to emit PNG files for each frame that is a meaningful change. The PNG output will further be merged into a variable frame rate video for analysis. Use this instead of ffmpeg to record a video (you still need the --video flag). [boolean] [default: false]
|
||||
--firefox.memoryReport Measure firefox resident memory after each iteration. [boolean] [default: false]
|
||||
--firefox.memoryReportParams.minizeFirst Force a collection before dumping and measuring the memory report. [boolean] [default: false]
|
||||
|
|
@ -81,7 +83,6 @@ firefox
|
|||
--firefox.collectMozLog Collect the MOZ HTTP log (by default). See --firefox.setMozLog if you need to specify the logs you wish to gather. [boolean]
|
||||
--firefox.powerConsumption Enable power consumption collection (in Wh). To get the consumption you also need to set firefox.geckoProfilerParams.features to include power. [boolean] [default: false]
|
||||
--firefox.setMozLog Use in conjunction with firefox.collectMozLog to set MOZ_LOG to something specific. Without this, the HTTP logs will be collected by default [default: "timestamp,nsHttp:5,cache2:5,nsSocketTransport:5,nsHostResolver:5"]
|
||||
--firefox.disableBrowsertimeExtension Disable installing the browsertime extension. [boolean]
|
||||
--firefox.noDefaultPrefs Prevents browsertime from setting its default preferences. [boolean] [default: false]
|
||||
--firefox.disableSafeBrowsing Disable safebrowsing. [boolean] [default: true]
|
||||
--firefox.disableTrackingProtection Disable Tracking Protection. [boolean] [default: true]
|
||||
|
|
@ -170,12 +171,14 @@ debug
|
|||
Options:
|
||||
--cpu Easy way to enable both chrome.timeline for Chrome and geckoProfile for Firefox [boolean]
|
||||
--enableProfileRun Make one extra run that collects the profiling trace log (no other metrics is collected). For Chrome it will collect the timeline trace, for Firefox it will get the Geckoprofiler trace. This means you do not need to get the trace for all runs and can skip the overhead it produces. [boolean]
|
||||
--enableVideoRun Make one extra run that collects video and visual metrics. This means you can do your runs with --visualMetrics true --video false --enableVideoRun true to collect visual metrics from all runs and save a video from the profile/video run. If you run it together with --enableProfileRun it will also collect profiling trace. [boolean]
|
||||
--video Record a video and store the video. Set it to false to remove the video that is created by turning on visualMetrics. To remove fully turn off video recordings, make sure to set video and visualMetrics to false. Requires FFMpeg to be installed. [boolean]
|
||||
--visualMetrics Collect Visual Metrics like First Visual Change, SpeedIndex, Perceptual Speed Index and Last Visual Change. Requires FFMpeg and Python dependencies [boolean]
|
||||
--visualElements, --visuaElements Collect Visual Metrics from elements. Works only with --visualMetrics turned on. By default you will get visual metrics from the largest image within the view port and the largest h1. You can also configure to pickup your own defined elements with --scriptInput.visualElements [boolean]
|
||||
--visualMetricsPerceptual Collect Perceptual Speed Index when you run --visualMetrics. [boolean]
|
||||
--visualMetricsContentful Collect Contentful Speed Index when you run --visualMetrics. [boolean]
|
||||
--visualMetricsPortable Use the portable visual-metrics processing script (no ImageMagick dependencies). [boolean] [default: true]
|
||||
--visualMetricsKeyColor Collect Key Color frame metrics when you run --visualMetrics. Each --visualMetricsKeyColor supplied must have 8 arguments: key name, red channel (0-255) low and high, green channel (0-255) low and high, blue channel (0-255) low and high, fraction (0.0-1.0) of pixels that must match each channel. [array]
|
||||
--scriptInput.visualElements Include specific elements in visual elements. Give the element a name and select it with document.body.querySelector. Use like this: --scriptInput.visualElements name:domSelector see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors. Add multiple instances to measure multiple elements. Visual Metrics will use these elements and calculate when they are visible and fully rendered.
|
||||
--scriptInput.longTask, --minLongTaskLength Set the minimum length of a task to be categorised as a CPU Long Task. It can never be smaller than 50. The value is in ms and only works in Chromium browsers at the moment. [number] [default: 50]
|
||||
-b, --browser Specify browser. Safari only works on OS X/iOS. Edge only work on OS that supports Edge. [choices: "chrome", "firefox", "edge", "safari"] [default: "chrome"]
|
||||
|
|
@ -184,10 +187,10 @@ Options:
|
|||
-n, --iterations Number of times to test the url (restarting the browser between each test) [number] [default: 3]
|
||||
--prettyPrint Enable to print json/har with spaces and indentation. Larger files, but easier on the eye. [boolean] [default: false]
|
||||
--delay Delay between runs, in milliseconds [number] [default: 0]
|
||||
-r, --requestheader Request header that will be added to the request. Add multiple instances to add multiple request headers. Works for Firefox and Chrome. Use the following format key:value
|
||||
--cookie Cookie that will be added to the request. Add multiple instances to add multiple request cookies. Works for Firefox and Chrome. Use the following format cookieName=cookieValue
|
||||
--injectJs Inject JavaScript into the current page at document_start. Works for Firefox and Chrome. More info: https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/contentScripts
|
||||
--block Domain to block or URL or URL pattern to block. If you use Chrome you can also use --blockDomainsExcept (that is more performant). Works in Chrome/Edge. For Firefox you can only block domains.
|
||||
-r, --requestheader Request header that will be added to the request. Add multiple instances to add multiple request headers. Works for Edge and Chrome. Use the following format key:value
|
||||
--cookie Cookie that will be added to the request. Add multiple instances to add multiple request cookies. Works for Firefox, Chrome and Edge. Use the following format cookieName=cookieValue
|
||||
--injectJs Inject JavaScript into the current page at document_start. Works for Firefox, Chrome and Edge. When injecting to Firefox make sure to wrap the code in a function!
|
||||
--block Domain to block or URL or URL pattern to block. If you use Chrome you can also use --blockDomainsExcept (that is more performant). Works in Chrome/Edge. For Firefox you block a URL if you start with http else you will block by setting a domain, like upload.wikimedia.org
|
||||
--percentiles The percentile values within the data browsertime will calculate and report. This argument uses Yargs arrays and you you to set them correctly it is recommended to use a configuraration file instead. [array] [default: [0,10,90,99,100]]
|
||||
--decimals The decimal points browsertime statistics round to. [number] [default: 0]
|
||||
--iqr Use IQR, or Inter Quartile Range filtering filters data based on the spread of the data. See https://en.wikipedia.org/wiki/Interquartile_range. In some cases, IQR filtering may not filter out anything. This can happen if the acceptable range is wider than the bounds of your dataset. [boolean] [default: false]
|
||||
|
|
@ -214,6 +217,7 @@ Options:
|
|||
--preURL, --warmLoad A URL that will be accessed first by the browser before the URL that you wanna analyze. Use it to fill the browser cache.
|
||||
--preURLDelay, --warmLoadDealy Delay between preURL and the URL you want to test (in milliseconds) [default: 1500]
|
||||
--userTimingAllowList All userTimings are captured by default this option takes a regex that will allow which userTimings to capture in the results.
|
||||
--userTimingBlockList All userTimings are captured by default this option takes a regex that will block some usertimings in the results.
|
||||
--headless Run the browser in headless mode. Works for Firefox and Chrome. [boolean] [default: false]
|
||||
--extension Path to a WebExtension to be installed in the browser. Note that --extension can be passed multiple times.
|
||||
--cjs Load scripting files that ends with .js as common js. Default (false) loads files as esmodules. [boolean] [default: false]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
layout: default
|
||||
title: Documentation Browsertime 21
|
||||
title: Documentation Browsertime 22
|
||||
description: Read about all you can do with Browsertime.
|
||||
keywords: tools, documentation, web performance
|
||||
nav: documentation
|
||||
|
|
@ -9,11 +9,11 @@ image: https://www.sitespeed.io/img/sitespeed-2.0-twitter.png
|
|||
twitterdescription: Documentation for Browsertime.
|
||||
---
|
||||
|
||||
# Documentation v21s
|
||||
# Documentation v22
|
||||
|
||||
<img src="{{site.baseurl}}/img/logos/browsertime.png" class="pull-right img-big" alt="Browsertime logo" width="200" height="175">
|
||||
|
||||
Browsertime is the heart of sitespeed.io that handles everything with the browser. At the moment we support Chrome, Firefox, Edge and Safari on desktop, Chrome on Android and limited support for Safari on iOS. You can see all the latest changes in the [Changelog](https://github.com/sitespeedio/browsertime/blob/main/CHANGELOG.md) for the project.
|
||||
Browsertime is the heart of sitespeed.io that handles everything with the browser. At the moment we support Chrome, Firefox, Edge and Safari on desktop, Chrome/Firefox on Android and limited support for Safari on iOS. You can see all the latest changes in the [Changelog](https://github.com/sitespeedio/browsertime/blob/main/CHANGELOG.md) for the project.
|
||||
|
||||
* [Introduction](introduction/) - what you can do with Browsertime.
|
||||
* [Installation](installation/) - install using npm, yarn or run our Docker containers.
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ Use Docker or the latest [LTS release of NodeJS](https://nodejs.org/) to run the
|
|||
* [Coach]({{site.baseurl}}/documentation/coach/) - get help from the Coach how you can make your web page faster.
|
||||
* [Compare]({{site.baseurl}}/documentation/compare/) - compare two HAR files with each other and find regressions.
|
||||
* [Humble]({{site.baseurl}}/documentation/humble/) - Raspberry Pi WiFi network link conditioner.
|
||||
* [OnlineTest]({{site.baseurl}}/documentation/onlinetest/) - deploy your own version of sitespeed.io online.
|
||||
* [PageXray]({{site.baseurl}}/documentation/pagexray/) - convert HAR files to a more usable format.
|
||||
* [sitespeed.io]({{site.baseurl}}/documentation/sitespeed.io/) - continuously monitor your web sites web performance (including the Coach, Browsertime, PageXray and the rest).
|
||||
* [Throttle]({{site.baseurl}}/documentation/throttle/) - simulate slow network connections on Linux and Mac OS X.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,468 @@
|
|||
---
|
||||
layout: default
|
||||
title: Online test
|
||||
description: Deploy your own version of sitespeed.io online.
|
||||
keywords: test, documentation, web performance
|
||||
author: Peter Hedenskog
|
||||
nav: documentation
|
||||
image: https://www.sitespeed.io/img/sitespeed-2.0-twitter.png
|
||||
twitterdescription:
|
||||
---
|
||||
|
||||
# Online test
|
||||
{:.no_toc}
|
||||
|
||||
* Lets place the TOC here
|
||||
{:toc}
|
||||
|
||||
## Introduction
|
||||
The online test is the simplest way to deploy your own version of sitespeed.io. You can add tests through a web GUI or by using the sitespeed.io command line, which pass the tests to your test server. This means that you can use your dedicated test machines both for monitoring and one off performance tests.
|
||||
|
||||

|
||||
{: .img-thumbnail}
|
||||
|
||||

|
||||
{: .img-thumbnail}
|
||||
|
||||
This method is ideal for small, medium, and large companies and organizations that also wants a GUI for running performance tests.
|
||||
|
||||
To get started, you will need the sitespeed.io server, at least one sitespeed.io test runner, and the necessary dependencies (a message broker like Redis/KeyDB, PostgreSQL, and a place to store the result pages).
|
||||
|
||||

|
||||
{: .img-thumbnail}
|
||||
|
||||
## Installation
|
||||
|
||||
For small businesses needing to test one or a few websites, you can deploy everything on a single dedicated server. For large companies planning to run many many tests, you can distribute the components across multiple servers. If you plan to run tests from various locations worldwide, ensure the web GUI, database, and KeyDB are located together in the same region since the web GUI is the one that do the most communication with KeyDB and the database.
|
||||
|
||||
### Using Docker
|
||||
It's easy to get the Docker version running on your local Linux or Mac OS machine. Make sure you have [Docker](https://www.docker.com) and [docker compose](https://docs.docker.com/compose/) installed.
|
||||
|
||||
1. **Clone the repository:**
|
||||
|
||||
```bash
|
||||
git clone https://github.com/sitespeedio/onlinetest.git
|
||||
```
|
||||
|
||||
2. **Navigate to the project directory:**
|
||||
|
||||
```bash
|
||||
cd onlinetest
|
||||
```
|
||||
|
||||
3. **Start the Docker containers (KeyDB/PostgreSQL/Minio/sitespeed.io server and testrunner):**
|
||||
|
||||
```bash
|
||||
docker compose -f docker-compose.yml -f docker-compose.app.yml up
|
||||
```
|
||||
|
||||
Now you can open your web browser and navigate to [http://127.0.0.1:3000](http://127.0.0.1:3000) to run your first test.
|
||||
|
||||
If you are on Linux you need to run `sudo modprobe ifb numifbs=1` to be able to set different connectivities inside of Docker. On Mac you can only run native connectivity when you run inside of Docker.
|
||||
|
||||
### Using NodeJS
|
||||
|
||||
To get the server and test runner running, you need to install [NodeJS](https://nodejs.org/). Please follow the instructions on [NodeJS](https://nodejs.org/) for your operating system. Install the LTS version (currently, that is NodeJS 20).
|
||||
|
||||
#### Install the server
|
||||
|
||||
Get the latest release from npm:
|
||||
|
||||
```bash
|
||||
npm install @sitespeed.io/server -g
|
||||
```
|
||||
|
||||
#### Install the test runner
|
||||
|
||||
Get the latest release from npm:
|
||||
|
||||
```bash
|
||||
npm install @sitespeed.io/testrunner -g
|
||||
```
|
||||
|
||||
The test runner can either use our [pre-made sitespeed.io Docker container](https://hub.docker.com/r/sitespeedio/sitespeed.io) (in which case you need to install Docker) or use the npm-installed sitespeed.io. If you choose not to use Docker, follow [these instructions](https://www.sitespeed.io/documentation/sitespeed.io/installation/#using-node-js) to get sitespeed.io up and running.
|
||||
|
||||
|
||||
#### Install the dependencies
|
||||
You need to have KeyDB (or a similar message broker that follow the Redis APIs), PostgreSQL and somewhere to store the HTML result. If you don't want to handle the dependencies yourself you can use [our docker compose file](https://github.com/sitespeedio/onlinetest/blob/main/docker-compose.yml). You need to have Docker and Docker compose installed to run it.
|
||||
|
||||
To get the Docker Compose file, the easiest way for testing is to clone the repository:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/sitespeedio/onlinetest.git
|
||||
cd onlinetest
|
||||
docker compose up
|
||||
```
|
||||
|
||||
In the repository you also have a *.env* file that sets up username/passwords for the different services. For KeyDB there's also a *keydb.conf* file that also holds the password.
|
||||
|
||||
## Configuration
|
||||
The [.env](https://github.com/sitespeedio/onlinetest/blob/main/.env) is the key for the setup if you use Docker/Docker compose. Most things for your everyday tests can be setup there.
|
||||
|
||||
You also have specific [configuration files for the server](https://github.com/sitespeedio/onlinetest/blob/main/server/config/default.yaml) and for the [test runner](https://github.com/sitespeedio/onlinetest/blob/main/testrunner/config/default.yaml).
|
||||
|
||||
You can override that configuration with command line parameters, or you can replace the configuration by using your own configuration file. Take a copy of the default ones and reconfigure them the way you need. When you start the server and the testrunnner you add `--config /path/to/file` to your new files and these will be used.
|
||||
|
||||
### YAML / JSON
|
||||
The configuration files can be YAML or JSON. Using a configuration file should be your first choice because then you are in full control.
|
||||
|
||||
You can provide a configuration file using the command line: `--config`.
|
||||
|
||||
When configuring the test runner, the configuration will be validated. If the configuration is broken, the test runner will not start. Check the log for a helpful message to fix what's broken.
|
||||
|
||||
### Command line override
|
||||
|
||||
If you just need to change one or two configurations, you can use the command line override. If your configuration looks like this:
|
||||
|
||||
```json
|
||||
redis: {
|
||||
host: "127.0.0.1"
|
||||
}
|
||||
```
|
||||
|
||||
You can override that with `--redis.host MY_HOST`.
|
||||
|
||||
### sitespeed.io configuration
|
||||
|
||||
You can also pre-configure how you will use sitespeed.io on each testrunner.
|
||||
|
||||
The configuration for sitespeed.io uses inheritance. On the server, you can configure a sitespeed.io configuration in the Docker compose file. That configuration will be passed on to the test runner and merged with the sitespeed.io configuration on the test runner. Finally, this configuration will be merged with the configuration from the CLI API or the GUI. It looks like this:
|
||||
|
||||
**server -> test runner -> CLI/GUI configurations**
|
||||
|
||||
This way, you can configure some parts globally (in the server config), some things locally (per test runner), and some parts individually per test.
|
||||
|
||||
## The server
|
||||
|
||||
The server will host the HTML GUI and the API. There's a lot of things you can configure on the server.
|
||||
|
||||
### Start the server
|
||||
|
||||
If your server is installed globally, you start it by running `sitespeed.io-server`.
|
||||
|
||||
When you have your own configuration, you provide it like this:
|
||||
```bash
|
||||
sitespeed.io-server --config path/to/file
|
||||
```
|
||||
|
||||
Or if you use Docker:
|
||||
```bash
|
||||
docker run --rm -v "$(pwd)":/config sitespeedio/server:{% include version/server.txt %} --config /config/config.yml
|
||||
```
|
||||
|
||||
### Database and message broker
|
||||
|
||||
The first thing you need to do is configure the PostgreSQL and KeyDB connections to match your setup. The default setup uses localhost and default passwords. Make sure to change these settings to match your specific configuration.
|
||||
|
||||
### HTTPS
|
||||
|
||||
If you want your server behind HTTPS, you can set up a reverse proxy or configure the path to keys and certificates.
|
||||
|
||||
```yaml
|
||||
server:
|
||||
# Configure SSL. Add the path to the key and certificate file
|
||||
ssl:
|
||||
key:
|
||||
cert:
|
||||
```
|
||||
|
||||
### Limit who can run tests
|
||||
|
||||
You probably want to make sure that your instance isn't open for everyone to add tests. There are a couple of ways to limit who can use your instance by just using configuration.
|
||||
|
||||
#### Adding Basic Auth
|
||||
|
||||
The server can be secured with basic authentication. You can configure it with the following settings:
|
||||
|
||||
```yaml
|
||||
basicAuth:
|
||||
login:
|
||||
password:
|
||||
```
|
||||
|
||||
The basic auth will be applied to all URLs except calls to the API and the admin pages (the admin page has a separate basic auth configuration).
|
||||
|
||||
#### Key for running tests through the API
|
||||
|
||||
You can set up a secret key that needs to be used when you send tests to the API. You configure that under *api.key* or in YAML:
|
||||
|
||||
```yaml
|
||||
api:
|
||||
key: MY_KEY
|
||||
```
|
||||
|
||||
Then when you use sitespeed.io and the API make sure to use`--api.key MY_KEY` to your configuration.
|
||||
|
||||
#### Validate test domains
|
||||
|
||||
You probably want to limit which domains can be tested through the GUI on the server. You can do this with the *validTestDomains* configuration. This needs to be a regular expression that will be matched against the hostname of the URL that you want to test.
|
||||
|
||||
Here are a couple of examples:
|
||||
|
||||
* To test all URLs on https://www.sitespeed.io: `validTestDomains: "^www\.sitespeed\.io$"`
|
||||
* To allow testing of any URLs: `validTestDomains: ".*"`
|
||||
|
||||
#### Disable the GUI
|
||||
You can fully disable the GUI so that tests can only be added through the API. You do this by setting: `disableGUI: true`.
|
||||
|
||||
#### Disable the search
|
||||
You can choose to only disable the search functionality. You do this by setting: `disableSearchGUI: true`.
|
||||
|
||||
### Style the pages
|
||||
If you want to style the server's pages, you can do so by adding extra CSS and your own images. In the [default configuration](https://github.com/sitespeedio/onlinetest/blob/main/server/config/default.yaml), look for the *html* key.
|
||||
|
||||
To get this to work, you should also configure where you locally host your CSS/images. You do that with the following configuration:
|
||||
|
||||
```yaml
|
||||
html:
|
||||
extras:
|
||||
path:
|
||||
```
|
||||
|
||||
Set the path to where you host the files on the server. They will then be accessible through */extras/*.
|
||||
|
||||
### Waiting on tests to finish
|
||||
You can choose what the user will see while waiting for the test to finish. By default, the log from sitespeed.io will be streamed on the wait screen so users can follow the progress of the test.
|
||||
|
||||
If you are not interested in that, you can choose to show random AI-generated images. You do that with:
|
||||
|
||||
```yaml
|
||||
html
|
||||
showRandomAIImage: true
|
||||
```
|
||||
|
||||
More well-curated images will come later. :)
|
||||
|
||||
### Change the locale
|
||||
|
||||
Do your users not have English as their first language? You can change the language! Use the [default locale file](https://github.com/sitespeedio/onlinetest/blob/main/server/locales/en.json) and create a new file for your language.
|
||||
|
||||
```yaml
|
||||
localization:
|
||||
defaultLocale: en
|
||||
directory: /path/to/your/directory
|
||||
```
|
||||
|
||||
## The testrunner
|
||||
If your testrunner is installed globally, you start it by running `sitespeed.io-testrunner`.
|
||||
|
||||
When you have your own configuration, you provide it like this:
|
||||
|
||||
```bash
|
||||
sitespeed.io-testrunner --config path/to/file
|
||||
```
|
||||
|
||||
If you use Docker, you can start it like this:
|
||||
|
||||
```bash
|
||||
docker run -v "$(pwd)":/config --cap-add=NET_ADMIN -v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp sitespeedio/testrunner:{% include version/testrunner.txt %} --config /config/config.json
|
||||
```
|
||||
|
||||
|
||||
### Message broker
|
||||
Your testrunner needs to be able to connect to your Redis-like broker, so make sure to configure it accordingly in your configuration file.
|
||||
|
||||
### Configuring test environments
|
||||
You need to configure what kind of tests you want to run.
|
||||
|
||||
#### Desktop/emulated mobile
|
||||
In most cases, the default configuration will be sufficient. It looks like this:
|
||||
|
||||
```yaml
|
||||
- name: "Desktop Browsers"
|
||||
type: "desktop"
|
||||
browsers: ["chrome", "firefox", "edge"]
|
||||
connectivity: ["native", "3g", "4g", "cable"]
|
||||
useDocker: false
|
||||
```
|
||||
|
||||
The browsers field lists the browsers you can use. The default sitespeed.io container includes the latest versions of all three browsers. If you set *useDocker* to true, all three will be available. If you install the browsers yourself on the server, you can edit the list accordingly.
|
||||
|
||||
When you set useDocker to true, the Docker container configured in:
|
||||
```yaml
|
||||
docker:
|
||||
container: "sitespeedio/sitespeed.io:latest"
|
||||
```
|
||||
is used. If you try the Docker container on your local machine, remember to change the settings for [how you upload the result](https://github.com/sitespeedio/onlinetest/blob/main/server/config/sitespeed.json) since localhost/127.0.0.1 do not work automatically inside the Docker container. Use your host IP or *host.docker.internal* if you are on a Mac.
|
||||
|
||||
The connectivity array lists the different connectivity options you will see in the drop-down menu in the GUI.
|
||||
|
||||
#### Android
|
||||
To run tests on an Android phone, you should follow the [sitespeed.io instructions on how to set up the phone and server](https://www.sitespeed.io/documentation/sitespeed.io/mobile-phones/#test-on-android). The server that runs your test runner needs to have ADB tools and sitespeed.io dependencies (so it can analyze the video, etc.).
|
||||
|
||||
Each phone needs to be configured on the test runner with the device ID.
|
||||
|
||||
```yaml
|
||||
- name: "Android"
|
||||
type: "android"
|
||||
browsers: ["chrome", "firefox"]
|
||||
model: "Moto G5"
|
||||
deviceId: "ZY322MMFZ2"
|
||||
useDocker: false
|
||||
connectivity: ["native"]
|
||||
```
|
||||
|
||||
By default, each phone will have its own queue of work, meaning you need to specify a specific device to pick up a job.
|
||||
|
||||
If you want to have multiple phones of the same model work on the same queue (to run multiple tests simultaneously), you can define your own queue name. Here's an example where two phones will take on jobs for all "motog5" tests.
|
||||
|
||||
```yaml
|
||||
- name: "Android"
|
||||
type: "android"
|
||||
browsers: ["chrome", "firefox"]
|
||||
model: "Moto G5"
|
||||
deviceId: "ZY322MMFZ2"
|
||||
useDocker: false
|
||||
connectivity: ["native"]
|
||||
queue: "motog5"
|
||||
|
||||
- name: "Android"
|
||||
type: "android"
|
||||
browsers: ["chrome", "firefox"]
|
||||
model: "Moto G5"
|
||||
deviceId: "HAY562MARW6"
|
||||
useDocker: false
|
||||
connectivity: ["native"]
|
||||
queue: "motog5"
|
||||
```
|
||||
|
||||
### Using sitespeed.io Docker containers
|
||||
|
||||
If you choose to use Docker, set `useDocker` to true in the configuration. Then all you need to do is make sure Docker is installed on the server.
|
||||
|
||||
You can configure which Docker container to use. Normally, when you run sitespeed.io, you should specify the exact sitespeed.io version, like `sitespeedio/sitespeed.io:35.0.0`, to know exactly which version you are using. However, if you want to deploy your test runner and let it auto-update, you can use `sitespeedio/sitespeed.io:35` as the tag. Ensure that you update the container once per day with:
|
||||
|
||||
```yaml
|
||||
docker:
|
||||
container: "sitespeedio/sitespeed.io:35"
|
||||
```
|
||||
|
||||
If you try out the Docker containers locally on your machine, you need to remember remember that localhost inside the container isn't automatically the same as localhost on the server. You can read about it [here](https://www.sitespeed.io/documentation/sitespeed.io/docker/#access-localhost).
|
||||
|
||||
That means if you run everything locally and want to use sitespeed.io docker containers, you need to set `--s3.endpoint` to something else than 127.0.0.1. By default that is set [here](https://github.com/sitespeedio/onlinetest/blob/main/server/config/sitespeed.json).
|
||||
|
||||
On Mac you can use `--s3.endpoint http://host.docker.internal:9000` and on Linux you can use your actual IP. You can see how that is used in [one of our GitHUb Actions](https://github.com/sitespeedio/onlinetest/blob/main/.github/workflows/docker.yml#L45).
|
||||
|
||||
## Dependencies
|
||||
|
||||
To ensure the smooth operation of your sitespeed.io server and test runners, there are several dependencies you need to configure. These dependencies facilitate communication between components, data storage, and result processing. Here’s a brief overview of why these dependencies are necessary:
|
||||
|
||||
1. **Message broker**: Facilitates communication between the server and test runners.
|
||||
2. **Database**: Stores configuration, test results, and other data.
|
||||
3. **Result storage**: Manages the storage of HTML results and other test artifacts.
|
||||
|
||||
|
||||
### Message broker
|
||||
|
||||
The communication between the server and test runners uses a Redis-like system. The default setting uses [KeyDb](https://docs.keydb.dev), but you can probably use anything that follows the Redis "standard". When the server and a test runner are started, they need access to the message broker.
|
||||
|
||||
You should make sure to configure your message broker to remove old data. If you use KeyDB you can set the max memory limit (adjust it to the RAM - OS of your server) and a remove strategy.
|
||||
|
||||
Checkout the *keydb.conf* file. It looks something like this
|
||||
|
||||
```bash
|
||||
# You can read more about keydb configuration: https://docs.keydb.dev/docs/config-file/
|
||||
# The default port
|
||||
port 6379
|
||||
# Your password, make sure to change this
|
||||
requirepass YOUR_PASSWORD_THAT_YOU_NEED_TO_CHANGE
|
||||
|
||||
# Choose max memory, adjust this to the server where you run keydb
|
||||
# You can also choose how many objects that should stay in keydb
|
||||
# by changing removeOnComplete in the server configuration
|
||||
maxmemory 6GB
|
||||
maxmemory-policy allkeys-lru
|
||||
|
||||
# You can configure to store the the data so that queued tests will survive
|
||||
# a restart
|
||||
appendonly yes
|
||||
appendfilename appendonly.aof
|
||||
appendfsync everysec
|
||||
```
|
||||
|
||||
### Database
|
||||
|
||||
PostgreSQL needs to have a database and table. This setup is handled in the Docker Compose file. If you want to set up the database manually, the table structure exists [here](https://github.com/sitespeedio/onlinetest/tree/main/server/database/setup).
|
||||
|
||||
### Result storage
|
||||
|
||||
The default setup uses [MinIO](https://min.io), which is an open-source version of S3, but you can use any sitespeed.io-compatible result storage. You configure this in the sitespeed.io JSON, preferably on the server. You can use S3, Google Cloud Storage, SCP to your own server, or create your own plugin to store the data wherever you want.
|
||||
|
||||
If you also use MinIO, make sure to configure how long the data will be stored. You can see how this is done in [the Docker Compose file](https://github.com/sitespeedio/onlinetest/blob/main/docker-compose.yml), and it looks something like this:
|
||||
|
||||
```bash
|
||||
/usr/bin/mc ilm rule add --expire-days 30 sitespeedio/sitespeedio
|
||||
```
|
||||
|
||||
## Add Lighthouse to your test
|
||||
You can enable the possibility to run Lighthouse tests by setting a configuration in the server configuration. Set useLighthouse to true.
|
||||
|
||||
```yaml
|
||||
html:
|
||||
# Show the Lighthouse box
|
||||
useLighthouse: true
|
||||
```
|
||||
|
||||
You will then have a checkbox in the extras section.
|
||||
|
||||
If your test runner uses NodeJS, then you need to manually install the Lighthouse plugin:
|
||||
`npm install @sitespeed.io/plugin-lighthouse -g`
|
||||
|
||||
If you use Docker, then you need to update which container to use. In your configuration for your test runner change the container to use the +1 container:
|
||||
|
||||
```yaml
|
||||
docker:
|
||||
container: "sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %}-plus1"
|
||||
```
|
||||
|
||||
|
||||
## Configuration for production
|
||||
|
||||
Here's a checklist of things to consider when pushing to production:
|
||||
|
||||
1. **Change all the default passwords**:
|
||||
- Do this for KeyDB, PostgreSQL, Admin, Minio (or what you use) and Basic Auth.
|
||||
2. **Change settings for where you upload your result**
|
||||
- Remember to change the [default settings](https://github.com/sitespeedio/onlinetest/blob/main/server/config/sitespeed.json) on where you upload the data and how you access it.
|
||||
3. **Limit your instance**:
|
||||
- Use Basic Auth for adding tests through the web GUI.
|
||||
- Set a secret key for adding tests through the API.
|
||||
- Use a regular expression that needs to match the domain you want to test.
|
||||
- Disable search.
|
||||
- Disable adding tests through the web GUI.
|
||||
4. **Data retention**:
|
||||
- If you use S3 (or Minio), make sure to configure how long the data will be kept.
|
||||
- Add a job to your PostgreSQL database to remove data older than X days. You can find an example script [here](https://github.com/sitespeedio/onlinetest/blob/main/server/database/delete/delete.sql).
|
||||
|
||||
# Using the API
|
||||
|
||||
You can use your normal sitespeed.io installation to pass tests to the server/test runner.
|
||||
|
||||
If you run `sitespeed.io --help`, you will see a section about the API. These configurations will be passed on to the test server. Your other configurations will be passed on to the test runner. This means you can configure your tests exactly as before and pass them on to the test server.
|
||||
|
||||
There are two parameters that you need to use:
|
||||
* `--api.hostname` - The hostname of your server that hosts the sitespeed.io server.
|
||||
* `--api.location` - The name of the location where you host your test runner (the `location.name` part in your test runner configuration).
|
||||
|
||||
You also have the following options:
|
||||
|
||||
- `--api.key` - The API key to use. You configure the key in the server configuration.
|
||||
|
||||
- `--api.action` - The type of API call you want to make:
|
||||
- `add`: Add a test.
|
||||
- `addAndGetResult`: Add a test and wait for the result.
|
||||
- `get`: Get the result of a test.
|
||||
- To get the result, make sure you add the ID using `--api.id`.
|
||||
- [choices: "add", "addAndGetResult", "get"] [default: "addAndGetResult"]
|
||||
|
||||
- `--api.silent` - Set to `true` if you do not want to log anything from the communication between the API and the server.
|
||||
|
||||
- `--api.port` - The port for the API.
|
||||
|
||||
- `--api.id` - The ID of the test. Use it when you want to get the test result.
|
||||
|
||||
- `--api.label` - Add a label to your test.
|
||||
|
||||
- `--api.priority` - The priority of the test. Highest priority is 1. The default is 10.
|
||||
|
||||
- `--api.json` - Output the result as JSON.
|
||||
|
|
@ -91,7 +91,7 @@ If you use the <code>--preScript</code> or <code>--multi</code> feature, it is t
|
|||
### My pre/post/scripting script doesn't work?
|
||||
We use Selenium pre/post script navigation. You can [read more](/documentation/sitespeed.io/prepostscript/) about of our pre/post script setup and focus on the [debug section](/documentation/sitespeed.io/prepostscript/#debuglog-from-your-script) if you have any problem.
|
||||
|
||||
If you have problem with Selenium (getting the right element etc), PLEASE do not create issues in sitespeed.io. Head over to the [Selenium community](https://docs.seleniumhq.org/) and they can help you.
|
||||
If you have problem with Selenium (getting the right element etc), PLEASE do not create issues in sitespeed.io. Head over to the [Selenium community](https://www.selenium.dev/support/) and they can help you.
|
||||
|
||||
### How do you pass HTML/JavaScript as a CLI parameter?
|
||||
The easiest way to pass HTML to the CLI is to pass on the whole message as a String (use a quotation mark to start and end the String) and then do not use quotation marks inside the HTML.
|
||||
|
|
@ -129,6 +129,18 @@ You can also use the <code>--urlAlias</code> if you want to give the page a frie
|
|||
docker run --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %} --useHash --urlAlias super --urlAlias duper https://www.sitespeed.io/#/super https://www.sitespeed.io/#/duper
|
||||
~~~
|
||||
|
||||
### How do I test single point of failure (SPOF)?
|
||||
|
||||
You can use the dommain unreachable.sitespeed.io that you can connect to but it will be really slow.
|
||||
|
||||
For example, you have a web site that load assets from cdn1.readspeaker.com inside of the head tag and you want to test what happens if that domain is really slow. You can do that using Chrome and add this argument.
|
||||
|
||||
~~~bash
|
||||
--chrome.args='--host-resolver-rules=MAP cdn1.readspeaker.com unreachable.sitespeed.io'
|
||||
~~~
|
||||
|
||||
That will make all requests that uses cdn1.readspeaker.com instead access unreachable.sitespeed.io that will slow down everything.
|
||||
|
||||
|
||||
### Running tests from multiple locations
|
||||
Can I test the same URLs from different locations and how do I make sure they don't override each others data in Graphite?
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ twitterdescription: You can use Firefox, Safari, Chrome, Edge and Chrome/Firefox
|
|||
You can fetch timings, run your own JavaScript and record a video of the screen. The following browsers are supported: Firefox, Safari, Edge, Chrome, Chrome and Firefox on Android and Safari on iOS. If you run our Docker containers, we always update them when we tested the latest stable release of Chrome and Firefox. Safari and Safari on iOS needs Mac OS X Catalina. Edge need the corresponding MSEdgeDriver.
|
||||
|
||||
## Firefox
|
||||
The latest version of Firefox should work out of the box.
|
||||
The latest version of Firefox should work out of the box except if you are on Linux and run Snap installed Firefox, then you need to [follow the workaround](https://github.com/mozilla/geckodriver/releases/tag/v0.31.0) by setting a TMPDIR that Geckodriver and Firefox will use.
|
||||
|
||||
### Firefox profile setup
|
||||
At the moment we setup a new profile for each run the browser do. We set up the profiles preferences like [this](https://github.com/sitespeedio/browsertime/blob/main/lib/firefox/webdriver/firefoxPreferences.js). We use Mozillas [own configuration](https://searchfox.org/mozilla-central/source/testing/talos/talos/config.py) as default with some changes + some extra configuration for performance and privacy.
|
||||
At the moment we setup a new profile for each run the browser do. We set up the profiles preferences like [this](https://github.com/sitespeedio/browsertime/blob/main/lib/firefox/settings/firefoxPreferences.js). We use Mozillas [own configuration](https://searchfox.org/mozilla-central/source/testing/talos/talos/config.py) as default with some changes + some extra configuration for performance and privacy.
|
||||
|
||||
We try to disable all Firefox ping home:
|
||||
* We disable [heartbeat](https://wiki.mozilla.org/Firefox/Shield/Heartbeat).
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ To help us reproduce your problem there are a couple of things we need:
|
|||
* Include the log output from your run. Please do not take a screenshot of the log, instead share the log as text either in the issue or in a [gist](https://gist.github.com/).
|
||||
* Give us the exact version of sitespeed.io you are using (so we know we use the same version when we try to reproduce it).
|
||||
* Tell us what OS you are using and if you are using Docker give us the base OS where you run your container.
|
||||
* We can run desktop tests on Mac OS (latest OS), Ubuntu and Debian. We can also reproduce issues on Moto G5, Samsung A51 and iPhone Xs. If you run on other OS, please provide a machine with that OS with access so we can use that machine to reproduce that issue. Thanks!
|
||||
* If you don't use Docker: Include the browser version you are using.
|
||||
* If you have problems with headers/cookie/auth you can use [https://httpbin.org](https://httpbin.org) to reproduce your issue.
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ description: Finding performance regressions is hard. Using Mann Whitney U/Wilco
|
|||
keywords: Mann Whitney U, performance, regression,
|
||||
nav: documentation
|
||||
category: sitespeed.io
|
||||
image: https://www.sitespeed.io/img/sitespeed-2.0-twitter.png
|
||||
image: htt"p"s://www.sitespeed.io/img/sitespeed-2.0-twitter.png
|
||||
twitterdescription: Use Mann Whitney U or Wilcox statistical methods to know if you have a regression.
|
||||
---
|
||||
[Documentation]({{site.baseurl}}/documentation/sitespeed.io/) / Compare
|
||||
|
|
@ -49,10 +49,10 @@ To save a baseline using NodeJS:
|
|||
sitespeed.io https://www.sitespeed.io -n 21 --compare.saveBaseline --compare.id start_page
|
||||
~~~
|
||||
|
||||
Using Docker there's a new volume that you should use to mount where you want to save the baseline. `-v "$(pwd):/baseline"` will map your current directory to where you will store the baseline files. If you want to store them somewhere else then change what you map inside the container `-v "/somewhere/else:/baseline"`
|
||||
Using Docker there's a new volume that you should use to mount where you want to save the baseline. `-v "$(pwd)":/baseline` will map your current directory to where you will store the baseline files. If you want to store them somewhere else then change what you map inside the container `-v "/somewhere/else:/baseline"`
|
||||
|
||||
~~~bash
|
||||
docker run -v "$(pwd):/baseline" sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %} https://www.sitespeed.io/ -n 21 --compare.saveBaseline --compare.id start_page --compare.baselinePath /baseline
|
||||
docker run -v "$(pwd)":/baseline sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %} https://www.sitespeed.io/ -n 21 --compare.saveBaseline --compare.id start_page --compare.baselinePath /baseline
|
||||
~~~
|
||||
|
||||
The baseline file is a JSON file that contains all the raw data from Browsertime.
|
||||
|
|
@ -62,18 +62,18 @@ The baseline file is a JSON file that contains all the raw data from Browsertime
|
|||
For your test to work, assign the same identification (id) to both your current test and the baseline test. This matching id is crucial for the test to correctly locate and compare with the baseline. Additionally, ensure that the number of iterations in your test matches that of the baseline. Remember, using a sufficiently large number of iterations is essential as it leads to more accurate and reliable results.
|
||||
|
||||
~~~bash
|
||||
sitespeed.io https://www.sitespeed.io -n 21 ---compare.id start_page
|
||||
sitespeed.io https://www.sitespeed.io -n 21 --compare.id start_page
|
||||
~~~
|
||||
|
||||
In Docker:
|
||||
~~~bash
|
||||
docker run -v "$(pwd):/baseline" sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %} https://www.sitespeed.io/ -n 21 --compare.id start_page --compare.baselinePath /baseline
|
||||
docker run -v "$(pwd)":/baseline sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %} https://www.sitespeed.io/ -n 21 --compare.id start_page --compare.baselinePath /baseline
|
||||
~~~
|
||||
|
||||
You can also save a baseline for each and every test, so you always compare your last run with the run before that. That will automatically happen if you have the `--compare.saveBaseline`.
|
||||
|
||||
~~~bash
|
||||
docker run -v "$(pwd):/baseline" sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %} https://www.sitespeed.io/ -n 21 --compare.id start_page --compare.baselinePath /baseline --compare.saveBaseline
|
||||
docker run -v "$(pwd)":/baseline sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %} https://www.sitespeed.io/ -n 21 --compare.id start_page --compare.baselinePath /baseline --compare.saveBaseline
|
||||
~~~
|
||||
|
||||
## Results
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ Browser
|
|||
--browsertime.cpu, --cpu Easy way to enable both chrome.timeline and CPU long tasks for Chrome and geckoProfile for Firefox [boolean]
|
||||
--browsertime.userTimingWhitelist, --userTimingWhitelist This option takes a regex that will whitelist which userTimings to capture in the results. All userTimings are captured by default. T
|
||||
--axe.enable Run axe tests. Axe will run after all other metrics is collected and will add some extra time to each test. [boolean]
|
||||
-r, --browsertime.requestheader, --requestheader Request header that will be added to the request. Add multiple instances to add multiple request headers. Use the following format key:value. Only works in Chrome and Firefox.
|
||||
-r, --browsertime.requestheader, --requestheader Request header that will be added to the request. Add multiple instances to add multiple request headers. Use the following format key:value. Only works in Chrome, Firefox and Edge.
|
||||
--browsertime.cookie, --cookie Cookie that will be added to the request. Add multiple instances to add multiple cookies. Use the following format cookieName=cookieValue. Only works in Chrome and Firefox.
|
||||
--browsertime.block, --block Domain or URL or URL pattern to block. If you use Chrome you can also use --blockDomainsExcept (that is more performant). Works in Chrome/Edge. For Firefox you can only block domains.
|
||||
--browsertime.basicAuth, --basicAuth Use it if your server is behind Basic Auth. Format: username@password. Only works in Chrome and Firefox.
|
||||
|
|
@ -70,7 +70,7 @@ Filmstrip
|
|||
--filmstrip.showAll Show all screenshots in the filmstrip, independent if they have changed or not. [boolean] [default: false]
|
||||
|
||||
Firefox
|
||||
--browsertime.firefox.includeResponseBodies, --firefox.includeResponseBodies Include response bodies in HAR [choices: "none", "all", "html"] [default: "none"]
|
||||
--browsertime.firefox.includeResponseBodies, --firefox.includeResponseBodies Warning: This do not work at the moment, see https://github.com/sitespeedio/sitespeed.io/issues/4295 [choices: "none", "all", "html"] [default: "none"]
|
||||
--browsertime.firefox.nightly, --firefox.nightly Use Firefox Nightly. Works on OS X. For Linux you need to set the binary path. [boolean]
|
||||
--browsertime.firefox.beta, --firefox.beta Use Firefox Beta. Works on OS X. For Linux you need to set the binary path. [boolean]
|
||||
--browsertime.firefox.developer, --firefox.developer Use Firefox Developer. Works on OS X. For Linux you need to set the binary path. [boolean]
|
||||
|
|
@ -145,7 +145,7 @@ Crawler
|
|||
|
||||
scp
|
||||
--scp.host The host.
|
||||
--scp. destinationPath The destination path on the remote server where the files will be copied.
|
||||
--scp.destinationPath The destination path on the remote server where the files will be copied.
|
||||
--scp.port The port for ssh when scp the result to another server. [default: 22]
|
||||
--scp.username The username. Use username/password or username/privateKey/pem.
|
||||
--scp.password The password if you do not use a pem file.
|
||||
|
|
@ -160,7 +160,7 @@ Grafana
|
|||
--grafana.annotationTitle Add a title to the annotation sent for a run.
|
||||
--grafana.annotationMessage Add an extra message that will be attached to the annotation sent for a run. The message is attached after the default message and can contain HTML.
|
||||
--grafana.annotationTag Add a extra tag to the annotation sent for a run. Repeat the --grafana.annotationTag option for multiple tags. Make sure they do not collide with the other tags.
|
||||
--grafana.annotationScreenshot Include screenshot (from Browsertime/WebPageTest) in the annotation. You need to specify a --resultBaseURL for this to work. [boolean] [default: false]
|
||||
--grafana.annotationScreenshot Include screenshot (from Browsertime) in the annotation. You need to specify a --resultBaseURL for this to work. [boolean] [default: false]
|
||||
|
||||
Graphite
|
||||
--graphite.host The Graphite host used to store captured metrics.
|
||||
|
|
@ -174,7 +174,7 @@ Graphite
|
|||
--graphite.arrayTags Send the tags as Array or a String. In Graphite 1.0 the tags is a array. Before a String [boolean] [default: true]
|
||||
--graphite.annotationTitle Add a title to the annotation sent for a run.
|
||||
--graphite.annotationMessage Add an extra message that will be attached to the annotation sent for a run. The message is attached after the default message and can contain HTML.
|
||||
--graphite.annotationScreenshot Include screenshot (from Browsertime/WebPageTest) in the annotation. You need to specify a --resultBaseURL for this to work. [boolean] [default: false]
|
||||
--graphite.annotationScreenshot Include screenshot (from Browsertime) in the annotation. You need to specify a --resultBaseURL for this to work. [boolean] [default: false]
|
||||
--graphite.sendAnnotation Send annotations when a run is finished. You need to specify a --resultBaseURL for this to work. However if you for example use a Prometheus exporter, you may want to make sure annotations are not sent, then set it to false. [boolean] [default: true]
|
||||
--graphite.annotationRetentionMinutes The retention in minutes, to make annotation match the retention in Graphite. [number]
|
||||
--graphite.statsd Uses the StatsD interface [boolean] [default: false]
|
||||
|
|
@ -247,7 +247,7 @@ s3
|
|||
--s3.secret The S3 secret.
|
||||
--s3.bucketname Name of the S3 bucket,
|
||||
--s3.path Override the default folder path in the bucket where the results are uploaded. By default it's "DOMAIN_OR_FILENAME_OR_SLUG/TIMESTAMP", or the name of the folder if --outputFolder is specified.
|
||||
--s3.region The S3 region. Optional depending on your settings.
|
||||
--s3.region The S3 region.
|
||||
--s3.acl The S3 canned ACL to set. Optional depending on your settings.
|
||||
--s3.removeLocalResult Remove all the local result files after they have been uploaded to S3. [boolean] [default: false]
|
||||
--s3.params Extra params passed when you do the S3.upload: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#upload-property - Example: --s3.params.Expires=31536000 to set expire to one year.
|
||||
|
|
@ -277,8 +277,9 @@ HTML
|
|||
--html.assetsBaseURL The base URL to the server serving the assets of HTML results. In the format of https://result.sitespeed.io. This can be used to reduce size in large setups. If set, disables writing of assets to the output folder.
|
||||
--html.compareURL, --html.compareUrl Will add a link on the waterfall page, helping you to compare the HAR. The full path to your compare installation. In the format of https://compare.sitespeed.io/
|
||||
--html.pageSummaryMetrics Select from a list of metrics to be displayed for given URL(s). Pass on multiple --html.pageSummaryMetrics to add more than one column. This is best used as an array in your config.json file. [default: ["transferSize.total","requests.total","thirdParty.requests","transferSize.javascript","transferSize.css","transferSize.image","score.performance"]]
|
||||
--html.summaryBoxes Select required summary information to be displayed on result index page. [default: ["score.score","score.accessibility","score.bestpractice","score.privacy","score.performance","timings.firstPaint","timings.firstContentfulPaint","timings.fullyLoaded","timings.pageLoadTime","timings.largestContentfulPaint","timings.FirstVisualChange","timings.LastVisualChange","timings.SpeedIndex","timings.PerceptualSpeedIndex","timings.VisualReadiness","timings.VisualComplete","timings.backEndTime","googleWebVitals.cumulativeLayoutShift","requests.total","requests.javascript","requests.css","requests.image","transferSize.total","transferSize.html","transferSize.javascript","contentSize.javascript","transferSize.css","transferSize.image","thirdParty.transferSize","thirdParty.requests","webpagetest.SpeedIndex","webpagetest.lastVisualChange","webpagetest.render","webpagetest.visualComplete","webpagetest.visualComplete95","webpagetest.TTFB","webpagetest.fullyLoaded","axe.critical","axe.serious","axe.minor","axe.moderate","cpu.longTasksTotalDuration","cpu.longTasks","cpu.totalBlockingTime","cpu.maxPotentialFid","sustainable.totalCO2","sustainable.co2PerPageView","sustainable.co2FirstParty","sustainable.co2ThirdParty"]]
|
||||
--html.summaryBoxes Select required summary information to be displayed on result index page. [default: ["score.score","score.accessibility","score.bestpractice","score.privacy","score.performance","timings.firstPaint","timings.firstContentfulPaint","timings.fullyLoaded","timings.pageLoadTime","timings.largestContentfulPaint","timings.FirstVisualChange","timings.LastVisualChange","timings.SpeedIndex","timings.PerceptualSpeedIndex","timings.VisualReadiness","timings.VisualComplete","timings.backEndTime","googleWebVitals.cumulativeLayoutShift","requests.total","requests.javascript","requests.css","requests.image","transferSize.total","transferSize.html","transferSize.javascript","contentSize.javascript","transferSize.css","transferSize.image","thirdParty.transferSize","thirdParty.requests","axe.critical","axe.serious","axe.minor","axe.moderate","cpu.longTasksTotalDuration","cpu.longTasks","cpu.totalBlockingTime","cpu.maxPotentialFid","sustainable.totalCO2","sustainable.co2PerPageView","sustainable.co2FirstParty","sustainable.co2ThirdParty"]]
|
||||
--html.summaryBoxesThresholds Configure the thresholds for red/yellow/green for the summary boxes.
|
||||
--html.homeurl The URL for the logo in the result [default: "https://www.sitespeed.io/"]
|
||||
|
||||
Text
|
||||
--summary Show brief text summary to stdout [boolean] [default: false]
|
||||
|
|
@ -287,6 +288,7 @@ Text
|
|||
Sustainable
|
||||
--sustainable.enable Test if the web page is sustainable. [boolean]
|
||||
--sustainable.model Model used for measure digital carbon emissions. [choices: "1byte", "swd"] [default: "1byte"]
|
||||
--sustainable.modelVersion The version used for the model. Only applicable for model swd at the moment. [choices: 3, 4] [default: 3]
|
||||
--sustainable.pageViews Number of page views used when calculating CO2.
|
||||
--sustainable.disableHosting Disable the hosting check. Default we do a check to a local database of domains with green hosting provided by the Green Web Foundation [boolean] [default: false]
|
||||
--sustainable.useGreenWebHostingAPI Instead of using the local copy of the hosting database, you can use the latest version through the Green Web Foundation API. This means sitespeed.io will make HTTP GET to the the hosting info. [boolean] [default: false]
|
||||
|
|
@ -321,6 +323,7 @@ Options:
|
|||
--browsertime.xvfbParams.display, --xvfbParams.display The display used for xvfb [default: 99]
|
||||
--browsertime.visualMetricsPortable Use the portable visual-metrics processing script (no ImageMagick dependencies). [boolean] [default: true]
|
||||
--browsertime.enableProfileRun, --enableProfileRun Make one extra run that collects the profiling trace log (no other metrics is collected). For Chrome it will collect the timeline trace, for Firefox it will get the Geckoprofiler trace. This means you do not need to get the trace for all runs and can skip the overhead it produces. [boolean]
|
||||
--browsertime.enableVideoRun, --enableVideoRun Make one extra run that collects video and visual metrics. This means you can do your runs with --visualMetrics true --video false --enableVideoRun true to collect visual metrics from all runs and save a video from the profile/video run. If you run it together with --enableProfileRun it will also collect profiling trace. [boolean]
|
||||
--browsertime.cjs, --cjs Load scripting files that ends with .js as common js. Default (false) loads files as esmodules. [boolean] [default: false]
|
||||
--browsertime.tcpdump, --tcpdump Collect a tcpdump for each tested URL. The user that runs sitespeed.io should have sudo rights for tcpdump to work. [boolean] [default: false]
|
||||
--browsertime.android, --android Short key to use Android. Will automatically use com.android.chrome for Chrome and stable Firefox. If you want to use another Chrome version, use --chrome.android.package [boolean] [default: false]
|
||||
|
|
@ -329,6 +332,7 @@ Options:
|
|||
--browsertime.preWarmServerWaitTime The wait time before you start the real testing after your pre-cache request. [number] [default: 5000]
|
||||
--plugins.disable [array]
|
||||
--plugins.load [array]
|
||||
--html.darkMode, --darkMode View test results with a dark theme. [boolean] [default: false]
|
||||
--mobile Access pages as mobile a fake mobile device. Set UA and width/height. For Chrome it will use device Moto G4. [boolean] [default: false]
|
||||
--resultBaseURL, --resultBaseUrl The base URL to the server serving the HTML result. In the format of https://result.sitespeed.io
|
||||
--gzipHAR Compress the HAR files with GZIP. [boolean] [default: false]
|
||||
|
|
|
|||
|
|
@ -72,13 +72,6 @@ lighthouse.accessibility
|
|||
lighthouse.best-practices
|
||||
lighthouse.seo
|
||||
lighthouse.pwa
|
||||
webpagetest.SpeedIndex
|
||||
webpagetest.lastVisualChange
|
||||
webpagetest.render
|
||||
webpagetest.visualComplete
|
||||
webpagetest.visualComplete95
|
||||
webpagetest.TTFB
|
||||
webpagetest.fullyLoaded
|
||||
gpsi.performance
|
||||
gpsi.accessibility
|
||||
gpsi.best-practices
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ Almost everything we do is written in NodeJS (use [latest LTS](https://nodejs.or
|
|||
### Built upon Open Source
|
||||
Sitespeed.io uses a lot of other Open Source tools so massive love to those projects and maintainers:
|
||||
|
||||
* [Selenium](http://www.seleniumhq.org/)
|
||||
* [Selenium](http://www.selenium.dev/)
|
||||
* [Visual Metrics](https://github.com/WPO-Foundation/visualmetrics)
|
||||
* [PerfCascade](https://github.com/micmro/PerfCascade)
|
||||
* [Skeleton](http://getskeleton.com)
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ We have a four ready made containers:
|
|||
* One slim container that contains only Firefox. You run Firefox headless. Use the container `sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %}-slim`. The container do not have FFMpeg and Imagemagick so you can not get any Visual Metrics using this container.
|
||||
* One with [Chrome, Firefox and Edge](https://hub.docker.com/r/sitespeedio/sitespeed.io/). It also contains FFMpeg and Imagemagick, so we can record a video and get metrics like Speed Index using [VisualMetrics](https://github.com/WPO-Foundation/visualmetrics). This is the default container and use it with `sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %}` . If you use the *arm64* version of the container, that container will have Firefox and Chromium installed.
|
||||
* One container that is based in the default container and includes the [Google Page Speed Insights](https://github.com/sitespeedio/plugin-gpsi) and [Lighthouse plugin](https://github.com/sitespeedio/plugin-lighthouse). Use it with `sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %}-plus1`.
|
||||
* Another container that is based in the default container and includes the [WebPageTest plugin](https://github.com/sitespeedio/plugin-webpagetest). Use it with `sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %}-webpagetest`
|
||||
|
||||
|
||||
### Structure
|
||||
|
||||
|
|
@ -43,6 +43,17 @@ The [slim container](https://github.com/sitespeedio/sitespeed.io/blob/main/Docke
|
|||
We lock down the browsers to specific versions for maximum compatibility and stability with sitespeed.io's current feature set; upgrading once we verify browser compatibility.
|
||||
{: .note .note-info}
|
||||
|
||||
## Build
|
||||
The containers are built in [the release step in GitHub actions](https://github.com/sitespeedio/sitespeed.io/blob/main/.github/workflows/building-docker-release.yml).
|
||||
|
||||
If you need to build it yourself, you need to clone the repository and build:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/sitespeedio/sitespeed.io.git
|
||||
cd sitespeed.io
|
||||
docker build --load -t sitespeedio/sitespeed.io .
|
||||
```
|
||||
|
||||
## Running using Docker
|
||||
|
||||
The simplest way to run using Chrome:
|
||||
|
|
@ -68,9 +79,11 @@ Using `-v "$(pwd):/sitespeed.io"` will map the current directory inside Docker a
|
|||
|
||||
|
||||
## Running on Mac M1 ARM
|
||||
We have ARM container that will be used by default but it will use an older version of Chromium and a newer version of Firefox. The problem is that the Chrome team (Google, 30000+ engineers) do not build Chrome/Chromium on ARM Linux so we rely on *ppa:saiarcot895/chromium-beta* and use the latest version from there.
|
||||
We have ARM container that will use almost latest version of Chromium (using Microsofts Playwright build) and a newer version of Firefox.
|
||||
|
||||
It's probably better to run the AMD containers. If you have a newer version of Docker desktop installed, you can *"Use Rosetta for x86/amd64 emulation"* to run the AMD containers. Go to settings and turn it on (see the screenshot).
|
||||
If you plan to run Lighthouse in the +1 container, that will not work. Lighthouse uses its own Chrome installation and at the moment Google do not provide a build that work on ARM Linux.
|
||||
|
||||
You can run the AMD containers. If you have a newer version of Docker desktop installed, you can *"Use Rosetta for x86/amd64 emulation"* to run the AMD containers. Go to settings and turn it on (see the screenshot).
|
||||
|
||||

|
||||
{: .img-thumbnail}
|
||||
|
|
@ -97,6 +110,16 @@ docker pull sitespeedio/sitespeed.io:X.Y.Z
|
|||
|
||||
Then change your start script (or where you start your container) to use the new version number.
|
||||
|
||||
You can also pin sitespeed.io to stable versions. Say for example that you want to pin your version to version 35. Then you can use the following version:
|
||||
|
||||
```bash
|
||||
docker pull sitespeedio/sitespeed.io:35
|
||||
```
|
||||
|
||||
Then when we continously release new 35 version, you can just run `docker pull sitespeedio/sitespeed.io:35` and you will get the latest released version of 35.
|
||||
|
||||
|
||||
|
||||
## Tags and version
|
||||
|
||||
In the real world you should always specify the exact version (tag) of the Docker container to make sure you use the same version for every run. If you use the latest tag you will download newer version of the container as they become available, meaning you can have major changes between test runs (version upgrades, dependencies updates, browser versions, etc). So you should always specify a tag after the container name(X.Y.Z). This is important for sitespeed.io/browsertime/Graphite/Grafana containers. It's important for all containers you use. Never use the *latest* tag!
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ There's a Google Page Speed Insights plugin at [https://github.com/sitespeedio/p
|
|||
You can run it with:
|
||||
|
||||
```bash
|
||||
docker run --shm-size=1g --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %}-plus1 https://www.sitespeed.io/ --plugins.remove /lighthouse
|
||||
docker run --shm-size=1g --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %}-plus1 https://www.sitespeed.io/ --plugins.remove @sitespeed.io/plugin-lighthouse
|
||||
```
|
||||
|
||||
The container also includes Lighthouse. We automatically release a new version of the container per release by adding *-plus1* to the tag. If you use Graphite/InfluxDb the score from Lighthouse and GPSI will be automatically stored.
|
||||
|
|
@ -34,4 +34,4 @@ The plugin also collect metrics for the specific page and the domain from the Ch
|
|||
All scores and distributions is automatically sent to Graphite/InfluxDB.
|
||||
|
||||
## Disable Lighthouse
|
||||
If you only want to run GPSI and not Lighthouse you can disable it with `--plugins.remove /lighthouse/index.js`.
|
||||
If you only want to run GPSI and not Lighthouse you can disable it with `--plugins.remove @sitespeed.io/plugin-lighthouse`.
|
||||
|
|
@ -22,7 +22,7 @@ twitterdescription: Store your metrics in Graphite.
|
|||
[Graphite](https://graphiteapp.org/) store numeric time-series data and you can use that to store the metrics sitespeed.io collects. We provide an easy integration and you can use [our pre-made Docker container](https://hub.docker.com/r/sitespeedio/graphite/) and our [dashboard setup]({{site.baseurl}}/documentation/sitespeed.io/performance-dashboard/#up-and-running-in-almost-5-minutes) or use your current Graphite setup.
|
||||
|
||||
## Before you start
|
||||
If you are a new user of Graphite you need to read Etsys write up about [Graphite](https://github.com/etsy/statsd/blob/main/docs/graphite.md) so you have an understanding of how the data is stored and how to configure the metrics. Also read [Graphite docs how to get metrics into graphite](https://graphite.readthedocs.io/en/latest/feeding-carbon.html#getting-your-data-into-graphite) for a better understanding of the metrics structure.
|
||||
If you are a new user of Graphite you need to read Etsys write up about [Graphite](https://github.com/statsd/statsd/blob/master/docs/graphite.md) so you have an understanding of how the data is stored and how to configure the metrics. Also read [Graphite docs how to get metrics into graphite](https://graphite.readthedocs.io/en/latest/feeding-carbon.html#getting-your-data-into-graphite) for a better understanding of the metrics structure.
|
||||
|
||||
In Graphite you configure for how long time you want to store metrics and at what precision, so it's good to check our default configuration ([this](https://raw.githubusercontent.com/sitespeedio/sitespeed.io/main/docker/graphite/conf/storage-aggregation.conf) and [this](https://raw.githubusercontent.com/sitespeedio/sitespeed.io/main/docker/graphite/conf/storage-schemas.conf)) before you start so you see that it matches your needs.
|
||||
|
||||
|
|
@ -216,8 +216,6 @@ Copy the JSON and add it to your favourite editor and search and replace all key
|
|||
We have [pre-made Grafana dashboards](https://github.com/sitespeedio/sitespeed.io/tree/main/docker/grafana/provisioning/dashboards) that works with Graphite. They are generic and as long as your [namespace](#namespace) consists of three parts (including the slug), they will work. You can import them one by one. You can also checkout our [docker-compose file](https://github.com/sitespeedio/sitespeed.io/blob/main/docker/docker-compose.yml) on how to set it up.
|
||||
|
||||
|
||||
|
||||
|
||||
## Namespace
|
||||
The default namespace when you send metrics to Graphite is *sitespeed_io.default*. You can change the namespace with `--graphite.namespace`. All premade dashboards are prepared to work with namespaces that starts with two parts: *first.second* and with adding a slug/test name. To add a slug add `--graphite.addSlugToKey true` and the actual test name/slug to all your test by adding `--slug YOUR_TEST_NAME`.
|
||||
|
||||
|
|
@ -254,7 +252,9 @@ If you are using statsd you can use it by adding <code>--graphite.statsd</code>
|
|||
If you are a DataDog user you can use [DogStatsD](https://docs.datadoghq.com/developers/dogstatsd/).
|
||||
|
||||
## Secure your instance
|
||||
You probably want to make sure that only your sitespeed.io servers can post data to your Graphite instance. If you run on AWS you that with [security groups](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html). On Digital Ocean you can setup firewalls through the admin or you can [use UFW on Ubuntu](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-ubuntu-18-04) (just make sure to disable iptables for the Docker daemon `--iptables=false` read [Viktors post](https://blog.viktorpetersson.com/2014/11/03/the-dangers-of-ufw-docker.html#update)).
|
||||
You probably want to make sure that only your sitespeed.io servers can post data to your Graphite instance. If you run your Graphite instance on your server using Docker, you need to use iptables to block access.
|
||||
|
||||
If you run on AWS you that with [security groups](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html). On Digital Ocean you can setup firewalls through the admin.
|
||||
|
||||
Your Graphite server needs to open port 2003 and 8080 for TCP traffic for your servers running sitespeed.io.
|
||||
|
||||
|
|
@ -262,7 +262,6 @@ If you are using AWS you always gives your servers a security group. The servers
|
|||
|
||||
The Graphite server can the open 2003 and 8080 only for that group (write the group name in the source/security group field). In this example we also run Grafana on port 3000 and have it open to the world.
|
||||
|
||||
|
||||
{:loading="lazy"}
|
||||
{: .img-thumbnail}
|
||||
|
||||
|
|
@ -276,6 +275,36 @@ If you are using Digital Ocean, you can setup the firewall rule in the admin. He
|
|||
{:loading="lazy"}
|
||||
{: .img-thumbnail}
|
||||
|
||||
If you run your own Ubuntu server you can use iptables something like this. You can read about firewalls for Docker at [Docker](https://docs.docker.com/network/packet-filtering-firewalls/) and [this blog post](https://www.net7.be/blog/article/docker_iptables.html).
|
||||
|
||||
~~~
|
||||
#!/bin/bash
|
||||
|
||||
# Add ip tables rules that is applied before Docker gets the packages
|
||||
|
||||
# Insert the rules (-I) at the top if iptables. The order is important.
|
||||
# First just drop everything for 8080 and 2003
|
||||
sudo iptables -I DOCKER-USER -p tcp -m conntrack --ctorigdstport 8080 -j DROP
|
||||
sudo iptables -I DOCKER-USER -p tcp -m conntrack --ctorigdstport 2003 -j DROP
|
||||
# Keep the current connection
|
||||
sudo iptables -I DOCKER-USER -p tcp -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
|
||||
|
||||
# Allow traffic from specific IP addresses to ports 8080 and 2003 in DOCKER-USER chain
|
||||
# Change these IPs to match your IPs
|
||||
ALLOWED_IPS=("138.111.22.22" "198.101.2.112")
|
||||
for ip in "${ALLOWED_IPS[@]}"; do
|
||||
sudo iptables -I DOCKER-USER -s $ip -p tcp -m conntrack --ctorigdstport 8080 -j ACCEPT
|
||||
sudo iptables -I DOCKER-USER -s $ip -p tcp -m conntrack --ctorigdstport 2003 -j ACCEPT
|
||||
done
|
||||
|
||||
# Save the rules
|
||||
sudo iptables-save | sudo tee /etc/iptables/rules.v4
|
||||
|
||||
# Ensure iptables-persistent is installed to load rules on boot
|
||||
sudo apt-get install -y iptables-persistent
|
||||
|
||||
~~~
|
||||
|
||||
## Storing the data
|
||||
You probably gonna need to store the metrics in Graphite on another disk. If you are an AWS user, you can use and [setup an EBS volume](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html). If you use Digital Ocean you can follow their [quick start guide](https://www.digitalocean.com/docs/volumes/quickstart/).
|
||||
|
||||
|
|
@ -296,6 +325,3 @@ If you use Grafana annotations, you should make sure grafana.db is outside of th
|
|||
If you use Grafana annotations, you should make sure grafana.db is outside of the container. Follow the documentation at [grafana.org](http://docs.grafana.org/installation/docker/#grafana-container-using-bind-mounts).
|
||||
5. Run the latest version of Graphite and if you are using Docker, make sure you use a tagged version of the container (like graphiteapp/graphite-statsd:1.1.5-12) and never use the **latest** Docker tag.
|
||||
6. Secure your instance with a firewall/security groups so only your servers can send data to the instance.
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ image: https://www.sitespeed.io/img/sitespeed-2.0-twitter.png
|
|||
twitterdescription: Documentation for sitespeed.io.
|
||||
---
|
||||
|
||||
# Documentation v31
|
||||
# Documentation v34
|
||||
|
||||
<img src="{{site.baseurl}}/img/logos/sitespeed.io.png" class="pull-right img-big" alt="sitespeed.io logo" width="200" height="214">
|
||||
|
||||
|
|
@ -58,5 +58,4 @@ Sitespeed.io is the complete toolbox to test the web performance of your web sit
|
|||
* [Third party requests](thirdparty/) - keep track of those 3rd party scripts.
|
||||
* [Video](video/) - all that you can do with the video and filmstrip.
|
||||
* [WebPageReplay](webpagereplay/) - WebPageReplay is proxy that first records your web site and then replay it locally. That can help you find performance regression in the front-end code easier: Latency/server timings are constant.
|
||||
* [WebPageTest](webpagetest/) - drive WebPageTest and fetch metrics and graph them.
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ Requires additional software like FFmpeg and Python dependencies.
|
|||
Install on a fresh Apple Mac M1:
|
||||
|
||||
1. Install Homebrew: `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`
|
||||
2. Install latest NodeJS LTS (and npm). Either download it from [nodejs.org](https://nodejs.org/en/) or install using Homebrew:
|
||||
2. Install latest NodeJS LTS (and npm). Either download it from [nodejs.org](https://nodejs.org/en/) or install using Homebrew (if you install using Homebrew, make sure you follow the instructions and add NodeJS and npm to your PATH):
|
||||
`brew install node@20`
|
||||
3. Make sure you can install using *npm* without using sudo. Checkout [Sindre Sorhus guide](https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md).
|
||||
4. Install ffmpeg
|
||||
|
|
@ -103,7 +103,7 @@ You can also install everything manually to have more control. This is what's ne
|
|||
* `curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh`
|
||||
* `sudo bash nodesource_setup.sh`
|
||||
* `sudo apt install -y nodejs`
|
||||
2. Install imagemagick and ffmpeg `sudo apt-get update -y && sudo apt-get install -y imagemagick ffmpeg`
|
||||
2. Install ffmpeg `sudo apt-get update -y && sudo apt-get install -y ffmpeg`
|
||||
3. Install Python dependencies:
|
||||
* `sudo apt-get install -y python-is-python3 python3-dev python3-pip`
|
||||
* `python -m pip install pyssim OpenCV-Python Numpy scipy`
|
||||
|
|
@ -204,36 +204,21 @@ npm install sitespeed.io --location=global
|
|||
|
||||
9. (Optional) You need Geckodriver if you want to run tests using Firefox on your phone. The easiest way to get Geckodriver on your Raspberry Pi is to build it on that Pi. You do that by cloning the Geckodriver repo and build the version you want. Checkout how it's done at [https://github.com/jamesmortensen/geckodriver-arm-binaries](https://github.com/jamesmortensen/geckodriver-arm-binaries) and adapt it to your Raspberry.
|
||||
|
||||
10. (Optional) If you are using Raspberry Pi OS Desktop you can install scrcpy and vnc. Here's instructions how to use it together with a Mac. First install scrcpy:
|
||||
10. (Optional) If you are using Raspberry Pi 5 OS Desktop you can install scrcpy. Here's instructions how to use it together with a Mac. First install scrcpy by building it on the Raspberry Pi following the instructions at [https://github.com/Genymobile/scrcpy/blob/master/doc/linux.md#latest-version](https://github.com/Genymobile/scrcpy/blob/master/doc/linux.md#latest-version).
|
||||
|
||||
Then you need to enable vnc server. Do it by running:
|
||||
|
||||
~~~bash
|
||||
sudo apt-get update && sudo apt-get install -y scrcpy
|
||||
~~~
|
||||
Then you need to enable vnc server.
|
||||
~~~bash
|
||||
sudo systemctl enable vncserver-x11-serviced
|
||||
~~~
|
||||
Then generate a password that you will use to connect to VNC from your computer
|
||||
~~~bash
|
||||
sudo vncpasswd -service
|
||||
~~~
|
||||
Then setup auth by edit the file */etc/vnc/config.d/common.custom*:
|
||||
~~~bash
|
||||
sudo nano /etc/vnc/config.d/common.custom
|
||||
~~~
|
||||
Add `Authentication=VncAuth` in the file and save and close.
|
||||
Restart the vnc server:
|
||||
~~~bash
|
||||
sudo systemctl restart vncserver-x11-serviced
|
||||
~~~
|
||||
As the last step, make sure to export your display number to the environment variable DISPLAY.
|
||||
~~~bash
|
||||
echo 'export DISPLAY=:0' >> ~/.profile
|
||||
sudo raspi-config
|
||||
~~~
|
||||
Choose option 3. and then 3. again (VNC).
|
||||
|
||||
Reboot your device:
|
||||
~~~bash
|
||||
sudo reboot
|
||||
~~~
|
||||
On your Mac, open "Screen Sharing" and then use *raspberrypi.local* as the hostname and the password you set in the previous step. You will then be able to see the Raspberry PI screen on your Mac. Start **scrcpy** and you will see the phone screen too.
|
||||
|
||||
On your Mac, use "VNC Viewer" and then use *raspberrypi.local* as the hostname. You will then be able to see the Raspberry PI screen on your Mac. Start **scrcpy** and you will see the phone screen too.
|
||||
|
||||
11. Plugin your phone, "Allow USB debugging" on your phone and run sitespeed.io:
|
||||
~~~bash
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ The Lighthouse tests will run after Browsertime finished and run Chrome headless
|
|||
*Note:* If you want to run more plugins with <code>--plugins.add</code> that will override the default settings so you will need to add the Lighthouse plugin again like this:
|
||||
|
||||
```bash
|
||||
docker run --shm-size=1g --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %}-plus1 https://www.sitespeed.io/ --plugins.add analysisstorer --plugins.add /lighthouse/index.js
|
||||
docker run --shm-size=1g --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %}-plus1 https://www.sitespeed.io/ --plugins.add analysisstorer --plugins.add @sitespeed.io/plugin-lighthouse
|
||||
```
|
||||
|
||||
The Lighthouse result is iframed into sitespeed.io:
|
||||
|
|
@ -53,12 +53,19 @@ module.exports = {
|
|||
};
|
||||
```
|
||||
|
||||
You can also add Lighthouse flags by a JSON file ```--lighthouse.flags flag.json```.
|
||||
You can also add Lighthouse flags by a JSON file ```--lighthouse.flags flag.json```. If you pass on command like flags that contains hyphens, they are removed and converted internally in Lighthouse, so for example to get the command line flag `--extra-headers` to work, the JSON should be like this:
|
||||
|
||||
```JSON
|
||||
{
|
||||
"extraHeaders": { "key": "value"}
|
||||
}
|
||||
```
|
||||
|
||||
Read all about configuring Lighthouse at [https://github.com/GoogleChrome/lighthouse/blob/master/docs/configuration.md](https://github.com/GoogleChrome/lighthouse/blob/master/docs/configuration.md).
|
||||
|
||||
|
||||
## Disable GPSI
|
||||
If you only want to run Lighthouse and not GPSI you can disable it with `----plugins.remove /gpsi/lib/index.js`.
|
||||
If you only want to run Lighthouse and not GPSI you can disable it with `----plugins.remove @sitespeed.io/plugin-gpsi`.
|
||||
|
||||
|
||||
You can read more about sitespeed.io plugins [here](https://www.sitespeed.io/documentation/sitespeed.io/plugins/).
|
||||
|
|
|
|||
|
|
@ -98,15 +98,6 @@
|
|||
"seo": limit,
|
||||
"pwa": limit,
|
||||
},
|
||||
"webpagetest": {
|
||||
"SpeedIndex": limit,
|
||||
"lastVisualChange": limit,
|
||||
"render": limit,
|
||||
"visualComplete": limit,
|
||||
"visualComplete95": limit,
|
||||
"TTFB": limit,
|
||||
"fullyLoaded": limit,
|
||||
},
|
||||
"gpsi": {
|
||||
"performance": limit,
|
||||
"accessibility": limit,
|
||||
|
|
|
|||
|
|
@ -50,10 +50,17 @@ Here's an example for setting up CORS to give compare.sitespeed.io access rights
|
|||
Do you need more help? First dive into the [AWS S3 docs](https://docs.aws.amazon.com/AmazonS3/latest/gsg/GetStartedWithS3.html) then if it doesn't help, [create an issue](https://github.com/sitespeedio/sitespeed.io/issues/new) and we can try to help you.
|
||||
|
||||
## sitespeed.io configuration
|
||||
To push the metrics to S3 you need the **key**, the **secret** and your **bucketname**. You get the ```--s3.key``` and ```--s3.secret``` from your IAM User. The ```--s3.bucketname``` is the name you picked for your bucket.
|
||||
To push the metrics to S3 you need either Explicit Credentials (Key, Secret) or an IAM instance profile if running on EC2. Here are both approaches:
|
||||
|
||||
### Using Explicit Credentials (Key, Secret)
|
||||
You need the **key**, the **secret** and your **bucketname**. You get the ```--s3.key``` and ```--s3.secret``` from your IAM User. The ```--s3.bucketname``` is the name you picked for your bucket.
|
||||
|
||||
Depending on the setup you sometimes want to set the S3 region (```--s3.region``` if you don't use the default one) and the [canned access control](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) ```--s3.acl``` of the uploaded files (you can setup the access control when you setup the bucket too).
|
||||
|
||||
### Using IAM Instance Profile
|
||||
When running sitespeed.io on an EC2 instance, you can use IAM instance profiles for S3 access instead of providing explicit AWS credentials. This is recommended as it's more secure than handling access keys directly.
|
||||
|
||||
Your EC2 instance needs an IAM role with S3 permissions (`s3:PutObject` and `s3:ListBucket`). You only need to specify the ```--s3.bucketname``` and optionally the ```--s3.region``` if you don't use the default one. The instance profile credentials will be automatically used without needing to specify ```--s3.key``` or ```--s3.secret```.
|
||||
|
||||
### Extra configuration
|
||||
You can also pass on all parameters that the official AWS JavaScript SDK uses.
|
||||
|
|
@ -89,11 +96,15 @@ And then you should also make sure that all the result files (HTML/videos/screen
|
|||
|
||||
As a last thing you should also add `--copyLatestFilesToBase` that will make it possible to view latest screenshot and video in Grafana from S3.
|
||||
|
||||
# MinIO
|
||||
If you want deploy the storage yourself you can use the Open Source [https://min.io](https://min.io). You can deploy that using Docker. You have an example on how you can set that up in [sitespeed.io online test](https://github.com/sitespeedio/onlinetest/blob/main/docker-compose.yml).
|
||||
|
||||
# Digital Ocean Spaces
|
||||
[Digital Ocean Spaces](https://developers.digitalocean.com/documentation/spaces/#aws-s3-compatibility)
|
||||
|
||||
Digital Ocean is compatible with the S3 api, so all that is required after setting up your space and acquiring a key and secret is to modify the endpoint that the s3 results are passed to as shown below.
|
||||
Digital Ocean is compatible with the S3 API, so all that is required after setting up your space and acquiring a key and secret is to modify the endpoint that the s3 results are passed to as shown below.
|
||||
|
||||
Make sure that your endpoint starts with http/https.
|
||||
|
||||
## JSON configuration file
|
||||
If the endpoint is not passed this will default to AWS's endpoint. You may safely exclude it for AWS integration. If you use a JSON configuration file you should make sure you add this to get S3 to work:
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -152,7 +152,7 @@ Which DNS server that is used can make a big difference. Keep a look at your DNS
|
|||
Number of open files can be quite low on Linux, check it with `ulimit -a`. Increase following [these instructions](https://linuxhint.com/increase-open-file-limit-ubuntu/).
|
||||
|
||||
#### Running on Kubernetes
|
||||
Do not use Kubernetes for performance tests. The problem running on Kubernetes is to get stable connectivity. On Kubernetes you cannot use [tc](https://tldp.org/HOWTO/Traffic-Control-HOWTO/intro.html) or Docker networks to set the connectivity.
|
||||
If you are gonna use Kubernetes, you should use the [bandwith plugin](https://www.cni.dev/plugins/current/meta/bandwidth/) to set the connectivity. If you Kubernetes user, please share your configiratuon and setup so we can add that to the documentation.
|
||||
|
||||
### Mobile
|
||||
|
||||
|
|
|
|||
|
|
@ -1,135 +0,0 @@
|
|||
---
|
||||
layout: default
|
||||
title: Use WebPageTest together with sitespeed.io
|
||||
description: Drive WebPageTest using sitespeed.io and include the metrics in your sitespeed.io report.
|
||||
keywords: webpagetest, wpt, documentation, web performance, sitespeed.io
|
||||
nav: documentation
|
||||
image: https://www.sitespeed.io/img/sitespeed-2.0-twitter.png
|
||||
category: sitespeed.io
|
||||
twitterdescription: Drive WebPageTest using sitespeed.io and include the metrics in your sitespeed.io report.
|
||||
---
|
||||
[Documentation]({{site.baseurl}}/documentation/sitespeed.io/) / WebPageTest
|
||||
|
||||
# WebPageTest
|
||||
{:.no_toc}
|
||||
|
||||
* Lets place the TOC here
|
||||
{:toc}
|
||||
|
||||
## Using WebPageTest
|
||||
To use WebPageTest you need to install the [WebPageTest plugin](https://github.com/sitespeedio/plugin-webpagetest) or run the Docker `sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %}-webpagetest` container.
|
||||
|
||||
To use WPT you need to setup your own WebPageTest instance (read how [Wikimedia setup an instance using AWS](https://wikitech.wikimedia.org/wiki/WebPageTest)) or have one of those (old) keys for the public instance.
|
||||
|
||||
## Configuration
|
||||
The plugin uses the [WebPageTest API](https://github.com/marcelduran/webpagetest-api), so you can do almost all the same thing as with the standalone API.
|
||||
|
||||
By default we have the following configuration options:
|
||||
|
||||
~~~
|
||||
--webpagetest.host The domain of your WebPageTest instance.
|
||||
--webpagetest.key The API key for your WebPageTest instance.
|
||||
--webpagetest.location The location for the test
|
||||
--webpagetest.connectivity The connectivity for the test.
|
||||
--webpagetest.runs The number of runs per URL.
|
||||
--webpagetest.custom Execute arbitrary JavaScript at the end of a test to collect custom metrics.
|
||||
--webpagetest.script Direct WebPageTest script as a string
|
||||
--webpagetest.file Path to a script file
|
||||
~~~
|
||||
|
||||
If you need anything else adding your own CLI parameter will propagate to the WebPageTest API. Checkout the different [options](https://github.com/marcelduran/webpagetest-api#test-works-for-test-command-only) for the API.
|
||||
|
||||
Example: So say that you want to change the user agent of your test. In the API you can do that with <code>--useragent</code>. Pass the same to sitespeed.io by prefixing webpagetest like so <code>--webpagetest.useragent</code> in the cli.
|
||||
|
||||
~~~bash
|
||||
docker run --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %}-webpagetest --plugins.add /webpagetest/index.js --webpagetest.host my.wpt.host.com --webpagetest.useragent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.59 Safari/537.36" https://www.sitespeed.io
|
||||
~~~
|
||||
|
||||
## Default configurations
|
||||
|
||||
The default configuration for WebPageTest looks like this:
|
||||
|
||||
~~~json
|
||||
{
|
||||
pollResults: 10,
|
||||
timeout: 600,
|
||||
includeRepeatView: false,
|
||||
private: true,
|
||||
aftRenderingTime: true,
|
||||
location: 'Dulles:Chrome',
|
||||
connectivity: 'Cable',
|
||||
video: true
|
||||
}
|
||||
~~~
|
||||
|
||||
You can override these with parameters. If you want to change the location, just pass <code>--webpagetest.location mylocation</code> and your new location will be used.
|
||||
|
||||
### WebPageTest scripting
|
||||
|
||||
WebPageTest has scripting capability where you can easily automate a multi-step test (e.x. login as a user and do some interaction). That is supported by sitespeed.io by supplying the script. You can do so like this:
|
||||
|
||||
You can create your script file (checkout [WebPageTest documentation](https://sites.google.com/a/webpagetest.org/docs/using-webpagetest/scripting) for what you can do). It can look something like this (wptScript.txt):
|
||||
|
||||
~~~shell
|
||||
logData 0
|
||||
|
||||
// put any urls you want to navigate
|
||||
navigate www.aol.com
|
||||
navigate news.aol.com
|
||||
|
||||
logData 1
|
||||
|
||||
// this step will get recorded
|
||||
navigate news.aol.com/world
|
||||
~~~
|
||||
|
||||
Then change your URL you want test (probably the last one) to \{\{\{URL\}\}\} and then all occurrences of \{\{\{URL\}\}\} will then be replaced with the current URL that should be tested. Now run sitespeed.io with the additional parameters:
|
||||
|
||||
~~~bash
|
||||
docker run --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %}-webpagetest --plugins.add /webpagetest/index.js --webpagetest.file /sitespeed.io/wptScript.txt --webpagetest.host my.wpt.host.com http://example.org
|
||||
~~~
|
||||
|
||||
It is also possible to pass the WebPageTest script as a string into the `--webpagetest.script` flag. You can use the `scriptToString()` method provided in [webpagetest-api](https://github.com/marcelduran/webpagetest-api/#module-1) to create a string from a JSON object.
|
||||
|
||||
{% assign bashURLString = '{{{URL}}}}' %}
|
||||
|
||||
~~~bash
|
||||
docker run --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %}-webpagetest --plugins.add /webpagetest/index.js --webpagetest.script "navigate \t www.aol.com \n navigate \t {{bashURLString}}" --webpagetest.host my.wpt.host.com http://example.org
|
||||
~~~
|
||||
|
||||
### Custom metrics
|
||||
|
||||
Hey we love custom metrics and you can fetch them using WPT. Checkout the [metrics docs](https://sites.google.com/a/webpagetest.org/docs/using-webpagetest/custom-metrics) for WPT and then create a file containing your metrics:
|
||||
|
||||
~~~shell
|
||||
[iframe-count]
|
||||
return document.getElementsByTagName("iframe").length;
|
||||
|
||||
[script-tag-count]
|
||||
return document.getElementsByTagName("script").length;
|
||||
|
||||
[meta-viewport]
|
||||
var viewport = undefined;
|
||||
var metaTags=document.getElementsByTagName("meta");
|
||||
for (var i = 0; i < metaTags.length; i++) {
|
||||
if (metaTags[i].getAttribute("name") == "viewport") {
|
||||
viewport = metaTags[i].getAttribute("content");
|
||||
break;
|
||||
}
|
||||
}
|
||||
return viewport;
|
||||
~~~
|
||||
|
||||
You can then run sitespeed.io to pick up the new custom metrics:
|
||||
|
||||
~~~bash
|
||||
docker run --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %}-webpagetest --plugins.add /webpagetest/index.js --webpagetest.custom /sitespeed.io/myScriptFile.txt --webpagetest.host my.wpt.host.com https://www.sitespeed.io
|
||||
~~~
|
||||
|
||||
## Run WebPageTest without Browsertime
|
||||
|
||||
Sometimes you want to only collect data from WebPageTest and not from Browsertime. The best way to do that is to disable the Browsertime plugin with *--plugins.remove browsertime*
|
||||
|
||||
~~~bash
|
||||
docker run --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %}-webpagetest --plugins.add /webpagetest/index.js --webpagetest.host my.wpt.host.com --plugins.remove browsertime https://www.sitespeed.io
|
||||
~~~
|
||||
1054
docs/feed/atom.xml
1054
docs/feed/atom.xml
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue