Energy-Aware Profiling Tool Developer Guide¤
Welcome to the Developer Guide for our Energy-Aware Profiling Tool! This guide will walk you through the process of cloning the repository, customizing it for your needs, and adding new file modules to support additional device measurements.
Cloning the Repository¤
To get started, follow these steps to clone the repository:
- Open a terminal or command prompt.
- Navigate to the directory where you want to clone the repository.
- Run the following command:
Customizing the Tool¤
After cloning the repository, you may want to customize it according to your specific requirements. Here are some common customization tasks:
Configuration¤
- Modify the default configuration file
config_energy.jsonlocated in theea2p/srcdirectory to adjust settings such as sampling interval, measurement thresholds, etc.
Visualization output¤
- Customize the output components named
__record_data_to_filein theea2p/src/power_meter.pyfile to tailor the output representation of energy profiling data as CSV, excel, json saving.
RAPL path for Intel Users¤
- Customize the intel RAPL directory to suit your energy profiling needs depending of your architecture using
ea2p/src/utils.pyfiles and set some others system configurations.
Adding a New File Module¤
If you need to support new device measurements, you can add a new file module to handle the data. Follow these steps:
-
Create a new Python file in the
ea2p/src/directory for your new module. For example,FPGA_module.py. -
Implement the necessary functions to parse and process the data from the new device.
-
Update the
__init__.pyfile in theea2p/srcdirectory to include your new module. For example:
-
Configure the
ea2p/src/wrapper.pymodule to support your energy module. Especially theget_power_consumptionfunction. Also, adapt the__set_powermethod in the same file to support auto-detection of your devices and make some initializations eventually. -
Finally, use the
PowerMeterinstance to profile your application by specifying your device in the list of devices in configuration the file.