From 019cea6adedfd34f25c117dc03d3d9f6d78a5b98 Mon Sep 17 00:00:00 2001 From: Roman Dementiev Date: Wed, 10 Jul 2024 11:25:51 +0200 Subject: [PATCH] grafana: show energy charts after freq charts --- src/dashboard.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/dashboard.cpp b/src/dashboard.cpp index 0e64c734..8242fca7 100644 --- a/src/dashboard.cpp +++ b/src/dashboard.cpp @@ -625,6 +625,21 @@ std::string getPCMDashboardJSON(const PCMDashboardType type, int ns, int nu, int dashboard.push(panel); dashboard.push(panel1); } + for (size_t s = 0; s < NumSockets; ++s) + { + const auto S = std::to_string(s); + auto panel = std::make_shared(0, y, width, height, std::string("Socket") + S + " Energy Consumption", "Watt", false); + auto panel1 = std::make_shared(width, y, max_width - width, height, std::string("Current Socket") + S + " Energy Consumption (Watt)"); + y += height; + for (auto &m : {"Package Joules Consumed", "DRAM Joules Consumed", "PP0 Joules Consumed", "PP1 Joules Consumed"}) + { + auto t = createTarget(m, influxDBUncore_Uncore_Counters(S, m), prometheusCounters(S, m, false)); + panel->push(t); + panel1->push(t); + } + dashboard.push(panel); + dashboard.push(panel1); + } { auto panel = std::make_shared(0, y, width, height, "Memory Bandwidth", "MByte/sec", false); auto panel1 = std::make_shared(width, y, max_width - width, height, "Memory Bandwidth (MByte/sec)"); @@ -874,21 +889,6 @@ std::string getPCMDashboardJSON(const PCMDashboardType type, int ns, int nu, int accelCounters(accs->getAccelIndexCounterName(j)); } } - for (size_t s = 0; s < NumSockets; ++s) - { - const auto S = std::to_string(s); - auto panel = std::make_shared(0, y, width, height, std::string("Socket") + S + " Energy Consumption", "Watt", false); - auto panel1 = std::make_shared(width, y, max_width - width, height, std::string("Current Socket") + S + " Energy Consumption (Watt)"); - y += height; - for (auto &m : {"Package Joules Consumed", "DRAM Joules Consumed", "PP0 Joules Consumed", "PP1 Joules Consumed"}) - { - auto t = createTarget(m, influxDBUncore_Uncore_Counters(S, m), prometheusCounters(S, m, false)); - panel->push(t); - panel1->push(t); - } - dashboard.push(panel); - dashboard.push(panel1); - } return dashboard(); }