-
-
Save arrogantrabbit/94440aff1fdb4afeb659aae0ffb169da to your computer and use it in GitHub Desktop.
STORJ: repeated downloads
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
bzgrep "download started" storj* | sed -E 's/.*Piece ID\": \"([^\"]+)".*/\1/' | sort | uniq -c | awk ' | |
BEGIN { | |
split("1, 10, 100, 1000, 10000", thresholds, ","); | |
print("Collecting the counts for thresholds\n"); | |
} { | |
count_now=$1; | |
for (i in thresholds) { | |
if (count_now > thresholds[i]) | |
counts[i] += count_now | |
} | |
totals += count_now; | |
} END { | |
printf("Download was requested for %d total chunks\n", totals); | |
for (i in thresholds) | |
printf("%3.2f%% of chunks were requested more than %d times\n", counts[i]/totals*100, thresholds[i]); | |
} | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment