Skip to content

Create public api for stats clients#236

Merged
zbyrne merged 4 commits into
developfrom
zbyrne/export-stats-client
Mar 26, 2026
Merged

Create public api for stats clients#236
zbyrne merged 4 commits into
developfrom
zbyrne/export-stats-client

Conversation

@zbyrne
Copy link
Copy Markdown
Collaborator

@zbyrne zbyrne commented Mar 24, 2026

Creates a C API that wraps StatsClient and updates ais-stats to use the new API

@zbyrne zbyrne force-pushed the zbyrne/export-stats-client branch 2 times, most recently from 32d6697 to 79e93b7 Compare March 24, 2026 19:56
@zbyrne zbyrne marked this pull request as ready for review March 24, 2026 20:12
@zbyrne zbyrne requested a review from kurtmcmillan as a code owner March 24, 2026 20:12
Copilot AI review requested due to automatic review settings March 24, 2026 20:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a small public C API wrapper around the existing hipFile::StatsClient (to enable non-C++ consumers) and migrates the ais-stats tool to use that wrapper.

Changes:

  • Added a new exported C header/API (include/hipfile-stats.h) and its implementation wrapper (src/amd_detail/hipfile-stats.cpp) around hipFile::StatsClient.
  • Updated tools/ais-stats to use the new C API instead of directly instantiating StatsClient.
  • Made StatsClient::pollProcess() and StatsClient::generateReport() const to support use via a const context pointer.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tools/ais-stats/ais-stats.cpp Switches the CLI tool to the new C API context/connect/poll/report flow.
src/amd_detail/stats.h Marks StatsClient polling/report methods as const for wrapper usage.
src/amd_detail/stats.cpp Implements the const-qualified StatsClient methods.
src/amd_detail/hipfile-stats.cpp New C API wrapper implementation around StatsClient.
src/amd_detail/CMakeLists.txt Adds the new wrapper source file to the AMD detail library build.
include/hipfile-stats.h New public C header exposing the stats API.

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

Comment thread src/amd_detail/hipfile-stats.cpp
Comment thread include/hipfile-stats.h Outdated
Comment thread include/hipfile-stats.h Outdated
Comment thread src/amd_detail/hipfile-stats.cpp Outdated
Comment thread src/amd_detail/hipfile-stats.cpp Outdated
@zbyrne zbyrne force-pushed the zbyrne/export-stats-client branch 2 times, most recently from c5b6eb2 to c6c72e2 Compare March 25, 2026 17:22
Copilot AI review requested due to automatic review settings March 25, 2026 17:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 8 out of 8 changed files in this pull request and generated 7 comments.


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

Comment thread src/amd_detail/include_internal/hipfile-stats.h Outdated
Comment thread src/amd_detail/hipfile-stats.cpp
Comment thread src/amd_detail/hipfile-stats.cpp
Comment thread tools/ais-stats/ais-stats.cpp
Comment thread test/amd_detail/hipfile-stats.cpp
Comment thread src/amd_detail/include_internal/hipfile-stats.h
Comment thread src/amd_detail/include_internal/hipfile-stats.h Outdated
@zbyrne zbyrne force-pushed the zbyrne/export-stats-client branch from c6c72e2 to ccbb060 Compare March 25, 2026 17:38
Copilot AI review requested due to automatic review settings March 25, 2026 17:44
@zbyrne zbyrne force-pushed the zbyrne/export-stats-client branch from ccbb060 to 00c742b Compare March 25, 2026 17:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 8 out of 8 changed files in this pull request and generated 2 comments.


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

Comment thread src/amd_detail/hipfile-stats.cpp Outdated
Comment thread src/amd_detail/hipfile-stats.cpp
@zbyrne zbyrne force-pushed the zbyrne/export-stats-client branch from 00c742b to 400fe1f Compare March 25, 2026 19:21
@zbyrne zbyrne force-pushed the zbyrne/export-stats-client branch from 400fe1f to cfcebff Compare March 26, 2026 16:04
@zbyrne zbyrne requested a review from Copilot March 26, 2026 16:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 8 out of 8 changed files in this pull request and generated 1 comment.


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

Comment thread src/amd_detail/hipfile-stats.cpp
@zbyrne zbyrne force-pushed the zbyrne/export-stats-client branch from cfcebff to e419505 Compare March 26, 2026 16:41
@zbyrne zbyrne merged commit 9e431f9 into develop Mar 26, 2026
42 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.

3 participants