File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ use anyhow::Context;
1818
1919use crate :: {
2020 config,
21+ cpu,
2122 system,
2223} ;
2324
@@ -373,9 +374,16 @@ pub fn run(config: config::DaemonConfig) -> anyhow::Result<()> {
373374 let start = Instant :: now ( ) ;
374375
375376 let state = config:: EvalState {
376- // TODO: Actually perform checking.
377- frequency_available : true ,
378- turbo_available : true ,
377+ frequency_available : daemon
378+ . system
379+ . cpus
380+ . iter ( )
381+ . any ( |cpu| cpu. frequency_mhz . is_some ( ) ) ,
382+ turbo_available : cpu:: Cpu :: turbo ( )
383+ . context (
384+ "failed to read CPU turbo boost status for `is-turbo-available`" ,
385+ ) ?
386+ . is_some ( ) ,
379387 cpu_usage : daemon. cpu_log . back ( ) . unwrap ( ) . usage ,
380388 cpu_usage_volatility : daemon. cpu_volatility ( ) . map ( |vol| vol. usage ) ,
381389 cpu_temperature : daemon. cpu_log . back ( ) . unwrap ( ) . temperature ,
You can’t perform that action at this time.
0 commit comments