mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-21 14:03:54 +02:00
Show write queue size on /gc
This commit is contained in:
@@ -6,8 +6,6 @@ import org.bukkit.World;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Commandgc extends EssentialsCommand
|
public class Commandgc extends EssentialsCommand
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@@ -31,6 +29,7 @@ public class Commandgc extends EssentialsCommand
|
|||||||
sender.sendMessage(_("gcmax", (Runtime.getRuntime().maxMemory() / 1024 / 1024)));
|
sender.sendMessage(_("gcmax", (Runtime.getRuntime().maxMemory() / 1024 / 1024)));
|
||||||
sender.sendMessage(_("gctotal", (Runtime.getRuntime().totalMemory() / 1024 / 1024)));
|
sender.sendMessage(_("gctotal", (Runtime.getRuntime().totalMemory() / 1024 / 1024)));
|
||||||
sender.sendMessage(_("gcfree", (Runtime.getRuntime().freeMemory() / 1024 / 1024)));
|
sender.sendMessage(_("gcfree", (Runtime.getRuntime().freeMemory() / 1024 / 1024)));
|
||||||
|
sender.sendMessage("Essentials write queue size: " + ess.getStorageQueue().getQueueSize()); //TODO:TL
|
||||||
|
|
||||||
for (World w : server.getWorlds())
|
for (World w : server.getWorlds())
|
||||||
{
|
{
|
||||||
|
@@ -7,7 +7,6 @@ import java.util.concurrent.Delayed;
|
|||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
|
||||||
import net.ess3.api.IPlugin;
|
import net.ess3.api.IPlugin;
|
||||||
|
|
||||||
|
|
||||||
@@ -86,6 +85,11 @@ public class StorageQueue implements Runnable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getQueueSize()
|
||||||
|
{
|
||||||
|
return queue.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private class WriteRequest implements Delayed
|
private class WriteRequest implements Delayed
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user