Created
July 4, 2020 03:36
-
-
Save yangweigbh/e3cdc9fb465aab7fa01dfa281751aec6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (sustainedPerformanceModeInUse) { | |
// Keep at least one core busy. Together with a single threaded benchmark, this | |
// makes the process get multi-threaded setSustainedPerformanceMode. | |
// | |
// We want to keep to the relatively lower clocks of the multi-threaded benchmark | |
// mode to avoid any benchmarks running at higher clocks than any others. | |
// | |
// Note, thread names have 15 char max in Systrace | |
thread(name = "BenchSpinThread") { | |
Process.setThreadPriority(Process.THREAD_PRIORITY_LOWEST) | |
while (true) { | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment