mirror of
https://github.com/correl/melpa.git
synced 2024-11-25 03:00:10 +00:00
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:
parent
b8a90b2612
commit
71ccdd7959
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,7 @@ def parse_logfile(logfilename, pkg_ip_time):
|
||||||
"%d/%b/%Y:%H:%M:%S").timetuple()))
|
"%d/%b/%Y:%H:%M:%S").timetuple()))
|
||||||
pkg = match.group('package')
|
pkg = match.group('package')
|
||||||
|
|
||||||
pkg_ip_time.setdefault(pkg, {}).setdefault(ip, set()).add(dtstamp)
|
pkg_ip_time.setdefault(pkg, set()).add(ip)
|
||||||
|
|
||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue