export type ByteEfficiencyProduct = { items: Array; wastedBytesByUrl?: Map | undefined; headings: LH.Audit.Details.Opportunity["headings"]; displayValue?: import("../../index.js").IcuMessage | undefined; explanation?: import("../../index.js").IcuMessage | undefined; warnings?: (string | import("../../index.js").IcuMessage)[] | undefined; sortedBy?: string[] | undefined; }; /** * @typedef {object} ByteEfficiencyProduct * @property {Array} items * @property {Map=} wastedBytesByUrl * @property {LH.Audit.Details.Opportunity['headings']} headings * @property {LH.IcuMessage} [displayValue] * @property {LH.IcuMessage} [explanation] * @property {Array} [warnings] * @property {Array} [sortedBy] */ /** * @overview Used as the base for all byte efficiency audits. Computes total bytes * and estimated time saved. Subclass and override `audit_` to return results. */ export class ByteEfficiencyAudit extends Audit { /** * Creates a score based on the wastedMs value using log-normal distribution scoring. A negative * wastedMs will be scored as 1, assuming time is not being wasted with respect to the opportunity * being measured. * * @param {number} wastedMs * @return {number} */ static scoreForWastedMs(wastedMs: number): number; /** * @param {LH.Artifacts} artifacts * @param {LH.Audit.Context} context * @return {Promise} */ static audit(artifacts: LH.Artifacts, context: LH.Audit.Context): Promise; /** * Computes the estimated effect of all the byte savings on the provided graph. * * @param {Array} results The array of byte savings results per resource * @param {LH.Gatherer.Simulation.GraphNode} graph * @param {LH.Gatherer.Simulation.Simulator} simulator * @param {{label?: string, providedWastedBytesByUrl?: Map}=} options * @return {{savings: number, simulationBeforeChanges: LH.Gatherer.Simulation.Result, simulationAfterChanges: LH.Gatherer.Simulation.Result}} */ static computeWasteWithGraph(results: Array, graph: LH.Gatherer.Simulation.GraphNode, simulator: LH.Gatherer.Simulation.Simulator, options?: { label?: string; providedWastedBytesByUrl?: Map; } | undefined): { savings: number; simulationBeforeChanges: LH.Gatherer.Simulation.Result; simulationAfterChanges: LH.Gatherer.Simulation.Result; }; /** * @param {ByteEfficiencyProduct} result * @param {LH.Gatherer.Simulation.Simulator} simulator * @param {LH.Artifacts.MetricComputationDataInput} metricComputationInput * @param {LH.Audit.Context} context * @return {Promise} */ static createAuditProduct(result: ByteEfficiencyProduct, simulator: LH.Gatherer.Simulation.Simulator, metricComputationInput: LH.Artifacts.MetricComputationDataInput, context: LH.Audit.Context): Promise; /** * @param {LH.Artifacts} artifacts * @param {Array} networkRecords * @param {LH.Audit.Context} context * @return {ByteEfficiencyProduct|Promise} */ static audit_(artifacts: LH.Artifacts, networkRecords: Array, context: LH.Audit.Context): ByteEfficiencyProduct | Promise; } import { Audit } from '../audit.js'; //# sourceMappingURL=byte-efficiency-audit.d.ts.map