How to use the lighthouse-logger.getTimeEntries function in lighthouse-logger

To help you get started, we’ve selected a few lighthouse-logger 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 GoogleChrome / lighthouse / lighthouse-core / gather / gather-runner.js View on Github external
static finalizeBaseArtifacts(baseArtifacts) {
    // Take only unique LighthouseRunWarnings.
    baseArtifacts.LighthouseRunWarnings = Array.from(new Set(baseArtifacts.LighthouseRunWarnings));

    // Take the timing entries we've gathered so far.
    baseArtifacts.Timing = log.getTimeEntries();
  }
github GoogleChrome / lighthouse / lighthouse-core / gather / gather-runner.js View on Github external
gathererArtifacts[gathererName] = /** @type {NonVoid} */ (artifact);
      } catch (err) {
        // Return error to runner to handle turning it into an error audit.
        gathererArtifacts[gathererName] = err;
      }

      if (gathererArtifacts[gathererName] === undefined) {
        throw new Error(`${gathererName} failed to provide an artifact.`);
      }
    }

    // Take only unique LighthouseRunWarnings.
    baseArtifacts.LighthouseRunWarnings = Array.from(new Set(baseArtifacts.LighthouseRunWarnings));

    // Take the timing entries we've gathered so far.
    baseArtifacts.Timing = log.getTimeEntries();

    // TODO(bckenny): correct Partial at this point to drop cast.
    return /** @type {LH.Artifacts} */ ({...baseArtifacts, ...gathererArtifacts});
  }