Created
May 5, 2017 23:16
-
-
Save luke-jr/333479252069bf6a6711046e6731d730 to your computer and use it in GitHub Desktop.
size_statistics.py
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
import sys | |
sizes = [] | |
count = 0 | |
for line in sys.stdin: | |
fields = line.split() | |
tx_count = int(fields[3]) | |
if tx_count < 16: | |
continue | |
segwit_size = int(fields[2]) | |
sizes.append(segwit_size) | |
count = count + 1 | |
sizes.sort() | |
print("25th pct: %s" % (sizes[count // 4],)) | |
print("Average: %s" % (sum(sizes) / count,)) | |
print("90th pct: %s" % (sizes[-(count // 10)],)) | |
print("Largest: %s" % (sizes[-1],)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment