Skip to content

Commit c1f1b50

Browse files
authored
fixes #1 CPU scoping of CPU power calculation in Grafana (#81)
* fixes #1 CPU scoping of CPU power calculation in Grafana * Update description and screenshot.
1 parent 75565f8 commit c1f1b50

3 files changed

Lines changed: 26 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ This application will run until you stop it and generate data. While it is gener
6969

7070
http://localhost:3000/grafana/dashboards
7171

72-
After some time you can see the data produced by this application in the following dashboard. As an example the CPU and memory demands are shown as they are supported on most plattforms as well as the Emission Calculation Factors. Furthermore, we have integrated a [Software Carbon Intensity](https://sci.greensoftware.foundation/) calculation for each transaction based on this data. This calculation is based on our work presented at the [Workshop on Challenges in Performance Methods for Software Development (WOSP-C) 2024](https://www.retit.de/wp-content/uploads/2024/05/Green_Software_Metrics.pdf) and [EcoCompute](https://www.retit.de/wp-content/uploads/2024/04/2024-04-25_How_to_Measure_CO2-Emissions_For_Every_API_Call_Of_Your_Microservices.pdf) with the main difference that we are now using the [Cloud Carbon coefficients](https://github.com/cloud-carbon-footprint/ccf-coefficients) instead of an external datasource for the emission data.
72+
After some time you can see the data produced by this application in the following dashboard. As an example the CPU and memory demands are shown as they are supported on most plattforms as well as the Emission Calculation Factors. Furthermore, we have integrated a [Software Carbon Intensity](https://sci.greensoftware.foundation/) calculation for each transaction based on this data. This calculation is based on our work presented at the [Workshop on Challenges in Performance Methods for Software Development (WOSP-C) 2024](https://www.retit.de/wp-content/uploads/2024/05/Green_Software_Metrics.pdf) and [EcoCompute](https://www.retit.de/wp-content/uploads/2024/04/2024-04-25_How_to_Measure_CO2-Emissions_For_Every_API_Call_Of_Your_Microservices.pdf) with the main difference that we are now using the [Cloud Carbon coefficients](https://github.com/cloud-carbon-footprint/ccf-coefficients) instead of an external datasource for the emission data. The current state of the calculation using the CCF data has been presented at the [Symposium on Software Performance 2024](https://fb-swt.gi.de/fileadmin/FB/SWT/Softwaretechnik-Trends/Verzeichnis/Band_44_Heft_4/SSP24_16_camera-ready_5255.pdf).
7373

7474
![dashboard.png](img/dashboard.png)
7575

docker/grafana/provisioning/dashboards/dashboard.json

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,18 @@
244244
"type": "__expr__",
245245
"uid": "__expr__"
246246
},
247-
"expression": "($Pcpu* 60000) / 1000",
247+
"expression": "$Pcpu * $CPUutilT",
248+
"hide": true,
249+
"refId": "Ptcpu",
250+
"type": "math"
251+
},
252+
{
253+
"datasource": {
254+
"name": "Expression",
255+
"type": "__expr__",
256+
"uid": "__expr__"
257+
},
258+
"expression": "($Ptcpu * 60000) / 1000",
248259
"hide": true,
249260
"refId": "Ecpu",
250261
"type": "math"
@@ -460,7 +471,7 @@
460471
"x": 12,
461472
"y": 0
462473
},
463-
"id": 7,
474+
"id": 8,
464475
"options": {
465476
"legend": {
466477
"calcs": [],
@@ -616,7 +627,18 @@
616627
"type": "__expr__",
617628
"uid": "__expr__"
618629
},
619-
"expression": "($Pcpu* 60000) / 1000",
630+
"expression": "$Pcpu * $CPUutilT",
631+
"hide": true,
632+
"refId": "Ptcpu",
633+
"type": "math"
634+
},
635+
{
636+
"datasource": {
637+
"name": "Expression",
638+
"type": "__expr__",
639+
"uid": "__expr__"
640+
},
641+
"expression": "($Ptcpu* 60000) / 1000",
620642
"hide": true,
621643
"refId": "Ecpu",
622644
"type": "math"

img/dashboard.png

-13.8 KB
Loading

0 commit comments

Comments
 (0)