update
This commit is contained in:
+3
-3
@@ -32,12 +32,12 @@ class ProgressReporter(object):
|
|||||||
self._prev_report_time = now
|
self._prev_report_time = now
|
||||||
dt = now - self._start_time
|
dt = now - self._start_time
|
||||||
if self._total and self._cnt > 0:
|
if self._total and self._cnt > 0:
|
||||||
eta_msg = '{}/{} ETA: {:.2f}'.format(self._cnt, self._total,
|
eta_msg = '{}/{} ETA: {:.1f}'.format(self._cnt, self._total,
|
||||||
(self._total-self._cnt)*dt/self._cnt)
|
(self._total-self._cnt)*dt/self._cnt)
|
||||||
else:
|
else:
|
||||||
eta_msg = '{} done'.format(self._cnt)
|
eta_msg = '{} done'.format(self._cnt)
|
||||||
self._fout.write(u'{}: avg {:.3f}/sec'
|
self._fout.write(u'{}: avg {:.1f}/sec'
|
||||||
u', passed {:.3f}sec, {} {} \r'.format(
|
u', passed {:.1f}sec, {} {} \r'.format(
|
||||||
self._name, self._cnt / dt, dt, eta_msg, extra_msg))
|
self._name, self._cnt / dt, dt, eta_msg, extra_msg))
|
||||||
self._fout.flush()
|
self._fout.flush()
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -52,6 +52,6 @@ if __name__ == '__main__':
|
|||||||
assert output_file.endswith(".html")
|
assert output_file.endswith(".html")
|
||||||
basename = output_file[:-5]
|
basename = output_file[:-5]
|
||||||
for idx, html in enumerate(htmls):
|
for idx, html in enumerate(htmls):
|
||||||
with open(basename + '.{}'.format(idx) + '.html', 'w') as f:
|
with open(basename + f'{idx:02d}.html', 'w') as f:
|
||||||
f.write(html)
|
f.write(html)
|
||||||
res.emoji_cache.flush()
|
res.emoji_cache.flush()
|
||||||
|
|||||||
Reference in New Issue
Block a user