Created
May 23, 2018 13:06
-
-
Save gunlee01/a30a5449fcec9d51bda0c771bc84eb70 to your computer and use it in GitHub Desktop.
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 avgTpsCurrent = $counter.getLatestAvg(30); //latest 30s avg | |
float avgTps3minAgo = $counter.getAvg(180+30, 30); //3min ago 30s avg | |
String title = "TPS fluctuation alert"; | |
String message = "TPS is highly(over 1.5x) incresed in 3min\n"; | |
message += "[TPS current] " + $$.formatNumber(avgTpsCurrent) + "\n"; | |
message += "[TPS 3min ago] " + $$.formatNumber(avgTps3minAgo) + "\n"; | |
message += "[objType] " + objType + "\n"; | |
message += "[objName] " + objName + "\n"; | |
if(avgTpsCurrent > avgTps3minAgo * 1.5) { | |
$counter.fatal(title, message); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment