From f886e0b6ee27ff65138cf068d292096b9e2db82b Mon Sep 17 00:00:00 2001 From: Peter Hedenskog Date: Mon, 29 Apr 2024 08:37:29 +0200 Subject: [PATCH] Bye bye wpt (#4085) * Bye WebPageTest * remove more --- .github/workflows/building-docker-release.yml | 11 ------ docker/Dockerfile-webpagetest | 14 ------- docs/_posts/2016-12-14-friendly-url-names.md | 5 --- lib/cli/cli.js | 34 ++-------------- lib/plugins/analysisstorer/index.js | 2 - lib/plugins/budget/index.js | 1 - lib/plugins/domains/index.js | 8 ---- lib/plugins/grafana/index.js | 18 +-------- lib/plugins/grafana/send-annotation.js | 8 +--- lib/plugins/graphite/data-generator.js | 7 ---- lib/plugins/graphite/index.js | 25 +----------- lib/plugins/graphite/send-annotation.js | 7 +--- lib/plugins/harstorer/index.js | 3 +- lib/plugins/html/defaultConfig.js | 7 ---- lib/plugins/html/htmlBuilder.js | 4 +- lib/plugins/html/index.js | 4 -- lib/plugins/html/setup/detailed.js | 23 ----------- .../html/setup/summaryBoxesDefaultLimits.js | 8 ---- lib/plugins/html/templates/runInfo.pug | 3 -- .../templates/url/includes/pageRunInfo.pug | 3 -- .../html/templates/url/iteration/index.pug | 24 +----------- .../html/templates/url/summary/index.pug | 21 ---------- lib/plugins/influxdb/data-generator.js | 28 ------------- lib/plugins/influxdb/index.js | 16 -------- lib/plugins/influxdb/send-annotation.js | 9 +---- lib/plugins/messagelogger/index.js | 1 - lib/plugins/pagexray/index.js | 12 +----- lib/plugins/tracestorer/index.js | 36 ----------------- lib/support/annotationsHelper.js | 9 +---- lib/support/friendlynames.js | 39 ------------------- 30 files changed, 15 insertions(+), 375 deletions(-) delete mode 100644 docker/Dockerfile-webpagetest delete mode 100644 lib/plugins/tracestorer/index.js diff --git a/.github/workflows/building-docker-release.yml b/.github/workflows/building-docker-release.yml index f1adc691c..bccbdf2d7 100644 --- a/.github/workflows/building-docker-release.yml +++ b/.github/workflows/building-docker-release.yml @@ -48,17 +48,6 @@ jobs: 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 - name: Build and push sitespeed.io-slim uses: docker/build-push-action@v5 diff --git a/docker/Dockerfile-webpagetest b/docker/Dockerfile-webpagetest deleted file mode 100644 index 212150d5f..000000000 --- a/docker/Dockerfile-webpagetest +++ /dev/null @@ -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 diff --git a/docs/_posts/2016-12-14-friendly-url-names.md b/docs/_posts/2016-12-14-friendly-url-names.md index c805a0e2c..444ca68ef 100644 --- a/docs/_posts/2016-12-14-friendly-url-names.md +++ b/docs/_posts/2016-12-14-friendly-url-names.md @@ -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. diff --git a/lib/cli/cli.js b/lib/cli/cli.js index 1993b0c68..07a3143ba 100644 --- a/lib/cli/cli.js +++ b/lib/cli/cli.js @@ -1,7 +1,7 @@ import { resolve } from 'node:path'; import { platform } from 'node:os'; import { createRequire } from 'node:module'; -import { readFileSync, statSync, existsSync } from 'node:fs'; +import { readFileSync, statSync } from 'node:fs'; import yargs from 'yargs'; import { hideBin } from 'yargs/helpers'; @@ -1213,7 +1213,7 @@ export async function parseCommandLine() { default: false, type: 'boolean', describe: - 'Include screenshot (from Browsertime/WebPageTest) in the annotation. You need to specify a --resultBaseURL for this to work.', + 'Include screenshot (from Browsertime) in the annotation. You need to specify a --resultBaseURL for this to work.', group: 'Grafana' }) @@ -1280,7 +1280,7 @@ export async function parseCommandLine() { default: false, type: 'boolean', describe: - 'Include screenshot (from Browsertime/WebPageTest) in the annotation. You need to specify a --resultBaseURL for this to work.', + 'Include screenshot (from Browsertime) in the annotation. You need to specify a --resultBaseURL for this to work.', group: 'Graphite' }) .option('graphite.sendAnnotation', { @@ -2076,28 +2076,6 @@ export async function parseCommandLine() { return plugins; } }) - .coerce('webpagetest', function (argument) { - if (argument) { - // for backwards compatible reasons we check if the passed parameters is a path to a script, if so just us it (PR #1445) - if (argument.script && existsSync(argument.script)) { - argument.script = readFileSync(resolve(argument.script), 'utf8'); - /* eslint no-console: off */ - console.log( - '[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).' - ); - return argument; - } - - if (argument.file) { - argument.script = readFileSync(resolve(argument.file), 'utf8'); - } else if (argument.script) { - // because the escaped characters are passed re-escaped from the console - argument.script = argument.script.split('\\t').join('\t'); - argument.script = argument.script.split('\\n').join('\n'); - } - return argument; - } - }) // .describe('browser', 'Specify browser') .wrap(yargsInstance.terminalWidth()) // .check(validateInput) @@ -2153,12 +2131,6 @@ export async function parseCommandLine() { explicitOptions = merge(explicitOptions, config); } - if (argv.webpagetest && argv.webpagetest.custom) { - argv.webpagetest.custom = readFileSync(resolve(argv.webpagetest.custom), { - encoding: 'utf8' - }); - } - if (argv.summaryDetail) argv.summary = true; if ( diff --git a/lib/plugins/analysisstorer/index.js b/lib/plugins/analysisstorer/index.js index cc7e93769..e6cbe34ad 100644 --- a/lib/plugins/analysisstorer/index.js +++ b/lib/plugins/analysisstorer/index.js @@ -17,8 +17,6 @@ function shouldIgnoreMessage(message) { 'browsertime.asyncscripts', 'compare.setup', 'sitespeedio.setup', - 'webpagetest.har', - 'webpagetest.setup', 'aggregateassets.summary', 'slowestassets.summary', 'largestassets.summary', diff --git a/lib/plugins/budget/index.js b/lib/plugins/budget/index.js index 415432e80..16a79d832 100644 --- a/lib/plugins/budget/index.js +++ b/lib/plugins/budget/index.js @@ -22,7 +22,6 @@ export default class BudgetPlugin extends SitespeedioPlugin { this.make = context.messageMaker('budget').make; this.budgetTypes = [ 'browsertime.pageSummary', - 'webpagetest.pageSummary', 'pagexray.pageSummary', 'coach.pageSummary', 'axe.pageSummary' diff --git a/lib/plugins/domains/index.js b/lib/plugins/domains/index.js index 99be2aebe..9c3448db4 100644 --- a/lib/plugins/domains/index.js +++ b/lib/plugins/domains/index.js @@ -27,14 +27,6 @@ export default class DomainsPlugin extends SitespeedioPlugin { break; } - case 'webpagetest.har': { - // Only collect WebPageTest data if we don't run Browsertime - if (this.browsertime === false) { - this.domainsAggregator.addToAggregate(message.data, message.url); - } - break; - } - case 'sitespeedio.summarize': { const summary = this.domainsAggregator.summarize(); if (!isEmpty(summary)) { diff --git a/lib/plugins/grafana/index.js b/lib/plugins/grafana/index.js index 1748abcba..b00572f01 100644 --- a/lib/plugins/grafana/index.js +++ b/lib/plugins/grafana/index.js @@ -3,7 +3,6 @@ import dayjs from 'dayjs'; import { SitespeedioPlugin } from '@sitespeed.io/plugin'; import { send } from './send-annotation.js'; -import { toSafeKey } from '../../support/tsdbUtil.js'; import { throwIfMissing } from '../../support/util.js'; export default class GrafanaPlugin extends SitespeedioPlugin { @@ -25,13 +24,6 @@ export default class GrafanaPlugin extends SitespeedioPlugin { } processMessage(message, queue) { - if (message.type === 'webpagetest.pageSummary') { - this.wptExtras[message.url] = {}; - this.wptExtras[message.url].webPageTestResultURL = - message.data.data.summary; - this.wptExtras[message.url].connectivity = message.connectivity; - this.wptExtras[message.url].location = toSafeKey(message.location); - } if (this.messageTypesToFireAnnotations.includes(message.type)) { this.receivedTypesThatFireAnnotations[message.url] ? this.receivedTypesThatFireAnnotations[message.url]++ @@ -46,11 +38,6 @@ export default class GrafanaPlugin extends SitespeedioPlugin { break; } - case 'webpagetest.setup': { - this.messageTypesToFireAnnotations.push('webpagetest.pageSummary'); - - break; - } case 'sitespeedio.setup': { // Let other plugins know that the Grafana plugin is alive queue.postMessage(this.make('grafana.setup')); @@ -77,10 +64,7 @@ export default class GrafanaPlugin extends SitespeedioPlugin { break; } default: { - if (message.type === 'webpagetest.browser' && !this.usingBrowsertime) { - // We are only interested in WebPageTest browser if we run it standalone - this.browser = message.data.browser; - } else if (message.type === 'browsertime.alias') { + if (message.type === 'browsertime.alias') { this.alias[message.url] = message.data; } else if ( this.receivedTypesThatFireAnnotations[message.url] === diff --git a/lib/plugins/grafana/send-annotation.js b/lib/plugins/grafana/send-annotation.js index 1c84da343..7ce30658d 100644 --- a/lib/plugins/grafana/send-annotation.js +++ b/lib/plugins/grafana/send-annotation.js @@ -65,19 +65,13 @@ export function send( tags.push(...extraTags); } - if (webPageTestExtraData) { - tags.push(webPageTestExtraData.connectivity, webPageTestExtraData.location); - } - const tagsArray = getTagsAsArray(tags); const message = getAnnotationMessage( absolutePagePath, screenShotsEnabledInBrowsertime, screenshotType, - webPageTestExtraData - ? webPageTestExtraData.webPageTestResultURL - : undefined, + undefined, usingBrowsertime, options ); diff --git a/lib/plugins/graphite/data-generator.js b/lib/plugins/graphite/data-generator.js index a5dd7436f..1ea3d155c 100644 --- a/lib/plugins/graphite/data-generator.js +++ b/lib/plugins/graphite/data-generator.js @@ -27,13 +27,6 @@ function keyPathFromMessage(message, options, includeQueryParameters, alias) { typeParts.splice(1, 0, connectivity); typeParts.splice(1, 0, options.browser); - } else if (/(^webpagetest)/.test(message.type)) { - if (message.connectivity) { - typeParts.splice(2, 0, message.connectivity); - } - if (message.location) { - typeParts.splice(2, 0, toSafeKey(message.location)); - } } else if (/(^gpsi)/.test(message.type)) { typeParts.splice(2, 0, options.mobile ? 'mobile' : 'desktop'); } diff --git a/lib/plugins/graphite/index.js b/lib/plugins/graphite/index.js index ad384bb80..f430cf640 100644 --- a/lib/plugins/graphite/index.js +++ b/lib/plugins/graphite/index.js @@ -7,7 +7,6 @@ import { SitespeedioPlugin } from '@sitespeed.io/plugin'; import { send } from './send-annotation.js'; import { GraphiteDataGenerator as DataGenerator } from './data-generator.js'; -import { toSafeKey } from '../../support/tsdbUtil.js'; import { isStatsD } from './helpers/is-statsd.js'; import { throwIfMissing } from '../../support/util.js'; import { toArray } from '../../support/util.js'; @@ -67,7 +66,7 @@ export default class GraphitePlugin extends SitespeedioPlugin { } processMessage(message, queue) { - // First catch if we are running Browsertime and/or WebPageTest + // First catch if we are running Browsertime switch (message.type) { case 'browsertime.setup': { this.messageTypesToFireAnnotations.push('browsertime.pageSummary'); @@ -75,11 +74,6 @@ export default class GraphitePlugin extends SitespeedioPlugin { break; } - case 'webpagetest.setup': { - this.messageTypesToFireAnnotations.push('webpagetest.pageSummary'); - - break; - } case 'browsertime.config': { if (message.data.screenshot) { this.useScreenshots = message.data.screenshot; @@ -104,12 +98,6 @@ export default class GraphitePlugin extends SitespeedioPlugin { break; } - default: { - if (message.type === 'webpagetest.browser' && !this.usingBrowsertime) { - // We are only interested in WebPageTest browser if we run it standalone - this.browser = message.data.browser; - } - } } if (message.type === 'browsertime.alias') { @@ -129,14 +117,6 @@ export default class GraphitePlugin extends SitespeedioPlugin { : (this.receivedTypesThatFireAnnotations[message.url] = 1); } - if (message.type === 'webpagetest.pageSummary') { - this.wptExtras[message.url] = {}; - this.wptExtras[message.url].webPageTestResultURL = - message.data.data.summary; - this.wptExtras[message.url].connectivity = message.connectivity; - this.wptExtras[message.url].location = toSafeKey(message.location); - } - // we only sends individual groups to Graphite, not the // total of all groups (you can calculate that yourself) if (message.group === 'total') { @@ -175,8 +155,7 @@ export default class GraphitePlugin extends SitespeedioPlugin { this.messageTypesToFireAnnotations.length && this.resultUrls.hasBaseUrl() && this.sendAnnotation && - (message.type === 'browsertime.pageSummary' || - message.type === 'webpagetest.pageSummary') + message.type === 'browsertime.pageSummary' ) { this.receivedTypesThatFireAnnotations[message.url] = 0; const absolutePagePath = this.resultUrls.absoluteSummaryPagePath( diff --git a/lib/plugins/graphite/send-annotation.js b/lib/plugins/graphite/send-annotation.js index a8f46e86c..f8f43c46a 100644 --- a/lib/plugins/graphite/send-annotation.js +++ b/lib/plugins/graphite/send-annotation.js @@ -59,9 +59,6 @@ export function send( if (extraTags.length > 0) { tags.push(...extraTags); } - if (webPageTestExtraData) { - tags.push(webPageTestExtraData.connectivity, webPageTestExtraData.location); - } const theTags = options.graphite.arrayTags ? getTagsAsArray(tags) : getTagsAsString(tags); @@ -70,9 +67,7 @@ export function send( absolutePagePath, screenShotsEnabledInBrowsertime, screenshotType, - webPageTestExtraData - ? webPageTestExtraData.webPageTestResultURL - : undefined, + undefined, usingBrowsertime, options ); diff --git a/lib/plugins/harstorer/index.js b/lib/plugins/harstorer/index.js index 7b2dda99f..24de56fbc 100644 --- a/lib/plugins/harstorer/index.js +++ b/lib/plugins/harstorer/index.js @@ -20,8 +20,7 @@ export default class HarstorerPlugin extends SitespeedioPlugin { this.alias[message.url] = message.data; break; } - case 'browsertime.har': - case 'webpagetest.har': { + case 'browsertime.har': { const json = JSON.stringify(message.data); return this.gzipHAR diff --git a/lib/plugins/html/defaultConfig.js b/lib/plugins/html/defaultConfig.js index 2fb189ffc..61ad5dd95 100644 --- a/lib/plugins/html/defaultConfig.js +++ b/lib/plugins/html/defaultConfig.js @@ -42,13 +42,6 @@ export default { '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', diff --git a/lib/plugins/html/htmlBuilder.js b/lib/plugins/html/htmlBuilder.js index 425792c6b..fa1f87749 100644 --- a/lib/plugins/html/htmlBuilder.js +++ b/lib/plugins/html/htmlBuilder.js @@ -198,7 +198,6 @@ export class HTMLBuilder { let ios; let connectivity; let usingBrowsertime; - let usingWebPageTest; let cpuBenchmark; let windowSize; const urlPageRenders = []; @@ -215,7 +214,6 @@ export class HTMLBuilder { pageNumber++; // In the future we can fix so we just pickup the setup messages usingBrowsertime = pageInfo.data.browsertime; - usingWebPageTest = pageInfo.data.webpagetest; // if we don't use Browsertime, we don't get the browser version browser = usingBrowsertime ? { @@ -463,7 +461,7 @@ export class HTMLBuilder { android, ios, usingBrowsertime, - usingWebPageTest, + usingWebPageTest: false, headers: this.summary, version: version, browsertimeVersion: dependencies.browsertime, diff --git a/lib/plugins/html/index.js b/lib/plugins/html/index.js index 0528410b5..17580fd7b 100644 --- a/lib/plugins/html/index.js +++ b/lib/plugins/html/index.js @@ -34,8 +34,6 @@ export default class HTMLPlugin extends SitespeedioPlugin { 'pagexray.pageSummary', 'coach.run', 'coach.pageSummary', - 'webpagetest.run', - 'webpagetest.pageSummary', 'thirdparty.run', 'thirdparty.pageSummary', 'crux.pageSummary' @@ -70,7 +68,6 @@ export default class HTMLPlugin extends SitespeedioPlugin { break; } // we always want to add data from our HARs - case 'webpagetest.har': case 'browsertime.har': { dataCollector.addDataForUrl( message.url, @@ -204,7 +201,6 @@ export default class HTMLPlugin extends SitespeedioPlugin { } break; } - case 'webpagetest.summary': case 'coach.summary': case 'pagexray.summary': case 'browsertime.summary': diff --git a/lib/plugins/html/setup/detailed.js b/lib/plugins/html/setup/detailed.js index 8bafea843..36a50b523 100644 --- a/lib/plugins/html/setup/detailed.js +++ b/lib/plugins/html/setup/detailed.js @@ -1,5 +1,4 @@ import { noop, size, time } from '../../../support/helpers/index.js'; -import get from 'lodash.get'; function row(stat, name, metricName, formatter) { if (stat === undefined) { @@ -23,7 +22,6 @@ export default function (data) { const coach = data.coach; const pagexray = data.pagexray; const browsertime = data.browsertime; - const webpagetest = data.webpagetest; const axe = data.axe; const sustainable = data.sustainable; @@ -309,27 +307,6 @@ export default function (data) { } } - if (webpagetest) { - const firstView = get(webpagetest, 'summary.timing.firstView'); - if (firstView) { - rows.push( - row(firstView.render, 'WPT render (firstView)', 'render', time.ms), - row( - firstView.SpeedIndex, - 'WPT SpeedIndex (firstView)', - 'SpeedIndex', - time.ms - ), - row( - firstView.fullyLoaded, - 'WPT Fully loaded (firstView)', - 'fullyLoaded', - time.ms - ) - ); - } - } - if (axe) { rows.push( row( diff --git a/lib/plugins/html/setup/summaryBoxesDefaultLimits.js b/lib/plugins/html/setup/summaryBoxesDefaultLimits.js index f6ef977e8..6bebaf66b 100644 --- a/lib/plugins/html/setup/summaryBoxesDefaultLimits.js +++ b/lib/plugins/html/setup/summaryBoxesDefaultLimits.js @@ -75,13 +75,5 @@ export default { co2PerPageView: {}, co2FirstParty: {}, co2ThirdParty: {} - }, - webpagetest: { - SpeedIndex: {}, - lastVisualChange: {}, - render: {}, - visualComplete: {}, - visualComplete95: {}, - fullyLoaded: {} } }; diff --git a/lib/plugins/html/templates/runInfo.pug b/lib/plugins/html/templates/runInfo.pug index 2c980ac40..e1ff3d582 100644 --- a/lib/plugins/html/templates/runInfo.pug +++ b/lib/plugins/html/templates/runInfo.pug @@ -12,6 +12,3 @@ if usingBrowsertime if options.browsertime.browser === 'safari' p At the moment we get limited metrics from Safari. Transfer sizes and number of requests are missing. - -else if usingWebPageTest - p.small Tested #{timestamp} using WebPageTest #{options.webpagetest.location} using connectivity #{options.webpagetest.connectivity} for #{h.plural(options.webpagetest.runs, 'run')}. diff --git a/lib/plugins/html/templates/url/includes/pageRunInfo.pug b/lib/plugins/html/templates/url/includes/pageRunInfo.pug index 9ee2a2508..a973b794b 100644 --- a/lib/plugins/html/templates/url/includes/pageRunInfo.pug +++ b/lib/plugins/html/templates/url/includes/pageRunInfo.pug @@ -7,6 +7,3 @@ if pageInfo.data.browsertime else if options.multi | . a(href= rootPath + 'settings.html')= '(runtime settings).' - -else if pageInfo.data.webpagetest - p.small Tested #{timestamp} using WebPageTest #{options.webpagetest.location} using connectivity #{options.webpagetest.connectivity} for #{h.plural(options.webpagetest.runs, 'run')}. diff --git a/lib/plugins/html/templates/url/iteration/index.pug b/lib/plugins/html/templates/url/iteration/index.pug index 1b0f15f47..db76150d2 100644 --- a/lib/plugins/html/templates/url/iteration/index.pug +++ b/lib/plugins/html/templates/url/iteration/index.pug @@ -175,31 +175,9 @@ block content tr td Last Visual Change td #{h.time.ms(lastVisualChange)} - if !d.browsertime && d.webpagetest - tr - th(colspan='2') WebPageTest - tr - td Render (first view) - td #{d.webpagetest.run.firstView.render} - tr - td Speed Index (first view) - td #{d.webpagetest.run.firstView.SpeedIndex} - tr - td Visual Complete 85% (first view) - td #{d.webpagetest.run.firstView.visualComplete85} - tr - td Last Visual Change (first view) - td #{d.webpagetest.run.firstView.lastVisualChange} - tr - td Requests - td #{d.webpagetest.run.firstView.requestsFull} .one-half.column - if !d.browsertime && d.webpagetest - - screenshotName = 'data/screenshots/wpt-' + iteration + '-firstView.png' - a(href=screenshotName) - img.screenshot(src=screenshotName, alt='Screenshot') - else if hasScreenShots + if hasScreenShots - screenshotName = 'data/screenshots/' + iteration + '/afterPageCompleteCheck.' + screenShotType - const width = options.mobile ? 150 : '100%'; a(href=screenshotName) diff --git a/lib/plugins/html/templates/url/summary/index.pug b/lib/plugins/html/templates/url/summary/index.pug index 2a7e59ae7..86150a80d 100644 --- a/lib/plugins/html/templates/url/summary/index.pug +++ b/lib/plugins/html/templates/url/summary/index.pug @@ -227,24 +227,6 @@ block content tr td Cumulative Layout Shift (CLS) [p75] td #{Number(cruxCLS).toFixed(2)} - if !d.browsertime && d.webpagetest - tr - th(colspan='2') WebPageTest - tr - td Render (first view) - td #{d.webpagetest.pageSummary.data.median.firstView.render} - tr - td Speed Index (first view) - td #{d.webpagetest.pageSummary.data.median.firstView.SpeedIndex} - tr - td Visual Complete 85% (first view) - td #{d.webpagetest.pageSummary.data.median.firstView.visualComplete85} - tr - td Last Visual Change (first view) - td #{d.webpagetest.pageSummary.data.median.firstView.lastVisualChange} - tr - td Requests - td #{d.webpagetest.pageSummary.data.median.firstView.requestsFull} if d.crux && d.crux.pageSummary && d.crux.pageSummary.loadingExperience && d.crux.pageSummary.loadingExperience.ALL && d.crux.pageSummary.loadingExperience.ALL.data && !d.browsertime - const cruxMetrics = {first_contentful_paint:'First Contentful Paint (FCP)', largest_contentful_paint: 'Largest Contentful Paint (LCP)', first_input_delay:'First Input Delay (FID)', cumulative_layout_shift: 'Cumulative Layout Shift'}; each name, key in cruxMetrics @@ -265,9 +247,6 @@ block content - const screenshotName = 'data/screenshots/' + screenshotNo + '/afterPageCompleteCheck.' + screenShotType a(href=screenshotName) img.screenshot(src=screenshotName, width=width, alt='Screenshot of run ' + screenshotNo) - else if !d.browsertime && d.webpagetest - a(href='data/screenshots/wpt-1-firstView.png') - img.screenshot(src='data/screenshots/wpt-1-firstView.png', alt='Screenshot of run 1') include ./summaryBox.pug #downloads diff --git a/lib/plugins/influxdb/data-generator.js b/lib/plugins/influxdb/data-generator.js index 23107530c..f4e7f5c8e 100644 --- a/lib/plugins/influxdb/data-generator.js +++ b/lib/plugins/influxdb/data-generator.js @@ -77,27 +77,6 @@ function getAdditionalTags(key, type) { break; } - case 'webpagetest.pageSummary': { - // data.median.firstView.SpeedIndex webpagetest.pageSummary - tags.view = keyArray[2]; - // data.median.firstView.breakdown.html.requests - // data.median.firstView.breakdown.html.bytes - if (key.includes('breakdown')) { - tags.contentType = keyArray[4]; - } - - break; - } - case 'webpagetest.summary': { - // timing.firstView.SpeedIndex.median - tags.view = keyArray[1]; - // asset.firstView.breakdown.html.requests.median - if (key.includes('breakdown')) { - tags.contentType = keyArray[4]; - } - - break; - } case 'pagexray.summary': { // firstParty.requests.min pagexray.summary // requests.median @@ -231,13 +210,6 @@ export class InfluxDBDataGenerator { let connectivity = getConnectivity(options); tags.connectivity = connectivity; tags.browser = options.browser; - } else if (/(^webpagetest)/.test(message.type)) { - if (message.connectivity) { - tags.connectivity = message.connectivity; - } - if (message.location) { - tags.location = message.location; - } } else if (/(^gpsi)/.test(message.type)) { tags.strategy = options.mobile ? 'mobile' : 'desktop'; } diff --git a/lib/plugins/influxdb/index.js b/lib/plugins/influxdb/index.js index a80ee8b64..eea1e4de7 100644 --- a/lib/plugins/influxdb/index.js +++ b/lib/plugins/influxdb/index.js @@ -5,7 +5,6 @@ import dayjs from 'dayjs'; import { SitespeedioPlugin } from '@sitespeed.io/plugin'; import { InfluxDBSender as Sender } from './sender.js'; import { InfluxDB2Sender as SenderV2 } from './senderV2.js'; -import { toSafeKey } from '../../support/tsdbUtil.js'; import { send } from './send-annotation.js'; import { InfluxDBDataGenerator as DataGenerator } from './data-generator.js'; import { throwIfMissing } from '../../support/util.js'; @@ -40,7 +39,6 @@ export default class InfluxDBPlugin extends SitespeedioPlugin { this.make = context.messageMaker('influxdb').make; this.sendAnnotation = true; this.alias = {}; - this.wptExtras = {}; } processMessage(message, queue) { @@ -54,11 +52,6 @@ export default class InfluxDBPlugin extends SitespeedioPlugin { break; } - case 'webpagetest.setup': { - this.messageTypesToFireAnnotations.push('webpagetest.pageSummary'); - - break; - } case 'browsertime.config': { if (message.data.screenshot) { this.useScreenshots = message.data.screenshot; @@ -100,14 +93,6 @@ export default class InfluxDBPlugin extends SitespeedioPlugin { : (this.receivedTypesThatFireAnnotations[message.url] = 1); } - if (message.type === 'webpagetest.pageSummary') { - this.wptExtras[message.url] = {}; - this.wptExtras[message.url].webPageTestResultURL = - message.data.data.summary; - this.wptExtras[message.url].connectivity = message.connectivity; - this.wptExtras[message.url].location = toSafeKey(message.location); - } - // Let us skip this for a while and concentrate on the real deal if ( /(^largestassets|^slowestassets|^aggregateassets|^domains)/.test( @@ -161,7 +146,6 @@ export default class InfluxDBPlugin extends SitespeedioPlugin { // Browsertime pass on when the first run was done for that URL message.runTime, this.alias, - this.wptExtras[message.url], this.usingBrowsertime, this.options ); diff --git a/lib/plugins/influxdb/send-annotation.js b/lib/plugins/influxdb/send-annotation.js index 56c6da517..6c9c1f6bf 100644 --- a/lib/plugins/influxdb/send-annotation.js +++ b/lib/plugins/influxdb/send-annotation.js @@ -21,7 +21,6 @@ export function send( screenshotType, runTime, alias, - webPageTestExtraData, usingBrowsertime, options ) { @@ -44,17 +43,11 @@ export function send( tags.push(options.slug); } - if (webPageTestExtraData) { - tags.push(webPageTestExtraData.connectivity, webPageTestExtraData.location); - } - const message = getAnnotationMessage( absolutePagePath, screenShotsEnabledInBrowsertime, screenshotType, - webPageTestExtraData - ? webPageTestExtraData.webPageTestResultURL - : undefined, + undefined, usingBrowsertime, options ); diff --git a/lib/plugins/messagelogger/index.js b/lib/plugins/messagelogger/index.js index 3c978c9b9..f7a755faa 100644 --- a/lib/plugins/messagelogger/index.js +++ b/lib/plugins/messagelogger/index.js @@ -37,7 +37,6 @@ export default class MessageLoggerPlugin extends SitespeedioPlugin { case 'browsertime.har': case 'browsertime.run': case 'domains.summary': - case 'webpagetest.pageSummary': case 'browsertime.screenshot': { replacerFunction = this.verbose > 1 ? undefined : shortenData; break; diff --git a/lib/plugins/pagexray/index.js b/lib/plugins/pagexray/index.js index b85f9b363..b82d40998 100644 --- a/lib/plugins/pagexray/index.js +++ b/lib/plugins/pagexray/index.js @@ -63,7 +63,6 @@ export default class PageXrayPlugin extends SitespeedioPlugin { 'pagexray.run' ); - this.usingWebpagetest = false; this.usingBrowsertime = false; this.multi = options.multi; } @@ -74,16 +73,9 @@ export default class PageXrayPlugin extends SitespeedioPlugin { this.usingBrowsertime = true; break; } - case 'webpagetest.setup': { - this.usingWebpagetest = true; - break; - } - case 'webpagetest.har': + case 'browsertime.har': { - if ( - (this.usingBrowsertime && message.type === 'browsertime.har') || - (!this.usingBrowsertime && this.usingWebpagetest) - ) { + if (this.usingBrowsertime && message.type === 'browsertime.har') { const group = message.group; let config = { includeAssets: true, diff --git a/lib/plugins/tracestorer/index.js b/lib/plugins/tracestorer/index.js deleted file mode 100644 index 3a1d63566..000000000 --- a/lib/plugins/tracestorer/index.js +++ /dev/null @@ -1,36 +0,0 @@ -import { gzip as _gzip } from 'node:zlib'; -import { promisify } from 'node:util'; -import { SitespeedioPlugin } from '@sitespeed.io/plugin'; -const gzip = promisify(_gzip); - -export default class TraceStorerPlugin extends SitespeedioPlugin { - constructor(options, context, queue) { - super({ name: 'tracestorer', options, context, queue }); - } - - open(context) { - this.storageManager = context.storageManager; - this.alias = {}; - } - processMessage(message) { - switch (message.type) { - case 'browsertime.alias': { - this.alias[message.url] = message.data; - break; - } - case 'webpagetest.chrometrace': { - const json = JSON.stringify(message.data); - - return gzip(Buffer.from(json), { level: 1 }).then(gziped => - this.storageManager.writeDataForUrl( - gziped, - `${message.name}.gz`, - message.url, - undefined, - this.alias[message.url] - ) - ); - } - } - } -} diff --git a/lib/support/annotationsHelper.js b/lib/support/annotationsHelper.js index 1f2e8b477..10923a5d8 100644 --- a/lib/support/annotationsHelper.js +++ b/lib/support/annotationsHelper.js @@ -14,8 +14,6 @@ export function getAnnotationMessage( absolutePagePath + 'data/screenshots/1/afterPageCompleteCheck.' + screenshotType; - } else if (webPageTestResultURL) { - screenshotPath = absolutePagePath + 'data/screenshots/wpt-1-firstView.png'; } const screenshotsEnabledForDatasource = @@ -37,15 +35,10 @@ export function getAnnotationMessage( const s = options.browsertime.iterations > 1 ? 's' : ''; let message = - (screenShotsEnabledInBrowsertime || webPageTestResultURL) && - screenshotsEnabledForDatasource + screenShotsEnabledInBrowsertime && screenshotsEnabledForDatasource ? `

Result - Download HAR

` : `Result ${options.browsertime.iterations} run${s}`; - if (webPageTestResultURL) { - message = message + ` WebPageTest`; - } - if (extraMessage) { message = message + ' - ' + extraMessage; } diff --git a/lib/support/friendlynames.js b/lib/support/friendlynames.js index aaa30bcdf..95f9ce9fb 100644 --- a/lib/support/friendlynames.js +++ b/lib/support/friendlynames.js @@ -544,45 +544,6 @@ export default { } } }, - webpagetest: { - webpagetest: { - SpeedIndex: { - path: 'data.median.firstView.SpeedIndex', - name: 'WebPageTest Speed Index', - format: time.ms - }, - lastVisualChange: { - path: 'data.median.firstView.lastVisualChange', - name: 'WebPageTest Last Visual Change', - format: time.ms - }, - render: { - path: 'data.median.firstView.render', - name: 'WebPageTest First Visual Change', - format: time.ms - }, - visualComplete: { - path: 'data.median.firstView.visualComplete', - name: 'WebPageTest Visual Complete', - format: time.ms - }, - visualComplete95: { - path: 'data.median.firstView.visualComplete95', - name: 'WebPageTest Visual Complete 95', - format: time.ms - }, - TTFB: { - path: 'data.median.firstView.TTFB', - name: 'WebPageTest TTFB', - format: time.ms - }, - fullyLoaded: { - path: 'data.median.firstView.fullyLoaded', - name: 'WebPageTest Fully Loaded', - format: time.ms - } - } - }, gpsi: { gpsi: { performance: {