sapling/build/fbcode_builder/specs
Yixian Jiang 19472ea493 Remove dependency on fbzmq::ResourceMonitor & sigar
Summary:
Replace the methods to get CPU and memory usage statistics:
- For the memory: use `VmRSS` of `/proc/[pid]/status`: http://man7.org/linux/man-pages/man5/proc.5.html
- For the CPU%: calculate the process is occupied how much percentage of the CPU time, use `getrusage()`: http://man7.org/linux/man-pages/man2/getrusage.2.html
   - Implemented like the sigar: https://our.intern.facebook.com/intern/diffusion/FBS/browse/master/third-party/sigar/src/sigar.c?commit=4f945812675131ea64cb3d143350b1414f34a351&lines=111-169
  - Formula:
    - CPU% = `process used time` during the period / `time period` * 100
    -  `time period` = current query timestamp - last query timestamp
    - `process used time` = current `process total time` - last query `process total time`
    - `process total time` = CPU time used in user mode + CPU time used in system mode // get from the API `ru_utime` and `ru_stime`

Remove the `fbzmq::ResourceMonitor` and `sigar`:
- Change and rename the UT
  - `ResourceMonitorTest.cpp` -> `SystemMetricsTest.cpp`
  - `ResourceMonitor` -> `SystemMetricsTest` in `openr/tests/OpenrSystemTest.cpp`
- Remove `ResourceMonitor` code and dependency for `Watchdog` and `ZmqMonitor`
- Remove `sigar` dependency used in building

Reviewed By: saifhhasan

Differential Revision: D20049944

fbshipit-source-id: 00b90c8558dc5f0fb18cc31a09b9666a47b096fe
2020-03-04 16:37:28 -08:00
..
__init__.py add fbcode_builder sources 2019-04-26 11:31:58 -07:00
fbthrift.py Replace Folly Format with fmt in logger to reduce binary size 2019-11-18 05:53:08 -08:00
fbzmq.py Remove dependency on fbzmq::ResourceMonitor & sigar 2020-03-04 16:37:28 -08:00
fizz.py Replace Folly Format with fmt in logger to reduce binary size 2019-11-18 05:53:08 -08:00
fmt.py add fbcode_builder sources 2019-04-26 11:31:58 -07:00
folly.py add fbcode_builder sources 2019-04-26 11:31:58 -07:00
gmock.py add fbcode_builder sources 2019-04-26 11:31:58 -07:00
mvfst.py Revert / fix up D17158685 2019-10-08 21:47:29 -07:00
proxygen_quic.py Revert / fix up D17158685 2019-10-08 21:47:29 -07:00
proxygen.py Replace Folly Format with fmt in logger to reduce binary size 2019-11-18 05:53:08 -08:00
re2.py add fbcode_builder sources 2019-04-26 11:31:58 -07:00
rocksdb.py add fbcode_builder sources 2019-04-26 11:31:58 -07:00
rsocket.py Replace Folly Format with fmt in logger to reduce binary size 2019-11-18 05:53:08 -08:00
rust_shed.py Fixes for travic CI build (#3) 2019-12-10 04:56:56 -08:00
sigar.py add fbcode_builder sources 2019-04-26 11:31:58 -07:00
sodium.py add fbcode_builder sources 2019-04-26 11:31:58 -07:00
wangle.py Replace Folly Format with fmt in logger to reduce binary size 2019-11-18 05:53:08 -08:00
zstd.py add fbcode_builder sources 2019-04-26 11:31:58 -07:00