sitespeed.io 23.6.1 → 24.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@ jobs:
9
9
  steps:
10
10
  -
11
11
  name: Checkout
12
- uses: actions/checkout@v2
12
+ uses: actions/checkout@v3
13
13
  -
14
14
  name: Set up QEMU
15
15
  uses: docker/setup-qemu-action@v1
@@ -10,9 +10,9 @@ jobs:
10
10
  build:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
- - uses: actions/checkout@v2
13
+ - uses: actions/checkout@v3
14
14
  - name: Use Node.js
15
- uses: actions/setup-node@v1
15
+ uses: actions/setup-node@v3
16
16
  with:
17
17
  node-version: '16.x'
18
18
  - name: Install sitespeed.io
@@ -10,7 +10,7 @@ jobs:
10
10
  runs-on: ubuntu-18.04
11
11
  steps:
12
12
  - name: Checkout code
13
- uses: actions/checkout@v2
13
+ uses: actions/checkout@v3
14
14
 
15
15
  - name: Build an image from Dockerfile
16
16
  run: |
@@ -10,7 +10,7 @@ jobs:
10
10
  build:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
- - uses: actions/checkout@v2
13
+ - uses: actions/checkout@v3
14
14
  - name: Build Docker containers
15
15
  run: |
16
16
  docker buildx install
@@ -10,9 +10,9 @@ jobs:
10
10
  build:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
- - uses: actions/checkout@v2
13
+ - uses: actions/checkout@v3
14
14
  - name: Use Node.js
15
- uses: actions/setup-node@v1
15
+ uses: actions/setup-node@v3
16
16
  with:
17
17
  node-version: '16.x'
18
18
  - name: Install sitespeed.io
@@ -10,9 +10,9 @@ jobs:
10
10
  build:
11
11
  runs-on: macos-latest
12
12
  steps:
13
- - uses: actions/checkout@v2
13
+ - uses: actions/checkout@v3
14
14
  - name: Use Node.js
15
- uses: actions/setup-node@v1
15
+ uses: actions/setup-node@v3
16
16
  with:
17
17
  node-version: '16.x'
18
18
  - name: Install dependencies
@@ -9,7 +9,7 @@ jobs:
9
9
  name: running sitespeed.io
10
10
  steps:
11
11
  - name: code checkout
12
- uses: actions/checkout@v2
12
+ uses: actions/checkout@v3
13
13
  # Here we build our own container to make sure we test against our latest code
14
14
  # but YOU can just used the latest version by specifying
15
15
  # sitespeedio/sitespeed.io:VERSION
@@ -13,9 +13,9 @@ jobs:
13
13
  matrix:
14
14
  node-version: [14.x, 16.x]
15
15
  steps:
16
- - uses: actions/checkout@v2
16
+ - uses: actions/checkout@v3
17
17
  - name: Use Node.js ${{ matrix.node-version }}
18
- uses: actions/setup-node@v1
18
+ uses: actions/setup-node@v3
19
19
  with:
20
20
  node-version: ${{ matrix.node-version }}
21
21
  - name: Install dependencies and Chrome
@@ -10,9 +10,9 @@ jobs:
10
10
  build:
11
11
  runs-on: windows-latest
12
12
  steps:
13
- - uses: actions/checkout@v2
13
+ - uses: actions/checkout@v3
14
14
  - name: Use Node.js
15
- uses: actions/setup-node@v1
15
+ uses: actions/setup-node@v3
16
16
  with:
17
17
  node-version: '16.x'
18
18
  - name: Install sitespeed.io
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # CHANGELOG - sitespeed.io (we use [semantic versioning](https://semver.org))
2
2
 
