Quantcast
Viewing latest article 24
Browse Latest Browse All 40

Answer by Max for Is it possible to set custom CPU throttling in Chrome DevTools?

Lighthouse uses Emulation.setCPUThrottlingRate command in the Chrome DevTools Protocol:

https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setCPUThrottlingRate

You can monitor the protocol this way:

https://umaar.com/dev-tips/166-protocol-monitor/

You'll see this command in the protocol log when you switch with the throttling setting in the performance panel.

If you're asking how to be sure if it works - here is the implementation from Chromium source code:

https://github.com/chromium/chromium/blob/master/third_party/blink/renderer/platform/scheduler/util/thread_cpu_throttler.h#L21

// This class is used to slow down the main thread for // inspector "cpu throttling". It does it by spawning an // additional thread which frequently interrupts main thread // and sleeps.

Hope this helps.


Viewing latest article 24
Browse Latest Browse All 40

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>