Closed Bug 936676 Opened 6 years ago Closed 5 years ago

[gaiatest][b2gperf] match the apploadtime event with the application being launched

Categories

(Firefox OS Graveyard :: Performance, defect, P3)

ARM
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: alive, Unassigned, Mentored)

References

Details

(Keywords: perf, Whiteboard: [c=automation p= s= u=] [lang=py])

Bug 907013 would change the way publishing events.
After that please use
evt.detail.manifestURL to do app match. (or name?)
Could you please clarify what's changing and what the alternative will be? I'm also interested to understand the reasons for the change. Several packages currently rely on the apploadtime event, including gaiatest (for indication that an app has loaded) and b2gperf (for measuring cold/warm startup times). Also, several packages rely on gaiatest so a change there will have an affect on tools such as b2gperf and Eideticker.
Flags: needinfo?(alive)
It's a cleanup to how we dispatch events.
https://github.com/mozilla-b2g/gaia/pull/13533/files#diff-f082b39d746bbf09333b1eef887d5678R188

The main reason is that I don't want other modules to know the detail of how we composing an app, and there's really lots of events implemented in a messy, so I grouped them and changed it to publishing on the iframe's container or just on window itself.

To me, "There're several packages relying on old window management" really is not a reason for "we cannot change anything". If pertest is something we really "definitely" cannot change anymore, then, OK, I will reserve a backdoor to it. But this is really a sad thing.
Flags: needinfo?(alive)
BTW in new mechanism, check event.detail.manifestURL to match apps.
(In reply to Alive Kuo [:alive][NEEDINFO] from comment #2)
> To me, "There're several packages relying on old window management" really
> is not a reason for "we cannot change anything".

It wasn't my intention to suggest that we cannot change anything. I merely wanted to express the impact so that we can be prepared for this. It sounds like immediately after this change lands there will be a not insignificant amount of work to allow all of our dependent tools to continue running and reporting results.

> If pertest is something we
> really "definitely" cannot change anymore, then, OK, I will reserve a
> backdoor to it. But this is really a sad thing.

I still don't fully understand the change. Are you saying there will be no way to wait for the "loadtime" event and capture the time detail from the event?

> BTW in new mechanism, check event.detail.manifestURL to match apps.

I think we only use the app matching in one place but that is on the mozbrowserloadend event, here: https://github.com/mozilla-b2g/gaia/blob/bcb4f94524ef02e9ef16b604d16c39e5a9c41281/tests/python/gaia-ui-tests/gaiatest/gaia_test.py#L431
Okay, from speaking to :alive on IRC it would seem there's nothing to do here for gaiatest or b2gperf as they do not currently match the apploadtime event with the app. This is something we should fix. Let's use this bug to do that, as it has details of how we will match the app once the mentioned changes land.
Depends on: app-window-manager
Summary: [b2gperf] apploadtime event is not fired on iframe soon. → [gaiatest][b2gperf] match the apploadtime event with the application being launched
Whiteboard: [mentor=davehunt][lang=py]
(In reply to Dave Hunt (:davehunt) from comment #5)
> Okay, from speaking to :alive on IRC it would seem there's nothing to do
> here for gaiatest or b2gperf as they do not currently match the apploadtime
> event with the app. This is something we should fix. Let's use this bug to
> do that, as it has details of how we will match the app once the mentioned
> changes land.

Correct!
Keywords: perf
Whiteboard: [mentor=davehunt][lang=py] → [c=automation p= s= u=] [mentor=davehunt][lang=py]
Here in the rework of make test-perf I used event.target.src
(In reply to Hubert Figuiere [:hub] from comment #7)
> Here in the rework of make test-perf I used event.target.src

No, don't use that :( Use event.detail.manifestURL
I've just tried adding this to b2gperf, but the apploadtime event doesn't appear to have event.detail.manifestURL. Am I still missing something?
Flags: needinfo?(alive)
(In reply to Dave Hunt (:davehunt) from comment #9)
> I've just tried adding this to b2gperf, but the apploadtime event doesn't
> appear to have event.detail.manifestURL. Am I still missing something?

Because this depends on 907013's landing. I could checkin another small patch at first if you'd like.
Flags: needinfo?(alive)
Sorry, I missed the dependency. No need to do anything else, I'll pick this up again when it's resolved.
Now that bug 949209 landed on gaia, event.detail contain src for the apploadtime event.
Adding bug 996038 as a See Also since it addresses the app launch events and may obsolete this bug's proposal.
Component: General → Performance
Priority: -- → P3
See Also: → gaia-perf-events
Mentor: dave.hunt
Whiteboard: [c=automation p= s= u=] [mentor=davehunt][lang=py] → [c=automation p= s= u=] [lang=py]
With Raptor we no longer rely on System events for determining application startup progress.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.