##// END OF EJS Templates
perf: add a perf::stream-generate command...
marmoute -
r51570:b8de54ac default
parent child Browse files
Show More
@@ -1992,6 +1992,38 b' def perf_stream_clone_scan(ui, repo, str'
1992 fm.end()
1992 fm.end()
1993
1993
1994
1994
1995 @command(
1996 b'perf::stream-generate',
1997 [
1998 (
1999 b'',
2000 b'stream-version',
2001 b'latest',
2002 b'stream version to us ("v1", "v2" or "latest", (the default))',
2003 ),
2004 ]
2005 + formatteropts,
2006 )
2007 def perf_stream_clone_generate(ui, repo, stream_version, **opts):
2008 """benchmark the full generation of a stream clone"""
2009
2010 opts = _byteskwargs(opts)
2011 timer, fm = gettimer(ui, opts)
2012
2013 # deletion of the generator may trigger some cleanup that we do not want to
2014 # measure
2015
2016 generate = _find_stream_generator(stream_version)
2017
2018 def runone():
2019 # the lock is held for the duration the initialisation
2020 for chunk in generate(repo):
2021 pass
2022
2023 timer(runone, title=b"generate")
2024 fm.end()
2025
2026
1995 @command(b'perf::parents|perfparents', formatteropts)
2027 @command(b'perf::parents|perfparents', formatteropts)
1996 def perfparents(ui, repo, **opts):
2028 def perfparents(ui, repo, **opts):
1997 """benchmark the time necessary to fetch one changeset's parents.
2029 """benchmark the time necessary to fetch one changeset's parents.
@@ -188,6 +188,8 b' perfstatus'
188 perf::startup
188 perf::startup
189 (no help text available)
189 (no help text available)
190 perf::status benchmark the performance of a single status call
190 perf::status benchmark the performance of a single status call
191 perf::stream-generate
192 benchmark the full generation of a stream clone
191 perf::stream-locked-section
193 perf::stream-locked-section
192 benchmark the initial, repo-locked, section of a stream-clone
194 benchmark the initial, repo-locked, section of a stream-clone
193 perf::tags (no help text available)
195 perf::tags (no help text available)
General Comments 0
You need to be logged in to leave comments. Login now