Skip to content

fix(metrics): add GPU detection fields to /metrics endpoint (Issue #111) - #115

Merged
Michael-A-Kuykendall merged 3 commits into
mainfrom
fix/issue-111-gpu-metrics
Oct 13, 2025
Merged

fix(metrics): add GPU detection fields to /metrics endpoint (Issue #111)#115
Michael-A-Kuykendall merged 3 commits into
mainfrom
fix/issue-111-gpu-metrics

Conversation

@Michael-A-Kuykendall

Copy link
Copy Markdown
Owner

Summary

  • Adds gpu_detected boolean field to /metrics endpoint JSON response
  • Adds gpu_vendor field returning nvidia/amd/intel or null
  • Implements comprehensive GPU detection for NVIDIA, AMD, and Intel GPUs
  • Resolves Issue Missing GPU metrics fields in /metrics endpoint #111: GPU metrics missing from /metrics endpoint

Technical Implementation

  • detect_gpu(): Multi-vendor detection using nvidia-smi, rocm-smi, wmic
  • get_gpu_vendor(): Returns detected vendor string or null
  • Cross-platform detection: Linux (nvidia-smi, rocm-smi), Windows (wmic)
  • Added to metrics_endpoint() function in server.rs

Test Coverage

  • test_gpu_detection_functions(): Core detection logic
  • test_nvidia_detection(), test_amd_detection(), test_intel_detection(): Individual vendor tests
  • test_metrics_endpoint_gpu_fields(): Integration test for /metrics endpoint
  • All tests verify correct data types and valid vendor strings

Changes

  • src/server.rs: Added GPU detection functions and fields to metrics endpoint
  • Tests: Comprehensive coverage for GPU detection functionality

🤖 Generated with Claude Code

Michael-A-Kuykendall and others added 3 commits October 13, 2025 08:35
- Add gpu_detected boolean field to JSON response
- Add gpu_vendor field (nvidia/amd/intel or null)
- Implement detect_gpu(), get_gpu_vendor() functions
- Add GPU vendor detection: nvidia-smi, rocm-smi, wmic queries
- Comprehensive test coverage for GPU detection functionality
- Resolves Issue #111: GPU metrics missing from /metrics endpoint

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Michael A. Kuykendall <michaelallenkuykendall@gmail.com>
- Remove trailing whitespace in server.rs
- Apply cargo fmt fixes across codebase
- Ensure CI formatting checks pass

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Michael A. Kuykendall <michaelallenkuykendall@gmail.com>
- Fix field_reassign_with_default in anthropic_compat.rs
- Remove needless_borrows_for_generic_args in server.rs
- Add allow(dead_code) attributes to placeholder memory utilities
- All clippy lints now pass with -D warnings

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Michael A. Kuykendall <michaelallenkuykendall@gmail.com>
@Michael-A-Kuykendall
Michael-A-Kuykendall merged commit a7a5fdd into main Oct 13, 2025
12 checks passed
Michael-A-Kuykendall added a commit that referenced this pull request Oct 13, 2025
…) (#115)

* fix(metrics): add GPU detection fields to /metrics endpoint (Issue #111)

- Add gpu_detected boolean field to JSON response
- Add gpu_vendor field (nvidia/amd/intel or null)
- Implement detect_gpu(), get_gpu_vendor() functions
- Add GPU vendor detection: nvidia-smi, rocm-smi, wmic queries
- Comprehensive test coverage for GPU detection functionality
- Resolves Issue #111: GPU metrics missing from /metrics endpoint

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Michael A. Kuykendall <michaelallenkuykendall@gmail.com>

* fix: resolve formatting issues for CI compliance

- Remove trailing whitespace in server.rs
- Apply cargo fmt fixes across codebase
- Ensure CI formatting checks pass

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Michael A. Kuykendall <michaelallenkuykendall@gmail.com>

* fix: resolve clippy warnings for CI compliance

- Fix field_reassign_with_default in anthropic_compat.rs
- Remove needless_borrows_for_generic_args in server.rs
- Add allow(dead_code) attributes to placeholder memory utilities
- All clippy lints now pass with -D warnings

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Michael A. Kuykendall <michaelallenkuykendall@gmail.com>

---------

Signed-off-by: Michael A. Kuykendall <michaelallenkuykendall@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Michael A. Kuykendall <michaelallenkuykendall@gmail.com>
Michael-A-Kuykendall added a commit that referenced this pull request Dec 19, 2025
…) (#115)

* fix(metrics): add GPU detection fields to /metrics endpoint (Issue #111)

- Add gpu_detected boolean field to JSON response
- Add gpu_vendor field (nvidia/amd/intel or null)
- Implement detect_gpu(), get_gpu_vendor() functions
- Add GPU vendor detection: nvidia-smi, rocm-smi, wmic queries
- Comprehensive test coverage for GPU detection functionality
- Resolves Issue #111: GPU metrics missing from /metrics endpoint

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Michael A. Kuykendall <michaelallenkuykendall@gmail.com>

* fix: resolve formatting issues for CI compliance

- Remove trailing whitespace in server.rs
- Apply cargo fmt fixes across codebase
- Ensure CI formatting checks pass

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Michael A. Kuykendall <michaelallenkuykendall@gmail.com>

* fix: resolve clippy warnings for CI compliance

- Fix field_reassign_with_default in anthropic_compat.rs
- Remove needless_borrows_for_generic_args in server.rs
- Add allow(dead_code) attributes to placeholder memory utilities
- All clippy lints now pass with -D warnings

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Michael A. Kuykendall <michaelallenkuykendall@gmail.com>

---------

Signed-off-by: Michael A. Kuykendall <michaelallenkuykendall@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
@Michael-A-Kuykendall
Michael-A-Kuykendall deleted the fix/issue-111-gpu-metrics branch May 26, 2026 14:52
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