Add a CPU timer to RequestInjectionData
commit2a6f6ce5decd9a31998d35a0ca26204fd3f73830
authorBert Maher <bertrand@fb.com>
Tue, 18 Nov 2014 04:17:17 +0000 (17 20:17 -0800)
committerhhvm-bot <hhvm-bot@fb.com>
Thu, 27 Nov 2014 01:30:30 +0000 (26 17:30 -0800)
treed1e70fb00ecd3dfa221c6e2d8e2b899dbb504d16
parent31d5ade0c8a66a83628d9046a115c277761babfc
Add a CPU timer to RequestInjectionData

Summary: We'd like to be able to kill a runaway CPU-eating request before it
hits the full wall-time timeout.  Requests generally use a lot less CPU than
wall time, so we should be able to be more aggressive with it.

Reviewed By: @markw65

Differential Revision: D1702049
22 files changed:
hphp/runtime/base/builtin-functions.cpp
hphp/runtime/base/builtin-functions.h
hphp/runtime/base/exceptions.h
hphp/runtime/base/execution-context.cpp
hphp/runtime/base/program-functions.cpp
hphp/runtime/base/request-injection-data.cpp
hphp/runtime/base/request-injection-data.h
hphp/runtime/base/runtime-option.cpp
hphp/runtime/base/runtime-option.h
hphp/runtime/base/thread-info.cpp
hphp/runtime/ext/std/ext_std_options.cpp
hphp/runtime/server/rpc-request-handler.cpp
hphp/test/slow/max_cpu_time/max_cpu_001.php [new file with mode: 0644]
hphp/test/slow/max_cpu_time/max_cpu_001.php.expectf [new file with mode: 0644]
hphp/test/slow/max_cpu_time/max_cpu_002.php [new file with mode: 0644]
hphp/test/slow/max_cpu_time/max_cpu_002.php.expectf [new file with mode: 0644]
hphp/test/slow/max_cpu_time/max_cpu_time.php [new file with mode: 0644]
hphp/test/slow/max_cpu_time/max_cpu_time.php.expectf [new file with mode: 0644]
hphp/test/slow/max_cpu_time/max_wall_time.php [new file with mode: 0644]
hphp/test/slow/max_cpu_time/max_wall_time.php.expectf [new file with mode: 0644]
hphp/test/slow/max_cpu_time/sleep_cpu.php [new file with mode: 0644]
hphp/test/slow/max_cpu_time/sleep_cpu.php.expectf [new file with mode: 0644]