Measure the energy consumption of a simulation on multiple hardwares. More...
#include <EnergySensor.h>
Public Member Functions | |
EnergySensor (EnergySensorOption sensor) | |
Constructor for energy sensor. | |
bool | init (bool tuningMetricIsEnergy) |
Initializes the EnergySenor. | |
bool | startMeasurement () |
Start measurements. | |
bool | endMeasurement () |
Ending measurement. | |
double | getJoules () const |
Get the energy consumed in Joules between the start and the end state. | |
double | getWatts () const |
Get the average power consumed in Watts between the start and the end state. | |
double | getEnergyDeltaT () const |
Get seconds between current start and end state. | |
const EnergySensorOption | getOption () const |
Getter for used sensor option. | |
long | getNanoJoules () const |
Method to convert consumed energy in Joules to nanoJoules. | |
Measure the energy consumption of a simulation on multiple hardwares.
Simulation needs to run on an Linux system to use Power measurement toolkit
autopas::utils::EnergySensor::EnergySensor | ( | EnergySensorOption | sensor | ) |
Constructor for energy sensor.
Takes
sensor | as possible energy sensors to use. Causes a runtime error if the specified sensor is not available with pmt module used in AutoPas. Currently, pmt in AutoPas can only be compiled with rapl and likwid. Rapl sensor is the default sensor option. And it is currently forced to be compiled always. |
bool autopas::utils::EnergySensor::endMeasurement | ( | ) |
Ending measurement.
Sets _end
double autopas::utils::EnergySensor::getEnergyDeltaT | ( | ) | const |
Get seconds between current start and end state.
double autopas::utils::EnergySensor::getJoules | ( | ) | const |
Get the energy consumed in Joules between the start and the end state.
long autopas::utils::EnergySensor::getNanoJoules | ( | ) | const |
Method to convert consumed energy in Joules to nanoJoules.
This is used for tuning.
const EnergySensorOption autopas::utils::EnergySensor::getOption | ( | ) | const |
Getter for used sensor option.
double autopas::utils::EnergySensor::getWatts | ( | ) | const |
Get the average power consumed in Watts between the start and the end state.
bool autopas::utils::EnergySensor::init | ( | bool | tuningMetricIsEnergy | ) |
Initializes the EnergySenor.
tuningMetricIsEnergy | whether energy is selected as the tuning metric. |
bool autopas::utils::EnergySensor::startMeasurement | ( | ) |
Start measurements.
Sets _start