Mercurial > public > mercurial-scm > hg-stable
changeset 52722:492de5c0ecdd
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)
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 29 Nov 2024 22:21:18 +0100 |
parents | 2e82bd50978c |
children | 42dd6ec73c28 |
files | contrib/perf.py |
diffstat | 1 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/perf.py Thu Nov 28 11:05:26 2024 +0100 +++ b/contrib/perf.py Fri Nov 29 22:21:18 2024 +0100 @@ -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'):