-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documentation Update and Update Version Number
- Loading branch information
1 parent
0959a78
commit 20a129b
Showing
6 changed files
with
65 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
toast.version=1.2.0 | ||
toast.version=1.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/main/java/jaci/openrio/toast/core/command/cmd/CommandThreadPool.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package jaci.openrio.toast.core.command.cmd; | ||
|
||
import jaci.openrio.toast.core.Toast; | ||
import jaci.openrio.toast.core.command.AbstractCommand; | ||
import jaci.openrio.toast.core.thread.ToastThreadPool; | ||
import jaci.openrio.toast.lib.log.Logger; | ||
|
||
import java.util.concurrent.ThreadPoolExecutor; | ||
|
||
/** | ||
* This command will simply echo data about the {@link jaci.openrio.toast.core.thread.ToastThreadPool} to the console. | ||
* This is for debugging purposes | ||
* | ||
* command_name: 'threads' | ||
* args: nil | ||
* | ||
* @author Jaci | ||
*/ | ||
public class CommandThreadPool extends AbstractCommand { | ||
|
||
@Override | ||
public String getCommandName() { | ||
return "threads"; | ||
} | ||
|
||
@Override | ||
public void invokeCommand(int argLength, String[] args, String command) { | ||
ThreadPoolExecutor e = (ThreadPoolExecutor) ToastThreadPool.INSTANCE.getService(); | ||
Logger l = Toast.log(); | ||
l.info("*Toast Thread Pool Instance Data: "); | ||
l.info(String.format("\t Active Threads: %d, Core Threads: %d", e.getPoolSize(), e.getCorePoolSize())); | ||
l.info(String.format("\t Active Jobs: %d, Completed Jobs: %d, Total Jobs: %d", e.getActiveCount(), e.getCompletedTaskCount(), e.getTaskCount())); | ||
l.info(String.format("\t Shutdown? %s, Terminated? %s, Terminating? %s", e.isShutdown(), e.isTerminated(), e.isTerminating())); | ||
l.info("*End Toast Thread Pool Data"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters