Trace perf: support custom thermal throttling for tests Vendor throttling kicks in rather quickly and starts affecting e.g. cpu/gpu freqs, which can be hard to predict and increases variance in our tests. This change implements support for disabling vendor throttling (re-enabled at the end, including ctrl-C) and using a custom temperature threshold for VIRTUAL-SKIN sensors, which are checked after each test runs. This allows to set the threshold to higher values and run the device hotter without touching cpu/gpu freqs while running tests, and then dissipate heat (if necessary) by sleeps between tests. This also allows to reduce fixed-time sleeps between tests as we're monitoring the temperatures. Only some of our trace tests heat up the device sufficiently to actually require throttling, and with active cooling I was able to avoid sleeps almost through the entire run. However, sleeps might also be needed to prevent battery from discharging, so also add a flag to sleep until a given battery level is reached after each test. Example usage, sleeping between tests until all sensors are below 39C but also battery level is at least 30%: --custom-throttling-temp=39 --min-battery-level=30 Bug: b/315042901 Change-Id: I7660fc36b1103e20e4cc97312d396f3667739481 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5288455 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>