Sun, 19 Feb 2017 20:16:11 -0500 dispatch: consolidate pager flag handling to a single place
Augie Fackler <augie@google.com> [Sun, 19 Feb 2017 20:16:11 -0500] rev 31027
dispatch: consolidate pager flag handling to a single place This makes a little more sense, thanks to Martin for suggesting it.
Sun, 19 Feb 2017 20:12:52 -0500 ui: rename neverpager to disablepager
Augie Fackler <augie@google.com> [Sun, 19 Feb 2017 20:12:52 -0500] rev 31026
ui: rename neverpager to disablepager I agree this is a clearer name for this method.
Sun, 19 Feb 2017 20:00:18 +0900 scmutil: proxy revrange() through repo to break import cycles
Yuya Nishihara <yuya@tcha.org> [Sun, 19 Feb 2017 20:00:18 +0900] rev 31025
scmutil: proxy revrange() through repo to break import cycles This was one of the hardest import cycles as scmutil is widely used and revset functions are likely to depend on a variety of modules. New repo.anyrevs() does not expand user aliases by default to copy the behavior of the existing repo.revs(). I don't want to add new function to localrepository, but this function is quite similar to repo.revs() so it won't increase the complexity of the localrepository class so much.
Sun, 19 Feb 2017 18:19:33 +0900 revset: split language services to revsetlang module (API)
Yuya Nishihara <yuya@tcha.org> [Sun, 19 Feb 2017 18:19:33 +0900] rev 31024
revset: split language services to revsetlang module (API) New revsetlang module hosts parser, tokenizer, and miscellaneous functions working on parsed tree. It does not include functions for evaluation such as getset() and match(). 2288 mercurial/revset.py 684 mercurial/revsetlang.py 2972 total get*() functions are aliased since they are common in revset.py.
Sun, 19 Feb 2017 18:16:09 +0900 revset: import set classes directly from smartset module
Yuya Nishihara <yuya@tcha.org> [Sun, 19 Feb 2017 18:16:09 +0900] rev 31023
revset: import set classes directly from smartset module Follows up 1be65deb3d54.
Sat, 18 Feb 2017 18:00:01 +0900 help: add pointer how to narrow list of resolved/unresolved files (issue5469)
Yuya Nishihara <yuya@tcha.org> [Sat, 18 Feb 2017 18:00:01 +0900] rev 31022
help: add pointer how to narrow list of resolved/unresolved files (issue5469)
Sun, 19 Feb 2017 10:56:08 +0100 shelve: add -n/--name option to unshelve (issue5475)
liscju <piotr.listkiewicz@gmail.com> [Sun, 19 Feb 2017 10:56:08 +0100] rev 31021
shelve: add -n/--name option to unshelve (issue5475) This makes using shelve/unshelve more consistent because shelving can be done using name option and unshelving as well. Author of the idea of this improvement and solution is joshgold.
Sat, 18 Feb 2017 17:23:43 -0800 smartset: use native set operations as fast paths
Jun Wu <quark@fb.com> [Sat, 18 Feb 2017 17:23:43 -0800] rev 31020
smartset: use native set operations as fast paths For set operations like "&" and "-", where we know both basesets have their sets ready, and the first set is sorted, use the native Python set operations as a fast path. Note: "+" is not optimized as that will break the ordering. This leads to noticeable improvements on performance: revset | before | after | delta ---------------------------------------------------------------- draft() & draft() & draft() & draft() | 776 | 477 | -39% draft() + draft() + draft() + draft() | 2849 | 2864 | draft() - draft() + draft() - draft() | 943 | 240 | -75% draft() - draft() - draft() - draft() | 557 | 197 | -64% (time measured in microseconds)
Sat, 18 Feb 2017 16:30:07 -0800 smartset: add some doctests
Jun Wu <quark@fb.com> [Sat, 18 Feb 2017 16:30:07 -0800] rev 31019
smartset: add some doctests Add doctests explaining the set / list behavior. This will make the following changes more confident.
Sat, 18 Feb 2017 00:55:20 -0800 obsolete: avoid using revset language to compute the obsolete revset
Jun Wu <quark@fb.com> [Sat, 18 Feb 2017 00:55:20 -0800] rev 31018
obsolete: avoid using revset language to compute the obsolete revset This is part of a refactoring that moves some phase query optimization from revset.py to phases.py. See previous patches for the motivation. Now we have APIs in phasecache to get the non-public set efficiently, let's use it directly instead of going through the "not public()" revset language in "obsolete()" computation. This patch was meaured using: for i in 'public()' 'not public()' 'draft()' 'not draft()'; do hg perfrevset "$i"; hg perfrevset "$i" --hidden; done and no noticeable (> 1%) performance difference was observed.
Sat, 18 Feb 2017 00:39:31 -0800 revset: use phasecache.getrevset
Jun Wu <quark@fb.com> [Sat, 18 Feb 2017 00:39:31 -0800] rev 31017
revset: use phasecache.getrevset This is part of a refactoring that moves some phase query optimization from revset.py to phases.py. See the previous patch for motivation. This patch changes revset code to use phasecache.getrevset so it no longer accesses the private field: _phasecache._phasesets directly. For performance impact, this patch was tested using the following query, on my hg-committed repo: for i in 'public()' 'not public()' 'draft()' 'not draft()'; do echo $i; hg perfrevset "$i"; hg perfrevset "$i" --hidden; done For the CPython implementation, most operations are unchanged (within +/- 1%), while "not public()" and "draft()" is noticeably faster on an unfiltered repo. It may be because the new code avoids a set copy if filteredrevs is empty. revset | public() | not public() | draft() | not draft() hidden | yes | no | yes | no | yes | no | yes | no ------------------------------------------------------------------ before | 19006 | 17352 | 239 | 286 | 180 | 228 | 7690 | 5745 after | 19137 | 17231 | 240 | 207 | 182 | 150 | 7687 | 5658 delta | | -38% | | -52% | (timed in microseconds) For the pure Python implementation, some operations are faster while "not draft()" is noticeably slower: revset | public() | not public() | draft() | not draft() hidden | yes | no | yes | no | yes | no | yes | no ------------------------------------------------------------------------ before | 18852 | 17183 | 17758 | 15921 | 17505 | 15973 | 41521 | 39822 after | 18924 | 17380 | 17558 | 14545 | 16727 | 13593 | 48356 | 43992 delta | | -9% | -5% | -15% | +16% | +10% That may be the different performance characters of generatorset vs. filteredset. The "not draft()" query could be optimized in this case where both "public" and "secret" are passed to "getrevsets" so it won't iterate the whole repo twice.
Fri, 17 Feb 2017 22:49:05 -0800 phases: add a getrevset method to phasecache
Jun Wu <quark@fb.com> [Fri, 17 Feb 2017 22:49:05 -0800] rev 31016
phases: add a getrevset method to phasecache This is part of a refactoring that moves some phase query optimization from revset.py to phases.py. The motivation behind this was chg repo preloading - to make the obsstore depend on less things (like the revset language). The refactoring also looks good by itself - phasecache does not expose its private field "_phasesets" via public methods and revset.py is accessing it in a hacky way. This patch adds a "getrevset" method, which takes multiple phases and returns a revset in an best-effort efficient way - for "public" phase, it returns a lazy generatorset; for "draft" and "secret", it returns efficient "baseset".
Fri, 17 Feb 2017 20:59:29 -0800 smartset: convert set to list lazily
Jun Wu <quark@fb.com> [Fri, 17 Feb 2017 20:59:29 -0800] rev 31015
smartset: convert set to list lazily If the caller only wants to construct a baseset via a set, and then do "__contains__" tests. It's unnecessary to initialize the list. Testing on my unfiltered hg-committed repo where len(draft()) is 2600, this patch shows about 6% improvement on set intensive queries: Before: $ for i in `seq 5`; hg perfrevset 'draft() & draft() & draft() & draft()' ! wall 0.001196 comb 0.000000 user 0.000000 sys 0.000000 (best of 2011) ! wall 0.001191 comb 0.000000 user 0.000000 sys 0.000000 (best of 2099) ! wall 0.001186 comb 0.010000 user 0.010000 sys 0.000000 (best of 1953) ! wall 0.001182 comb 0.000000 user 0.000000 sys 0.000000 (best of 2135) ! wall 0.001193 comb 0.000000 user 0.000000 sys 0.000000 (best of 2177) After: $ for i in `seq 5`; hg perfrevset 'draft() & draft() & draft() & draft()' ! wall 0.001128 comb 0.000000 user 0.000000 sys 0.000000 (best of 2247) ! wall 0.001119 comb 0.000000 user 0.000000 sys 0.000000 (best of 2317) ! wall 0.001115 comb 0.000000 user 0.000000 sys 0.000000 (best of 2244) ! wall 0.001131 comb 0.000000 user 0.000000 sys 0.000000 (best of 2093) ! wall 0.001124 comb 0.000000 user 0.000000 sys 0.000000 (best of 2134) It could have bigger impact on larger sets in theory.
Thu, 16 Feb 2017 11:34:50 -0500 ui: construct _keepalnum list in a python3-friendly way
Augie Fackler <augie@google.com> [Thu, 16 Feb 2017 11:34:50 -0500] rev 31014
ui: construct _keepalnum list in a python3-friendly way It'll be more expensive, but it preserves the behavior.
Mon, 13 Feb 2017 17:03:14 -0800 match: making visitdir() deal with non-recursive entries
Rodrigo Damazio Bovendorp <rdamazio@google.com> [Mon, 13 Feb 2017 17:03:14 -0800] rev 31013
match: making visitdir() deal with non-recursive entries Primarily as an optimization to avoid recursing into directories that will never have a match inside, this classifies each matcher pattern's root as recursive or non-recursive (erring on the side of keeping it recursive, which may lead to wasteful directory or manifest walks that yield no matches). I measured the performance of "rootfilesin" in two repos: - The Firefox repo with tree manifests, with "hg files -r . -I rootfilesin:browser". The browser directory contains about 3K files across 249 subdirectories. - A specific Google-internal directory which contains 75K files across 19K subdirectories, with "hg files -r . -I rootfilesin:REDACTED". I tested with both cold and warm disk caches. Cold cache was produced by running "sync; echo 3 > /proc/sys/vm/drop_caches". Warm cache was produced by re-running the same command a few times. These were the results: Cold cache Warm cache Before After Before After firefox 0m5.1s 0m2.18s 0m0.22s 0m0.14s google3 dir 2m3.9s 0m1.57s 0m8.12s 0m0.16s Certain extensions, notably narrowhg, can depend on this for correctness (not trying to recurse into directories for which it has no information).
Mon, 13 Feb 2017 15:39:29 -0800 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com> [Mon, 13 Feb 2017 15:39:29 -0800] rev 31012
match: adding support for matching files inside a directory This adds a new "rootfilesin" matcher type which matches files inside a directory, but not any subdirectories (so it matches non-recursively). This has the "root" prefix per foozy's plan for other matchers (rootglob, rootpath, cwdre, etc.).
Fri, 17 Feb 2017 01:21:15 -0800 runtests: add an IPv6 command line flag
Jun Wu <quark@fb.com> [Fri, 17 Feb 2017 01:21:15 -0800] rev 31011
runtests: add an IPv6 command line flag Now we have all IPv6 related issues fixed, add a command line flag so people could actually run tests with IPv6.
Thu, 16 Feb 2017 08:43:59 -0800 runtests: always set web.ipv6
Jun Wu <quark@fb.com> [Thu, 16 Feb 2017 08:43:59 -0800] rev 31010
runtests: always set web.ipv6 Previously, we only set web.ipv6 if IPv6 is used, but not on the IPv4 case. Since we already have set web.address, it makes sense to move "web.ipv6" out from "extra config options".
Thu, 16 Feb 2017 00:13:29 -0800 runtests: set web.address to localhost
Jun Wu <quark@fb.com> [Thu, 16 Feb 2017 00:13:29 -0800] rev 31009
runtests: set web.address to localhost Previously, "hg serve" will listen on "", which is not clear which interface it will actually listen on - it could listen on all interfaces (ex. 0.0.0.0 on IPv4). The run-tests.py script only checks "localhost" for available ports. So let's make it the same for "hg serve" by explicitly setting "web.address" to "localhost". This resolves some IPv6 EADDRINUSE errors.
Thu, 16 Feb 2017 09:38:52 -0800 tests: use LOCALIP
Jun Wu <quark@fb.com> [Thu, 16 Feb 2017 09:38:52 -0800] rev 31008
tests: use LOCALIP This patch replaces hardcoded 127.0.0.1 with $LOCALIP in all tests. Till now, the IPv6 series should make tests pass on common IPv6 systems where the local device has the address "::1" and the hostname "localhost" resolves to "::1".
Wed, 15 Feb 2017 23:24:03 -0800 dummyssh: use LOCALIP
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 23:24:03 -0800] rev 31007
dummyssh: use LOCALIP This patch replaces hard-coded 127.0.0.1 with $LOCALIP in dummyssh.
Thu, 16 Feb 2017 08:01:19 -0800 runtests: export LOCALIP
Jun Wu <quark@fb.com> [Thu, 16 Feb 2017 08:01:19 -0800] rev 31006
runtests: export LOCALIP Previously, tests hard-code local IP address as "127.0.0.1". That won't work for IPv6. This patch exports the $LOCALIP environment variable, which is set to "::1" if we decide to use IPv6.
Wed, 15 Feb 2017 22:53:45 -0800 tinyproxy: use IPv6 if HGIPV6 is set to 1
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 22:53:45 -0800] rev 31005
tinyproxy: use IPv6 if HGIPV6 is set to 1 This patch makes tinyproxy.py work in IPv6 mode if HGIPV6 is set to 1. This will make test-http-proxy.t pass on IPv6 machines.
Wed, 15 Feb 2017 21:09:00 -0800 dumbhttp: use IPv6 if HGIPV6 is set to 1
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 21:09:00 -0800] rev 31004
dumbhttp: use IPv6 if HGIPV6 is set to 1 This will fix flaky tests using dumbhttp. The patch was tested on gcc112.fsffrance.org using the following command: ./run-tests.py -j 40 --runs-per-test 120 test-bundle2-remote-changegroup.t
Wed, 15 Feb 2017 21:03:42 -0800 runtests: export HGIPV6 to hint test scripts whether to use IPv6
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 21:03:42 -0800] rev 31003
runtests: export HGIPV6 to hint test scripts whether to use IPv6 Previously, run-tests.py only exports HGPORT, and scripts in tests do not know if IPv6 should be used. And that breaks scripts like dumbhttp.py which always uses IPv4. This patch makes run-tests.py export HGIPV6, which can help test scripts like dumbhttp.py and tinyproxy.py to decide whether to use IPv6 or not.
Fri, 17 Feb 2017 00:59:09 -0800 runtests: prefer IPv4 to IPv6
Jun Wu <quark@fb.com> [Fri, 17 Feb 2017 00:59:09 -0800] rev 31002
runtests: prefer IPv4 to IPv6 To make IPv6 work, there are multiple areas that need to fix. Before they all get fixed, use IPv4 by default. This should fix tests caused on IPv6 systems.
Fri, 17 Feb 2017 11:08:36 +0100 doc: correct example concerning "hg purge" alias in man page "hgrc.5"
Rainer Woitok <Rainer.Woitok@Gmail.Com> [Fri, 17 Feb 2017 11:08:36 +0100] rev 31001
doc: correct example concerning "hg purge" alias in man page "hgrc.5" The "hg purge" alias as currently described in "hgrc.5" issues a possibly confusing error message like rm: missing operand Try 'rm --help' for more information. if no files are to be purged at all. This patch slightly modifies the example by adding a "-f" option to the "rm" command.
Mon, 06 Feb 2017 23:22:04 -0500 tests: prove that ignore works
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:22:04 -0500] rev 31000
tests: prove that ignore works
Mon, 06 Feb 2017 22:52:47 -0500 annotate: migrate to modern pager API
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 22:52:47 -0500] rev 30999
annotate: migrate to modern pager API
Mon, 06 Feb 2017 23:55:54 -0500 ui: add a debug print right before we start the pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:55:54 -0500] rev 30998
ui: add a debug print right before we start the pager This makes it easier to figure out why a command is getting paginated.
Mon, 06 Feb 2017 23:42:04 -0500 ui: respect historic pager.attend-$COMMAND=no
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:42:04 -0500] rev 30997
ui: respect historic pager.attend-$COMMAND=no I'm on the fence about this behavior, but the user's intent was pretty specific and it's not expensive to support this case.
Mon, 06 Feb 2017 23:45:30 -0500 tests: clean up a bunch of pager testing that is about to be invalidated
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:45:30 -0500] rev 30996
tests: clean up a bunch of pager testing that is about to be invalidated All this attend logic and potential bugs just no longer make sense to test.
Mon, 06 Feb 2017 23:21:45 -0500 ui: add ignore-single-command functionality
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:21:45 -0500] rev 30995
ui: add ignore-single-command functionality This closes the last feature gap other than the attend list from the extension. For now, I'm leaving the attend list in the extension, because I'm unsure it has merit in a world where commands have been updated to take advantage of the modern API.
Wed, 15 Feb 2017 17:48:03 -0500 ui: introduce neverpager() call
Augie Fackler <augie@google.com> [Wed, 15 Feb 2017 17:48:03 -0500] rev 30994
ui: introduce neverpager() call I'm about to add direct paging support to some commands, and as a result we need a way to communicate from the higher layers of dispatch that paging is explicitly disabled.
Wed, 15 Feb 2017 17:47:57 -0500 pager: move more behavior into core
Augie Fackler <augie@google.com> [Wed, 15 Feb 2017 17:47:57 -0500] rev 30993
pager: move more behavior into core This moves the global flag and the --pager=yes logic into core. Only functionality change is that users now always get a --pager flag and can enable the pager via the flag without the extension active. Moving the flag into core exposes a defect in the ro localization, which will have to be corrected later.
Wed, 15 Feb 2017 17:47:51 -0500 pager: move pager-initiating code into core
Augie Fackler <augie@google.com> [Wed, 15 Feb 2017 17:47:51 -0500] rev 30992
pager: move pager-initiating code into core No functionality change. A previous version of this API had a category argument on ui.pager(). As I migrated the commands in core, I couldn't come up with good enough consistency in any categorization scheme so I just scrapped the whole idea. It may be worth revisiting in the future.
Thu, 16 Feb 2017 10:33:59 -0800 test-logtoprocess: use cat to wait for outputs
Jun Wu <quark@fb.com> [Thu, 16 Feb 2017 10:33:59 -0800] rev 30991
test-logtoprocess: use cat to wait for outputs Commands started by logtoprocess are running asynchronously. To be able to test the output, we need to block and wait for the output. The patch uses "| cat" to wait for such "asynchronous" outputs, to make the test more reliable. I have also written a short notice at the top, hopefully people would be aware of the pitfall when changing the test.
Thu, 16 Feb 2017 23:10:47 -0800 chgserver: move comments in config example
Jun Wu <quark@fb.com> [Thu, 16 Feb 2017 23:10:47 -0800] rev 30990
chgserver: move comments in config example "#" must be the first character of a line to mark the text as comments. So let's change the docstring.
Wed, 15 Feb 2017 19:41:14 -0800 localrepo: move extension loading to a separate method
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 19:41:14 -0800] rev 30989
localrepo: move extension loading to a separate method The stateful chg plan [1] requires a special repo object, where ideally all side effects caused by loading the repo object could be reverted by just dropping (gabbage collect) the loaded repo object. Currently, that is impossible because repo.__init__ calls "extensions.loadall", which may have unpredictable side-effects that cannot be reverted by dropping the repo object. This patch moves "extensions.loadall" to a separate method, so chg could subclass localrepository and make extensions loading a no-op. [1]: mercurial-scm.org/pipermail/mercurial-devel/2017-February/092547.html
Thu, 16 Feb 2017 17:30:35 +0530 py3: convert the mode argument of os.fdopen to unicodes
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 16 Feb 2017 17:30:35 +0530] rev 30988
py3: convert the mode argument of os.fdopen to unicodes Couple of these from the earlier series got lost while rebasing. So this patch converts them again.
Wed, 15 Feb 2017 16:29:58 -0800 runtests: unindent an "if True" block
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 16:29:58 -0800] rev 30987
runtests: unindent an "if True" block The block was left to make review easier. This patch unindents it.
Wed, 15 Feb 2017 16:43:27 -0800 runtests: set web.ipv6 if we use IPv6
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 16:43:27 -0800] rev 30986
runtests: set web.ipv6 if we use IPv6 As explained by the previous patch, we need to set "web.ipv6=True" if we decide to use IPv6. Otherwise "hg serve" will still try to listen on IPv4. This patch makes it so by appending web.ipv6 to "extra configs". This patch was tested in a Linux system with IPv6, by the following steps: 1. Change hgweb/server.py temporarily to write a file if IPv6HTTPServer.__init__ is called. 2. run-tests.py -l --keep-tmpdir test-serve.t 3. Check the generated .hgrc, make sure it sets web.ipv6=1. 4. Check the log file to make sure IPv6HTTPServer.__init__ is called.
Wed, 15 Feb 2017 16:22:22 -0800 runtests: checkportisavailable should only check one family
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 16:22:22 -0800] rev 30985
runtests: checkportisavailable should only check one family As explained by the previous patch, checkportisavailable() should only check the preferred family - either IPv4 or IPv6, not both. This patch makes it so.
Wed, 15 Feb 2017 16:18:31 -0800 runtests: add a function to test if IPv6 is available
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 16:18:31 -0800] rev 30984
runtests: add a function to test if IPv6 is available Previously, checkportisavailable returns True if the port is free either on IPv4 or IPv6, but the hg server only uses IPv4 by default. That leads to issues when IPv4 port is not free but the IPv6 one is. To address that, run-tests should stick with either IPv4 or IPv6. This patch adds a function similar to checkportisavailable to test if IPv6 is available, and assigns the result to a variable. The new function was tested in a Linux system script with the following steps: 1. Run "ip addr del ::1/128 dev lo" to delete lo's IPv6 address, Confirm checkipv6available() returns False. 2. Run "ip addr add ::1/128 dev lo" to add back lo's IPv6 address. Confirm checkipv6available() returns True. 3. Start a web server taking the 8000 port. Confirm checkipv6available(8000) is still True.
Wed, 15 Feb 2017 13:34:06 -0800 histedit: log the time taken to read in the commands list
Simon Farnsworth <simonfar@fb.com> [Wed, 15 Feb 2017 13:34:06 -0800] rev 30983
histedit: log the time taken to read in the commands list If we're being fed an external command list from stdin (histedit --commands -), then the time spent reading stdin is outside our control. Log it.
Wed, 15 Feb 2017 13:34:06 -0800 extdiff: log time spent in external diff program
Simon Farnsworth <simonfar@fb.com> [Wed, 15 Feb 2017 13:34:06 -0800] rev 30982
extdiff: log time spent in external diff program We can't fix the time external diff programs take to run. Log that duration for us to remove from any stats we gather
Wed, 15 Feb 2017 13:34:06 -0800 crecord: log blocked time waiting for curses input
Simon Farnsworth <simonfar@fb.com> [Wed, 15 Feb 2017 13:34:06 -0800] rev 30981
crecord: log blocked time waiting for curses input We want to know when we're blocked waiting for the user - log the time spent waiting in the curses keyboard handlers
Wed, 15 Feb 2017 13:38:00 -0800 ui: give editor() a tag of its own
Simon Farnsworth <simonfar@fb.com> [Wed, 15 Feb 2017 13:38:00 -0800] rev 30980
ui: give editor() a tag of its own We know that calls to ui.editor() always block on the user's configured editor. Use a blocking tag that ensures that we don't see a huge variety of editor options in our logging.
Wed, 15 Feb 2017 13:29:12 -0800 ui: time calls to ui.system
Simon Farnsworth <simonfar@fb.com> [Wed, 15 Feb 2017 13:29:12 -0800] rev 30979
ui: time calls to ui.system We want to know when we're blocked on ui.system, and why. Allow the user to supply a tag - otherwise we record on an unspecific tag derived from cmd.
Wed, 15 Feb 2017 13:50:06 -0800 ui: log time spent blocked on stdio
Simon Farnsworth <simonfar@fb.com> [Wed, 15 Feb 2017 13:50:06 -0800] rev 30978
ui: log time spent blocked on stdio We use a wrapper around Mercurial at Facebook that logs key statistics (like elpased time) to our standard performance tooling. This is less useful than it could be, because we currently can't tell when a command is slow because we need to fix Mercurial versus when a command is slow because the user isn't interacting quickly. Teach Mercurial to log the time it spends blocked, so that our tooling can pick it up and submit it with the elapsed time - we can then do the math in our tooling to see if Mercurial is slow, or if the user simply failed to interact. Combining this with the command duration log means that we can ensure that we concentrate performance efforts on the things that bite Facebook users. The perfwrite microbenchmark shifts from: Linux: ! wall 3.213560 comb 0.410000 user 0.350000 sys 0.060000 (best of 4) Mac: ! wall 0.342325 comb 0.180000 user 0.110000 sys 0.070000 (best of 20) before this change to: ! wall 3.478070 comb 0.500000 user 0.420000 sys 0.080000 (best of 3) Mac: ! wall 0.218112 comb 0.220000 user 0.150000 sys 0.070000 (best of 15) showing a small hit in comb time, but firmly in the noise on wall time.
Wed, 15 Feb 2017 13:07:26 -0800 contrib: add a write microbenchmark to perf.py
Simon Farnsworth <simonfar@fb.com> [Wed, 15 Feb 2017 13:07:26 -0800] rev 30977
contrib: add a write microbenchmark to perf.py I'm adding some performance logging to ui.write - this benchmark lets us confirm that the cost of that logging is acceptably low. At this point, the microbenchmark on Linux over SSH shows: ! wall 3.213560 comb 0.410000 user 0.350000 sys 0.060000 (best of 4) while on the Mac locally, it shows: ! wall 0.342325 comb 0.180000 user 0.110000 sys 0.070000 (best of 20)
Wed, 15 Feb 2017 13:17:45 -0800 ui: provide a mechanism to track and log blocked time
Simon Farnsworth <simonfar@fb.com> [Wed, 15 Feb 2017 13:17:45 -0800] rev 30976
ui: provide a mechanism to track and log blocked time We want to log the time Mercurial spends trapped in things outside programmatic control. Provide a mechanism to give us both command runtime and as many different sources of blocking as we deem useful.
Wed, 15 Feb 2017 13:17:39 -0800 mercurial: switch to util.timer for all interval timings
Simon Farnsworth <simonfar@fb.com> [Wed, 15 Feb 2017 13:17:39 -0800] rev 30975
mercurial: switch to util.timer for all interval timings util.timer is now the best available interval timer, at the expense of not having a known epoch. Let's use it whenever the epoch is irrelevant.
Wed, 15 Feb 2017 11:53:59 -0800 util: introduce timer()
Simon Farnsworth <simonfar@fb.com> [Wed, 15 Feb 2017 11:53:59 -0800] rev 30974
util: introduce timer() As documented for timeit.default_timer, there are better timers available for performance measures on some platforms. These timers don't have a set epoch, and thus are only useful for interval measurements, but have higher resolution, and thus get you a better measurement overall. Use the same selection logic as Python's timeit.default_timer. This is a platform clock on Python 2 and early Python 3, and time.perf_counter on Python 3.3 and later (where time.perf_counter is introduced as the best timer to use).
Thu, 22 Dec 2016 02:38:53 +0100 color: move the '_render_effects' function to the core module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 22 Dec 2016 02:38:53 +0100] rev 30973
color: move the '_render_effects' function to the core module
Thu, 22 Dec 2016 02:37:18 +0100 color: move '_effect_str' function into the core module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 22 Dec 2016 02:37:18 +0100] rev 30972
color: move '_effect_str' function into the core module
(0) -30000 -10000 -3000 -1000 -300 -100 -56 +56 +100 +300 +1000 +3000 +10000 tip