Bye bye wpt (#4085)

* Bye WebPageTest

* remove more
This commit is contained in:
Peter Hedenskog 2024-04-29 08:37:29 +02:00 committed by GitHub
parent 13770c35a1
commit f886e0b6ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
30 changed files with 15 additions and 375 deletions

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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 (

View File

@ -17,8 +17,6 @@ function shouldIgnoreMessage(message) {
'browsertime.asyncscripts',
'compare.setup',
'sitespeedio.setup',
'webpagetest.har',
'webpagetest.setup',
'aggregateassets.summary',
'slowestassets.summary',
'largestassets.summary',

View File

@ -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'

View File

@ -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)) {

View File

@ -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] ===

View File

@ -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
);

View File

@ -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');
}

View File

@ -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(

View File

@ -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
);

View File

@ -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

View File

@ -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',

View File

@ -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,

View File

@ -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':

View File

@ -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(

View File

@ -75,13 +75,5 @@ export default {
co2PerPageView: {},
co2FirstParty: {},
co2ThirdParty: {}
},
webpagetest: {
SpeedIndex: {},
lastVisualChange: {},
render: {},
visualComplete: {},
visualComplete95: {},
fullyLoaded: {}
}
};

View File

@ -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')}.

View File

@ -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')}.

View File

@ -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)

View File

@ -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

View File

@ -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';
}

View File

@ -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
);

View File

@ -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
);

View File

@ -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;

View File

@ -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,

View File

@ -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]
)
);
}
}
}
}

View File

@ -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
? `<a href='${resultPageUrl}' target='_blank'><img src='${screenshotPath}' ${screenshotSize}></a><p><a href='${resultPageUrl}'>Result</a> - <a href='${harPath}'>Download HAR</a></p>`
: `<a href='${resultPageUrl}' target='_blank'>Result ${options.browsertime.iterations} run${s}</a>`;
if (webPageTestResultURL) {
message = message + ` <a href='${webPageTestResultURL}'>WebPageTest</a>`;
}
if (extraMessage) {
message = message + ' - ' + extraMessage;
}

View File

@ -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: {