Commit Graph

21 Commits

Author SHA1 Message Date
Durham Goode
ab78eca81d perftweaks: add logging for rebase size
Summary:
Let's add logging for the size of rebases (the number of commits being rebased
and the distance over which they are rebased).

Test Plan: Ran a rebase and saw the data show up in ptail

Reviewers: #fbhgext, quark

Reviewed By: #fbhgext, quark

Subscribers: stash, quark, ryanmce

Differential Revision: https://phab.mercurial-scm.org/D169
2017-07-31 10:57:44 -07:00
Durham Goode
dcf434110d perftweaks: add update sizes to logging
Summary:
Let's log the number of commits we're traversing and the number of files
changed by an update.

Test Plan:
Ran it with --config
sampling.key.update_size=perfpipe_dev_command_timers and watched the entry show
up via ptail

Reviewers: #fbhgext, ryanmce

Reviewed By: #fbhgext, ryanmce

Subscribers: ryanmce

Differential Revision: https://phab.mercurial-scm.org/D166
2017-07-31 09:57:23 -07:00
Ryan McElroy
b4c0bebf74 perftweaks: start using cachevfs
Summary:
Without this, we get develwarnings about vfs being deprecated for accessing
files under .hg/cache/.

Test Plan: run-tests, more tests pass

Reviewers: #fbhgext, mitrandir

Reviewed By: #fbhgext, mitrandir

Differential Revision: https://phab.mercurial-scm.org/D129
2017-07-18 10:09:28 -07:00
Stanislau Hlebik
bbe014cb96 perftweaks: remove newhiddencache
Summary: Upstream dropped hidden cache in 2f38ac4af04e70af3ffce4700c5a15252391e391, let's drop newhiddencache too

Test Plan: arc unit

Reviewers: #mercurial, simonfar

Reviewed By: simonfar

Subscribers: simonfar, mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D5146661

Signature: t1:5146661:1496140799:a5a4ddeac577f58a7e1998a5f9fb2eac305cc9d2
2017-05-30 03:42:56 -07:00
Durham Goode
0d916abbed perftweaks: rename _getdynamicblocks to revealedrevs
Upstream has renamed this function.
2017-05-24 09:18:45 -07:00
Jun Wu
adfd01303d perftweaks: remove hardlink tweak
Summary:
The core mercurial could now detect filesystem for Linux and OSX, and enable
real hardlink support for their major filesystems. So the hardlink tweak is no
longer needed.

Test Plan: `arc unit`

Reviewers: #mercurial, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4776139

Signature: t1:4776139:1490601097:0be66e2a0111b71a932b453ef4e1e75fed8276e6
2017-03-27 10:43:01 -07:00
Jeroen Vaelen
b7e3010b10 perftweaks: enable hardlink backups
Summary:
Hardlink backups are significantly cheaper than file copies. They are
disabled in core because they are problematic on CIFS.

Test Plan: Ran the tests.

Reviewers: #sourcecontrol

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4652490

Tasks: 16406729
2017-03-21 13:05:28 -08:00
Stanislau Hlebik
7f8418f995 newhiddencache: record obsinhibit
Summary:
We forgot one more store file: obsinhibit.
This diff adds it

Test Plan: arc unit

Reviewers: #mercurial, mjpieters

Reviewed By: mjpieters

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4714522

Tasks: 16558840

Signature: t1:4714522:1489717585:fdabf3c5f0c11310708ba3d78df39cbaa04a3afa
2017-03-20 01:38:06 -07:00
Stanislau Hlebik
f0b136f93b newhiddencache: add knob to enable fasthiddencache
Summary: Add a knob to easily disable/enable fasthiddencache functionality

Test Plan: arc unit

Reviewers: #mercurial, mjpieters

Reviewed By: mjpieters

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4714509

Tasks: 16558840

Signature: t1:4714509:1489717542:d022201fd7c17863ffe664ae4115b8d1d896da3c
2017-03-20 01:38:06 -07:00
Stanislau Hlebik
32199b95b4 newhiddencache: restore back
Summary:
This diff just restores the code that was reverted before. Next diffs will fix
it

Test Plan: arc unit

Reviewers: #mercurial, mjpieters

Reviewed By: mjpieters

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4714397

Tasks: 16558840

Signature: t1:4714397:1489717436:9777d783d1443dea46460450e8f3da862c147483
2017-03-20 01:38:06 -07:00
Adam Simpkins
143d13f6e3 perftweaks: revert new computehidden cache functionality
Summary:
The computehidden caching functionality doesn't seem to be correct, and breaks
my repository.  "hg log -r head()" now incorrectly reports some obsolete
commits, which causes various mercurial commands to crash.  (They incorrectly
think that these commits aren't obsolete, but their parents are obsolete, which
breaks things.)

This diff reverts the new functionality until it gets fixed.

Test Plan: Confirmed that "hg-dev pull" no longer crashes in my repository.

Reviewers: #mercurial, stash, durham, quark

Reviewed By: quark

Subscribers: net-systems-diffs@fb.com, yogeshwer, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4676573

Tasks: 16558840

Signature: t1:4676573:1489008220:f730da69ec0f8d7220cad16ea6956944cfeb670d
2017-03-08 13:42:01 -08:00
Stanislau Hlebik
ba7fe90440 hgext3rd: newhiddencachekey extension
Summary:
Computing cache key can be quite slow (100ms and even more). Instead let's use
a simpler cache key: size + mtime of phaseroots, obsstore and changelod and
whether changelog write was delayed.

Test Plan:
1) arc unit

