Commit b9745d6b authored by Vincent Pelletier's avatar Vincent Pelletier

Add timing information when loading state files.

parent 278332c9
...@@ -947,6 +947,8 @@ def main(): ...@@ -947,6 +947,8 @@ def main():
file_count = len(infile_list) file_count = len(infile_list)
per_site = {} per_site = {}
for state_file in args.state_file: for state_file in args.state_file:
print >> sys.stderr, 'Loading', state_file.name, '...',
load_start = time.time()
state = json.load(state_file, encoding='ascii') state = json.load(state_file, encoding='ascii')
for url, site_state in state: for url, site_state in state:
if url is None: if url is None:
...@@ -964,6 +966,8 @@ def main(): ...@@ -964,6 +966,8 @@ def main():
continue continue
per_site[site] = action.func.fromJSONState(site_state, per_site[site] = action.func.fromJSONState(site_state,
getDuration, action.keywords['suffix']) getDuration, action.keywords['suffix'])
print >> sys.stderr, 'done (%s)' % timedelta(seconds=time.time()
- load_start)
skip_user_agent = list(itertools.chain(*args.skip_user_agent)) skip_user_agent = list(itertools.chain(*args.skip_user_agent))
malformed_lines = 0 malformed_lines = 0
skipped_lines = 0 skipped_lines = 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment