Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Unified Diff: third_party/WebKit/Source/devtools/front_end/audits2_worker/Audits2Service.js

Issue 2861053003: DevTools: [lighthouse] Implement performance metrics filmstrip (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/audits2_worker/Audits2Service.js
diff --git a/third_party/WebKit/Source/devtools/front_end/audits2_worker/Audits2Service.js b/third_party/WebKit/Source/devtools/front_end/audits2_worker/Audits2Service.js
index a1a4afad0a2442d663df1198d80e8ad6d36a97db..993a8b766e2ae04145ab0d3093d3c537586569e1 100644
--- a/third_party/WebKit/Source/devtools/front_end/audits2_worker/Audits2Service.js
+++ b/third_party/WebKit/Source/devtools/front_end/audits2_worker/Audits2Service.js
@@ -45,9 +45,18 @@ var Audits2Service = class {
});
return Promise.resolve()
- .then(_ => self.runLighthouseInWorker(this, params.url, undefined, params.categoryIDs))
- .then(/** @type {!ReportRenderer.ReportJSON} */ result => result)
- .catchException(null);
+ .then(_ => self.runLighthouseInWorker(this, params.url, undefined, params.categoryIDs))
+ .then(/** @type {!ReportRenderer.ReportJSON} */ result => {
+ // Filter out artifacts except for screenshots in traces to minimize report size.
+ var traces = result['artifacts']['traces'];
+ for (var pass in traces) {
+ traces[pass]['traceEvents'] =
+ traces[pass]['traceEvents'].filter(e => e['cat'] === 'disabled-by-default-devtools.screenshot');
+ }
+ result['artifacts'] = {traces: traces};
+ return result;
+ })
+ .catchException(null);
}
/**

Powered by Google App Engine
This is Rietveld 408576698