DOI: 10.5281/zenodo.7877593
title: An approach using performance models for supporting energy analysis of software systems

description: # LQN4Energy-Replication-Package This repository contains the replication package and dataset of the paper titled "An approach using performance models for supporting energy analysis of software systems". This study has been developed by:<br> 1. [Vincenzo Stoico](https://scholar.google.com/citations?user=E8C9Uz4AAAAJ&hl=en)(University of L'Aquila)<br> 2. [Vittorio Cortellessa](https://scholar.google.com/citations?hl=en&user=s4JPUOEAAAAJ)(University of L'Aquila)<br> 3. [Ivano Malavolta](https://scholar.google.com/citations?hl=en&user=ya3htIoAAAAJ)(Vrije University Amsterdam)<br> 4. [Daniele Di Pompeo](https://scholar.google.com/citations?hl=en&user=E2dr5vIAAAAJ)(University of L'Aquila)<br> 5. [Luigi Pomante](https://scholar.google.com/citations?hl=en&user=q2_sZiMAAAAJ)(University of L'Aquila) for further details, comments, and/or suggestions, you can write an email to the following address: &lt;vincenzo.stoico@graduate.univaq.it&gt; ## Repository Description This repository is made by three directories: - `code`: it contains the scripts that read the dataset and generate the results for the Digital Camera and Train Ticket Booking System. Therefore, the response time for the supplied workloads, CPU utilization, the average power, i.e., e multiplier, and the average energy consumption.<br> - `dc_energy_estimation.py`: generates the energy estimates for Digital Camera<br> - `dc_overall_stats.py`: calculates the performance and the energy metrics from the measurements collected for Digital Camera<br> - `ttbs_performance_stats.py`: calculates the performance metrics from the measurements retrieved for Train Ticket Booking System<br> - `ttbs_energy_stats.py`: calculates the energy metrics from the measurements taken for Train Ticket Booking System<br> - `ttbs_overall_stats.py`: generates the energy estimates and the charts comparing estimates and measurements for Train Ticket Booking System. It prints the Root Mean Square Error (RMSE) and the Mean Absolute Percentage Error (MAPE). - `dataset`: it has two subdirectories: `dc` and `ttbs` containing the data collected during the experiments performed for Digital Camera and Train Ticket Booking System, respectively; - `model`: it includes the Layered Queuing Networks we used to retrieve CPU Utilization and the response time for both case studies; ## How do I run this? The scripts are written in python, so you must have installed the latest version of python to run them. In addition, they require `pandas`, `matplotlib`, `numpy`, `scipy`. The suite to execute the Layered Queuing Networks must be installed to retrieve performance estimatations. It is possible to find it at the following repository:<br> [https://github.com/layeredqueuing/V5](https://github.com/layeredqueuing/V5) After installation is complete, you can execute the list of commands indicated below to obtain the results for the case studies. The commands must be executed in the described order. The results will be generated in the `results/` directory. ### Digital Camera<br> 1. move to the `~/code` folder<br> 2. execute `python dc_overall_stats.py`, it will take ~1m<br> 3. move to the `~/model` directory and execute `lqns dc.lqnx &gt; ../results/dc_estimates.csv`<br> 4. go back to the `~/code` folder and execute `python dc_energy_estimation.py` ### Train Ticket Booking System<br> 1. move to the `~/code` folder<br> 2. execute `python ttbs_performance_stats.py`<br> 3. execute `python ttbs_energy_stats.py`<br> 3. move to the `~/model` directory and execute `lqns ttbs.lqnx &gt; ../results/ttbs_performance_estimates.csv`<br> 4. go back to the `~/code` folder and execute `python ttbs_overall_stats.py`