justinmclean opened a new issue, #4016:
URL: https://github.com/apache/iggy/issues/4016

   ### Description
   
   `get_stats` is the server's headline diagnostic call and is exposed by every 
other SDK; the Python SDK has no way to reach it. Part of the parity work 
tracked in #3893.
   
   ```rust
   async fn get_stats(&self) -> Result<Stats, IggyError>;
   ```
   
   `Stats` carries scalar counts (streams, topics, partitions, segments, 
messages, clients, consumer groups), host and version strings, thread count, 
free and total disk space, and `cache_metrics: HashMap<CacheMetricsKey, 
CacheMetrics>`.
   
   ### Affected area / component
   
   _No response_
   
   ### Proposed solution
   
   - Add `foreign/python/src/stats.rs` wrapping `Stats`, `CacheMetrics` and 
`CacheMetricsKey`, following `src/user.rs`. `CacheMetricsKey` needs `__hash__` 
and `__eq__` so it can key a Python dict.
   - Expose `cache_metrics` as a `dict[CacheMetricsKey, CacheMetrics]`.
   - Add `get_stats` to `src/client.rs` and the stub entries to 
`foreign/python/apache_iggy.pyi`.
   - Add `foreign/python/tests/test_stats.py`: create a stream and topic, send 
messages, then assert the counts moved and the version string is non-empty.
   
   ### Alternatives considered
   
   _No response_
   
   ### Contribution
   
   - [ ] I'm willing to submit a pull request to implement this feature
   
   ### Good first issue
   
   - [x] I think this could be a good first issue for a new contributor


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to