Closed z4kn4fein closed 3 years ago
Merging #24 (fa35873) into master (26b2edd) will increase coverage by
0.02%
. The diff coverage is95.91%
.:exclamation: Current head fa35873 differs from pull request most recent head d6ac458. Consider uploading reports for the commit d6ac458 to get more accurate results
@@ Coverage Diff @@
## master #24 +/- ##
==========================================
+ Coverage 96.89% 96.91% +0.02%
==========================================
Files 27 27
Lines 708 713 +5
Branches 71 73 +2
==========================================
+ Hits 686 691 +5
Misses 12 12
Partials 10 10
Impacted Files | Coverage Δ | |
---|---|---|
src/ConfigCatClient/HttpConfigFetcher.cs | 96.51% <92.30%> (-0.05%) |
:arrow_down: |
src/ConfigCatClient/ConfigCatClient.cs | 92.42% <100.00%> (-0.06%) |
:arrow_down: |
src/ConfigCatClient/ConfigDeserializer.cs | 100.00% <100.00%> (ø) |
|
src/ConfigCatClient/Evaluate/RolloutEvaluator.cs | 97.67% <100.00%> (+0.01%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 26b2edd...d6ac458. Read the comment docs.
Replaced .GetHashCode()
with MurmurHash3
. Far less chance for hashes to collide.
Updated benchmark:
| Method | Mean | Error | StdDev | Ratio | Gen 0 | Gen 1 | Allocated |
|------- |-----------:|----------:|----------:|------:|-------:|-------:|----------:|
| Old | 107.847 us | 0.4968 us | 0.4647 us | 1.00 | 2.9297 | 0.1221 | 25 KB |
| New | 6.921 us | 0.0347 us | 0.0325 us | 0.06 | 1.3809 | 0.0076 | 11 KB |
Describe the purpose of your pull request
Reducing the number of JSON deserialization calls by caching the last deserialized object in memory. Now, the deserialization is called only when the retrieved JSON string differs from the latest cached one.
Performance benchmark:
Related issues (only if applicable)
22
Requirement checklist (only if applicable)