Commit Graph

12 Commits

Author SHA1 Message Date
Phil Cohen
3d3d84bea3 dispatch: log raised exception messages and types with ui.log
Reviewed By: DurhamG

Differential Revision: D9363420

fbshipit-source-id: 08fe04b7a72bc14b8f3fccbe1c40ad15d896e5b4
2018-08-16 17:51:25 -07:00
Phil Cohen
916bcca9e2 sampling: add support for environment variables to be logged as metrics
Summary: It seems likely that we'll want to capture environmental vars and log them. Let's make this really easy to do by parsing a config list.

Reviewed By: quark-zju

Differential Revision: D8810693

fbshipit-source-id: 25f507323e3fc4b8c666c66429001189ad7dc7ef
2018-07-11 21:09:32 -07:00
Jun Wu
4c9d79b852 fsmonitor: add a race detector
Summary:
Add a config option `fsmonitor.detectrace` and environment variable
`HGDETECTRACE`. Once set, perform an additional query to check if there are
writes to the working copy while `wctx._buildstatus()` is being calculated.

Also enable the race detector for all fsmonitor tests.

Reviewed By: wez

Differential Revision: D8597957

fbshipit-source-id: 5d83d529641325dc8d5e72ad059eed8db27d1f2a
2018-06-25 19:51:40 -07:00
Jun Wu
0cd76376ed tests: run watchman tests in CI
Summary: Run tests with watchman built from fbcode master. So we get signals about watchman/hg changes.

Reviewed By: DurhamG

Differential Revision: D8448187

fbshipit-source-id: 8643f139932057f326bc75b0b0c5cc616355eeed
2018-06-20 19:35:31 -07:00
Phil Cohen
41453a9a02 fix the build
Summary: Reports of my competence were greatly overstated.

Reviewed By: quark-zju

Differential Revision: D8174059

fbshipit-source-id: 25de102f9fa7b47f9654ae0219e5373e9111b197
2018-05-25 18:48:33 -07:00
Phil Cohen
e3181247e5 log first component of cwd (relative to root) if configured
Reviewed By: quark-zju

Differential Revision: D8173079

fbshipit-source-id: 8b5b6aab7319e2bd892f26e90e840919fb1b7aa3
2018-05-25 18:03:27 -07:00
Durham Goode
e1ac4b80e0 metrics: add performance logging to important locations
Summary:
This logs timing data for:
- update
  - merge.update
  - mergedriver
  - applyupdates
  - workers
- fetches
  - pulls
  - remotefilelog prefetches
  - treemanifest prefetches
- status
  - dirstate walks
  - fsmonitor walks
  - watchman queries

Hopefully this will let us narrow down where time is going in a number of cases
where the profile data is ambigiuous or hard to come by.

Reviewed By: quark-zju

Differential Revision: D7681026

fbshipit-source-id: e6fe65c9a4d2f4e128f62ccb767a7cbe73b2649a
2018-04-23 10:51:21 -07:00
Durham Goode
a4d4fb3e29 metrics: rename logblockedtimes to logmeasuredtimes
Summary:
In an upcoming diff I want to add more timing measurements for various
parts of the Mercurial code (like how long status takes, vs checkout, vs
prefetch, etc). Let's rename the logblockedtimes logic to be more generic, since
it is doing basically the same thing.

Reviewed By: singhsrb

Differential Revision: D7676406

fbshipit-source-id: 9aa8c90ce562fa3ad5b654f7b3191b2c16a440c2
2018-04-18 17:05:32 -07:00
Kostia Balytskyi
662ade9719 hg: make sure blocked times logged during atexit handlers are logged
Summary:
Previosuly, we would miss anything logged in the `ui.atexit`-registered
handler, since the actual logging would happen before those handlers were
called.

Reviewed By: quark-zju

Differential Revision: D6912321

fbshipit-source-id: 77600b7ae535b4da56fef1f92b51998de8e304e2
2018-04-13 21:51:06 -07:00
Jun Wu
1cde63d99c codemod: drop hacks changing PYTHONPATH in tests
Summary:
Now they are unnecessary since `run-tests.py` will set up `PYTONPATH`
correctly.

Differential Revision: D6865042

fbshipit-source-id: ca95314f725968e14349a9d916434aa832c596f9
2018-04-13 21:51:00 -07:00
Kostia Balytskyi
b27a46c987 fb-hgext: fix copied fb-hgext tests
Summary:
This is a big bulk of generally almost-obvious fixes to the moved tests. Mostly
these fixes have to do with correct importing of the actual extensions.

Depends on D6675329

Test Plan:
- ./run-tests.py fails less after this commit
- see further commits for more test fixes

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6675344
2018-01-09 03:06:09 -08:00
Kostia Balytskyi
e75b9fc1b1 fb-hgext: move most of hgext3rd and related tests to core
Summary:
This commit moves most of the stuff in hgext3rd and related tests to
hg-crew/hgext and hg-crew/test respectively.

The things that are not moved are the ones which require some more complex
imports.


Depends on D6675309

Test Plan: - tests are failing at this commit, fixes are in the following commits

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6675329
2018-01-09 03:03:59 -08:00