# HG changeset patch # User Gregory Szorc # Date 1494094556 25200 # Node ID 954f63391d7104826b11047c007345956e53680f # Parent 73c3e226d2fc29af8490180f68193941b9279aed perf: clear revlog caches on every iteration cmdutil.openrevlog() may return a cached revlog instance. This /may/ be a recent "regression" due to refactoring of the manifest API. I'm not sure. Either way, this perf command was broken for at least manifests because subsequent invocations of the perf function would get cache hits from previous invocations, invalidating results. In the extreme case, testing the last revision in the revlog resulted in near-instantanous execution of subsequent runs (since the fulltext is cached). A time of ~1us would be reported in this case. diff -r 73c3e226d2fc -r 954f63391d71 contrib/perf.py --- a/contrib/perf.py Sat May 06 11:12:23 2017 -0700 +++ b/contrib/perf.py Sat May 06 11:15:56 2017 -0700 @@ -854,6 +854,7 @@ def d(): r = cmdutil.openrevlog(repo, 'perfrevlog', file_, opts) + r.clearcaches() beginrev = startrev endrev = _len(r)