Last active
May 23, 2018 12:24
-
-
Save gunlee01/a7f91fc4208b7db8164d427c962f1cf4 to your computer and use it in GitHub Desktop.
scouter alert scripting #2
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
String objType = $counter.getObjType(); | |
String objName = $counter.getObjName(); | |
float value = $counter.getFloatValue(); | |
float tps = $counter.getFloatValue("TPS"); | |
String title = "Elapsed time alert"; | |
String message = "Elapsed is over 2000ms\n"; | |
message += "[current value] " + value + "ms\n"; | |
message += "[objType] " + objType + "\n"; | |
message += "[objName] " + objName + "\n"; | |
message += "[TPS] " + tps; | |
if(value > 2000 && tps > 10.0) { | |
$counter.fatal(title, message); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment