Created
March 5, 2012 20:52
-
-
Save alq666/1980998 to your computer and use it in GitHub Desktop.
aws crawler stats
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
BEGIN { | |
skipped = 0; | |
processed = 0; | |
} | |
/Skipped/ { | |
skipped++; | |
} | |
/Saving/ { | |
if (match($0, /pts for ([^ ]+) /, arr)) { | |
split(arr[1], metric, /\./); | |
metrics[metric[2]]++; | |
suffix=metric[length(metric)]; | |
if (suffix == "min" || suffix == "max" || suffix == "count" || suffix == "sum") { | |
print "ignoring", arr[1], "in query count"; | |
} else { | |
processed++; | |
} | |
} | |
if (match($0, /host=([^, ]+)/, arr)) { | |
hosts[arr[1]]++; | |
} | |
} | |
END { | |
print "Skipped", skipped; | |
print "Queried", processed; | |
print "Total", skipped + processed; | |
print "Hosts", length(hosts); | |
print "Metrics"; | |
for (m in metrics) { | |
print m, metrics[m]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment