Commit Graph

93 Commits

Author SHA1 Message Date
Augie Fackler
a84cc516e7 merge: restate calculateupdates in terms of a matcher
Once we get a matcher down into manifestmerge, we can make narrowhg
work more easily and potentially let manifest.match().diff() do less
work in manifestmerge.
2015-12-14 20:37:41 -05:00
timeless
e91c29104b perf: perfrevlog optimize for perf.stub 2015-12-04 19:05:56 +00:00
timeless
0da8511b85 perf: add getlen
getlen will return 1 if perf.stub
2015-12-04 19:05:32 +00:00
timeless
04f03f3aeb perf: add optional rev for perflog and perftemplating 2015-12-04 18:08:50 +00:00
timeless
05d63c41ee perf: perfparents honor config perf.parentscount 2015-12-04 18:18:07 +00:00
timeless
c9727daf48 perf: offer perf.stub to only run one loop 2015-12-04 17:41:30 +00:00
timeless
aa0ea59703 perf: improve grammar of gettimer comment 2015-12-04 17:41:02 +00:00
Gregory Szorc
da7e434856 perf: add perflrucachedict command
It measures time to construct, perform gets, sets, or mixed mode
operations on a cache of configurable size with variable numbers of
operations.
2015-12-06 17:07:50 -08:00
timeless
6706ae14fe contrib/perf: perfparents handle filtered repos 2015-11-24 21:36:20 +00:00
timeless
0706103b1f contrib/perf: perfparents handle tiny repos
refuse to run if there are not enough commits
2015-11-24 20:54:14 +00:00
timeless
d5fb95573c contrib/perf: fix perfmergecalculate
merge.calculateupdates requires an array of ancestors and followcopies
2015-11-24 21:44:16 +00:00
timeless
1781386673 contrib/perf: fix perffncachewrite
fncache.write requires a transaction (and thus a lock)
2015-11-24 22:01:11 +00:00
timeless
73fa098081 contrib/perf: omit duplicated function 2015-11-24 20:05:15 +00:00
timeless
87b00f7ab0 contrib/perf: name functions to match decorators 2015-11-24 20:08:21 +00:00
Gregory Szorc
86b206e002 perf: support obtaining contexts from perfrevset
Previously, perfrevset called repo.revs(), which only returns integer
revisions. Many revset consumers call repo.set(), which returns
changectx instances. Or they obtain a context manually later.

Since obtaining changectx instances when evaluating revsets is common,
this patch adds support for benchmarking this use case.

While we added an if conditional for every benchmark loop, it
doesn't appear to matter since revset evaluation dwarfs the cost
of a single if.
2015-11-21 15:39:18 -08:00
Matt Mackall
fd472e2570 perf: un-bitrot perfstatus 2015-11-19 15:02:27 -06:00
FUJIWARA Katsunori
106983607a dirstate: make dirstate.write() callers pass transaction object to it
Now, 'dirstate.write(tr)' delays writing in-memory changes out, if a
transaction is running.

This may cause treating this revision as "the first bad one" at
bisecting in some cases using external hook process inside transaction
scope, because some external hooks and editor process are still
invoked without HG_PENDING and pending changes aren't visible to them.

'dirstate.write()' callers below in localrepo.py explicitly use 'None'
as 'tr', because they can assume that no transaction is running:

  - just before starting transaction
  - at closing transaction, or
  - at unlocking wlock
2015-10-17 01:15:34 +09:00
Matt Mackall
e6644982a8 perf: mark experimental option presleep 2015-07-18 14:16:36 -05:00
Pierre-Yves David
a4580cc28e perf: support -T for every perf commands
We are already building a formatter, we can now pass it options the official
way.
2015-06-09 15:18:47 -07:00
Siddharth Agarwal
6a367ef5be perf: make measuring foldmap perf work again
Rev 54727f222a91 split the foldmap into two, but I forgot to update perf for
the changes.
2015-04-02 19:13:50 -07:00
Matt Mackall
bbeea83192 perf: add methods for timing changeset file list reading 2015-03-18 12:03:44 -05:00
Angel Ezquerra
6e49f7def8 localrepo: remove all external users of localrepo.sopener
This change touches every module in which repository.sopener was being used, and
changes it for the equivalent repository.svfs.

It should now be possible to remove localrepo.sopener.
2015-01-11 00:25:54 +01:00
Matt Mackall
465be7563f perf: add a configurable sleep on startup
This is intended to counteract power management by giving a consistent
idle period before test runs.
2015-01-10 21:13:10 -06:00
Matt Harbison
3c47e94de7 commit: propagate --addremove to subrepos if -S is specified (issue3759)
The recursive addremove operation occurs completely before the first subrepo is
committed.  Only hg subrepos support the addremove operation at the moment- svn
and git subrepos will warn and abort the commit.
2014-11-24 22:27:49 -05:00
Matt Harbison
9e4d7cc2d3 scmutil: pass a matcher to scmutil.addremove() instead of a list of patterns
This will make it easier to support subrepository operations.
2014-11-09 19:57:02 -05:00
Pierre-Yves David
a2ff033417 perf: add a perfloadmarkers command
It is used to benchmark the obsstore initialization time.
2014-11-20 16:27:55 -08:00
Pierre-Yves David
1154bfe337 perf: use a formatter for output
We use a `formatter` object in the perf extensions. This allow the use of
formatted output like json. To avoid adding logic to create a formatter and pass
it around to the timer function in every command, we add a `gettimer` function
in charge of returning a `timer` function as simple as before but embedding an
appropriate formatter.

This new `gettimer` function also return the formatter as it needs to be
explicitly closed at the end of the command.

example output:


  $ hg --config ui.formatjson=True perfvolatilesets visible obsolete
  [
   {
    "comb": 0.02,
    "count": 126,
    "sys": 0.0,
    "title": "obsolete",
    "user": 0.02,
    "wall": 0.0199398994446
   },
   {
    "comb": 0.02,
    "count": 117,
    "sys": 0.0,
    "title": "visible",
    "user": 0.02,
    "wall": 0.0250301361084
   }
  ]
2014-11-04 10:40:06 +00:00
Siddharth Agarwal
6a0b47b797 perf: add a way to measure the perf of constructing the foldmap
Constructing the foldmap is a necessary part of operations like 'hg status' on
OS X. This command allows us to measure the perf of constructing it.
2014-10-03 19:58:26 -07:00
Pierre-Yves David
8dd85d0996 perf: unroll the result in perfrevset
With the new lazy revset implementation, we need to actually read all elements
to trigger all the computations. Otherwise a no-op if of course much faster than
the full work.
2014-03-26 17:25:11 -07:00
Pierre-Yves David
f834b74f49 perf: fix perfvolatilesets
The repoview's `filteredrevs` has been renamed to `filterrevs` at some point.
perf was never informed.
2013-12-23 16:04:51 -08:00
Brodie Rao
aba805d85d perf: add perfmoonwalk command to walk the changelog backwards
This lets us test the effectiveness (or ineffectiveness) of the revlog chunk
cache when walking revlogs backwards.
2013-11-17 18:04:28 -05:00
Augie Fackler
2859ed15ec subsettable: move from repoview to branchmap, the only place it's used
This is a step towards breaking an import cycle between revset and
repoview. Import cycles happened to work in Python 2 with implicit
relative imports, but breaks on Python 3 when we start using explicit
relative imports via 2to3 rewrite rules.
2013-11-06 14:38:34 -05:00
Augie Fackler
2727bcf864 perf: rearrange imports of changelong and manifest to appease check-code 2013-09-20 10:14:59 -04:00
Siddharth Agarwal
10bb361ad4 perfmanifest: allow and require passing in a rev
Previously perfmanifest would only test tip.
2013-09-06 13:35:29 -07:00
Siddharth Agarwal
79b9a1c4e5 perfmanifest: fix cache invalidation
The manifest cache is now stored in _mancache. The revlog cache is still stored
in _cache.
2013-09-06 13:20:07 -07:00
Simon Heimberg
6059e06d0f cleanup: drop unused variables and an unused import 2013-07-01 20:48:56 +02:00
Simon Heimberg
8a32578a00 cleanup: remove unused imports
detected by pyflakes
2013-06-13 01:36:58 +02:00
Durham Goode
94d98a2fbb annotate: simplify annotate parent function
The annotate algorithm used a custom parents() function to try to reuse
filectx and filelogs. I simplified it a bit to rely more heavily on the
self.parents() which makes it work well with alternative filectx
implementations. I tested performance on a file with 5000+ revisions
but no renames, and on a file with 500 revisions repeating a series of
4 edits+renames and saw zero performance hit.  In fact, it was reliably a
couple milliseconds faster now.

Added the perfannotate command to contrib/perf.py for future use.
2013-05-30 19:29:03 -07:00
Siddharth Agarwal
b2115318e7 perf: add a command to test copies.pathcopies perf
An upcoming patch will improve the performance of this function, and this
command will be used to demonstrate that improvement.
2013-04-04 20:36:46 -07:00
Siddharth Agarwal
3d47559133 perf: add a command to test addremove performance
Upcoming patches will improve addremove performance. This command will be used
to demonstrate that improvement.
2013-04-01 23:09:36 -07:00
Bryan O'Sullivan
0c6ba243cb perf: add perfdirs command
This measures the cost of computing the dirstate's dirs structure,
which becomes very expensive in a large working directory.
2013-04-01 13:46:32 -07:00
Bryan O'Sullivan
b9f58e03c3 perf: remove mysterious trailing newlines 2013-03-28 18:21:20 -07:00
Siddharth Agarwal
47a58ca6ee perf: add a command to measure merge.calculateupdates perf
The performance of merge.manifestmerge will be improved in upcoming patches.
This command will be used to demonstrate the improvement.
2013-03-24 17:06:10 -07:00
Mads Kiilerich
5787baee50 spelling: fix some minor issues found by spell checker 2013-02-10 18:24:29 +01:00
Pierre-Yves David
684502f847 perf: add perfbranchmap command
The command times the update of a branchmap from its nearest subset
or from scratch.
2013-01-11 18:39:43 +01:00
Pierre-Yves David
237773b354 perftest: allow selection of volatile set to benchmark
This helps when you focus on a subset of the volatile chain.
2013-01-04 19:24:32 +01:00
Pierre-Yves David
7e392315df 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.
2013-01-04 19:23:26 +01:00
Pierre-Yves David
0df9cd0af7 perftest: add an option to invalidate volatile cache
Some revsets are sensitive to such initialization. Being able to
test the impact is great.
2013-01-04 19:22:40 +01:00
Pierre-Yves David
c91dd4609f perftest: document the perfrevset command
I'll add an argument to it.
2013-01-04 19:22:15 +01:00
Pierre-Yves David
220ee90898 perftest: migrate to new style command declaration
Declaring synopsis and argument on the function site is much clearer.
2013-01-04 19:20:51 +01:00