How to use pagexray - 2 common examples

To help you get started, we’ve selected a few pagexray examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sitespeedio / coach / lib / index.js View on Github external
function getPagesFromHar(harJson, options) {
  return pagexray.convert(harJson, {
    includeAssets: true,
    firstParty: options.firstParty
  });
}
github sitespeedio / sitespeed.io / lib / plugins / pagexray / index.js View on Github external
break;
      }
      case 'webpagetest.har':
      case 'browsertime.har': {
        if (
          this.usingBrowsertime ||
          (!this.usingBrowsertime && this.usingWebpagetest)
        ) {
          const group = message.group;
          let config = {
            includeAssets: true,
            firstParty: this.options.firstParty
              ? this.options.firstParty
              : undefined
          };
          const pageSummary = pagexray.convert(message.data, config);
          //check and print any http server error > 399
          for (let summary of pageSummary) {
            if (Object.keys(summary.responseCodes).some(code => code > 399)) {
              for (let asset of summary.assets) {
                if (asset.status > 399) {
                  log.info(
                    `The server responded with a ${
                      asset.status
                    } status code for ${h.short(asset.url, 60)}`
                  );
                }
              }
            }
          }
          pagexrayAggregator.addToAggregate(pageSummary, group);

pagexray

Xray your HAR file and know all about the page

MIT
Latest version published 1 year ago

Package Health Score

55 / 100
Full package analysis

Popular pagexray functions