Repository navigation
Conversation
The existing benchmarks evaluate a handful of features, too few to catch regressions that only show at scale, such as flagsmith-python-client#198. Adds a benchmark over an identity context shaped like a large real-world environment, and one over a context trimmed to a single feature and the segments overriding it, as the Python SDK evaluates flags lazily.
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against 98d0377 |
This was referenced Oct 19, 2026
Merging this PR will not alter performance
Performance Changes
Comparing |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of a stack of small local evaluation performance PRs, addressing flagsmith-python-client#198. Each PR is based on the previous one;
perf/allholds the whole stack for benchmarking.The existing benchmarks evaluate a handful of features, too few to catch regressions that only show at scale, as in #198. This adds two CodSpeed benchmarks:
test_engine_benchmark__large_context: an identity context shaped like a large real-world environment, as built by the Python SDK in local evaluation mode. It has 262 features (a tenth of them multivariate) and 20 segments with nested trait rules overriding 5 features each, plus a$.environment.namesegment and an identity overrides segment.test_engine_benchmark__single_feature_context: the same context trimmed to one feature and the segments overriding it, as the Python SDK evaluates flags lazily.No engine changes.
Stack
perf/all= the whole stack (compare).Stack results
p50 µs per
get_evaluation_result, median of 3 interleaved rounds, Python 3.11. Contexts are built by flagsmith-python-client:f262_s20= 262 features / 20 segments etc., with#262applied;released_sdk_io1000is as released SDKs build it, with 1,000 identity overrides segments. Run-to-run noise is up to ~8%, so read single-digit per-PR deltas as indicative.