fn process_fractional_loads(&self, all_cpu_loads: &Vec<f32>) -> (f32, NormPerfs) {
        let cluster_load: f32 =
            self.logical_cpu_numbers.iter().map(|i| all_cpu_loads[*i as usize]).sum();

        // P-states are sorted with frequency as primary key, so the lowest-possible index has the
        // highest-possible frequency.
        let pstate_index = self.current_pstate.get().lower();
        let frequency = self.pstates[pstate_index].frequency;

        let performance =
            self.performance_per_ghz.mul_scalar(frequency.0 / 1e9 * cluster_load as f64);
        (cluster_load, performance)
    }
/// Given fractional loads for all system CPUs, gives this cluster's corresponding load and its
/// estimated normalized performance. If the current P-state is unknown, the highest-possible
/// frequency will be used to ensure that performance (and thus contribution to thermals) is
/// not underestimated.
Given fractional loads for all system CPUs, gives this cluster's corresponding load and its
estimated normalized performance. If the current P-state is unknown, the highest-possible
frequency will be used to ensure that performance (and thus contribution to thermals) is
not underestimated.
Given fractional loads for all system CPUs gives this cluster ' s corresponding load and its estimated normalized performance . If the current P - state is unknown the highest - possible frequency will be used to ensure that performance ( and thus contribution to thermals ) is not underestimated .
fn process_fractional_loads(&self, all_cpu_loads: &Vec<f32>) -> (f32, NormPerfs) {
        let cluster_load: f32 =
            self.logical_cpu_numbers.iter().map(|i| all_cpu_loads[*i as usize]).sum();
        // P-states are sorted with frequency as primary key, so the lowest-possible index has the
        // highest-possible frequency.
        let pstate_index = self.current_pstate.get().lower();
        let frequency = self.pstates[pstate_index].frequency;
        let performance =
            self.performance_per_ghz.mul_scalar(frequency.0 / 1e9 * cluster_load as f64);
        (cluster_load, performance)
    }
fn process_fractional_loads ( & self , all_cpu_loads : & Vec < f32 > ) -> ( f32 , NormPerfs ) { let cluster_load : f32 = self . logical_cpu_numbers . iter ( ) . map ( | i | all_cpu_loads [ * i as usize ] ) . sum ( ) ; // P-states are sorted with frequency as primary key, so the lowest-possible index has the // highest-possible frequency. let pstate_index = self . current_pstate . get ( ) . lower ( ) ; let frequency = self . pstates [ pstate_index ] . frequency ; let performance = self . performance_per_ghz . mul_scalar ( frequency . 0 / 1e9 * cluster_load as f64 ) ; ( cluster_load , performance ) }
Given fractional loads for all system CPUs, gives this cluster's corresponding load and its
estimated normalized performance.
Given fractional loads for all system CPUs gives this cluster ' s corresponding load and its estimated normalized performance .
&self
all_cpu_loads
&Vec<f32>
&self
all_cpu_loads
&Vec<f32>