3
+ ## 24.1.0 - 2022-04-22
4
+ ### Added
5
+ * Update Grafana auth settings to allow api token or basic auth, thank you [Vladimir Stepanov](https://github.com/vs-odessa) for PR [#3627](https://github.com/sitespeedio/sitespeed.io/pull/3627).
6
+ * Add TTFB to the metrics page [#3630](https://github.com/sitespeedio/sitespeed.io/pull/3630).
7
+ * Use latest Coach core with updated PageXray and Third party web [#3629](https://github.com/sitespeedio/sitespeed.io/pull/3629).
8
+ * Make it possible to disable annotations for Graphite. Set `--graphite.sendAnnotation false` to disable sending annotations [#3625](https://github.com/sitespeedio/sitespeed.io/pull/3625).
9
+ * Show which run that is used in the metrics tab [#3631](https://github.com/sitespeedio/sitespeed.io/pull/3631).
10
+ * Updated to [Browsertime 16.1.0](https://github.com/sitespeedio/browsertime/blob/main/CHANGELOG.md#1610---2022-04-20).
11
+ ### Updated
12
+ * Update dependencies: google-cloud/storage, aws-sdk, dayjs, yargs [#3635](https://github.com/sitespeedio/sitespeed.io/pull/3635).
13
+
14
+ ## 24.0.0 - 2022-04-06
15
+
16
+ ### Changed
17
+ * Upgraded to [Browsertime 16.0.0](https://github.com/sitespeedio/browsertime/blob/main/CHANGELOG.md#1600---2022-04-05) that changed how the DNS is flushed. You need to add `--flushDNS` to your conifguration to flush the DNS between runs.
18
+
19
+ ### Added
20
+ * Use Firefox 99 and Edge/Edgedriver 100 in the Dockker container.
21
+
22
+ ### Fixed
23
+ * Better catch if Visual Metrics fails [#3619](https://github.com/sitespeedio/sitespeed.io/pull/3619)
24
+ * Fixed JUnit/alias bug [#3620](https://github.com/sitespeedio/sitespeed.io/pull/3620)
25
+ ## 23.7.0 - 2022-03-31
26
+ ### Added
27
+ * Updated to Chrome/Chromedriver 100 and [Browsertime 15.4.0](https://github.com/sitespeedio/browsertime/blob/main/CHANGELOG.md#1540---2022-03-30).
28
+ * Updated the +1 container to use Lighthouse 9.5.0.
29
+ * Updated to [Axe-core 4.4.1](https://github.com/sitespeedio/sitespeed.io/pull/3615).
3
30
 
4
31
  ## 23.6.1 - 2022-03-25
5
32
  ### Fixed
package/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM sitespeedio/webbrowsers:chrome-99.0-firefox-98.0-edge-99.0-b
1
+ FROM sitespeedio/webbrowsers:chrome-100.0-firefox-99.0-edge-100.0
2
2
 
3
3
  ARG TARGETPLATFORM=linux/amd64
4
4
 
package/lib/cli/cli.js CHANGED
@@ -970,7 +970,7 @@ module.exports.parseCommandLine = function parseCommandLine() {
970
970
  .option('browsertime.block', {
971
971
  alias: 'block',
972
972
  describe:
973
- 'Domain to block. Add multiple instances to add multiple domains that will be blocked. Only works in Chrome and Firefox.',
973
+ '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.',
974
974
  group: 'Browser'
975
975
  })
976
976
  .option('browsertime.basicAuth', {
@@ -991,6 +991,12 @@ module.exports.parseCommandLine = function parseCommandLine() {
991
991
  describe: 'Https proxy (host:port)',
992
992
  group: 'proxy'
993
993
  })
994
+ .option('browsertime.flushDNS', {
995
+ alias: 'flushDNS',
996
+ describe:
997
+ 'Flush the DNS between runs (works on Mac OS and Linux). The user needs sudo rights to flush the DNS.',
998
+ group: 'Browser'
999
+ })
994
1000
  .option('browsertime.headless', {
995
1001
  alias: 'headless',
996
1002
  type: 'boolean',
@@ -11,24 +11,29 @@ exports.writeJunit = function (results, dir, options) {
11
11
  const urls = Object.keys(merge({}, results.failing, results.working));
12
12
 
13
13
  for (const url of urls) {
14
- const parsedUrl = urlParser.parse(url);
15
- const fineUrl =
14
+ // The URL can be an alias
15
+ let name = url;
16
+ if (url.startsWith('http')) {
17
+ const parsedUrl = urlParser.parse(url);
18
+ name = url.startsWith('http') ? url : url;
16
19
  parsedUrl.hostname.replace(/\./g, '_') +
17
- '.' +
18
- parsedUrl.path.replace(/\./g, '_').replace(/\//g, '_');
20
+ '.' +
21
+ parsedUrl.path.replace(/\./g, '_').replace(/\//g, '_');
22
+ }
23
+
19
24
  const suite = builder
20
25
  .testSuite()
21
26
  .name(
22
27
  options.budget.friendlyName
23
28
  ? options.budget.friendlyName
24
- : 'sitespeed.io' + '.' + fineUrl
29
+ : 'sitespeed.io' + '.' + name
25
30
  );
26
31
 
27
32
  if (results.failing[url]) {
28
33
  for (const result of results.failing[url]) {
29
34
  suite
30
35
  .testCase()
31
- .className(fineUrl)
36
+ .className(name)
32
37
  .name(result.type + '.' + result.metric)
33
38
  .failure(
34
39
  result.metric + ' is ' + result.friendlyValue ||
@@ -46,7 +51,7 @@ exports.writeJunit = function (results, dir, options) {
46
51
  for (const result of results.working[url]) {
47
52
  suite
48
53
  .testCase()
49
- .className(fineUrl)
54
+ .className(name)
50
55
  .name(result.type + '.' + result.metric)
51
56
  .standardOutput(
52
57
  result.metric + ' is ' + result.friendlyValue ||
@@ -10,7 +10,7 @@ module.exports = {
10
10
  },
11
11
  auth: {
12
12
  describe:
13
- 'The Grafana auth/bearer value used when sending annotations to Grafana. See http://docs.grafana.org/http_api/auth/#authentication-api',
13
+ 'The Grafana auth/bearer value used when sending annotations to Grafana. If you do not set Bearer/Auth, Bearer is automatically set. See http://docs.grafana.org/http_api/auth/#authentication-api',
14
14
  group: 'Grafana'
15
15
  },
16
16
  annotationTitle: {
@@ -98,7 +98,14 @@ module.exports = {
98
98
  // If Grafana is behind auth, use it!
99
99
  if (options.grafana.auth) {
100
100
  log.debug('Using auth for Grafana');
101
- postOptions.headers.Authorization = 'Bearer ' + options.grafana.auth;
101
+ if (
102
+ options.grafana.auth.startsWith('Bearer') ||
103
+ options.grafana.auth.startsWith('Basic')
104
+ ) {
105
+ postOptions.headers.Authorization = options.grafana.auth;
106
+ } else {
107
+ postOptions.headers.Authorization = 'Bearer ' + options.grafana.auth;
108
+ }
102
109
  }
103
110
  log.verbose('Send annotation to Grafana: %j', postData);
104
111
  return new Promise((resolve, reject) => {
@@ -59,6 +59,13 @@ module.exports = {
59
59
  'Include screenshot (from Browsertime/WebPageTest) in the annotation. You need to specify a --resultBaseURL for this to work.',
60
60
  group: 'Graphite'
61
61
  },
62
+ sendAnnotation: {
63
+ default: true,
64
+ type: 'boolean',
65
+ describe:
66
+ '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.',
67
+ group: 'Graphite'
68
+ },
62
69
  annotationRetentionMinutes: {
63
70
  type: 'number',
64
71
  describe:
@@ -60,7 +60,7 @@ module.exports = {
60
60
  this.messageTypesToFireAnnotations = [];
61
61
  this.receivedTypesThatFireAnnotations = {};
62
62
  this.make = context.messageMaker('graphite').make;
63
- this.sendAnnotation = true;
63
+ this.sendAnnotation = opts.sendAnnotation || true;
64
64
  this.alias = {};
65
65
  this.wptExtras = {};
66
66
  this.usingBrowsertime = false;
@@ -4,7 +4,7 @@ module.exports = {
4
4
  pickMedianRun(runs, pageInfo) {
5
5
  // Choose the median run. Early first version, in the future we can make
6
6
  // this configurable through the CLI
7
- // If we have SpeedIndex use that else backup with RUM SpeedIndex
7
+ // If we have SpeedIndex use that else backup with loadEventEnd
8
8
 
9
9
  const speedIndexMedian = get(
10
10
  pageInfo,
@@ -17,6 +17,8 @@ module.exports = {
17
17
  if (speedIndexMedian) {
18
18
  for (let run of runs) {
19
19
  if (
20
+ // https://github.com/sitespeedio/sitespeed.io/issues/3618
21
+ run.data.browsertime.run.visualMetrics &&
20
22
  speedIndexMedian === run.data.browsertime.run.visualMetrics.SpeedIndex
21
23
  ) {
22
24
  return {
@@ -38,6 +38,9 @@ if browsertime
38
38
  a(href='#server-timings') Server timings
39
39
  |  | 
40
40
 
41
+ p
42
+ small #{ medianRun ? 'Data from run ' + medianRun.runIndex : ''}
43
+
41
44
  - baseHelpURL = rootPath + 'help.html#';
42
45
 
43
46
  - const defaultVisualMetrics = ['SpeedIndex','FirstVisualChange','LastVisualChange','VisualProgress', 'PerceptualSpeedIndexProgress', 'ContentfulSpeedIndexProgress', 'videoRecordingStart', 'PerceptualSpeedIndex', 'ContentfulSpeedIndex', 'LastMeaningfulPaint', 'LargestImage', 'Heading' ,'VisualReadiness','VisualComplete85', 'VisualComplete95','VisualComplete99'];
@@ -156,6 +159,10 @@ if browsertime
156
159
  table
157
160
  tr
158
161
  th(colspan='2') Extra timings
162
+ tr
163
+ td
164
+ a(href=baseHelpURL + 'ttfb') TTFB
165
+ td.number #{h.time.ms(timings.ttfb.toFixed(0))}
159
166
  if (timings.paintTiming && Object.keys(timings.paintTiming).length > 0)
160
167
  - const paintTimingHelper = { "first-contentful-paint": {"name": 'First Contentful Paint (FCP)', "friendly": "first-contentful-paint"}, "first-paint": {"name": 'First Paint', "friendly": "firstPaint" }};
161
168
  each value, name in timings.paintTiming
@@ -289,7 +296,10 @@ if browsertime
289
296
  td #{element.name}
290
297
  if (element.filename)
291
298
  | (#{element.filename})
292
- td #{visualMetrics[element.name] ? h.time.ms(visualMetrics[element.name].toFixed(0)): ''}
299
+ if element && visualMetrics && visualMetrics[element.name]
300
+ td #{visualMetrics[element.name] ? h.time.ms(visualMetrics[element.name].toFixed(0)): ''}
301
+ else
302
+ td
293
303
  td #{element.x}
294
304
  td #{element.y}
295
305
  td #{element.width}