perftest: allow selection of volatile set to benchmark
This helps when you focus on a subset of the volatile chain.
perftest: add a command to benchmark construction of volatile cache
Obsolescence and filtering related caches are critical. Having a handy way to
check them is valuable.
perftest: add an option to invalidate volatile cache
Some revsets are sensitive to such initialization. Being able to
test the impact is great.
perftest: migrate to new style command declaration
Declaring synopsis and argument on the function site is much clearer.
perftest: drop duplicated codes
The `perfnodelookup` lookup commands is duplicated. We drop the first version,
overwritten by the seconds.
cmdutil: make options argument optional
There is not reason to force passing of an empty options list.
branchmap: allow to use cache of subset
Filtered repository are *subset* of unfiltered repository. This means that a
filtered branchmap could be use to compute the unfiltered version.
And filtered version happen to be subset of each other:
- "all() - unserved()" is a subset of "all() - hidden()"
- "all() - hidden()" is a subset of "all()"
This means that branchmap with "unfiltered" filter can be used as a base for
"hidden" branchmap that itself could be used as a base for unfiltered
branchmap.
unserved < hidden < None
This changeset implements this mechanism. If the on disk branchcache is not valid
we use the branchcache of the nearest subset as base instead of computing it from
scratch. Such fallback can be cascaded multiple time is necessary.
Note that both "hidden" and "unserved" set are a bit volatile. We will add more
stable filtering in next changesets.
This changeset enables collaboration between no filtering and "unserved"
filtering. Fixing performance regression introduced by
47f00b0de337
repoview: add a subset table
This will be used by branchmap collaboration. See inline documentation for more
details
branchmap: add a copy method
If we want branchcache of different filter to collaborate, they need a simple
way to copy each other. This will ensure that each filtered have no side effect
on other filter level cache.