-
-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python: fix pmcc time window handling
For reference, see BZ 1671818 - pcp ignores --finish=time option. PCP python apps that use pmcc and support -u (non-interpolation mode) ignore the --finish time window option because the calculation relies on sampling time delta being set (but it is not set in -u mode). With this fix to pmcc.py, the --samples and --finish options are both considered when deciding when to terminate the run() loop. If both --samples and --finish are specified, the run loop will terminate when either the current timestamp or sample count reaches the end of the time window. If neither are set, run() continues to the end of the archive, as normal. Using sample count OR finish time to terminate the run loop effectively avoids the problem in the BZ because --finish no longer relies on the time delta to figure out when to stop. qa/1588 exercises the fix. Also note, qa/829 might need a tweak for testing pcp-dmcache(1), which also uses pmcc.
- Loading branch information
Showing
1 changed file
with
38 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters