26 class TemperatureModel;
31 Processor(std::shared_ptr<Utils::Configuration>);
58 bool isRunning(std::shared_ptr<Process> p)
const;
81 std::shared_ptr<Utils::Configuration> conf;
86 std::shared_ptr<Process> runningTask{
nullptr};
87 long long int totalBusyTicks{0};
88 long long int totalIdleTicks{0};
89 long long int previousIdleTicks{0};
90 long long int previousBusyTicks{0};
double getMinFreq() const
get the minimum frequency at which this processor can operate
double getFreq() const
get the current frequency of the processor
void printEnergyReport(std::string folder) const
TemperatureModel * getTemperatureModel()
void updateUsage()
updates the value of the usage percentage.
void setRunning(std::shared_ptr< Process > p)
void printTemperatureReport(std::string folder) const
bool isBusy() const
return true if the processor is running any task
Processor(std::shared_ptr< Utils::Configuration >)
double getTemperature() const
double getUsage() const
get the current usage of the processor
void printFreqReport(std::string folder) const
void printUsageReport(std::string folder) const
void power(bool p)
power the processor on or off
void setFreq(double)
set the current frequency of the processor
void updateTemperature(double timeInterval)
bool powered() const
return true if the processor is powered on
double getMaxFreq() const
get the maximum frequency at which this processor can operate
std::shared_ptr< Process > getRunningTask()
void printReports(std::string folder) const
void setTemperatureModel(TemperatureModel *)
bool isRunning(std::shared_ptr< Process > p) const
returns true if the processor is running the task provided as argument