Skip to content

Commit 308347b

Browse files
committed
Added a comment to the stats route
1 parent 76c2e77 commit 308347b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/de/gnmyt/mcdash/panel/routes/stats/StatsRoute.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@ public class StatsRoute extends DefaultHandler {
1010

1111
private final StatsController STATS = new StatsController(MinecraftDashboard.getInstance());
1212

13+
/**
14+
* Gets the current server statistics such as the tps, processors, memory and the space
15+
* @param request The request object from the HttpExchange
16+
* @param response The response controller from the HttpExchange
17+
*/
1318
@Override
14-
public void get(Request request, ResponseController response) throws Exception {
19+
public void get(Request request, ResponseController response) {
1520
response.json("tps="+STATS.getTPS(), "processors="+STATS.getAvailableProcessors(),
1621
"free_memory="+STATS.getFreeMemory(), "total_memory="+STATS.getTotalMemory(), "used_memory="+STATS.getUsedMemory(),
1722
"free_space="+STATS.getFreeSpace(), "total_space="+STATS.getTotalSpace(), "used_space="+STATS.getUsedSpace());

0 commit comments

Comments
 (0)