summaryrefslogtreecommitdiff
path: root/buildscripts/collect_resource_info.py
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2018-03-26 11:25:04 -0400
committerJonathan Abrahams <jonathan@mongodb.com>2018-03-26 13:04:25 -0400
commit36148ad8bbdb94162b2926f4700d935ee4dc5994 (patch)
tree1d893c4ca0b0afa407f7724c7942dfbf643560af /buildscripts/collect_resource_info.py
parentd62d631f0ca40c5199fdfae2980080ca0cc982b5 (diff)
downloadmongo-36148ad8bbdb94162b2926f4700d935ee4dc5994.tar.gz
SERVER-23312 Format Python files with yapf
Diffstat (limited to 'buildscripts/collect_resource_info.py')
-rwxr-xr-xbuildscripts/collect_resource_info.py19
1 files changed, 6 insertions, 13 deletions
diff --git a/buildscripts/collect_resource_info.py b/buildscripts/collect_resource_info.py
index 56bbb073fca..211d00e3235 100755
--- a/buildscripts/collect_resource_info.py
+++ b/buildscripts/collect_resource_info.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python
-
"""
Collect system resource information on processes running in Evergreen on a given interval.
"""
@@ -16,29 +15,23 @@ import time
from bson.json_util import dumps
import requests
-
# Get relative imports to work when the package is not installed on the PYTHONPATH.
if __name__ == "__main__" and __package__ is None:
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from buildscripts.resmokelib import utils
-
+
def main():
usage = "usage: %prog [options]"
parser = optparse.OptionParser(description=__doc__, usage=usage)
- parser.add_option("-i", "--interval",
- dest="interval",
- default=5,
- type="int",
+ parser.add_option("-i", "--interval", dest="interval", default=5, type="int",
help="Collect system resource information every <interval> seconds. "
- "Default is every 5 seconds.")
- parser.add_option("-o", "--output-file",
- dest="outfile",
- default="-",
+ "Default is every 5 seconds.")
+ parser.add_option("-o", "--output-file", dest="outfile", default="-",
help="If '-', then the file is written to stdout."
- " Any other value is treated as the output file name. By default,"
- " output is written to stdout.")
+ " Any other value is treated as the output file name. By default,"
+ " output is written to stdout.")
(options, _) = parser.parse_args()