Skip to content
Snippets Groups Projects
Commit 492de5c0ecdd authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

perf: disable progress by default in stream-generate

Progress can take a signifiant time and that is not what we are measuring it.

This can impact the benchmark result when the command is run in a terminal.

(looking at how much time is consume is now possible, but a quest for another
day)
parent 2e82bd50978c
No related branches found
No related tags found
2 merge requests!1292Draft: 7.0rc preparation,!1197stream: use an utility function to report transferred bytes
......@@ -2179,7 +2179,15 @@
@command(
b'perf::stream-consume',
formatteropts,
[
(
b'',
b'unbundle-progress',
False,
b"compute and display progress during stream processing",
),
]
+ formatteropts,
)
def perf_stream_clone_consume(ui, repo, filename, **opts):
"""benchmark the full application of a stream clone
......@@ -2250,6 +2258,11 @@
new_ui, tmp_dir, requirements=repo.requirements
)
target = hg.repository(new_ui, tmp_dir)
# we don't need to use a config override here because this is a
# dedicated UI object for the disposable repository create for the
# benchmark.
show_progress = bool(opts.get("show_progress"))
target.ui.setconfig(b"progress", b"disable", not show_progress)
gen = exchange.readbundle(target.ui, bundle, bundle.name)
# stream v1
if util.safehasattr(gen, 'apply'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment