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

ci: fix ui thread starvation in benchmarks #2009

Merged
merged 1 commit into from
Jul 28, 2022

Conversation

armcknight
Copy link
Member

@armcknight armcknight commented Jul 27, 2022

Maxing out CPU with a hot while loop also prevented the test runner app from
being able to query the accessibility system to hit the stop button. This causes
lots of retries and eventual failures or timeouts in other areas, and the tests
to run a long time in general.

Instead of having a button press stop the benchmark and contending for time on
the main run loop, just remove the start/stop buttons and start when the view
controller appears, and set a 15 second delay to stop the benchmarks. Then the
test runner queries the text field for results as usual. Removing the steps needed
to press the start and stop buttons also saves time.

#skip-changelog

Maxing out CPU with a hot while loop also prevented the test runner app from
being able to query the accessibility system to hit the stop button. This causes
lots of retries and eventual failures or timeouts in other areas, and the tests
to run a long time in general.

Instead of having a button press stop the benchmark and contending for time on
the main run loop, just remove the start/stop buttons and start when the view
controller appears, and set a 15 minute delay to stop the benchmarks. Then the
test runner queries the text field for results as usual.
Copy link
Contributor

@brustolin brustolin left a comment

Choose a reason for hiding this comment

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

LGTM

@armcknight armcknight merged commit 91cf82a into master Jul 28, 2022
@armcknight armcknight deleted the armcknight/fix-benchmark-ui-thread-starvation branch July 28, 2022 00:03
kevinrenskers added a commit that referenced this pull request Aug 1, 2022
* master:
  ci: benchmarking and profile generation improvements (#2022)
  release: 7.23.0
  fix: Bad merge on CHANGELOG.md (#2020)
  fix: Log empty samples instead of collecting stacks for idle threads (#2013)
  fix: Handle failure to read thread priority gracefully (#2015)
  fix: Remove logging that could occur while a thread is suspended (#2014)
  fix: Use constant for max thread name size instead of magic number (#2012)
  Disable flaky tesDefaultMaxEnvelopesConcurrent (#2018)
  Fix build failure in unit tests (#2019)
  Fix address sanitizer compilation error (#1996)
  fix: Sauce labs iPhone 13 pro iOS version
  feat: Add transaction to baggage and trace headers (#1992)
  ci: fix ui thread starvation in benchmarks (#2009)
  fix: Add more descriptive deprecation message for enableProfiling (#2011)
  feat: Add sampling configuration for profiling (#2004)
  fix log message option name (#2006)
  meta: add armcknight as a codeowner (#2008)
  release: 7.22.0
  fix: Disable broken LaunchUITests to unblock release (#2003)

# Conflicts:
#	Samples/iOS-Swift/iOS-Swift/ViewControllers/PerformanceViewController.swift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants