-
Notifications
You must be signed in to change notification settings - Fork 15
FFL-1255 Add feature flag evaluation library #1271
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
Conversation
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1271 +/- ##
==========================================
+ Coverage 71.74% 71.84% +0.10%
==========================================
Files 356 368 +12
Lines 56993 57967 +974
==========================================
+ Hits 40887 41648 +761
- Misses 16106 16319 +213
🚀 New features to boost your workflow:
|
BenchmarksComparisonBenchmark execution time: 2025-10-21 10:30:23 Comparing candidate commit 64681df in PR branch Found 7 performance improvements and 0 performance regressions! Performance is the same for 46 metrics, 2 unstable metrics. scenario:normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo...
scenario:normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000...
scenario:normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters
scenario:redis/obfuscate_redis_string
CandidateCandidate benchmark detailsGroup 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 8
Group 9
Group 10
Group 11
Group 12
Group 13
Group 14
Group 15
Group 16
Group 17
BaselineOmitted due to size. |
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.
Looks good in general. I can't comment on the correctness, but the tests are passing 👍🏼
| } | ||
|
|
||
| #[test] | ||
| fn evaluation_sdk_test_data() { |
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.
It feels a bit weird that all the test cases are run inside a single method. I think it would be better to use a build.rs file to generate them. I'll open a small PR.
| impl Split { | ||
| /// Return `true` if `targeting_key` matches the given split. | ||
| /// | ||
| /// To match a split, subject must match all underlying shards. |
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.
It would be nice if there was some documentation that describes how the algorithm works. I see that there are shards, but how are they used.
| test_cases | ||
| } | ||
|
|
||
| fn bench_sdk_test_data_rules_based(b: &mut Bencher) { |
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.
exciting!
What does this PR do?
Adding a feature-flagging evaluation library for use in Python/Ruby tracers.
Motivation
We're adding feature flags support in a bunch of tracers and want to use the common core in Python and Ruby (and any other tracer that can work with Rust).
Additional Notes
It's being moved over from dd-source. You can review it by commit. The first commit is a copy from dd-source, the next ones are dropping features we don't need / adapting to libdatadog.
How to test the change?
See inline tests.