From 9726ac6f1271caee5265f94a63b8718c9bfd88c8 Mon Sep 17 00:00:00 2001 From: NuclearW Date: Sat, 19 May 2012 00:42:50 -0400 Subject: [PATCH] Send metrics information on if this server uses timings --- src/main/java/com/gmail/nossr50/mcMMO.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/mcMMO.java b/src/main/java/com/gmail/nossr50/mcMMO.java index 9fa76b7bb..9cd4ee7d1 100644 --- a/src/main/java/com/gmail/nossr50/mcMMO.java +++ b/src/main/java/com/gmail/nossr50/mcMMO.java @@ -16,6 +16,7 @@ import com.gmail.nossr50.runnables.*; import com.gmail.nossr50.util.Database; import com.gmail.nossr50.util.Leaderboard; import com.gmail.nossr50.util.Metrics; +import com.gmail.nossr50.util.Metrics.Graph; import com.gmail.nossr50.util.Users; import com.gmail.nossr50.util.blockmeta.ChunkletManager; import com.gmail.nossr50.util.blockmeta.ChunkletManagerFactory; @@ -138,6 +139,25 @@ public class mcMMO extends JavaPlugin { if (configInstance.getStatsTrackingEnabled()) { try { Metrics metrics = new Metrics(this); + + Graph graph = metrics.createGraph("Percentage of servers using timings"); + + if(pm.useTimings()) { + graph.addPlotter(new Metrics.Plotter("Enabled") { + @Override + public int getValue() { + return 1; + } + }); + } else { + graph.addPlotter(new Metrics.Plotter("Disabled") { + @Override + public int getValue() { + return 1; + } + }); + } + metrics.start(); } catch (IOException e) {