1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-17 13:21:04 +03:00
Files
proxygen/build/fbcode_builder/specs/fbzmq.py
Mahesh Maddikayala 0bc6d7c294 Add resource monitor object to fbzmq library
Summary:
Add resource monitor object to fbzmq library to monitor CPU and memory. User can use
the object to query RSS memory, cpu usage, and optionally call API to monitor memory periodicially
 and crash when reaches beyond a specified threshold limit.

Reviewed By: cenzhao

Differential Revision: D8873504

fbshipit-source-id: a445fdd580da82c55fba09c43f46f60bb9f1149a
2018-07-23 10:42:37 -07:00

40 lines
1.4 KiB
Python

#!/usr/bin/env python
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import specs.fbthrift as fbthrift
import specs.folly as folly
import specs.gmock as gmock
import specs.sodium as sodium
import specs.sigar as sigar
from shell_quoting import ShellQuoted
def fbcode_builder_spec(builder):
builder.add_option('zeromq/libzmq:git_hash', 'v4.2.5')
return {
'depends_on': [folly, fbthrift, gmock, sodium, sigar],
'steps': [
builder.github_project_workdir('zeromq/libzmq', '.'),
builder.step('Build and install zeromq/libzmq', [
builder.run(ShellQuoted('./autogen.sh')),
builder.configure(),
builder.make_and_install(),
]),
builder.fb_github_project_workdir('fbzmq/fbzmq/build', 'facebook'),
builder.step('Build and install fbzmq/fbzmq/build', [
builder.cmake_configure('fbzmq/fbzmq/build'),
# we need the pythonpath to find the thrift compiler
builder.run(ShellQuoted(
'PYTHONPATH="$PYTHONPATH:"{p}/lib/python2.7/site-packages '
'make -j {n}'
).format(p=builder.option('prefix'), n=builder.option('make_parallelism'))),
builder.run(ShellQuoted('make install')),
]),
],
}