class CpuStressor
Defined at line 90 of file ../../src/zircon/bin/hwstress/cpu_stressor.h
A CpuStressor performs the given workload on multiple CPUs in the system,
coordinating the creation and destruction of threads.
Public Methods
void ~CpuStressor ()
Defined at line 92 of file ../../src/zircon/bin/hwstress/cpu_stressor.cc
void CpuStressor (std::vector<uint32_t> cores_to_test, std::function<void (WorkIndicator)> workload, double utilization, ProfileManager * manager)
Create a CPU stressor that runs the given workload function.
|workload| should loop until the given StopIndicator has its
|ShouldStop| method return true.
|utilization| should be a value between 0.0 and 1.0 indicating the
fraction of CPU that should be used in the long run.
Defined at line 72 of file ../../src/zircon/bin/hwstress/cpu_stressor.cc
void CpuStressor (std::vector<uint32_t> cores_to_test, std::function<void ()> looping_workload, double utilization, ProfileManager * manager)
Create a CPU stressor that calls the given workload function in
a tight loop.
The given workload should perform a small chunk of work (roughly in
the range of 100 microseconds to 10 milliseconds) that exercises the
CPU.
|utilization| should be a value between 0.0 and 1.0 indicating the
fraction of CPU that should be used in the long run.
Defined at line 80 of file ../../src/zircon/bin/hwstress/cpu_stressor.cc
void Start ()
Start the workload. Must not already be started.
Defined at line 94 of file ../../src/zircon/bin/hwstress/cpu_stressor.cc
void Stop ()
Stop the workload, blocking until all threads have completed.
Defined at line 120 of file ../../src/zircon/bin/hwstress/cpu_stressor.cc