feat: Cache hooks per Flag Evaluation Type
Hooks are now stored in a map to allow efficient lookup of hooks supporting certain FlagValueTypes. This and other changes makes merging the hooks cheaper.
Related Issues
Part of #1718
Follow Up Tasks
Implement efficient Hook Storage in all providers (optional, but will speed things up)
- [ ] Make sure the additions of default methods to interfaces is not a byte code incompatibility
Codecov Report
:x: Patch coverage is 94.20290% with 4 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 93.36%. Comparing base (bd70a3a) to head (59530f5).
:warning: Report is 14 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #1734 +/- ##
============================================
+ Coverage 92.47% 93.36% +0.88%
- Complexity 527 546 +19
============================================
Files 52 53 +1
Lines 1276 1326 +50
Branches 112 125 +13
============================================
+ Hits 1180 1238 +58
+ Misses 60 50 -10
- Partials 36 38 +2
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 93.36% <94.20%> (+0.88%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Benchmark results: (I ran AllocationBenchmark#main with the IntelliJ Profiler. This is not a proper JMH benchmark, so the values are not representative per evaluation, but should be helpful to compare both versions)
Baseline:
Duration: 5267 ms
Allocations: 16.834 GB
Flamegraph of allocations:
This PR:
Duration: 5023 ms (this is an insignificant change, the deviations on those tests are quite large)
Allocations: 14.224 GB
Flamegraph of allocations:
Quality Gate passed
Issues
23 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code