mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Chunkmeta and Storage graphs
This commit is contained in:
parent
727cb029a6
commit
5801981147
@ -215,6 +215,8 @@ public class mcMMO extends JavaPlugin {
|
||||
if (configInstance.getStatsTrackingEnabled()) {
|
||||
try {
|
||||
Metrics metrics = new Metrics(this);
|
||||
|
||||
// Timings Graph
|
||||
Graph timingsGraph = metrics.createGraph("Percentage of servers using timings");
|
||||
|
||||
if (pluginManager.useTimings()) {
|
||||
@ -234,6 +236,7 @@ public class mcMMO extends JavaPlugin {
|
||||
});
|
||||
}
|
||||
|
||||
// Donut Version Graph
|
||||
Graph versionDonutGraph = metrics.createGraph("Donut Version");
|
||||
|
||||
boolean haveVersionInformation = false;
|
||||
@ -280,6 +283,7 @@ public class mcMMO extends JavaPlugin {
|
||||
});
|
||||
}
|
||||
|
||||
// Official v Custom build Graph
|
||||
Graph officialGraph = metrics.createGraph("Built by official ci");
|
||||
|
||||
if (isOfficialBuild) {
|
||||
@ -299,6 +303,46 @@ public class mcMMO extends JavaPlugin {
|
||||
});
|
||||
}
|
||||
|
||||
// Chunkmeta enabled Graph
|
||||
Graph chunkmetaGraph = metrics.createGraph("Uses Chunkmeta");
|
||||
|
||||
if (HiddenConfig.getInstance().getChunkletsEnabled()) {
|
||||
chunkmetaGraph.addPlotter(new Metrics.Plotter("Yes") {
|
||||
@Override
|
||||
public int getValue() {
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
chunkmetaGraph.addPlotter(new Metrics.Plotter("No") {
|
||||
@Override
|
||||
public int getValue() {
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Storage method Graph
|
||||
Graph storageGraph = metrics.createGraph("Storage method");
|
||||
|
||||
if (configInstance.getUseMySQL()) {
|
||||
storageGraph.addPlotter(new Metrics.Plotter("SQL") {
|
||||
@Override
|
||||
public int getValue() {
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
storageGraph.addPlotter(new Metrics.Plotter("Flatfile") {
|
||||
@Override
|
||||
public int getValue() {
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
metrics.start();
|
||||
}
|
||||
catch (IOException e) {
|
||||
|
Loading…
Reference in New Issue
Block a user