sapling/edenscm/hgext/fastlog.py

558 lines
18 KiB
Python
Raw Normal View History

Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
# fastlog.py
#
# An extension to query remote servers for logs using scmquery / fastlog
#
# Copyright 2016 Facebook, Inc.
"""
connect to scmquery servers for fast fetching of logs on files and directories.
Configure it by adding the following config options to your .hg/hgrc.
This relies on fbconduit being setup for the repo; this should already
be configured if supported by your repo.
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
Config::
[fastlog]
enabled=true
fastlog: add an option to use fastlog for files Summary: The fastlog code says it cannot handle file renames, which is not true as far as I know. Therefore, try use it for files. This affects the `follow()` revset. I picked a random file, and fastlog is faster than the alternative code path even with warm cache: With fastlog: % ./hg log edenscm/mercurial/smartset.py --time --pager=off -T '.' --debug --config fastlog.files=1 found common parent at a320f95a23716d0d106d922fa07ffcf0f838d3ff starting fastlog at a320f95a23716d0d106d922fa07ffcf0f838d3ff ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. time: real 2.060 secs (user 1.870+0.000 sys 0.290+0.000) Without fastlog, cold cache: % sudo rm /var/cache/hgcache/fbsource/packs/*.hist*; ./hg log edenscm/mercurial/smartset.py --time --pager=off -T '.' --debug --config fastlog.files=0 fastlog: not used because fbcode/scm/hg/edenscm/mercurial/smartset.py is not a directory .fetching content for 1 file over HTTPS 35.56 kB downloaded in 147 ms over 1 request (0.24 MB/s; latency: 147 ms) fetching history for 1 file over HTTPS 445 B downloaded in 56 ms over 1 request (0.01 MB/s; latency: 56 ms) running ssh -oControlMaster=no hg.vip.facebook.com 'hg -R '\''/data/scm/fbsource?stage1_read'\'' serve --stdio' sending hello command sending between command remote: 713 remote: capabilities: unbundlehash gettreepack pushkey getfile getflogheads listkeyspatterns knownnodes getbundle lookup treeonly stream_option remotefilelog known unbundle=HG10GZ,HG10BZ,HG10UN clienttelemetry branchmap changegroupsubset unbundlereplay batch bundle2=HG20%0Ab2x%253Ainfinitepush%0Ab2x%253Ainfinitepushmutation%0Ab2x%253Ainfinitepushscratchbookmarks%0Ab2x%253Arebase%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Atreemanifest%3DTrue%0Atreemanifestserver%3DTrue%0Atreeonly%3DTrue streamreqs=generaldelta,lz4revlog,revlogv1 getannotate stream-preferred remote: 1 sending clienttelemetry command connected to hg020.prn2.facebook.com sending getpackv2 command ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 876 files fetched over 876 fetches - (1 misses, 99.89% hit ratio) over 5.98s (running background incremental repack) time: real 11.920 secs (user 5.050+0.000 sys 0.470+0.000) Without fastlog, warm cache: quark@devvm33994 ~/fbcode/scm/hg % ./hg log edenscm/mercurial/smartset.py --time --pager=off -T '.' --debug --config fastlog.files=0 fastlog: not used because fbcode/scm/hg/edenscm/mercurial/smartset.py is not a directory ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. time: real 2.530 secs (user 2.050+0.000 sys 0.070+0.000) This is one step forward getting rid of the legacy filenode / ancestormap logic. It regresses on offline experience, but we can build simple caches around the `follow()` revset later. Reviewed By: markbt Differential Revision: D16365331 fbshipit-source-id: 16ffd6c3ec2daa5530fed94fb9c41fe75efd6182
2019-08-14 05:09:13 +03:00
# Also use fastlog for files. Otherwise only use fastlog for directories.
# (default: false)
files=true
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
"""
import heapq
from collections import deque
from threading import Event, Thread
from edenscm.mercurial import (
changelog,
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
error,
extensions,
match as matchmod,
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
node,
phases,
revset,
smartset,
util,
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
)
from edenscm.mercurial.i18n import _
from edenscm.mercurial.node import nullrev
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
conduit = None
FASTLOG_MAX = 500
FASTLOG_QUEUE_SIZE = 1000
FASTLOG_TIMEOUT = 20
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
def extsetup(ui):
global conduit
try:
conduit = extensions.find("fbconduit")
except KeyError:
from . import fbconduit as conduit
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
except ImportError:
ui.warn(_("Unable to find fbconduit extension\n"))
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
return
if not util.safehasattr(conduit, "conduit_config"):
ui.warn(_("Incompatible conduit module; disabling fastlog\n"))
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
return
if not conduit.conduit_config(ui):
ui.warn(_("No conduit host specified in config; disabling fastlog\n"))
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
return
extensions.wrapfunction(revset, "_follow", fastlogfollow)
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
def lazyparents(rev, public, parentfunc):
"""lazyparents(rev, public)
Lazily yield parents of rev in reverse order until all nodes
in public have been reached or all revs have been exhausted
10
| \
9 8
| | \
7 6 5
| | /
4 *3 First move, 4 -3
| /
2 *2 Second move, 4 -1
| *
1
For example:
>>> parents = { 10:[9, 8], 9:[7], 8:[6,5], 7:[4], 6:[3], 5:[3], 4:[2] }
>>> parents.update({ 3:[2], 2:[1], 1:[] })
>>> parentfunc = lambda k: parents[k]
>>> public = set([1])
>>> for p in lazyparents(10, public, parentfunc): print p,
10 9 8 7 6 5 4 3 2 1
>>> public = set([2,3])
>>> for p in lazyparents(10, public, parentfunc): print p,
10 9 8 7 6 5 4 3 2
>>> parents[4] = [3]
>>> public = set([3,4,5])
>>> for p in lazyparents(10, public, parentfunc): print p,
10 9 8 7 6 5 4 3
>>> parents[4] = [1]
>>> public = set([3,5,7])
>>> for p in lazyparents(10, public, parentfunc): print p,
10 9 8 7 6 5 4 3 2 1
"""
seen = set()
heap = [-rev]
while heap:
cur = -heapq.heappop(heap)
if cur not in seen:
seen.add(cur)
yield cur
published = cur in public
if published:
# Down to one public ancestor; end generation
if len(public) == 1:
return
public.remove(cur)
for p in parentfunc(cur):
if p != nullrev:
heapq.heappush(heap, -p)
if published:
public.add(p)
def dirmatches(files, paths):
"""dirmatches(files, paths)
Return true if any files match directories in paths
fastlog: add an option to use fastlog for files Summary: The fastlog code says it cannot handle file renames, which is not true as far as I know. Therefore, try use it for files. This affects the `follow()` revset. I picked a random file, and fastlog is faster than the alternative code path even with warm cache: With fastlog: % ./hg log edenscm/mercurial/smartset.py --time --pager=off -T '.' --debug --config fastlog.files=1 found common parent at a320f95a23716d0d106d922fa07ffcf0f838d3ff starting fastlog at a320f95a23716d0d106d922fa07ffcf0f838d3ff ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. time: real 2.060 secs (user 1.870+0.000 sys 0.290+0.000) Without fastlog, cold cache: % sudo rm /var/cache/hgcache/fbsource/packs/*.hist*; ./hg log edenscm/mercurial/smartset.py --time --pager=off -T '.' --debug --config fastlog.files=0 fastlog: not used because fbcode/scm/hg/edenscm/mercurial/smartset.py is not a directory .fetching content for 1 file over HTTPS 35.56 kB downloaded in 147 ms over 1 request (0.24 MB/s; latency: 147 ms) fetching history for 1 file over HTTPS 445 B downloaded in 56 ms over 1 request (0.01 MB/s; latency: 56 ms) running ssh -oControlMaster=no hg.vip.facebook.com 'hg -R '\''/data/scm/fbsource?stage1_read'\'' serve --stdio' sending hello command sending between command remote: 713 remote: capabilities: unbundlehash gettreepack pushkey getfile getflogheads listkeyspatterns knownnodes getbundle lookup treeonly stream_option remotefilelog known unbundle=HG10GZ,HG10BZ,HG10UN clienttelemetry branchmap changegroupsubset unbundlereplay batch bundle2=HG20%0Ab2x%253Ainfinitepush%0Ab2x%253Ainfinitepushmutation%0Ab2x%253Ainfinitepushscratchbookmarks%0Ab2x%253Arebase%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Atreemanifest%3DTrue%0Atreemanifestserver%3DTrue%0Atreeonly%3DTrue streamreqs=generaldelta,lz4revlog,revlogv1 getannotate stream-preferred remote: 1 sending clienttelemetry command connected to hg020.prn2.facebook.com sending getpackv2 command ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 876 files fetched over 876 fetches - (1 misses, 99.89% hit ratio) over 5.98s (running background incremental repack) time: real 11.920 secs (user 5.050+0.000 sys 0.470+0.000) Without fastlog, warm cache: quark@devvm33994 ~/fbcode/scm/hg % ./hg log edenscm/mercurial/smartset.py --time --pager=off -T '.' --debug --config fastlog.files=0 fastlog: not used because fbcode/scm/hg/edenscm/mercurial/smartset.py is not a directory ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. time: real 2.530 secs (user 2.050+0.000 sys 0.070+0.000) This is one step forward getting rid of the legacy filenode / ancestormap logic. It regresses on offline experience, but we can build simple caches around the `follow()` revset later. Reviewed By: markbt Differential Revision: D16365331 fbshipit-source-id: 16ffd6c3ec2daa5530fed94fb9c41fe75efd6182
2019-08-14 05:09:13 +03:00
Expects paths to end in '/' if they are directories.
>>> dirmatches(['holy/grail'], ['holy/'])
True
>>> dirmatches(['holy/grail'], ['holly/'])
False
fastlog: add an option to use fastlog for files Summary: The fastlog code says it cannot handle file renames, which is not true as far as I know. Therefore, try use it for files. This affects the `follow()` revset. I picked a random file, and fastlog is faster than the alternative code path even with warm cache: With fastlog: % ./hg log edenscm/mercurial/smartset.py --time --pager=off -T '.' --debug --config fastlog.files=1 found common parent at a320f95a23716d0d106d922fa07ffcf0f838d3ff starting fastlog at a320f95a23716d0d106d922fa07ffcf0f838d3ff ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. time: real 2.060 secs (user 1.870+0.000 sys 0.290+0.000) Without fastlog, cold cache: % sudo rm /var/cache/hgcache/fbsource/packs/*.hist*; ./hg log edenscm/mercurial/smartset.py --time --pager=off -T '.' --debug --config fastlog.files=0 fastlog: not used because fbcode/scm/hg/edenscm/mercurial/smartset.py is not a directory .fetching content for 1 file over HTTPS 35.56 kB downloaded in 147 ms over 1 request (0.24 MB/s; latency: 147 ms) fetching history for 1 file over HTTPS 445 B downloaded in 56 ms over 1 request (0.01 MB/s; latency: 56 ms) running ssh -oControlMaster=no hg.vip.facebook.com 'hg -R '\''/data/scm/fbsource?stage1_read'\'' serve --stdio' sending hello command sending between command remote: 713 remote: capabilities: unbundlehash gettreepack pushkey getfile getflogheads listkeyspatterns knownnodes getbundle lookup treeonly stream_option remotefilelog known unbundle=HG10GZ,HG10BZ,HG10UN clienttelemetry branchmap changegroupsubset unbundlereplay batch bundle2=HG20%0Ab2x%253Ainfinitepush%0Ab2x%253Ainfinitepushmutation%0Ab2x%253Ainfinitepushscratchbookmarks%0Ab2x%253Arebase%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Atreemanifest%3DTrue%0Atreemanifestserver%3DTrue%0Atreeonly%3DTrue streamreqs=generaldelta,lz4revlog,revlogv1 getannotate stream-preferred remote: 1 sending clienttelemetry command connected to hg020.prn2.facebook.com sending getpackv2 command ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 876 files fetched over 876 fetches - (1 misses, 99.89% hit ratio) over 5.98s (running background incremental repack) time: real 11.920 secs (user 5.050+0.000 sys 0.470+0.000) Without fastlog, warm cache: quark@devvm33994 ~/fbcode/scm/hg % ./hg log edenscm/mercurial/smartset.py --time --pager=off -T '.' --debug --config fastlog.files=0 fastlog: not used because fbcode/scm/hg/edenscm/mercurial/smartset.py is not a directory ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. time: real 2.530 secs (user 2.050+0.000 sys 0.070+0.000) This is one step forward getting rid of the legacy filenode / ancestormap logic. It regresses on offline experience, but we can build simple caches around the `follow()` revset later. Reviewed By: markbt Differential Revision: D16365331 fbshipit-source-id: 16ffd6c3ec2daa5530fed94fb9c41fe75efd6182
2019-08-14 05:09:13 +03:00
>>> dirmatches(['holy/grail'], ['holy/grail'])
True
>>> dirmatches(['holy/grail'], ['holy/grail1'])
False
>>> dirmatches(['holy/grail1'], ['holy/grail'])
False
"""
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
assert paths
for path in paths:
fastlog: add an option to use fastlog for files Summary: The fastlog code says it cannot handle file renames, which is not true as far as I know. Therefore, try use it for files. This affects the `follow()` revset. I picked a random file, and fastlog is faster than the alternative code path even with warm cache: With fastlog: % ./hg log edenscm/mercurial/smartset.py --time --pager=off -T '.' --debug --config fastlog.files=1 found common parent at a320f95a23716d0d106d922fa07ffcf0f838d3ff starting fastlog at a320f95a23716d0d106d922fa07ffcf0f838d3ff ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. time: real 2.060 secs (user 1.870+0.000 sys 0.290+0.000) Without fastlog, cold cache: % sudo rm /var/cache/hgcache/fbsource/packs/*.hist*; ./hg log edenscm/mercurial/smartset.py --time --pager=off -T '.' --debug --config fastlog.files=0 fastlog: not used because fbcode/scm/hg/edenscm/mercurial/smartset.py is not a directory .fetching content for 1 file over HTTPS 35.56 kB downloaded in 147 ms over 1 request (0.24 MB/s; latency: 147 ms) fetching history for 1 file over HTTPS 445 B downloaded in 56 ms over 1 request (0.01 MB/s; latency: 56 ms) running ssh -oControlMaster=no hg.vip.facebook.com 'hg -R '\''/data/scm/fbsource?stage1_read'\'' serve --stdio' sending hello command sending between command remote: 713 remote: capabilities: unbundlehash gettreepack pushkey getfile getflogheads listkeyspatterns knownnodes getbundle lookup treeonly stream_option remotefilelog known unbundle=HG10GZ,HG10BZ,HG10UN clienttelemetry branchmap changegroupsubset unbundlereplay batch bundle2=HG20%0Ab2x%253Ainfinitepush%0Ab2x%253Ainfinitepushmutation%0Ab2x%253Ainfinitepushscratchbookmarks%0Ab2x%253Arebase%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Atreemanifest%3DTrue%0Atreemanifestserver%3DTrue%0Atreeonly%3DTrue streamreqs=generaldelta,lz4revlog,revlogv1 getannotate stream-preferred remote: 1 sending clienttelemetry command connected to hg020.prn2.facebook.com sending getpackv2 command ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 876 files fetched over 876 fetches - (1 misses, 99.89% hit ratio) over 5.98s (running background incremental repack) time: real 11.920 secs (user 5.050+0.000 sys 0.470+0.000) Without fastlog, warm cache: quark@devvm33994 ~/fbcode/scm/hg % ./hg log edenscm/mercurial/smartset.py --time --pager=off -T '.' --debug --config fastlog.files=0 fastlog: not used because fbcode/scm/hg/edenscm/mercurial/smartset.py is not a directory ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. time: real 2.530 secs (user 2.050+0.000 sys 0.070+0.000) This is one step forward getting rid of the legacy filenode / ancestormap logic. It regresses on offline experience, but we can build simple caches around the `follow()` revset later. Reviewed By: markbt Differential Revision: D16365331 fbshipit-source-id: 16ffd6c3ec2daa5530fed94fb9c41fe75efd6182
2019-08-14 05:09:13 +03:00
if path[-1] == "/":
for f in files:
if f.startswith(path):
return True
else:
for f in files:
if f == path:
return True
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
return False
def originator(parentfunc, rev):
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
"""originator(repo, rev)
Yield parents of rev from repo in reverse order
"""
# Use set(nullrev, rev) to iterate until termination
for p in lazyparents(rev, set([nullrev, rev]), parentfunc):
if rev != p:
yield p
def fastlogfollow(orig, repo, subset, x, name, followfirst=False):
if followfirst:
# fastlog does not support followfirst=True
repo.ui.debug("fastlog: not used because 'followfirst' is set\n")
return orig(repo, subset, x, name, followfirst)
args = revset.getargsdict(x, name, "file startrev")
if "file" not in args:
# Not interesting for fastlog case.
repo.ui.debug("fastlog: not used because 'file' is not provided\n")
return orig(repo, subset, x, name, followfirst)
if "startrev" in args:
revs = revset.getset(repo, smartset.fullreposet(repo), args["startrev"])
it = iter(revs)
try:
startrev = next(it)
except StopIteration:
startrev = repo["."].rev()
try:
next(it)
# fastlog does not support multiple startrevs
repo.ui.debug("fastlog: not used because multiple revs are provided\n")
return orig(repo, subset, x, name, followfirst)
except StopIteration:
# supported by fastlog: startrev contains a single rev
pass
else:
startrev = repo["."].rev()
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
reponame = repo.ui.config("fbconduit", "reponame")
if not reponame or not repo.ui.configbool("fastlog", "enabled"):
repo.ui.debug("fastlog: not used because fastlog is disabled\n")
return orig(repo, subset, x, name, followfirst)
path = revset.getstring(args["file"], _("%s expected a pattern") % name)
if path.startswith("path:"):
# strip "path:" prefix
path = path[5:]
if any(path.startswith("%s:" % prefix) for prefix in matchmod.allpatternkinds):
# Patterns other than "path:" are not supported
repo.ui.debug(
"fastlog: not used because '%s:' patterns are not supported\n"
% path.split(":", 1)[0]
)
return orig(repo, subset, x, name, followfirst)
files = [path]
if not files or "." in files:
# Walking the whole repo - bail on fastlog
repo.ui.debug("fastlog: not used because walking through the entire repo\n")
return orig(repo, subset, x, name, followfirst)
dirs = set()
wvfs = repo.wvfs
for path in files:
if wvfs.isdir(path) and not wvfs.islink(path):
dirs.update([path + "/"])
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
else:
fastlog: add an option to use fastlog for files Summary: The fastlog code says it cannot handle file renames, which is not true as far as I know. Therefore, try use it for files. This affects the `follow()` revset. I picked a random file, and fastlog is faster than the alternative code path even with warm cache: With fastlog: % ./hg log edenscm/mercurial/smartset.py --time --pager=off -T '.' --debug --config fastlog.files=1 found common parent at a320f95a23716d0d106d922fa07ffcf0f838d3ff starting fastlog at a320f95a23716d0d106d922fa07ffcf0f838d3ff ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. time: real 2.060 secs (user 1.870+0.000 sys 0.290+0.000) Without fastlog, cold cache: % sudo rm /var/cache/hgcache/fbsource/packs/*.hist*; ./hg log edenscm/mercurial/smartset.py --time --pager=off -T '.' --debug --config fastlog.files=0 fastlog: not used because fbcode/scm/hg/edenscm/mercurial/smartset.py is not a directory .fetching content for 1 file over HTTPS 35.56 kB downloaded in 147 ms over 1 request (0.24 MB/s; latency: 147 ms) fetching history for 1 file over HTTPS 445 B downloaded in 56 ms over 1 request (0.01 MB/s; latency: 56 ms) running ssh -oControlMaster=no hg.vip.facebook.com 'hg -R '\''/data/scm/fbsource?stage1_read'\'' serve --stdio' sending hello command sending between command remote: 713 remote: capabilities: unbundlehash gettreepack pushkey getfile getflogheads listkeyspatterns knownnodes getbundle lookup treeonly stream_option remotefilelog known unbundle=HG10GZ,HG10BZ,HG10UN clienttelemetry branchmap changegroupsubset unbundlereplay batch bundle2=HG20%0Ab2x%253Ainfinitepush%0Ab2x%253Ainfinitepushmutation%0Ab2x%253Ainfinitepushscratchbookmarks%0Ab2x%253Arebase%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Atreemanifest%3DTrue%0Atreemanifestserver%3DTrue%0Atreeonly%3DTrue streamreqs=generaldelta,lz4revlog,revlogv1 getannotate stream-preferred remote: 1 sending clienttelemetry command connected to hg020.prn2.facebook.com sending getpackv2 command ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 876 files fetched over 876 fetches - (1 misses, 99.89% hit ratio) over 5.98s (running background incremental repack) time: real 11.920 secs (user 5.050+0.000 sys 0.470+0.000) Without fastlog, warm cache: quark@devvm33994 ~/fbcode/scm/hg % ./hg log edenscm/mercurial/smartset.py --time --pager=off -T '.' --debug --config fastlog.files=0 fastlog: not used because fbcode/scm/hg/edenscm/mercurial/smartset.py is not a directory ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. time: real 2.530 secs (user 2.050+0.000 sys 0.070+0.000) This is one step forward getting rid of the legacy filenode / ancestormap logic. It regresses on offline experience, but we can build simple caches around the `follow()` revset later. Reviewed By: markbt Differential Revision: D16365331 fbshipit-source-id: 16ffd6c3ec2daa5530fed94fb9c41fe75efd6182
2019-08-14 05:09:13 +03:00
if repo.ui.configbool("fastlog", "files"):
dirs.update([path])
else:
# bail on symlinks, and also bail on files for now
# with follow behavior, for files, we are supposed
# to track copies / renames, but it isn't convenient
# to do this through scmquery
repo.ui.debug(
"fastlog: not used because %s is not a directory\n" % path
)
return orig(repo, subset, x, name, followfirst)
rev = startrev
parents = repo.changelog.parentrevs
public = set()
# Our criterion for invoking fastlog is finding a single
# common public ancestor from the current head. First we
# have to walk back through drafts to find all interesting
# public parents. Typically this will just be one, but if
# there are merged drafts, we may have multiple parents.
if repo[rev].phase() == phases.public:
public.add(rev)
else:
queue = deque()
queue.append(rev)
seen = set()
while queue:
cur = queue.popleft()
if cur not in seen:
seen.add(cur)
if repo[cur].mutable():
for p in parents(cur):
if p != nullrev:
queue.append(p)
else:
public.add(cur)
def fastlog(repo, startrev, dirs, localmatch):
filefunc = repo.changelog.readfiles
for parent in lazyparents(startrev, public, parents):
files = filefunc(parent)
if dirmatches(files, dirs):
yield parent
repo.ui.debug("found common parent at %s\n" % repo[parent].hex())
for rev in combinator(repo, parent, dirs, localmatch):
yield rev
def combinator(repo, rev, dirs, localmatch):
"""combinator(repo, rev, dirs, localmatch)
Make parallel local and remote queries along ancestors of
rev along path and combine results, eliminating duplicates,
restricting results to those which match dirs
"""
LOCAL = "L"
REMOTE = "R"
queue = util.queue(FASTLOG_QUEUE_SIZE + 100)
hash = repo[rev].hex()
local = LocalIteratorThread(queue, LOCAL, rev, dirs, localmatch, repo)
remote = FastLogThread(queue, REMOTE, reponame, "hg", hash, dirs, repo)
# Allow debugging either remote or local path
debug = repo.ui.config("fastlog", "debug")
if debug != "local":
repo.ui.debug("starting fastlog at %s\n" % hash)
remote.start()
if debug != "remote":
local.start()
seen = set([rev])
try:
while True:
try:
producer, success, msg = queue.get(True, 3600)
except util.empty:
raise error.Abort("Timeout reading log data")
if not success:
if producer == LOCAL:
raise error.Abort(msg)
elif msg:
repo.ui.log("hgfastlog", msg)
continue
if msg is None:
# Empty message means no more results
return
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
rev = msg
if debug:
if producer == LOCAL:
repo.ui.debug("LOCAL:: %s\n" % msg)
elif producer == REMOTE:
repo.ui.debug("REMOTE:: %s\n" % msg)
if rev not in seen:
seen.add(rev)
yield rev
finally:
local.stop()
remote.stop()
revgen = fastlog(repo, rev, dirs, dirmatches)
fastlogset = smartset.generatorset(revgen, iterasc=False)
# Optimization: typically for "reverse(:.) & follow(path)" used by
# "hg log". The left side is more expensive, although it has smaller
# "weight". Make sure fastlogset is on the left side to avoid slow
# walking through ":.".
if subset.isdescending():
fastlogset.reverse()
return fastlogset & subset
return subset & fastlogset
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
class readonlychangelog(object):
def __init__(self, *args, **kwargs):
self._changelog = changelog.changelog(*args, **kwargs)
def parentrevs(self, rev):
return self._changelog.parentrevs(rev)
def readfiles(self, node):
return self._changelog.readfiles(node)
def rev(self, node):
return self._changelog.rev(node)
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
class LocalIteratorThread(Thread):
"""Class which reads from an iterator and sends results to a queue.
Results are sent in a tuple (tag, success, result), where tag is the
id passed to this class' initializer, success is a bool, True for
success, False on error, and result is the output of the iterator.
When the iterator is finished, a poison pill is sent to the queue
with result set to None to signal completion.
Used to allow parallel fetching of results from both a local and
remote source.
* queue - self explanatory
* id - tag to use when sending messages
* rev - rev to start iterating at
* dirs - directories against which to match
* localmatch - a function to match candidate results
* repo - mercurial repository object
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
If an exception is thrown, error result with the message from the
exception will be passed along the queue. Since local results are
not expected to generate exceptions, this terminates iteration.
"""
def __init__(self, queue, id, rev, dirs, localmatch, repo):
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
Thread.__init__(self)
self.daemon = True
self.queue = queue
self.id = id
self.rev = rev
self.dirs = dirs
self.localmatch = localmatch
self.ui = repo.ui
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
self._stop = Event()
# Create a private instance of changelog to avoid trampling
# internal caches of other threads
c = readonlychangelog(repo.svfs, uiconfig=repo.ui.uiconfig())
self.generator = originator(c.parentrevs, rev)
self.filefunc = c.readfiles
self.ui = repo.ui
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
def stop(self):
self._stop.set()
def stopped(self):
return self._stop.isSet()
def run(self):
generator = self.generator
match = self.localmatch
dirs = self.dirs
filefunc = self.filefunc
queue = self.queue
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
try:
for result in generator:
if self.stopped():
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
break
if not match or match(filefunc(result), dirs):
queue.put((self.id, True, result))
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
except Exception as e:
self.ui.traceback()
queue.put((self.id, False, str(e)))
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
finally:
queue.put((self.id, True, None))
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
class FastLogThread(Thread):
"""Class which talks to a remote SCMQuery
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
Like the above, results are sent to a queue, and tagged with the
id passed to this class' initializer. Same rules for termination.
We page results in windows of up to FASTLOG_MAX to avoid generating
too many results; this has been optimized on the server to cache
fast continuations but this assumes service stickiness.
* queue - self explanatory
* id - tag to use when sending messages
* reponame - repository name (str)
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
* scm - scm type (str)
* rev - revision to start logging from
* paths - paths to request logs
* repo - mercurial repository object
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
"""
def __init__(self, queue, id, reponame, scm, rev, paths, repo):
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
Thread.__init__(self)
self.daemon = True
self.queue = queue
self.id = id
self.reponame = reponame
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
self.scm = scm
self.rev = rev
self.paths = list(paths)
self.ui = repo.ui
self.changelog = readonlychangelog(repo.svfs, uiconfig=repo.ui.uiconfig())
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
self._stop = Event()
self._paths_to_fetch = 0
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
def stop(self):
self._stop.set()
def stopped(self):
return self._stop.isSet()
def finishpath(self, path):
self._paths_to_fetch -= 1
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
def gettodo(self):
return max(FASTLOG_MAX / self._paths_to_fetch, 100)
def generate(self, path):
start = str(self.rev)
reponame = self.reponame
revfn = self.changelog.rev
skip = 0
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
while True:
if self.stopped():
break
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
results = None
todo = self.gettodo()
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
try:
results = conduit.call_conduit(
"scmquery.log_v2",
repo=reponame,
scm_type=self.scm,
rev=start,
file_paths=[path],
skip=skip,
number=todo,
)
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
except Exception as e:
if self.ui.config("fastlog", "debug"):
self.ui.traceback(force=True)
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
self.queue.put((self.id, False, str(e)))
self.stop()
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
return
if results is None:
self.queue.put((self.id, False, "Unknown error"))
self.stop()
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
return
for result in results:
hash = result["hash"]
try:
if len(hash) != 40:
raise ValueError("Received invalid hash %s" % hash)
rev = revfn(node.bin(hash))
if rev is None:
raise KeyError("Hash %s not in local repo" % hash)
except Exception as e:
if self.ui.config("fastlog", "debug"):
self.ui.traceback(force=True)
self.queue.put((self.id, False, str(e)))
else:
yield rev
skip += todo
if len(results) < todo:
self.finishpath(path)
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
return
def run(self):
revs = None
paths = self.paths
self._paths_to_fetch = len(paths)
for path in paths:
g = self.generate(path)
gen = smartset.generatorset(g, iterasc=False)
gen.reverse()
if revs:
revs = smartset.addset(revs, gen, ascending=False)
else:
revs = gen
for rev in revs:
if self.stopped():
break
self.queue.put((self.id, True, rev))
# The end marker (self.id, True, None) indicates that the thread
# completed successfully. Don't send it if the thread is stopped.
# The thread can be stopped for one of two reasons:
# 1. The fastlog service failed - in this case, flagging a successful
# finish is harmful, because it will stop us continuing with local
# results, truncating output.
# 2. The caller is going to ignore all future results from us. In this
# case, it'll ignore the end marker anyway - it's discarding the
# entire queue.
if not self.stopped():
self.queue.put((self.id, True, None))
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
if __name__ == "__main__":
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
import doctest
Parallel callout to scmquery through conduit Summary: Parallel callout to scmquery through conduit This implements the special case of log on a single directory, preserving follow behavior. To do this, we backtrackfrom the current head to find all draft revisions along the path, then find the common public ancestor of those. Once we find that, we can begin paging in results from the scmquery service. Pretty much a working diff at this point. Limits and boundary conditions have not been fully tested. Every once in a while I run into a bum query, which I suspect to be either a bad proxy or a service router failure; still debugging that. Could also be an issue with conduit. Other than that, things seem to work. Test Plan: Testing log with fastest setting (no revsets), revsets (using -M), and with extension disabled (--sparse): [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m1.895s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m1.308s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbcode] diff a b [zamsden@devbig192.prn1 ~/local/fbcode] time hg log tao --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.320s user 0m0.004s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbcode] diff a c Testing --user option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri > a real 0m2.765s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/dragon --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 5 -u dmitri --sparse > b real 0m23.247s user 0m0.005s sys 0m0.001s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing same output enabled / disabled for -X option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' > a real 0m1.292s user 0m0.002s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -X '**TARGETS' --sparse > b real 0m2.697s user 0m0.002s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -k option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 > a real 0m1.174s user 0m0.003s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/lithium/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -k 'e' -X '**TARGETS' -l 10 --sparse > b real 0m1.259s user 0m0.004s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing -I option: [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' > a real 0m1.473s user 0m0.005s sys 0m0.003s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/scm/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 20 -I '**.py' --sparse > b real 0m2.911s user 0m0.003s sys 0m0.002s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] Testing multiple directory output in all three modes - revset, fast filtered, and forcing original fallback with --sparse [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 -M > a real 0m2.892s user 0m0.003s sys 0m0.006s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 > b real 0m2.575s user 0m0.697s sys 0m0.077s [zamsden@devbig192.prn1 ~/local/fbsource] time hg log fbcode/hphp/hhvm fbcode/hphp/runtime/ --config extensions.fbconduit=~/local/fb-hgext/hgext3rd/fbconduit.py --config fbconduit.host=our.zamsden.devbig192.prn1.facebook.com --config extensions.fastlog=~/local/fb-hgext/hgext3rd/fastlog.py --pager=off -l 100 --sparse > c real 0m7.339s user 0m0.003s sys 0m0.004s [zamsden@devbig192.prn1 ~/local/fbsource] diff a b [zamsden@devbig192.prn1 ~/local/fbsource] diff a c [zamsden@devbig192.prn1 ~/local/fbsource] Reviewers: rmcelroy, #scmquery, #mercurial, ttung, lcharignon, durham, stash Reviewed By: stash Subscribers: cdykes, lcharignon, quark, stash, mjpieters, jeroenv Differential Revision: https://phabricator.intern.facebook.com/D3634075 Tasks: 12341014 Signature: t1:3634075:1471039212:0989839636847a8e5da6a0ef9150035fcf5bb797
2016-08-13 01:52:50 +03:00
doctest.testmod()