1.3s is yellow, >3.5s is red p10: 1282, median: 3500, thresholdInMs: 50, }; } /** * @param {LH.Artifacts} artifacts * @param {LH.Audit.Context} context * @return {Promise} */ static async getTbtImpact(artifacts, context) { let tbtImpact = 0; try { const metricComputationData = Audit.makeMetricComputationDataInput(artifacts, context); const tasks = await TBTImpactTasks.request(metricComputationData, context); for (const task of tasks) { const groupId = task.group.id; if (groupId !== 'scriptEvaluation' && groupId !== 'scriptParseCompile') continue; tbtImpact += task.selfTbtImpact; } } catch (err) { Sentry.captureException(err, { tags: {audit: this.meta.id}, level: 'error', }); log.error(this.meta.id, err.message); } return tbtImpact; } /** * @param {LH.Artifacts} artifacts * @param {LH.Audit.Context} context * @return {Promise} */ static async audit(artifacts, context) { const settings = context.settings || {}; const trace = artifacts.traces[BootupTime.DEFAULT_PASS]; const devtoolsLog = artifacts.devtoolsLogs[BootupTime.DEFAULT_PASS]; const networkRecords = await NetworkRecords.request(devtoolsLog, context); const tasks = await MainThreadTasks.request(trace, context); const multiplier = settings.throttlingMethod === 'simulate' ? settings.throttling.cpuSlowdownMultiplier : 1; const executionTimings = getExecutionTimingsByURL(tasks, networkRecords); // Exclude our own tasks. executionTimings.delete('_lighthouse-eval.js'); const tbtImpact = await this.getTbtImpact(artifacts, context); let hadExcessiveChromeExtension = false; let totalBootupTime = 0; const results = Array.from(executionTimings) .map(([url, timingByGroupId]) => { // Add up the totalExecutionTime for all the taskGroups let totalExecutionTimeForURL = 0; for (const [groupId, timespanMs] of Object.entries(timingByGroupId)) { timingByGroupId[groupId] = timespanMs * multiplier; totalExecutionTimeForURL += timespanMs * multiplier; } const scriptingTotal = timingByGroupId[taskGroups.scriptEvaluation.id] || 0; const parseCompileTotal = timingByGroupId[taskGroups.scriptParseCompile.id] || 0; // Add up all the JavaScript time of shown URLs if (totalExecutionTimeForURL >= context.options.thresholdInMs) { totalBootupTime += scriptingTotal + parseCompileTotal; } hadExcessiveChromeExtension = hadExcessiveChromeExtension || (url.startsWith('chrome-extension:') && scriptingTotal > 100); return { url: url, total: totalExecutionTimeForURL, // Highlight the JavaScript task costs scripting: scriptingTotal, scriptParseCompile: parseCompileTotal, }; }) .filter(result => result.total >= context.options.thresholdInMs) .sort((a, b) => b.total - a.total); // TODO: consider moving this to core gathering so you don't need to run the audit for warning let runWarnings; if (hadExcessiveChromeExtension) { runWarnings = [str_(UIStrings.chromeExtensionsWarning)]; } /** @type {LH.Audit.Details.Table['headings']} */ const headings = [ {key: 'url', valueType: 'url', label: str_(i18n.UIStrings.columnURL)}, {key: 'total', granularity: 1, valueType: 'ms', label: str_(UIStrings.columnTotal)}, {key: 'scripting', granularity: 1, valueType: 'ms', label: str_(UIStrings.columnScriptEval)}, {key: 'scriptParseCompile', granularity: 1, valueType: 'ms', label: str_(UIStrings.columnScriptParse)}, ]; const details = BootupTime.makeTableDetails(headings, results, {wastedMs: totalBootupTime, sortedBy: ['total']}); const score = Audit.computeLogNormalScore( {p10: context.options.p10, median: context.options.median}, totalBootupTime ); return { score, scoreDisplayMode: score >= Util.PASS_THRESHOLD ? Audit.SCORING_MODES.INFORMATIVE : undefined, notApplicable: !results.length, numericValue: totalBootupTime, numericUnit: 'millisecond', displayValue: totalBootupTime > 0 ? str_(i18n.UIStrings.seconds, {timeInMs: totalBootupTime}) : '', details, runWarnings, metricSavings: { TBT: tbtImpact, }, }; } } export default BootupTime; export {UIStrings};>
Vai ai contenuti
Società di produzione Teatro e Musical
Prossimamente a Teatro
Le scorse Tournée
A Peter Pan Fantasy Musical
Roma Teatro Orione -  sabato 9 dicembre 2023
A Christmas Carol Musical
Dal 2017 129 repliche, oltre 100 sold-out,
6 standing ovation con oltre 130000 presenze di cui oltre 30000 bambini
La Bella e la Bestia Musical
Oltre quindicimila bambini e genitori incantati dalla magia dello spettacolo,
dalle incantevoli musiche e dai nuovi fantastici personaggi
Mortina Musical
Lo spettacolo è tratto dalla fortunatissima serie “Mortina” della geniale autrice
e illustratrice Barbara Cantini
5 libri in soli 4 anni, tradotto in 32 lingue nel mondo e più di 100.000 copie vendute solo in Italia!
Aladino La Lampada meravigliosa Musical
Direttamente dal palcoscenico
Video dello Spettacolo a Christmas Carol
-
Icona Newsletter ItaliaShow


Teatro, Musical e Concerti
Distribuzione Spettacoli e Booking
Marketing per lo Spettacolo
Biglietteria Ticketone
WhatsApp - 392.4550795

© 2020 ItaliaShow Srl
Partita IVA 02661620993
Registro Imprese di Genova GE-502515
16129 Genova - C.so Buenos Aires 99r
info@italiashow.it - italiashow@pec.it

Powered by ItaliaShow.it
Torna ai contenuti