Skip to content

Conversation

Michael-A-Kuykendall
Copy link
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 <[email protected]>
Signed-off-by: Michael A. Kuykendall <[email protected]>
- 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 <[email protected]>
Signed-off-by: Michael A. Kuykendall <[email protected]>
- 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 <[email protected]>
Signed-off-by: Michael A. Kuykendall <[email protected]>
@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 <[email protected]>
Signed-off-by: Michael A. Kuykendall <[email protected]>

* 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 <[email protected]>
Signed-off-by: Michael A. Kuykendall <[email protected]>

* 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 <[email protected]>
Signed-off-by: Michael A. Kuykendall <[email protected]>

---------

Signed-off-by: Michael A. Kuykendall <[email protected]>
Co-authored-by: Claude <[email protected]>
Signed-off-by: Michael A. Kuykendall <[email protected]>
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