Closed Bug 1536523 Opened 5 years ago Closed 5 years ago

Make `console.table` work with `performance.getEntries()`

Categories

(DevTools :: Console, defect, P3)

68 Branch
Desktop
All
defect

Tracking

(firefox72 fixed)

RESOLVED FIXED
Firefox 72
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:

  1. Open devtools on any page
  2. 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.

Component: Untriaged → Console
OS: Unspecified → All
Product: Firefox → DevTools
Hardware: Unspecified → Desktop

This is probably because we are retrieving own properties, and entries performance data are not defined in own properties.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Summary: Devtools: Make `console.table` work with `performance.getEntries()` → Make `console.table` work with `performance.getEntries()`

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

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1680a0b08a76
Support performance.getEntries result in console.table. r=Honza.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 72
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: