mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 01:39:21 +03:00
remotefilelog: make test output more -i friendly
Summary: We have to use globs in tests everywhere they output durations. It's annoying when you have to update many tests, so let's force the output to 0 when in tests. Reviewed By: quark-zju Differential Revision: D15382069 fbshipit-source-id: eaed82e2ba685d594267433494d98fce5de3663e
This commit is contained in:
parent
ad813edcbd
commit
788387206b
@ -137,6 +137,7 @@ from edenscm.mercurial import (
|
||||
bundlerepo,
|
||||
changegroup,
|
||||
commands,
|
||||
encoding,
|
||||
error,
|
||||
exchange,
|
||||
extensions,
|
||||
@ -472,7 +473,7 @@ def wraprepo(repo):
|
||||
if depth is None:
|
||||
depth = self.ui.configint("treemanifest", "fetchdepth")
|
||||
|
||||
start = time.time()
|
||||
start = util.timer()
|
||||
with self.ui.timesection("fetchingtrees"):
|
||||
with self.connectionpool.get(fallbackpath) as conn:
|
||||
remote = conn.peer
|
||||
@ -1797,9 +1798,8 @@ def _gettrees(repo, remote, rootdir, mfnodes, basemfnodes, directories, start, d
|
||||
count += len(reply)
|
||||
perftrace.tracevalue("Fetched", count)
|
||||
if op.repo.ui.configbool("remotefilelog", "debug"):
|
||||
op.repo.ui.warn(
|
||||
_("%s trees fetched over %0.2fs\n") % (count, time.time() - start)
|
||||
)
|
||||
duration = util.timer() - start
|
||||
op.repo.ui.warn(_("%s trees fetched over %0.2fs\n") % (count, duration))
|
||||
|
||||
if missingnodes:
|
||||
raise shallowutil.MissingNodesError(
|
||||
|
Loading…
Reference in New Issue
Block a user