Skip to content

Fix PCP_ORIGIN and PCP_ORIGIN_TIME issues, small QA fixups - #2718

Merged
kmcdonell merged 3 commits into
performancecopilot:mainfrom
kmcdonell:wip
Sep 18, 2026
Merged

kmcdonell merged 3 commits into
performancecopilot:mainfrom
kmcdonell:wip

Conversation

@kmcdonell

Copy link
Copy Markdown
Member

For PCP_ORIGIN and PCP_ORIGIN_TIME:

  1. make all references in our code base use PCP_ORIGIN_TIME (for consistency with other PCP_*_TIME environment variables) [except qa tests that are specifically aimed at checking that the two are supported]
  2. maintain support for PCP_ORIGIN and PCP_ORIGIN_TIME in libpcp.so.4 and libpcp.so.3
  3. fix the diagnostic that uses the wrong name in (both) getopt.c files

For QA, minor fixups.

PCP_ORIGIN remains supported in getopt.c, but the man page for pmGetOptions
notes that this is deprecated.

Elsewhere in the code base and QA all references to $PCP_ORIGIN have been
replaced by $PCP_ORIGIN_TIME.
We're planning to continue supporting PCP_ORIGIN and PCP_ORIGIN_TIME
as equivalent environment variable names.
Apparently not everyone runs QA from the /home/kenj/src/pcp/qa
directory.
@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Repository UI (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Advanced

Run ID: 4602789c-adf4-42f8-be10-6c37cb7543c2

📥 Commits

Reviewing files that changed from the base of the PR and between fbe582d and 9ac1359.

⛔ Files ignored due to path filters (1)
  • qa/1730.out is excluded by !**/*.out
📒 Files selected for processing (14)
  • man/man3/pmgetoptions.3
  • qa/1080
  • qa/1113
  • qa/1400
  • qa/1987
  • qa/1988
  • qa/1991
  • qa/1994
  • qa/728
  • qa/743
  • src/libpcp/src/getopt.c
  • src/libpcp3/src/getopt.c
  • src/pcp/summary/pcp-summary.sh
  • src/pcp/xsos/pcp-xsos

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Bug Fixes

    • Corrected origin-time handling to use the current PCP_ORIGIN_TIME environment variable across summary and system-reporting commands.
    • Updated diagnostic output to display the correct environment-variable name.
    • Improved filtered QA output by masking command paths for more consistent results.
  • Tests

    • Updated archive-based validation scenarios to use the current origin-time variable.
  • Documentation

    • Adjusted the pmGetOptions manual page table formatting for improved presentation.

Walkthrough

Changes

Origin time environment migration

Layer / File(s) Summary
Origin time producers
src/pcp/summary/pcp-summary.sh, src/pcp/xsos/pcp-xsos
The scripts set and export PCP_ORIGIN_TIME. pcp-xsos reads the renamed variable for sampletime derivation.
Origin time diagnostics
src/libpcp/src/getopt.c, src/libpcp3/src/getopt.c
Debug messages now report PCP_ORIGIN_TIME.
Origin time QA invocations
qa/1080, qa/1113, qa/1400, qa/1987, qa/1988, qa/1991, qa/1994, qa/743
Archive-based QA commands now use PCP_ORIGIN_TIME instead of PCP_ORIGIN.

QA output filtering

Layer / File(s) Summary
Command path filtering
qa/728
The _filter function replaces command paths in Command: output lines.

Man-page table formatting

Layer / File(s) Summary
Options table formatting
man/man3/pmgetoptions.3
The environment-variable options table removes expand and changes the final column format from l to lx.

Suggested reviewers: natoscott

Priority: ⬇️ Low

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 9ac13

The reviewed changes are mergeable with no identified material regression.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the PCP_ORIGIN and PCP_ORIGIN_TIME fixes and notes the related QA updates. It accurately summarizes the main changes.
Description check ✅ Passed The description directly explains the environment-variable standardization, compatibility requirements, diagnostic fixes, and QA updates.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checked the origin time,
And found its name in every line.
QA paths now hide the trail,
Tables stand with cleaner scale.
The little hare thumps, “All aligned!”

Comment @coderabbitai help to get the list of available commands.

@kmcdonell
kmcdonell merged commit 4c93d3f into performancecopilot:main Sep 18, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant