Search in sources :

Example 1 with Insights

use of dev.frankheijden.insights.Insights in project Insights by InsightsPlugin.

the class CommandInsights method displayStatistics.

@CommandMethod("stats")
@CommandPermission("insights.stats")
private void displayStatistics(CommandSender sender) {
    ContainerExecutorService executor = ((Insights) plugin).getExecutor();
    plugin.getMessages().getMessage(Messages.Key.STATS).addTemplates(Messages.tagOf("chunks_scanned", StringUtils.pretty(executor.getCompletedTaskCount())), Messages.tagOf("blocks_scanned", StringUtils.pretty(plugin.getMetricsManager().getTotalBlocksScanned().sum())), Messages.tagOf("queue_size", StringUtils.pretty(executor.getQueueSize()))).sendTo(sender);
}
Also used : Insights(dev.frankheijden.insights.Insights) ContainerExecutorService(dev.frankheijden.insights.concurrent.ContainerExecutorService) CommandMethod(cloud.commandframework.annotations.CommandMethod) CommandPermission(cloud.commandframework.annotations.CommandPermission)

Aggregations

CommandMethod (cloud.commandframework.annotations.CommandMethod)1 CommandPermission (cloud.commandframework.annotations.CommandPermission)1 Insights (dev.frankheijden.insights.Insights)1 ContainerExecutorService (dev.frankheijden.insights.concurrent.ContainerExecutorService)1