Skip to content

feat: cmperf collector#4305

Merged
cgrinds merged 4 commits into
mainfrom
rg2-cmperf
Jun 1, 2026
Merged

feat: cmperf collector#4305
cgrinds merged 4 commits into
mainfrom
rg2-cmperf

Conversation

@rahulguptajss

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 27, 2026 06:46
@cla-bot cla-bot Bot added the cla-signed label May 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces the CmPerf collector's data path: instead of polling per-counter REST endpoints, it downloads pre-aggregated CM2 protobuf files from the ONTAP counter-cache SPI endpoint, parses them into the matrix, and cooks counters using the existing RestPerf-style post-processing. Templates under conf/cmperf/9.19.1 are migrated from the old instance_key: + plain counter style to the new ^^/^ counter-prefix syntax that CmPerf's InitCache requires. A small IsCmPerfCollector() hook is added so the RestPerf NIC plugin selects the rx_bytes/tx_bytes naming used by CmPerf.

Changes:

  • New cm2.go: ONTAP file listing, SPI download, protobuf parse, schema-driven counter setup, scalar/1D/2D/histogram matrix population, and instance-key construction.
  • Reworked cmperf.go PollData/PollCounter to drive the CM2 download/parse pipeline, plus receiver-name and structural cleanups (drop unused QoS-detail plumbing and InitSchedule).
  • Bulk template migration to ^^instance_uuid / ^… label syntax across 30+ object YAMLs, and small plugin/poller hooks (IsCmPerfCollector, NIC plugin updates).

Reviewed changes

Copilot reviewed 40 out of 40 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
cmd/collectors/cmperf/cm2.go New CM2 download/parse pipeline and matrix population.
cmd/collectors/cmperf/cmperf.go Reworked PollData/PollCounter around CM2 files; receiver rename; QoS-detail cleanup.
cmd/poller/plugin/plugin.go Adds IsCmPerfCollector() helper.
cmd/collectors/restperf/plugins/nic/nic.go Treats CmPerf like StatPerf for rx/tx byte naming and nic port label.
conf/cmperf/9.19.1/*.yaml (30+) Migrate counters to ^^/^ prefix syntax; drop top-level instance_key; minor formatting.
conf/cmperf/9.19.1/token_manager.yaml Renames instance_name => token but is missing the ^/^^ prefixes, leaving the template inconsistent with the rest of the migration.
conf/cmperf/9.19.1/workload*.yaml Switch keys to ^^instance_uuid, change data schedule from 3m to 1m.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread conf/cmperf/9.19.1/token_manager.yaml Outdated
Comment thread cmd/collectors/cmperf/cmperf.go Outdated
Comment thread cmd/collectors/cmperf/cm2.go Outdated
Comment thread cmd/collectors/cmperf/cm2.go Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 39 out of 39 changed files in this pull request and generated 7 comments.

Comment thread conf/cmperf/9.19.1/workload_volume.yaml Outdated
Comment thread cmd/collectors/cmperf/cmperf.go Outdated
Comment thread cmd/collectors/cmperf/cm2.go
Comment thread cmd/collectors/cmperf/cm2.go
Comment thread cmd/collectors/cmperf/cm2.go
Comment thread cmd/collectors/cmperf/cmperf.go
Comment thread conf/cmperf/9.19.1/workload.yaml Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 39 out of 39 changed files in this pull request and generated 7 comments.

Comment thread conf/cmperf/9.19.1/workload.yaml
Comment thread cmd/collectors/cmperf/cmperf.go
Comment thread cmd/collectors/cmperf/cmperf.go
Comment thread cmd/collectors/cmperf/cm2.go
Comment thread cmd/collectors/cmperf/cm2.go Outdated
Comment thread cmd/collectors/cmperf/cm2.go Outdated
Comment thread cmd/collectors/cmperf/cmperf.go
Comment thread cmd/collectors/cmperf/cm2.go Outdated
Comment thread cmd/collectors/cmperf/cm2.go Outdated
Comment thread cmd/collectors/cmperf/cm2.go Outdated
Comment thread cmd/collectors/cmperf/cm2.go Outdated
Copilot AI review requested due to automatic review settings June 1, 2026 06:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 39 out of 39 changed files in this pull request and generated 1 comment.

Comment thread cmd/collectors/cmperf/cm2.go

@Hardikl Hardikl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

@cgrinds cgrinds merged commit 3c0f98e into main Jun 1, 2026
14 checks passed
@cgrinds cgrinds deleted the rg2-cmperf branch June 1, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants