From b98d6b0a9300969cc5e2a8f71d9372479149298b Mon Sep 17 00:00:00 2001 From: Austin Macdonald Date: Mon, 3 Jun 2024 13:42:35 -0500 Subject: [PATCH] Doc: minimum sample-interval relation to runtime Fixes https://github.com/con/duct/issues/36 --- README.md | 4 +++- src/duct.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bc7423df..1f80e1a2 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,9 @@ options: .duct/logs/{datetime_filesafe}-{pid}_) --sample-interval SAMPLE_INTERVAL, --s-i SAMPLE_INTERVAL Interval in seconds between status checks of the - running process. (default: 1.0) + running process. Sample interval should be larger than + the runtime of the process or `duct` may underreport + the number of processes started. (default: 1.0) --report-interval REPORT_INTERVAL, --r-i REPORT_INTERVAL Interval in seconds at which to report aggregated data. (default: 60.0) diff --git a/src/duct.py b/src/duct.py index 542acb5c..ab226065 100755 --- a/src/duct.py +++ b/src/duct.py @@ -217,7 +217,9 @@ def create_and_parse_args(): "--s-i", type=float, default=float(os.getenv("DUCT_SAMPLE_INTERVAL", "1.0")), - help="Interval in seconds between status checks of the running process.", + help="Interval in seconds between status checks of the running process. " + "Sample interval should be larger than the runtime of the process or `duct` may " + "underreport the number of processes started.", ) parser.add_argument( "--report-interval",