Commit f357f8a6 authored by Tim Peters's avatar Tim Peters

Show index and pack times in minutes instead of seconds. Show timestamps

for start and end of run.  Show elapsed wall-clock time in minutes.
parent 5da9eb6b
......@@ -77,6 +77,7 @@ def index(rt, mboxfile, db):
global NUM
idx_time = 0
pack_time = 0
start_time = time.time()
lexicon = Lexicon(Splitter(), CaseNormalizer(), StopWordRemover())
extra = Extra()
......@@ -137,12 +138,16 @@ def index(rt, mboxfile, db):
pack_time += p1 - p0
if VERBOSE:
finish_time = time.time()
print
print "Index time", idx_time
print "Pack time", pack_time
print "Index time", round(idx_time / 60, 3), "minutes"
print "Pack time", round(pack_time / 60, 3), "minutes"
print "Index bytes", Message.total_bytes
rate = (Message.total_bytes / idx_time) / 1024
print "Index rate %d KB/sec" % int(rate)
print "Index rate %.2f KB/sec" % rate
print "Indexing began", time.ctime(start_time)
print "Indexing ended", time.ctime(finish_time)
print "Wall clock minutes", round((finish_time - start_time)/60, 3)
def query(rt, query_str):
idx = rt["index"]
......
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