Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chromium: Type each character as the screen changes #15173

Merged

Conversation

kalikiana
Copy link
Member

@kalikiana
Copy link
Member Author

openqa-clone-custom-git-refspec #15173 https://openqa.opensuse.org/tests/2443233
Created job #2449803: opensuse-15.3-DVD-Updates-x86_64-Build20220701-1-install_with_updates_gnome@64bit-2G -> https://openqa.opensuse.org/t2449803

@kalikiana kalikiana marked this pull request as ready for review July 4, 2022 14:38
Copy link
Member

@okurz okurz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://openqa.opensuse.org/tests/2449613 took 2m26s for the chromium test module. Your verification run took 3m44s. I don't think the test should be slowed down that significantly. Please check runtime of the module.

@kalikiana
Copy link
Member Author

https://openqa.opensuse.org/tests/2449613 took 2m26s for the chromium test module. Your verification run took 3m44s. I don't think the test should be slowed down that significantly. Please check runtime of the module.

Any suggestions on how to avoid that while still verifying every typed character? I didn't change anything else.

@okurz
Copy link
Member

okurz commented Jul 5, 2022

https://openqa.opensuse.org/tests/2449613 took 2m26s for the chromium test module. Your verification run took 3m44s. I don't think the test should be slowed down that significantly. Please check runtime of the module.

Any suggestions on how to avoid that while still verifying every typed character? I didn't change anything else.

I am not sure if my observation really shows a problem. So to be sure that your changes actually cause this slow-down can you try to run multiple tests with just the "chromium" test module included to check? E.g. call openqa-clone-custom-git-refspec https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/15173 https://openqa.opensuse.org/tests/2450411 SCHEDULE=tests/boot/boot_to_desktop,tests/x11/chromium with https://openqa.opensuse.org/tests/2450411 being "opensuse-Tumbleweed-DVD-x86_64-extra_tests_gnome@64bit" which uses one of the latest Tumbleweed pre-installed qcow files.

The option wait_screen_change seems to be a sensible approach, maybe we just need to tweak it a bit.

https://gist.github.com/okurz/295e2ad3a13a37a02294f0c6c26fe69a is the section of the log where the entering and waiting happens.

Just the first two characters:

[2022-07-04T17:59:25.030514+02:00] [debug] tests/x11/chromium.pm:33 called chromium::type_address -> tests/x11/chromium.pm:20 called testapi::enter_cmd
[2022-07-04T17:59:25.030652+02:00] [debug] <<< testapi::wait_screen_change(timeout=10, similarity_level=50)
[2022-07-04T17:59:25.032396+02:00] [debug] <<< consoles::video_base::type_string(max_interval=250, json_cmd_token="rvBsdwgL", cmd="backend_type_string", text="c")
[2022-07-04T17:59:25.070389+02:00] [debug] waiting for screen change: 0 1000000
[2022-07-04T17:59:25.577352+02:00] [debug] waiting for screen change: 0 1000000
[2022-07-04T17:59:26.080454+02:00] [debug] waiting for screen change: 1 21.236376031981
[2022-07-04T17:59:26.080613+02:00] [debug] >>> testapi::wait_screen_change: screen change seen at 1
[2022-07-04T17:59:26.080818+02:00] [debug] tests/x11/chromium.pm:33 called chromium::type_address -> tests/x11/chromium.pm:20 called testapi::enter_cmd
[2022-07-04T17:59:26.080961+02:00] [debug] <<< testapi::wait_screen_change(timeout=10, similarity_level=50)
[2022-07-04T17:59:26.081879+02:00] [debug] <<< consoles::video_base::type_string(text="h", json_cmd_token="cUPMDVMb", max_interval=250, cmd="backend_type_string")
[2022-07-04T17:59:26.118460+02:00] [debug] waiting for screen change: 0 1000000
[2022-07-04T17:59:26.621285+02:00] [debug] waiting for screen change: 0 1000000
[2022-07-04T17:59:27.125229+02:00] [debug] waiting for screen change: 1 22.3299081718199
[2022-07-04T17:59:27.125328+02:00] [debug] >>> testapi::wait_screen_change: screen change seen at 1

the "waiting for screen change" is done every 500ms and the screen change is only detected in the third iteration. I assume here we would benefit from something similar to the "no_wait" in https://github.com/os-autoinst/os-autoinst/blob/master/testapi.pm#L378 . I suggest to check the implementation of the wait_screen_change option and how that is passed to lower levels, then check the implementation of "no_wait" and then extend to make "no_wait" accessible to all users of the "wait_screen_change" option.

@kalikiana
Copy link
Member Author

Waiting on the results of #2109 for now to confirm how to continue

@okurz
Copy link
Member

okurz commented Jul 7, 2022

Waiting on the results of #2109 for now to confirm how to continue

You don't mean pull request #2109 in this repo, what are you waiting for?

EDIT: Oh, you mean os-autoinst/os-autoinst#2109, right

@kalikiana kalikiana requested a review from okurz July 19, 2022 10:43
@kalikiana
Copy link
Member Author

Apparently looking into optimizing the underlying code is far from trivial, so I'd like to wrap this up as-is. We know it works. See also my comment on the ticket.

Copy link
Member

@okurz okurz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As https://progress.opensuse.org/issues/109737 still doesn't have auto-review or anything let's approve as is despite the slow-down. Created a new ticket https://progress.opensuse.org/issues/114412 to optimize the performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants