-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[e2e] Add customizable flutter_driver
adaptor
#2859
Conversation
cbe4b39
to
927cfe6
Compare
392871b
to
3a24002
Compare
Looking at this a bit more, I think it would be better if we just offered some kind of API to get the timeline at various points, and to help with starting/stopping recording. I don't think this is fine grained enough - someone may want the timeline for just part of their test, and they may not want to write the timeline to a local file system - they might need the test itself to send the timeline somewhere else. Can we re-think the design here to handle that kind of use case? |
The hard part is, the test is driven on the device, and the timeline is collected on host. The generation of the timeline is distributed in framework and engine which we have very limited control. To achieve that there will have to be conversation between the device and the host, making the device side test code depending directly or indirectly on |
The timeline is actually connected on the device by the driver extension. It's fine to make it easier to shovel it over to the host to write, but we should expose an easier way to just collect it whether you end up using the driver extension or not. |
So if the collecting and processing of timeline is completely on device, it makes finer graining but:
I understand this PR doesn't provide a perfect solution, and that's why in the PR description I said
The finer grain version should be do-able, but for my project I don't think I should invest more time on it because this feature is not critical for me. It will be great if this PR lands and I can use this feature for my project, otherwise I will put these codes separately in my project. However I still feel this PR is useful. My example use case would be to measure the binding overhead. See this repo Our (with @liyuqian) original plan for the performance test metrics is to implement a frame build time statistics API in or out of E2E, but independent of the Dart timeline, both for the purpose of host independency and for the purpose of using it in release mode. |
@dnfield Would you mind letting me know if we finally decide to refuse this PR? I will need to add new features as flutter/flutter#61490 and I don't want to introduce conflicts. |
I'd prefer to see a solution for this that does not require a host device to be attached. For example, we should support getting timeline information on Firebase Testlab. |
@dnfield I think timeline requires vmservice, which I'm not sure how to have it enabled for an app running completely without a host. |
https://github.com/flutter/flutter/pull/61509/files#diff-73e66281b14c792afcdcd20acb9edd92R5 says that this is blocking that PR. I wonder what's the future plan for this PR? |
@liyuqian I didn't update here because @dnfield mentioned:
I am not planning on implementing a host-independent timeline collection but #2873 would be an infra for that. It might make sense to modify what's here to make a new PR, with an |
21d5292
to
5ab1b59
Compare
5ab1b59
to
af57e0a
Compare
Description
Add a customizable
flutter_driver
adaptor, allowing changing timeout time, flag to enable timeline tracing.A use case is here where I'm using the timeline to estimate overhead of
E2E
andflutter_driver
(E2E is better!)Related Issues
Not a full implementation but can be considered a work around for flutter/flutter#58789
Test
It seems that we don't yet have unit test for E2E. I changed the related example.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).flutter analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?