""" this script performs simple analysis of the stat generated in cleaning """ import os, sys import time import csv import pickle, json from collections import defaultdict, Counter import struct def analysis1(datafile): with open("{}_stat.json".format(datafile), "r") as ifile: content_cnt, extension_cnt, hostname_cnt, method_cnt, n_level_cnt, n_param_cnt = json.load(ifile) n = 0 for k, v in sorted(hostname_cnt.items(), key=lambda x: -x[1]): n += 1 print(k, v//1e6) if n > 2000: break if __name__ == "__main__": analysis1(sys.argv[1])