Lines Matching refs:last_sample
43 bool calculateAvgPower(std::string_view power_rail, const PowerSample &last_sample, in calculateAvgPower() argument
46 if (curr_sample.duration == last_sample.duration) { in calculateAvgPower()
50 } else if (curr_sample.duration < last_sample.duration || in calculateAvgPower()
51 curr_sample.energy_counter < last_sample.energy_counter) { in calculateAvgPower()
53 << " is invalid: last_sample=" << last_sample.energy_counter in calculateAvgPower()
54 << "(T=" << last_sample.duration << ")" in calculateAvgPower()
59 const auto duration = curr_sample.duration - last_sample.duration; in calculateAvgPower()
60 const auto deltaEnergy = curr_sample.energy_counter - last_sample.energy_counter; in calculateAvgPower()
245 const auto last_sample = power_history->front(); in updateAveragePower() local
247 if (calculateAvgPower(power_rail, last_sample, curr_sample, &avg_power)) { in updateAveragePower()
358 const auto &last_sample = power_status_log_.prev_energy_info_map.at(rail); in logPowerStatus() local
361 if (calculateAvgPower(rail, last_sample, curr_sample, &avg_power) && in logPowerStatus()
373 max_duration = std::max(max_duration, curr_sample.duration - last_sample.duration); in logPowerStatus()