1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-21 01:18:50 +02:00
phorge-arcanist/src
epriestley 5b1a00eab1 Add various flags to the HgProxy daemons
Summary:
  - Add flags to exit after an idle time or client count.
  - Add flags to control daemonization.
  - Add flags to control output.
  - Add flags to skip the "hello" frame of the protocol.
  - Make the client launch a server if one does not exist.

The one-time overhead to launch a server and run a command through it looks to be ~130% of the overhead to run the command directly with "hg", so even if we never run a second command we're not paying too much.

The incremental overhead to run subsequent command appears to be less than 3% of the overhead to run the command directly with "hg" (and maybe less than 1%, I'm not sure how long the computation part of a command like 'hg log' "actually" takes).

The overhead to launch a PHP client, connect to an existing server, run a command, and then print it and exit is roughly 50% of the overhead to run the command directly with "hg". So theoretically a user can achieve an amortized 2x performance increase for all 'hg' commands by aliasing 'hg' to the PHP client in their shell.

Test Plan:
  - Ran servers with idle and client count limits, let them idle and/or hit their connection limits, saw them exit.
  - Ran foreground and background servers.
  - Ran a daemon server with redirected stdout/stderr. Verified logs appeared.
  - Ran with --quiet.
  - Ran clients and servers with and without --skip-hello, things work if they agree and break if they disagree. The throughput gain on this is fairly small (maybe 5%?) but it seems simple enough to keep for the moment.
  - Ran serverless clients and verified that servers launched the first time, were available subsequently, and relaunched after 15 seconds idle.

Reviewers: csilvers, vrana, btrahan

Reviewed By: csilvers

CC: aran

Differential Revision: https://secure.phabricator.com/D2680
2012-06-26 11:00:26 -07:00
..
configuration Upgrade arcanist to libphutil v2 2012-05-30 14:22:59 -07:00
difference Upgrade arcanist to libphutil v2 2012-05-30 14:22:59 -07:00
differential Move files in Arcanist one level up 2012-06-01 11:56:00 -07:00
docs Reorganize documentation. 2011-05-31 12:14:20 -07:00
events/constant Move files in Arcanist one level up 2012-06-01 11:56:00 -07:00
exception Move files in Arcanist one level up 2012-06-01 11:56:00 -07:00
hgdaemon Add various flags to the HgProxy daemons 2012-06-26 11:00:26 -07:00
lint Warn about PHP 5.3 only functions and parameters 2012-06-22 15:52:10 -07:00
parser [arcanist] add system arc config file 2012-06-25 15:14:11 -07:00
repository Simplify "arc branch" and make it work in immutable history repositories 2012-06-26 10:50:43 -07:00
unit Display number of assertions in unit test details 2012-06-17 13:39:46 -07:00
workflow Simplify "arc branch" and make it work in immutable history repositories 2012-06-26 10:50:43 -07:00
workingcopyidentity [Arcanist] fix scratch dir for svn >= 1.7 2012-06-25 17:13:29 -07:00
__phutil_library_init__.php Initial commit. 2011-01-09 15:22:25 -08:00
__phutil_library_map__.php Simplify "arc branch" and make it work in immutable history repositories 2012-06-26 10:50:43 -07:00