Skip to content

Commit f886e0b

Browse files
authored
Bye bye wpt (#4085)
* Bye WebPageTest * remove more
1 parent 13770c3 commit f886e0b

File tree

30 files changed

+15
-375
lines changed

30 files changed

+15
-375
lines changed

.github/workflows/building-docker-release.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,6 @@ jobs:
4848
push: true
4949
provenance: false
5050
tags: sitespeedio/sitespeed.io:${{steps.tag.outputs.tag}}-plus1
51-
-
52-
name: Build and push sitespeed.io+wpt
53-
uses: docker/build-push-action@v5
54-
with:
55-
context: .
56-
platforms: linux/amd64,linux/arm64
57-
file: ./docker/Dockerfile-webpagetest
58-
build-args: version=${{steps.tag.outputs.tag}}
59-
push: true
60-
provenance: false
61-
tags: sitespeedio/sitespeed.io:${{steps.tag.outputs.tag}}-webpagetest
6251
-
6352
name: Build and push sitespeed.io-slim
6453
uses: docker/build-push-action@v5

docker/Dockerfile-webpagetest

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/_posts/2016-12-14-friendly-url-names.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ Michael Mrowetz has updated [PerfCascade](https://github.com/micmro/PerfCascade)
2626

2727
The video now uses video.js making it easier to slow the video down.
2828

29-
## Slack and WebPageTest
30-
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).
31-
32-
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!
33-
3429
## Important bug fixes
3530
* Running multiple URLs in WebPageTest failed because of a "feature" in the WebPageTest NodeJS API where options in s are change to ms.
3631

lib/cli/cli.js

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { resolve } from 'node:path';
22
import { platform } from 'node:os';
33
import { createRequire } from 'node:module';
4-
import { readFileSync, statSync, existsSync } from 'node:fs';
4+
import { readFileSync, statSync } from 'node:fs';
55

66
import yargs from 'yargs';
77
import { hideBin } from 'yargs/helpers';
@@ -1213,7 +1213,7 @@ export async function parseCommandLine() {
12131213
default: false,
12141214
type: 'boolean',
12151215
describe:
1216-
'Include screenshot (from Browsertime/WebPageTest) in the annotation. You need to specify a --resultBaseURL for this to work.',
1216+
'Include screenshot (from Browsertime) in the annotation. You need to specify a --resultBaseURL for this to work.',
12171217
group: 'Grafana'
12181218
})
12191219

@@ -1280,7 +1280,7 @@ export async function parseCommandLine() {
12801280
default: false,
12811281
type: 'boolean',
12821282
describe:
1283-
'Include screenshot (from Browsertime/WebPageTest) in the annotation. You need to specify a --resultBaseURL for this to work.',
1283+
'Include screenshot (from Browsertime) in the annotation. You need to specify a --resultBaseURL for this to work.',
12841284
group: 'Graphite'
12851285
})
12861286
.option('graphite.sendAnnotation', {
@@ -2076,28 +2076,6 @@ export async function parseCommandLine() {
20762076
return plugins;
20772077
}
20782078
})
2079-
.coerce('webpagetest', function (argument) {
2080-
if (argument) {
2081-
// for backwards compatible reasons we check if the passed parameters is a path to a script, if so just us it (PR #1445)
2082-
if (argument.script && existsSync(argument.script)) {
2083-
argument.script = readFileSync(resolve(argument.script), 'utf8');
2084-
/* eslint no-console: off */
2085-
console.log(
2086-
'[WARNING] Since sitespeed.io 4.4 you should pass the path to the script file through the --webpagetest.file flag (https://github.com/sitespeedio/sitespeed.io/pull/1445).'
2087-
);
2088-
return argument;
2089-
}
2090-
2091-
if (argument.file) {
2092-
argument.script = readFileSync(resolve(argument.file), 'utf8');
2093-
} else if (argument.script) {
2094-
// because the escaped characters are passed re-escaped from the console
2095-
argument.script = argument.script.split('\\t').join('\t');
2096-
argument.script = argument.script.split('\\n').join('\n');
2097-
}
2098-
return argument;
2099-
}
2100-
})
21012079
// .describe('browser', 'Specify browser')
21022080
.wrap(yargsInstance.terminalWidth())
21032081
// .check(validateInput)
@@ -2153,12 +2131,6 @@ export async function parseCommandLine() {
21532131
explicitOptions = merge(explicitOptions, config);
21542132
}
21552133

