Optimize processing logs.

Don't actually store the timestamp along with each IP when we parse logs. Only look at unique IP addresses. Duh.
This commit is contained in:
Donald Curtis 2014-10-23 16:55:26 -04:00
parent b8a90b2612
commit 71ccdd7959

View file

@ -82,7 +82,7 @@ def parse_logfile(logfilename, pkg_ip_time):
"%d/%b/%Y:%H:%M:%S").timetuple()))
pkg = match.group('package')
pkg_ip_time.setdefault(pkg, {}).setdefault(ip, set()).add(dtstamp)
pkg_ip_time.setdefault(pkg, set()).add(ip)
count += 1