Skip to content

Commit 3470655

Browse files
vimalk78rdementi
authored andcommitted
fix(dashboard): Use Timeseries instead of Graph
Signed-off-by: Vimal Kumar <[email protected]>
1 parent 322d885 commit 3470655

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/dashboard.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,13 @@ class BarGaugePanel : public Panel
262262
}
263263
};
264264

265-
class GraphPanel : public Panel
265+
class TimeSeriesPanel : public Panel
266266
{
267267
std::string yAxisLabel;
268268
bool stack;
269-
GraphPanel() = delete;
269+
TimeSeriesPanel() = delete;
270270
public:
271-
GraphPanel(int x_, int y_, int w_, int h_, const std::string & title_, const std::string & yAxisLabel_, bool stack_)
271+
TimeSeriesPanel(int x_, int y_, int w_, int h_, const std::string & title_, const std::string & yAxisLabel_, bool stack_)
272272
: Panel(x_, y_, w_, h_, title_)
273273
, yAxisLabel(yAxisLabel_)
274274
, stack(stack_)
@@ -306,7 +306,7 @@ class GraphPanel : public Panel
306306
"dataLinks": []
307307
},
308308
"percentage": false,
309-
"pluginVersion": "6.7.2",
309+
"pluginVersion": "10.4.2",
310310
"pointradius": 2,
311311
"points": false,
312312
"renderer": "flot",
@@ -325,7 +325,7 @@ class GraphPanel : public Panel
325325
"sort": 0,
326326
"value_type": "individual"
327327
},
328-
"type": "graph",
328+
"type": "timeseries",
329329
"xaxis": {
330330
"buckets": null,
331331
"mode": "time",
@@ -587,7 +587,7 @@ std::string getPCMDashboardJSON(const PCMDashboardType type, int ns, int nu, int
587587
return t;
588588
};
589589
{
590-
auto panel = std::make_shared<GraphPanel>(0, y, width, height, "Memory Bandwidth", "MByte/sec", false);
590+
auto panel = std::make_shared<TimeSeriesPanel>(0, y, width, height, "Memory Bandwidth", "MByte/sec", false);
591591
auto panel1 = std::make_shared<BarGaugePanel>(width, y, max_width - width, height, "Memory Bandwidth (MByte/sec)");
592592
y += height;
593593
auto genAll = [type](const std::string& special) -> std::string
@@ -622,7 +622,7 @@ std::string getPCMDashboardJSON(const PCMDashboardType type, int ns, int nu, int
622622
for (size_t s = 0; s < NumSockets; ++s)
623623
{
624624
const auto S = std::to_string(s);
625-
auto panel = std::make_shared<GraphPanel>(0, y, width, height, std::string("Socket") + S + " Memory Bandwidth", "MByte/sec", false);
625+
auto panel = std::make_shared<TimeSeriesPanel>(0, y, width, height, std::string("Socket") + S + " Memory Bandwidth", "MByte/sec", false);
626626
auto panel1 = std::make_shared<BarGaugePanel>(width, y, max_width - width, height, std::string("Current Socket") + S + " Memory Bandwidth (MByte/sec)");
627627
y += height;
628628
for (auto& m : { "DRAM Reads", "DRAM Writes", "Persistent Memory Reads", "Persistent Memory Writes" })
@@ -648,7 +648,7 @@ std::string getPCMDashboardJSON(const PCMDashboardType type, int ns, int nu, int
648648
dashboard.push(panel1);
649649
}
650650

651-
auto panel = std::make_shared<GraphPanel>(0, y, width, height, "PMEM/DRAM Bandwidth Ratio", "PMEM/DRAM", false);
651+
auto panel = std::make_shared<TimeSeriesPanel>(0, y, width, height, "PMEM/DRAM Bandwidth Ratio", "PMEM/DRAM", false);
652652
auto panel1 = std::make_shared<BarGaugePanel>(width, y, max_width - width, height, "PMEM/DRAM Bandwidth Ratio");
653653
y += height;
654654
for (size_t s = 0; s < NumSockets; ++s)
@@ -676,7 +676,7 @@ std::string getPCMDashboardJSON(const PCMDashboardType type, int ns, int nu, int
676676
for (size_t s = 0; s < NumSockets; ++s)
677677
{
678678
const auto S = std::to_string(s);
679-
auto panel = std::make_shared<GraphPanel>(0, y, width, height, std::string("Socket") + S + " " + pcm->xPI() + " " + m, utilization?"%": "MByte/sec", false);
679+
auto panel = std::make_shared<TimeSeriesPanel>(0, y, width, height, std::string("Socket") + S + " " + pcm->xPI() + " " + m, utilization?"%": "MByte/sec", false);
680680
std::shared_ptr<Panel> panel1;
681681
if (utilization)
682682
panel1 = std::make_shared<GaugePanel>(width, y, max_width - width, height, std::string("Current Socket") + S + " UPI " + m + " (%)");
@@ -708,7 +708,7 @@ std::string getPCMDashboardJSON(const PCMDashboardType type, int ns, int nu, int
708708
auto cstate = [&] (const char * m, const char * tPrefix, const char * source)
709709
{
710710
auto my_height = 3 * height / 2;
711-
auto panel = std::make_shared<GraphPanel>(0, y, width, my_height, std::string(m) + " C-state residency", "stacked %", true);
711+
auto panel = std::make_shared<TimeSeriesPanel>(0, y, width, my_height, std::string(m) + " C-state residency", "stacked %", true);
712712
auto panel1 = std::make_shared<BarGaugePanel>(width, y, max_width - width, my_height, std::string("Current ") + m + " C-state residency (%)");
713713
y += my_height;
714714
auto prometheusCStateExpression = [](const std::string& source, const size_t c) -> std::string
@@ -748,7 +748,7 @@ std::string getPCMDashboardJSON(const PCMDashboardType type, int ns, int nu, int
748748
cstate("Package", "Uncore Aggregate_Uncore", "uncore");
749749
auto derived = [&](const std::string & fullName, const std::string & shortName, const std::string & dividend, const std::string & divisor)
750750
{
751-
auto panel = std::make_shared<GraphPanel>(0, y, width, height, fullName, shortName, false);
751+
auto panel = std::make_shared<TimeSeriesPanel>(0, y, width, height, fullName, shortName, false);
752752
auto panel1 = std::make_shared<BarGaugePanel>(width, y, max_width - width, height, fullName);
753753
y += height;
754754
for (size_t s = 0; s < NumSockets; ++s)
@@ -775,7 +775,7 @@ std::string getPCMDashboardJSON(const PCMDashboardType type, int ns, int nu, int
775775
derived("L2 Cache Misses Per Instruction", "L2 MPI", "L2 Cache Misses", "Instructions Retired Any");
776776
for (auto & m : {"Instructions Retired Any", "Clock Unhalted Thread", "L2 Cache Hits", "L2 Cache Misses", "L3 Cache Hits", "L3 Cache Misses"})
777777
{
778-
auto panel = std::make_shared<GraphPanel>(0, y, width, height, std::string(m), "Million", false);
778+
auto panel = std::make_shared<TimeSeriesPanel>(0, y, width, height, std::string(m), "Million", false);
779779
auto panel1 = std::make_shared<BarGaugePanel>(width, y, max_width - width, height, std::string(m) + " (Million)");
780780
y += height;
781781
for (size_t s = 0; s < NumSockets; ++s)
@@ -794,7 +794,7 @@ std::string getPCMDashboardJSON(const PCMDashboardType type, int ns, int nu, int
794794
if (pcm->getAccel() != ACCEL_NOCONFIG){
795795
auto accelCounters = [&](const std::string & m)
796796
{
797-
auto panel = std::make_shared<GraphPanel>(0, y, width, height, accs->getAccelCounterName() + " " + m,"Byte/sec", false);
797+
auto panel = std::make_shared<TimeSeriesPanel>(0, y, width, height, accs->getAccelCounterName() + " " + m,"Byte/sec", false);
798798
std::shared_ptr<Panel> panel1;
799799
panel1 = std::make_shared<BarGaugePanel>(width, y, max_width - width, height, std::string("Current ") +accs->getAccelCounterName() + " (Byte/sec)");
800800
y += height;
@@ -820,7 +820,7 @@ std::string getPCMDashboardJSON(const PCMDashboardType type, int ns, int nu, int
820820
for (size_t s = 0; s < NumSockets; ++s)
821821
{
822822
const auto S = std::to_string(s);
823-
auto panel = std::make_shared<GraphPanel>(0, y, width, height, std::string("Socket") + S + " Energy Consumption", "Watt", false);
823+
auto panel = std::make_shared<TimeSeriesPanel>(0, y, width, height, std::string("Socket") + S + " Energy Consumption", "Watt", false);
824824
auto panel1 = std::make_shared<BarGaugePanel>(width, y, max_width - width, height, std::string("Current Socket") + S + " Energy Consumption (Watt)");
825825
y += height;
826826
for (auto &m : {"Package Joules Consumed", "DRAM Joules Consumed", "PP0 Joules Consumed", "PP1 Joules Consumed"})

0 commit comments

Comments
 (0)