Skip to content

Instantly share code, notes, and snippets.

@gunlee01
Last active May 23, 2018 12:24
Show Gist options
  • Save gunlee01/a7f91fc4208b7db8164d427c962f1cf4 to your computer and use it in GitHub Desktop.
Save gunlee01/a7f91fc4208b7db8164d427c962f1cf4 to your computer and use it in GitHub Desktop.
scouter alert scripting #2
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