2) Run test-newhiddencache.t

3) Run upstream unittest with extension enabled.
python run-tests.py --extra-config-opt extensions.newhiddencachekey=/home/stash/facebook-hg-rpms/fb-hgext/hgext3rd/newhiddencachekey.py -j20

Verify that there are no failures except for those that show that new extension were added.
Note: also need to comment out debug output in the extension

Reviewers: #mercurial, durham

Reviewed By: durham

Subscribers: durham, quark, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4604811

Signature: t1:4604811:1487958882:702ea8fdee16def674db97344832936d53f0cd9d
2017-03-06 01:18:58 -08:00
Martijn Pieters
1752a2ba84 Send a single string (normal) to scuba
Summary: The data was being sent to scuba, but then ignored altogether. Turn this into a single string instead.

Test Plan: arc unit

Reviewers: #sourcecontrol, andrasbelo

Reviewed By: andrasbelo

Subscribers: mjpieters, andrasbelo

Differential Revision: https://phabricator.intern.facebook.com/D4598196

Signature: t1:4598196:1487784582:8952e0e386325d1635029aab2b9d97e9284376ea
2017-02-22 14:36:28 -08:00
Stanislau Hlebik
fa28a07404 perftweaks: fix failure
Summary:
turned out that transaction can be None in some cases.
Let's just write to the cache in this case.

Test Plan: arc unit

Reviewers: #sourcecontrol, durham, andrasbelo

Reviewed By: andrasbelo

Subscribers: andrasbelo, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4507653

Tasks: 15862906

Signature: t1:4507653:1486133933:de0997ef1724ba1082c3597ea64aab760f670b47
2017-02-03 07:22:07 -08:00
Durham Goode
6b981a083a perftweaks: fix noderev cache for non existent nodes
Summary:
In certain situations, like infinitepush, the noderev cache builders would try
to save a node that didn't exist in the repo. This caused an exception. Now we
check each node before we attempt to resolve it to a rev.

Test Plan: Added a test. It failed before, and passes now.

Reviewers: #mercurial, andrasbelo

Reviewed By: andrasbelo

Subscribers: andrasbelo, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4494848

Signature: t1:4494848:1485964835:986d4fe3e29404cac22e4acf7d88c3715fcb51b9
2017-02-01 08:03:49 -08:00
Durham Goode
5da804759f perftweaks: increase noderev cache coverage
Summary:
Previously the noderev cache only covered the branchmap. These days remotenames
and phases are also doing a lot of node->rev look ups, so let's add them to the
noderev cache as well.

Test Plan:
Compared hg book before and after the change. Noticed a significant
perf increase.

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4487962

Signature: t1:4487962:1485871615:634d95f61e916d81440a0f440010912af5ae6a13
2017-01-31 06:11:25 -08:00
Martijn Pieters
1c54b7f189 perftweaks: start logging active sparse profiles
Summary: Log active profiles for any command that uses the repository.

Test Plan: arc unit

Reviewers: #sourcecontrol, mitrandir

Reviewed By: mitrandir

Subscribers: andrasbelo, mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4346795

Signature: t1:4346795:1482251224:a9b3568eeb7e57c61273ce0dc9f4d41abcd2888e
2016-12-20 16:34:33 +00:00
Martijn Pieters
a678247319 perftweaks: start logging the dirstate size
Summary:
Logging dirstate sizes gives us a way to track sparse profile use; how big a
working copy do people actually have?

The logged info can be directed to Scuba via the sampling extension.

Test Plan: Run on a local test repo with the debugger attached. Goal

Reviewers: #sourcecontrol, quark

Reviewed By: quark

Subscribers: mitrandir, quark, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4340367

Signature: t1:4340367:1481920819:d7358e0bdc2cc1422b36266374344e7d2b644ae5
2016-12-16 22:46:36 +00:00
Jun Wu
f08e17d3ed testedwith: change testedwith to "ships-with-fb-hgext"
Summary:
Using `testedwith = 'internal'` is not a good habit [1]. Having it
auto-updated in batch would also introduce a lot of churn. This diff makes
them "ships-with-fb-hgext". If we do want to fill the ideal "testedwith"
information, we could put it in a centric place, like a "fbtestedwith"
extension rewriting those "ships-with-fb-hgext" on the fly.

Maybe having in-repo tags for tested Mercurial releases is also a good idea.

[1]: www.mercurial-scm.org/repo/hg/rev/2af1014c2534

Test Plan: `arc lint`

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4244689

Signature: t1:4244689:1480440027:3dc18d017b48beba1176fbfd120351889259eb4b
2016-11-29 13:24:07 +00:00
Jun Wu
d203784d68 pyflakes: fix all pyflakes issues
Summary: As the title.

Test Plan: `arc unit`

Reviewers: #sourcecontrol, stash, rmcelroy

Reviewed By: stash, rmcelroy

Subscribers: rmcelroy, stash, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4232321

Signature: t1:4232321:1480067588:54e91ece8fa6b5ff13b3ebc9279217c76bf96a24
2016-11-25 00:23:21 +00:00
Jun Wu
8a3a99ba21 hgext: move single file extensions to hgext3rd
Summary:
Be a better citizen under system python path.

Fix all tests issues and change setup.py to use glob pattern to include
all extensions.

Test Plan:
Run tests and `make local`.
Also build and install the package and run `hg sl` in major repos.

Reviewers: #mercurial, ttung, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, durham, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3534311

Signature: t1:3534311:1468275426:fe122646c8bd6c541e1889e73e9df28f86747ff2
2016-07-08 13:15:42 +01:00