perf: run the gc before each run
The python garbage collector is a large source of performance troubles, we run
it right before the timed section to reduce the change for the gc to add noise
to the benchmark.
from mercurial.i18n import _
from mercurial import changegroup, error, extensions
def abort(orig, *args, **kwargs):
raise error.Abort(_('this is an exercise'))
def uisetup(ui):
extensions.wrapfunction(changegroup, 'getbundler', abort)