Make `console.table` work with `performance.getEntries()`
Categories
(DevTools :: Console, defect, P3)
Tracking
(firefox72 fixed)
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: jakub.g.opensource, Assigned: nchevobbe)
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0
Steps to reproduce:
- Open devtools on any page
- Run in console:
A> console.table(performance.getEntries())
B> console.table(performance.getEntries(), ['type', 'name', 'duration'])
Actual results:
A> You see a table with just one column (indices of entries)
B> You see a table with (index) + 3 columns, but they are all undefined
Expected results:
You should have seen a nice table with multiple columns and their corresponding values.
It works fine in Chrome and Edge.
Perhaps the solution is to call .toJSON() on each entry before rendering its contents into console.table
.
Assignee | ||
Comment 2•5 years ago
|
||
This is probably because we are retrieving own properties, and entries performance data are not defined in own properties.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
PerformanceEntry values are put in the getterValue
property in
the descriptor, so whenever we want to display a table we need
to check if the value could be in there.
This highlighted an issue in the console layout when there is a
large number of cells, which we fix in this patch.
Depends on D54260
Assignee | ||
Comment 4•5 years ago
|
||
TRY looks happy for the whole patch queue https://treeherder.mozilla.org/#/jobs?repo=try&revision=c28d24ff5262034ec9e2c0a857be56c8ff80c6f7
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1680a0b08a76 Support performance.getEntries result in console.table. r=Honza.
Comment 6•5 years ago
|
||
bugherder |
Description
•