Last active
March 13, 2019 21:41
-
-
Save linuxkidd/bbc6067b9e6015f774a6737d73ddb1db to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env python | |
import sys | |
import simplejson as json | |
obj=json.load(sys.stdin) | |
itemcount=0 | |
sizesum=0 | |
accountsizesum=0 | |
for item in obj: | |
itemcount+=1 | |
sizesum+=item['entry']['meta']['size'] | |
accountsizesum+=item['entry']['meta']['accounted_size'] | |
print "Items:\t{0:d}\nSize:\t{1:d}\nASize:\t{2:d}\n".format(itemcount,sizesum,accountsizesum) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment