Closed
Bug 819080
Opened 12 years ago
Closed 11 years ago
[FMRadio] "ready to use" perf measurement
Categories
(Firefox OS Graveyard :: Gaia::FMRadio, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: pla, Assigned: hub)
References
Details
(Keywords: perf, Whiteboard: [c=automation p=4 s= u=] interaction)
Attachments
(2 files, 4 obsolete files)
What makes it feel slow/broken? It takes a little longer to startup the FM Radio app after a device reset/startup. Timed consistently at 2.3 seconds on Unagi running Dec. 6th nightly. David Clarke to provide more accurate, recent numbers. Did it prevent you from doing what you wanted? Why? FM Radio is a core entertainment app for our target launch market. While 2.3 seconds isn't too bad, any gains we can make here would be important. How does this make you feel? [ ] :) I feel happy about it [X] :| Meh [ ] :( I'm upset [ ] >:O I'm angry Device: Original numbers from Unagi, Dec. 6th nightly. David Clarke to get Otoro numbers. Details: B2G on Unagi: 2.3 seconds Android ICS 4.0.4 on Otoro: 1.6 seconds David Clarke to provide updated B2G on Otoro numbers. Bonus: can you attach a video of the problem? See metabug 814981
Comment 1•12 years ago
|
||
Hi Peter, The long start up time is resulted from that when we enable FM radio, hal takes about 2.2 seconds to get ready. If we want shorter time, we may need vendor's support.
Updated•11 years ago
|
Whiteboard: interaction → interaction [c= ]
Assignee | ||
Comment 2•11 years ago
|
||
Peter, is this still a problem on Unagi? Is it also a problem devices that ships (Alcatel/TCL, ZTE Open) ? Strangely the problem doesn't show up in datazilla, but I'm not sure that we actually measure it properly. Thanks,
Flags: needinfo?(pla)
Updated•11 years ago
|
Assignee: nobody → hub
Status: NEW → ASSIGNED
Whiteboard: interaction [c= ] → interaction [c= p=]
Assignee | ||
Comment 3•11 years ago
|
||
This just a debugging patch. Apply it, then start the FMRadio app. in the logcat we should see: E/GeckoConsole( 112): Content JS LOG at app://system.gaiamobile.org/js/window_manager.js:730 in appLoadedHandler: apploadtime sent E/GeckoConsole( 501): Content JS LOG at app://fm.gaiamobile.org/js/fm.js:189 in enableFMRadio: enabling the FMRadio That show the HAL is initialised AFTER the load startup measurement. This confirm why it isn't measure in the perf bigdata.
Assignee | ||
Updated•11 years ago
|
Whiteboard: interaction [c= p=] → interaction [c= p=3]
Assignee | ||
Comment 5•11 years ago
|
||
With this Gecko patch we measure the initialization time and log it into the logcat. Look for "Perf:FMRadio:Enable"
Assignee | ||
Comment 6•11 years ago
|
||
Comment on attachment 793438 [details] [diff] [review] Bug 819080 - Part 1: Timing of the FM Radio hardware initialisation. Adding Pin Zhang to review.
Attachment #793438 -
Flags: review?(pzhang)
Comment 7•11 years ago
|
||
Comment on attachment 793438 [details] [diff] [review] Bug 819080 - Part 1: Timing of the FM Radio hardware initialisation. Review of attachment 793438 [details] [diff] [review]: ----------------------------------------------------------------- Will the log message be shown in production? If not, we should use |debug| instead of |widow.dump|. ::: dom/fm/DOMFMRadioParent.jsm @@ +335,4 @@ > this._enabling = true; > let self = this; > > + let t0 = 0; You don't have to init the variable here. @@ +340,4 @@ > FMRadio.addEventListener("enabled", function on_enabled() { > + let t1 = Date.now(); > + let timing = t1 - t0; > + dump("Perf:FMRadio:Enable " + timing + " ms."); I think |dump| won't append |\n| for you, so the log message will be messed with the following one, how about: dump("Perf:FMRadio:Enable " + (Date.now() - timeStart) + " ms.\n"); then you don't have to define the temp vars |t1| and |timing|. @@ +362,4 @@ > ppmm.broadcastAsyncMessage("DOMFMRadio:frequencyChange", { }); > }); > > + t0 = Date.now(); t0 doesn't mean anything, how about rename it to startTime, and you can init it here intead in line338: let startTime = Date.now();
Attachment #793438 -
Flags: review?(pzhang) → review-
Assignee | ||
Comment 8•11 years ago
|
||
Addressed comment from previous review.
Attachment #793438 -
Attachment is obsolete: true
Attachment #793816 -
Flags: review?(pzhang)
Assignee | ||
Comment 9•11 years ago
|
||
Sorry, this is actually the version with all the comments addressed.
Attachment #793816 -
Attachment is obsolete: true
Attachment #793816 -
Flags: review?(pzhang)
Attachment #793820 -
Flags: review?(pzhang)
Updated•11 years ago
|
Attachment #793820 -
Flags: review?(pzhang) → review+
Assignee | ||
Comment 10•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/ec5837779ede
Whiteboard: interaction [c= p=3] → interaction [c= p=3] leave-open
Assignee | ||
Updated•11 years ago
|
Whiteboard: interaction [c= p=3] leave-open → interaction [c= p=3] [leave-open]
Assignee | ||
Comment 12•11 years ago
|
||
The test is implemented as such: https://bugzilla.mozilla.org/show_bug.cgi?id=819080 Not sure how to go further to have it added to DataZilla for tracking.
Assignee | ||
Comment 13•11 years ago
|
||
(In reply to Hubert Figuiere [:hub] from comment #12) > The test is implemented as such: > > https://bugzilla.mozilla.org/show_bug.cgi?id=819080 Oops I meant https://github.com/mozilla/b2gperf/pull/14
Assignee | ||
Updated•11 years ago
|
Whiteboard: interaction [c= p=3] [leave-open] → interaction [c= p=1] [leave-open]
Assignee | ||
Comment 14•11 years ago
|
||
(In reply to StevenLee from comment #1) > Hi Peter, > > The long start up time is resulted from that when we enable FM radio, hal > takes about 2.2 seconds to get ready. If we want shorter time, we may need > vendor's support. Steven, We are in the process of setting up automatic performance measurements for this. How do we go on getting the vendor's help to have an engineer fix the actual issue? Thanks,
Flags: needinfo?(slee)
Whiteboard: interaction [c= p=1] [leave-open] → interaction [c= p=4] [leave-open]
Comment 15•11 years ago
|
||
Hi Micheal, Can you find someone to help us on this issue? Thanks.
Flags: needinfo?(slee) → needinfo?(mvines)
Comment 16•11 years ago
|
||
This doesn't seem like that big of a deal TBH:
> How does this make you feel?
> [X] :| Meh
Flags: needinfo?(mvines)
Assignee | ||
Comment 17•11 years ago
|
||
Steven, now that we'll have a way to measure this, who can help us (Mozilla) address the issue and make this faster, since according to comment 1, this is a vendor driver issue. Or maybe it has become a non issue as per comment 16. Thanks
Flags: needinfo?(slee)
Comment 18•11 years ago
|
||
(In reply to Hubert Figuiere [:hub] from comment #17) > Steven, now that we'll have a way to measure this, who can help us (Mozilla) > address the issue and make this faster, since according to comment 1, this > is a vendor driver issue. > Or maybe it has become a non issue as per comment 16. I think we may need the feedback of PM or UX. If they want to make the startup time shorted, we need the vendor's help. If not, it should not be an issue.
Flags: needinfo?(slee)
Assignee | ||
Comment 19•11 years ago
|
||
So basically the last rewrite of the FMRadio module completely broke the test as the log entry has disappeared. *sigh*
Assignee | ||
Comment 20•11 years ago
|
||
In light of everything, morphing this bug into "write perf test".
Blocks: gaia-perf-measure
Summary: [Gaia::FMRadio] Long initial startup time for FMRadio app → [FMRadio] "ready to use" perf measurement
Updated•11 years ago
|
Target Milestone: --- → 1.2 C3(Oct25)
Assignee | ||
Updated•11 years ago
|
Assignee | ||
Updated•11 years ago
|
Priority: -- → P2
Target Milestone: 1.2 C3(Oct25) → ---
Assignee | ||
Updated•11 years ago
|
QA Contact: dclarke
Assignee | ||
Comment 21•11 years ago
|
||
Test writing ongoing in this branch https://github.com/hfiguiere/gaia/compare/bug819080-perf
Assignee | ||
Comment 22•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #785887 -
Attachment is obsolete: true
Updated•11 years ago
|
Whiteboard: interaction [c= p=4] [leave-open] → [c=automation p=4 s= u=] interaction [leave-open]
Assignee | ||
Comment 24•11 years ago
|
||
Comment on attachment 8343828 [details]
Pull request
r?: Julien for the test part, pzhang for the fm radio part.
Attachment #8343828 -
Flags: review?(pzhang)
Attachment #8343828 -
Flags: review?(felash)
Comment 25•11 years ago
|
||
+ PerformanceTestingHelper.dispatch('fm-radio-enabled'); + PerformanceTestingHelper.dispatch('startup-path-done'); The event 'startup-path-done' is defined in tests/performance/startup_events_test.js, right? but what 'fm-radio-enabled' is used for?
Comment 26•11 years ago
|
||
(In reply to Hubert Figuiere [:hub] from comment #19) > So basically the last rewrite of the FMRadio module completely broke the > test as the log entry has disappeared. > > *sigh* I'm sorry rewriting broke this, :(
Assignee | ||
Comment 27•11 years ago
|
||
(In reply to Pin Zhang [:pzhang] from comment #26) > (In reply to Hubert Figuiere [:hub] from comment #19) > > So basically the last rewrite of the FMRadio module completely broke the > > test as the log entry has disappeared. > > > > *sigh* > > I'm sorry rewriting broke this, :( No worries about that.
Assignee | ||
Comment 28•11 years ago
|
||
(In reply to Pin Zhang [:pzhang] from comment #25) > + PerformanceTestingHelper.dispatch('fm-radio-enabled'); > + PerformanceTestingHelper.dispatch('startup-path-done'); > > The event 'startup-path-done' is defined in > tests/performance/startup_events_test.js, right? but what 'fm-radio-enabled' > is used for? These are just "keys" and not events - they mark a specific timing ; they are data for the x-moz-perf event that is sent in shared/js/performance_testing_helper.js. Only the test needs to know about them.
Comment 29•11 years ago
|
||
(In reply to Hubert Figuiere [:hub] from comment #28) > (In reply to Pin Zhang [:pzhang] from comment #25) > > + PerformanceTestingHelper.dispatch('fm-radio-enabled'); > > + PerformanceTestingHelper.dispatch('startup-path-done'); > > > > The event 'startup-path-done' is defined in > > tests/performance/startup_events_test.js, right? but what 'fm-radio-enabled' > > is used for? > > These are just "keys" and not events - they mark a specific timing ; they > are data for the x-moz-perf event that is sent in > shared/js/performance_testing_helper.js. Only the test needs to know about > them. The helper is designed to catch all events _until_ "startup-path-done" is received and log their timestamp :) That's the beauty of it: you can add markers whenever you want.
Updated•11 years ago
|
Attachment #8343828 -
Flags: review?(pzhang) → review+
Comment 30•11 years ago
|
||
Comment on attachment 8343828 [details]
Pull request
I don't see it working on my device?
Even with a connected headphone, it never seems to stop.
Comment 31•11 years ago
|
||
Comment on attachment 8343828 [details]
Pull request
Also, you need to update the unit tests, they currently fail because PerformanceTestingHelper is missing.
You just need to load the file at apps/communications/contacts/test/unit/mock_performance_testing_helper.js, maybe move it to shared/, and use the mocks_helper to manage it.
Comment 32•11 years ago
|
||
Comment on attachment 8343828 [details]
Pull request
r- until these changes are done.
Attachment #8343828 -
Flags: review?(felash) → review-
Assignee | ||
Comment 33•11 years ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #31) > Comment on attachment 8343828 [details] > Pull request > > Also, you need to update the unit tests, they currently fail because > PerformanceTestingHelper is missing. > > You just need to load the file at > apps/communications/contacts/test/unit/mock_performance_testing_helper.js, > maybe move it to shared/, and use the mocks_helper to manage it. Since when did that change? I tested it yesterday.
Comment 34•11 years ago
|
||
I just tested the standalone file, maybe the full suite is working because the mock is loaded elsewhere. But individual files should work in a standalone way as well.
Assignee | ||
Comment 35•11 years ago
|
||
Doing a |APP=fm make test-perf| or just |make test-perf| works. I don't get what the issue that you are having.
Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(felash)
Comment 36•11 years ago
|
||
I was not talking about the perf tests but about the unit tests.
Flags: needinfo?(felash)
Assignee | ||
Comment 37•11 years ago
|
||
Comment on attachment 8343828 [details]
Pull request
Updated pull request to deal with the unit test failure.
The added change is in apps/fm/test/unit/fm_test.js
Attachment #8343828 -
Flags: review- → review?(felash)
Comment 39•11 years ago
|
||
Comment on attachment 8343828 [details]
Pull request
r=me
that was me being stupid and not flashing the new "fm" app...
Thanks
Attachment #8343828 -
Flags: review?(felash) → review+
Assignee | ||
Comment 40•11 years ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #39) > that was me being stupid and not flashing the new "fm" app... You don't want to know how many time this happened to me :-) Thanks !
Assignee | ||
Comment 41•11 years ago
|
||
Travis is green. Merged. https://github.com/mozilla-b2g/gaia/commit/6d8c461b03efe18bcdea34386cdcfbe612b098e0
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [c=automation p=4 s= u=] interaction [leave-open] → [c=automation p=4 s= u=] interaction
Updated•10 years ago
|
Blocks: gaia-perf-events
Updated•10 years ago
|
No longer blocks: gaia-perf-events
You need to log in
before you can comment on or make changes to this bug.
Description
•