From 5801981147ef86ba28ac605dec49fc549d5c14df Mon Sep 17 00:00:00 2001 From: NuclearW Date: Sat, 2 Feb 2013 22:47:05 -0500 Subject: [PATCH] Chunkmeta and Storage graphs --- src/main/java/com/gmail/nossr50/mcMMO.java | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/mcMMO.java b/src/main/java/com/gmail/nossr50/mcMMO.java index 0eaa5d166..d9fe0c61c 100644 --- a/src/main/java/com/gmail/nossr50/mcMMO.java +++ b/src/main/java/com/gmail/nossr50/mcMMO.java @@ -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) {