Closed
Bug 973188
Opened 11 years ago
Closed 11 years ago
Make the Developer HUD API nicer for Gaia test integration
Categories
(Firefox OS Graveyard :: Gaia, defect)
Firefox OS Graveyard
Gaia
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: janx, Assigned: janx)
References
Details
Attachments
(1 file, 2 obsolete files)
11.48 KB,
patch
|
janx
:
review+
|
Details | Diff | Splinter Review |
The Developer HUD's main objective is to help web developers notice problems in their apps.
While the HUD has already proved useful in manual testing, it would make even more sense to hook it up to Gaia tests and prevent future changes from introducing new problems unnoticed (e.g. too many reflows, too much jank, memory leaks, etc).
Assignee | ||
Updated•11 years ago
|
Depends on: developer-hud
Assignee | ||
Updated•11 years ago
|
OS: Linux → All
Hardware: x86_64 → All
Updated•11 years ago
|
Component: Gaia::UI Tests → Gaia
Assignee | ||
Comment 1•11 years ago
|
||
Note to self: Make the Developer HUD event-based, allowing other to listen in.
Assignee | ||
Comment 2•11 years ago
|
||
Assignee | ||
Comment 3•11 years ago
|
||
WIP.
The current proposal is to use the 'developer-hud-update' event sent on the System App to notify front-end view and tests that a metric has changed.
- The event's target will be the frame that caused the metric change.
- The event's detail will look like: `{app:app://manifest.webapp, metric:jank, value:112, message:'jank: 112ms'}`.
- To listen to it you could proceed like so: https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/devtools_view.js#L11
Etienne and Hubert, would that work well for you?
TODO:
- Figure out good names for the Target prototype methods.
- Remove the `event.detail.metrics` field by making the front-end update metrics individually.
- Make logging depend on a pref.
- Fix FIXMEs, do TODOs.
Flags: needinfo?(hub)
Flags: needinfo?(etienne)
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #8389101 -
Attachment is obsolete: true
Assignee | ||
Comment 5•11 years ago
|
||
Comment on attachment 8389132 [details] [diff] [review]
Make the Developer HUD API nicer for Gaia test integration. r=21
Vivien, does this make sense to you?
Attachment #8389132 -
Flags: review?(21)
Comment 7•11 years ago
|
||
Comment on attachment 8389132 [details] [diff] [review]
Make the Developer HUD API nicer for Gaia test integration. r=21
Review of attachment 8389132 [details] [diff] [review]:
-----------------------------------------------------------------
::: b2g/chrome/content/devtools.js
@@ +250,5 @@
> + this.update(metric, this.metrics.get(metric) + 1, message);
> + },
> +
> + /**
> + * Void a metric value and make sure isn't displayed on the front-end anymore.
s/isn't/it isn't ?
Attachment #8389132 -
Flags: review?(21) → review+
Assignee | ||
Comment 8•11 years ago
|
||
Dietrich, just giving you the heads up that this changes the logging format a bit. It will look like:
> I/GeckoDump( 2201): DeveloperHUD: [app://system.gaiamobile.org/manifest.webapp] reflow: 2.78ms
> I/GeckoDump( 2201): DeveloperHUD: [app://keyboard.gaiamobile.org/manifest.webapp] jank: 146ms
Additionally, you can also watch app metrics by listening for 'developer-hud-update' events on the System App (see comment #3).
Caveat: Changes to the 'memory' metric (app window memory, we have no uss info yet) are sent as events, but are not dumped in the console. Would you like them to be dumped as well?
Flags: needinfo?(dietrich)
Assignee | ||
Comment 9•11 years ago
|
||
Attachment #8389132 -
Attachment is obsolete: true
Assignee | ||
Comment 10•11 years ago
|
||
Comment on attachment 8389303 [details] [diff] [review]
Make the Developer HUD API nicer for Gaia test integration. r=21
Review of attachment 8389303 [details] [diff] [review]:
-----------------------------------------------------------------
21's r+
Attachment #8389303 -
Flags: review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 11•11 years ago
|
||
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
Comment 13•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Updated•11 years ago
|
Flags: needinfo?(etienne)
You need to log in
before you can comment on or make changes to this bug.
Description
•