Skip to content

Commit

Permalink
grafana: show energy charts after freq charts
Browse files Browse the repository at this point in the history
  • Loading branch information
rdementi committed Jul 11, 2024
1 parent e8386a3 commit 019cea6
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/dashboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<TimeSeriesPanel>(0, y, width, height, std::string("Socket") + S + " Energy Consumption", "Watt", false);
auto panel1 = std::make_shared<BarGaugePanel>(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<TimeSeriesPanel>(0, y, width, height, "Memory Bandwidth", "MByte/sec", false);
auto panel1 = std::make_shared<BarGaugePanel>(width, y, max_width - width, height, "Memory Bandwidth (MByte/sec)");
Expand Down Expand Up @@ -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<TimeSeriesPanel>(0, y, width, height, std::string("Socket") + S + " Energy Consumption", "Watt", false);
auto panel1 = std::make_shared<BarGaugePanel>(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();
}

Expand Down

0 comments on commit 019cea6

Please sign in to comment.