1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-21 22:32:41 +01:00
phorge-arcanist/scripts
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
..
hgdaemon Add various flags to the HgProxy daemons 2012-06-26 11:00:26 -07:00
lib Save files with path to phutil cache 2012-06-22 11:56:54 -07:00
__init_script__.php Use pht() for plural 2012-06-19 15:16:52 -07:00
arcanist.php Exit with an error code if the workflow returned one. 2012-06-13 16:33:37 -07:00
php_extension_functions.txt Include common extensions in symbol mapper 2012-06-12 12:54:26 -07:00
phutil_analyzer.php Depend on autoloading 2012-05-30 16:02:36 -07:00
phutil_mapper.php Depend on autoloading 2012-05-30 16:02:36 -07:00
phutil_rebuild_map.php Bump symbol cache version from v2 -> v3 2012-06-14 12:02:27 -07:00
phutil_symbols.php Include common extensions in symbol mapper 2012-06-12 12:54:26 -07:00
update_compat_info.php Warn about PHP 5.3 only functions and parameters 2012-06-22 15:52:10 -07:00