-
Notifications
You must be signed in to change notification settings - Fork 19
Add direct access API for metrics #293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #293 +/- ##
===========================================
- Coverage 64.29% 50.56% -13.74%
===========================================
Files 72 63 -9
Lines 4406 4080 -326
Branches 555 1771 +1216
===========================================
- Hits 2833 2063 -770
+ Misses 1327 864 -463
- Partials 246 1153 +907
🚀 New features to boost your workflow:
|
95939d0 to
e165e7a
Compare
This adds COUNTER_VALUE, GAUGE_VALUE, and HISTOGRAM_VALUE macros that allow reading metric values directly as native types (int64_t for counters/gauges, HistogramStatistics struct for histograms) without going through JSON serialization. Also made gather_result() public to allow custom metric collection without JSON if needed. Tests added to farm_test.cpp verify the new direct access methods work correctly across all metric types. Signed-off-by: Xiaoxi Chen <xiaoxchen@ebay.com>
e165e7a to
879aaad
Compare
conanfile.py
Outdated
| class SISLConan(ConanFile): | ||
| name = "sisl" | ||
| version = "13.1.1" | ||
| version = "13.1.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we bump the MINOR since we are extending the API not just patching the implementation? Should be backwards compat from what I can tell.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack, done
This adds COUNTER_VALUE, GAUGE_VALUE, and HISTOGRAM_VALUE macros that allow reading metric values directly as native types (int64_t for counters/gauges, HistogramStatistics struct for histograms) without going through JSON serialization.
Also made gather_result() public to allow custom metric collection without JSON if needed.
Tests added to wrapper_test.cpp verify the new direct access methods work correctly across all metric types.