Show a message when using console.profile with the new performance panel enabled
Categories
(DevTools :: Performance Tools (Profiler/Timeline), task, P3)
Tracking
(firefox94 fixed)
Tracking | Status | |
---|---|---|
firefox94 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
(Blocks 2 open bugs)
Details
Attachments
(2 files, 1 obsolete file)
See https://bugzilla.mozilla.org/show_bug.cgi?id=1693316#c9
With the new performance panel, console.profile is currently a no-op and doesn't show any message to the user.
It's unclear how much this feature is used. In a first step we should at least show a message so that users know the feature only works with the old panel, and link to the bug where support will be added.
We could also add some event telemetry to get an idea of the feature usage. Would need to have something to compare it to though, as an absolute number would be pretty useless. Maybe perf panel opens vs console.profile usage?
Assignee | ||
Comment 1•3 years ago
|
||
We should keep in mind console.profile can be triggered by user inputs in the Console panel, as well as by content scripts which would simply contain console.profile
statements. Meaning the starting point for this should always be the Console implementation on platform side.
Step by step, we have the following:
1/ platform: Console.cpp notifies observers about "console-api-profiler" https://searchfox.org/mozilla-central/rev/1761c710b035d7dc8892dfa8e56589b4e095221f/dom/console/Console.cpp#1211
2/ devtools server: The profiler observes the notification and emits a corresponding event https://searchfox.org/mozilla-central/rev/1761c710b035d7dc8892dfa8e56589b4e095221f/devtools/server/performance/profiler.js#328
3/ devtools server: The performance recorder catches the event from the profiler and starts/stops a recording https://searchfox.org/mozilla-central/rev/1761c710b035d7dc8892dfa8e56589b4e095221f/devtools/server/performance/recorder.js#160,162
2 & 3 only occur if the old performance panel is used and therefore the DevTools performance actors are started.
From a user point of view, when using console.profile()
, undefined
is always logged.
Assignee | ||
Comment 2•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 3•3 years ago
|
||
Assignee | ||
Comment 4•3 years ago
|
||
Depends on D125699
Comment 6•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b6066cc8f700
https://hg.mozilla.org/mozilla-central/rev/ebc89de3f27b
Description
•