Skip to content

Commit

Permalink
fix(Page.getMetrics): do not report a few metrics (#1001)
Browse files Browse the repository at this point in the history
A few of the reported metrics in the Page.getMetrics are already
reported with lifecycle events.

This patch excludes these metrics for now.
  • Loading branch information
aslushnikov committed Oct 10, 2017
1 parent b82d319 commit 464b6a9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
3 changes: 0 additions & 3 deletions docs/api.md
Expand Up @@ -663,9 +663,6 @@ If there's no element matching `selector`, the method throws an error.
- `TaskDuration` <[number]> Combined duration of all tasks performed by the browser.
- `JSHeapUsedSize` <[number]> Used JavaScript heap size.
- `JSHeapTotalSize` <[number]> Total JavaScript heap size.
- `FirstMeaningfulPaint` <[number]> Timestamp of the first meaningful paint event.
- `DomContentLoaded` <[number]> Timestamp of the DOM content loaded event.
- `NavigationStart` <[number]> Timestamp of the navigation start event.

> **NOTE** All timestamps are in monotonic time: monotonically increasing time in seconds since an arbitrary point in the past.
Expand Down
3 changes: 0 additions & 3 deletions lib/Page.js
Expand Up @@ -824,9 +824,6 @@ const supportedMetrics = new Set([
'TaskDuration',
'JSHeapUsedSize',
'JSHeapTotalSize',
'FirstMeaningfulPaint',
'DomContentLoaded',
'NavigationStart',
]);

/** @enum {string} */
Expand Down
3 changes: 0 additions & 3 deletions test/test.js
Expand Up @@ -777,9 +777,6 @@ describe('Page', function() {
'TaskDuration',
'JSHeapUsedSize',
'JSHeapTotalSize',
'FirstMeaningfulPaint',
'DomContentLoaded',
'NavigationStart',
]);
for (const name in metrics) {
expect(metricsToCheck.has(name)).toBeTruthy();
Expand Down

0 comments on commit 464b6a9

Please sign in to comment.