2156-
if (argv.webpagetest && argv.webpagetest.custom) {
2157-
argv.webpagetest.custom = readFileSync(resolve(argv.webpagetest.custom), {
2158-
encoding: 'utf8'
2159-
});
2160-
}
2161-
21622134
if (argv.summaryDetail) argv.summary = true;
21632135

21642136
if (

lib/plugins/analysisstorer/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ function shouldIgnoreMessage(message) {
1717
'browsertime.asyncscripts',
1818
'compare.setup',
1919
'sitespeedio.setup',
20-
'webpagetest.har',
21-
'webpagetest.setup',
2220
'aggregateassets.summary',
2321
'slowestassets.summary',
2422
'largestassets.summary',

lib/plugins/budget/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export default class BudgetPlugin extends SitespeedioPlugin {
2222
this.make = context.messageMaker('budget').make;
2323
this.budgetTypes = [
2424
'browsertime.pageSummary',
25-
'webpagetest.pageSummary',
2625
'pagexray.pageSummary',
2726
'coach.pageSummary',
2827
'axe.pageSummary'

lib/plugins/domains/index.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@ export default class DomainsPlugin extends SitespeedioPlugin {
2727
break;
2828
}
2929

30-
case 'webpagetest.har': {
31-
// Only collect WebPageTest data if we don't run Browsertime
32-
if (this.browsertime === false) {
33-
this.domainsAggregator.addToAggregate(message.data, message.url);
34-
}
35-
break;
36-
}
37-
3830
case 'sitespeedio.summarize': {
3931
const summary = this.domainsAggregator.summarize();
4032
if (!isEmpty(summary)) {

lib/plugins/grafana/index.js

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import dayjs from 'dayjs';
33
import { SitespeedioPlugin } from '@sitespeed.io/plugin';
44

55
import { send } from './send-annotation.js';
6-
import { toSafeKey } from '../../support/tsdbUtil.js';
76
import { throwIfMissing } from '../../support/util.js';
87

98
export default class GrafanaPlugin extends SitespeedioPlugin {
@@ -25,13 +24,6 @@ export default class GrafanaPlugin extends SitespeedioPlugin {
2524
}
2625

2726
processMessage(message, queue) {
28-
if (message.type === 'webpagetest.pageSummary') {
29-
this.wptExtras[message.url] = {};
30-
this.wptExtras[message.url].webPageTestResultURL =
31-
message.data.data.summary;
32-
this.wptExtras[message.url].connectivity = message.connectivity;
33-
this.wptExtras[message.url].location = toSafeKey(message.location);
34-
}
3527
if (this.messageTypesToFireAnnotations.includes(message.type)) {
3628
this.receivedTypesThatFireAnnotations[message.url]
3729
? this.receivedTypesThatFireAnnotations[message.url]++
@@ -46,11 +38,6 @@ export default class GrafanaPlugin extends SitespeedioPlugin {
4638

4739
break;
4840
}
49-
case 'webpagetest.setup': {
50-
this.messageTypesToFireAnnotations.push('webpagetest.pageSummary');
51-
52-
break;
53-
}
5441
case 'sitespeedio.setup': {
5542
// Let other plugins know that the Grafana plugin is alive
5643
queue.postMessage(this.make('grafana.setup'));
@@ -77,10 +64,7 @@ export default class GrafanaPlugin extends SitespeedioPlugin {
7764
break;
7865
}
7966
default: {
80-
if (message.type === 'webpagetest.browser' && !this.usingBrowsertime) {
81-
// We are only interested in WebPageTest browser if we run it standalone
82-
this.browser = message.data.browser;
83-
} else if (message.type === 'browsertime.alias') {
67+
if (message.type === 'browsertime.alias') {
8468
this.alias[message.url] = message.data;
8569
} else if (
8670
this.receivedTypesThatFireAnnotations[message.url] ===

lib/plugins/grafana/send-annotation.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,13 @@ export function send(
6565
tags.push(...extraTags);
6666
}
6767

68-
if (webPageTestExtraData) {
69-
tags.push(webPageTestExtraData.connectivity, webPageTestExtraData.location);
70-
}
71-
7268
const tagsArray = getTagsAsArray(tags);
7369

7470
const message = getAnnotationMessage(
7571
absolutePagePath,
7672
screenShotsEnabledInBrowsertime,
7773
screenshotType,
78-
webPageTestExtraData
79-
? webPageTestExtraData.webPageTestResultURL
80-
: undefined,
74+
undefined,
8175
usingBrowsertime,
8276
options
8377
);

lib/plugins/graphite/data-generator.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ function keyPathFromMessage(message, options, includeQueryParameters, alias) {
2727

2828
typeParts.splice(1, 0, connectivity);
2929
typeParts.splice(1, 0, options.browser);
30-
} else if (/(^webpagetest)/.test(message.type)) {
31-
if (message.connectivity) {
32-
typeParts.splice(2, 0, message.connectivity);
33-
}
34-
if (message.location) {
35-
typeParts.splice(2, 0, toSafeKey(message.location));
36-
}
3730
} else if (/(^gpsi)/.test(message.type)) {
3831
typeParts.splice(2, 0, options.mobile ? 'mobile' : 'desktop');
3932
}

lib/plugins/graphite/index.js

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { SitespeedioPlugin } from '@sitespeed.io/plugin';
77

88
import { send } from './send-annotation.js';
99
import { GraphiteDataGenerator as DataGenerator } from './data-generator.js';
10-
import { toSafeKey } from '../../support/tsdbUtil.js';
1110
import { isStatsD } from './helpers/is-statsd.js';
1211
import { throwIfMissing } from '../../support/util.js';
1312
import { toArray } from '../../support/util.js';
@@ -67,19 +66,14 @@ export default class GraphitePlugin extends SitespeedioPlugin {
6766
}
6867

6968
processMessage(message, queue) {
70-
// First catch if we are running Browsertime and/or WebPageTest
69+
// First catch if we are running Browsertime
7170
switch (message.type) {
7271
case 'browsertime.setup': {
7372
this.messageTypesToFireAnnotations.push('browsertime.pageSummary');
7473
this.usingBrowsertime = true;
7574

7675
break;
7776
}
78-
case 'webpagetest.setup': {
79-
this.messageTypesToFireAnnotations.push('webpagetest.pageSummary');
80-
81-
break;
82-
}
8377
case 'browsertime.config': {
8478
if (message.data.screenshot) {
8579
this.useScreenshots = message.data.screenshot;
@@ -104,12 +98,6 @@ export default class GraphitePlugin extends SitespeedioPlugin {
10498

10599
break;
106100
}
107-
default: {
108-
if (message.type === 'webpagetest.browser' && !this.usingBrowsertime) {
109-
// We are only interested in WebPageTest browser if we run it standalone
110-
this.browser = message.data.browser;
111-
}
112-
}
113101
}
114102

115103
if (message.type === 'browsertime.alias') {
@@ -129,14 +117,6 @@ export default class GraphitePlugin extends SitespeedioPlugin {
129117
: (this.receivedTypesThatFireAnnotations[message.url] = 1);
130118
}
131119

132-
if (message.type === 'webpagetest.pageSummary') {
133-
this.wptExtras[message.url] = {};
134-
this.wptExtras[message.url].webPageTestResultURL =
135-
message.data.data.summary;
136-
this.wptExtras[message.url].connectivity = message.connectivity;
137-
this.wptExtras[message.url].location = toSafeKey(message.location);
138-
}
139-
140120
// we only sends individual groups to Graphite, not the
141121
// total of all groups (you can calculate that yourself)
142122
if (message.group === 'total') {
@@ -175,8 +155,7 @@ export default class GraphitePlugin extends SitespeedioPlugin {
175155
this.messageTypesToFireAnnotations.length &&
176156
this.resultUrls.hasBaseUrl() &&
177157
this.sendAnnotation &&
178-
(message.type === 'browsertime.pageSummary' ||
179-
message.type === 'webpagetest.pageSummary')
158+
message.type === 'browsertime.pageSummary'
180159
) {
181160
this.receivedTypesThatFireAnnotations[message.url] = 0;
182161
const absolutePagePath = this.resultUrls.absoluteSummaryPagePath(

lib/plugins/graphite/send-annotation.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ export function send(
5959
if (extraTags.length > 0) {
6060
tags.push(...extraTags);
6161
}
62-
if (webPageTestExtraData) {
63-
tags.push(webPageTestExtraData.connectivity, webPageTestExtraData.location);
64-
}
6562
const theTags = options.graphite.arrayTags
6663
? getTagsAsArray(tags)
6764
: getTagsAsString(tags);
@@ -70,9 +67,7 @@ export function send(
7067
absolutePagePath,
7168
screenShotsEnabledInBrowsertime,
7269
screenshotType,
73-
webPageTestExtraData
74-
? webPageTestExtraData.webPageTestResultURL
75-
: undefined,
70+
undefined,
7671
usingBrowsertime,
7772
options
7873
);

lib/plugins/harstorer/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ export default class HarstorerPlugin extends SitespeedioPlugin {
2020
this.alias[message.url] = message.data;
2121
break;
2222
}
23-
case 'browsertime.har':
24-
case 'webpagetest.har': {
23+
case 'browsertime.har': {
2524
const json = JSON.stringify(message.data);
2625

2726
return this.gzipHAR

lib/plugins/html/defaultConfig.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,6 @@ export default {
4242
'transferSize.image',
4343
'thirdParty.transferSize',
4444
'thirdParty.requests',
45-
'webpagetest.SpeedIndex',
46-
'webpagetest.lastVisualChange',
47-
'webpagetest.render',
48-
'webpagetest.visualComplete',
49-
'webpagetest.visualComplete95',
50-
'webpagetest.TTFB',
51-
'webpagetest.fullyLoaded',
5245
'axe.critical',
5346
'axe.serious',
5447
'axe.minor',

lib/plugins/html/htmlBuilder.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ export class HTMLBuilder {
198198
let ios;
199199
let connectivity;
200200
let usingBrowsertime;
201-
let usingWebPageTest;
202201
let cpuBenchmark;
203202
let windowSize;
204203
const urlPageRenders = [];
@@ -215,7 +214,6 @@ export class HTMLBuilder {
215214
pageNumber++;
216215
// In the future we can fix so we just pickup the setup messages
217216
usingBrowsertime = pageInfo.data.browsertime;
218-
usingWebPageTest = pageInfo.data.webpagetest;
219217
// if we don't use Browsertime, we don't get the browser version
220218
browser = usingBrowsertime
221219
? {
@@ -463,7 +461,7 @@ export class HTMLBuilder {
463461
android,
464462
ios,
465463
usingBrowsertime,
466-
usingWebPageTest,
464+
usingWebPageTest: false,
467465
headers: this.summary,
468466
version: version,
469467
browsertimeVersion: dependencies.browsertime,

lib/plugins/html/index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ export default class HTMLPlugin extends SitespeedioPlugin {
3434
'pagexray.pageSummary',
3535
'coach.run',
3636
'coach.pageSummary',
37-
'webpagetest.run',
38-
'webpagetest.pageSummary',
3937
'thirdparty.run',
4038
'thirdparty.pageSummary',
4139
'crux.pageSummary'
@@ -70,7 +68,6 @@ export default class HTMLPlugin extends SitespeedioPlugin {
7068
break;
7169
}
7270
// we always want to add data from our HARs
73-
case 'webpagetest.har':
7471
case 'browsertime.har': {
7572
dataCollector.addDataForUrl(
7673
message.url,
@@ -204,7 +201,6 @@ export default class HTMLPlugin extends SitespeedioPlugin {
204201
}
205202
break;
206203
}
207-
case 'webpagetest.summary':
208204
case 'coach.summary':
209205
case 'pagexray.summary':
210206
case 'browsertime.summary':

0 commit comments

Comments
 (0)