[FFE] Added support for Value evaluation type in OpenFeature#8086
[FFE] Added support for Value evaluation type in OpenFeature#8086daniel-romano-DD merged 1 commit intomasterfrom
Conversation
BenchmarksBenchmark execution time: 2026-01-22 15:30:36 Comparing candidate commit d17bff2 in PR branch Found 10 performance improvements and 10 performance regressions! Performance is the same for 152 metrics, 20 unstable metrics. scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net6.0
scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net6.0
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net6.0
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1
scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net6.0
scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472
scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1
scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1
scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0
scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net6.0
scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net6.0
scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net6.0
scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog netcoreapp3.1
scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0
scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog netcoreapp3.1
scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan netcoreapp3.1
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8086) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard. Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph). Duration chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8086) - mean (69ms) : 67, 70
master - mean (69ms) : 67, 70
section Bailout
This PR (8086) - mean (72ms) : 71, 73
master - mean (72ms) : 71, 73
section CallTarget+Inlining+NGEN
This PR (8086) - mean (1,019ms) : 938, 1100
master - mean (1,024ms) : 938, 1110
FakeDbCommand (.NET Core 3.1)gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8086) - mean (106ms) : 103, 109
master - mean (106ms) : 104, 109
section Bailout
This PR (8086) - mean (107ms) : 106, 108
master - mean (107ms) : 106, 108
section CallTarget+Inlining+NGEN
This PR (8086) - mean (738ms) : 681, 795
master - mean (738ms) : 685, 792
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8086) - mean (94ms) : 92, 96
master - mean (93ms) : 91, 95
section Bailout
This PR (8086) - mean (95ms) : 94, 96
master - mean (94ms) : 94, 95
section CallTarget+Inlining+NGEN
This PR (8086) - mean (720ms) : 693, 747
master - mean (711ms) : 667, 755
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8086) - mean (92ms) : 90, 94
master - mean (92ms) : 90, 95
section Bailout
This PR (8086) - mean (94ms) : 92, 95
master - mean (93ms) : 92, 94
section CallTarget+Inlining+NGEN
This PR (8086) - mean (637ms) : 622, 652
master - mean (636ms) : 623, 650
HttpMessageHandler (.NET Framework 4.8)gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8086) - mean (196ms) : 190, 203
master - mean (194ms) : 188, 200
section Bailout
This PR (8086) - mean (201ms) : 194, 207
master - mean (198ms) : 195, 201
section CallTarget+Inlining+NGEN
This PR (8086) - mean (1,157ms) : 1065, 1250
master - mean (1,140ms) : 1054, 1227
HttpMessageHandler (.NET Core 3.1)gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8086) - mean (280ms) : 273, 287
master - mean (277ms) : 271, 283
section Bailout
This PR (8086) - mean (281ms) : 273, 289
master - mean (277ms) : 274, 280
section CallTarget+Inlining+NGEN
This PR (8086) - mean (940ms) : 893, 987
master - mean (924ms) : 876, 972
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8086) - mean (274ms) : 266, 283
master - mean (271ms) : 265, 277
section Bailout
This PR (8086) - mean (282ms) : 272, 293
master - mean (271ms) : 267, 274
section CallTarget+Inlining+NGEN
This PR (8086) - mean (937ms) : 881, 993
master - mean (928ms) : 877, 979
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8086) - mean (274ms) : 265, 283
master - mean (272ms) : 265, 278
section Bailout
This PR (8086) - mean (273ms) : 265, 281
master - mean (270ms) : 267, 273
section CallTarget+Inlining+NGEN
This PR (8086) - mean (849ms) : 807, 890
master - mean (831ms) : 811, 850
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f836ca5a2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <ItemGroup> | ||
| <PackageReference Include="OpenFeature" Version="[2.0.0, 3.0.0)" /> | ||
| <PackageReference Include="OpenFeature" Version="2.0.0" /> | ||
| <PackageReference Include="Newtonsoft.Json" Version="12.0.1" /> |
There was a problem hiding this comment.
Why was Newtonsoft.Json chosen over the vendored version or System.Text.Json?
There was a problem hiding this comment.
Because this package does not have (must not) a dep with any of our libs. This is the most used version of Newtonsoft, as a min requirement
There was a problem hiding this comment.
this package does not have (must not) a dep with any of our libs
That explains why we don't use the vendored version, but what about System.Text.Json? It's supposed to have better performance.
There was a problem hiding this comment.
Never mind. It doesn't support .NET Framework 4.6.1 and brings in a lot of other dependencies.
There was a problem hiding this comment.
That was the main reason (as Gemini suggested) XD
| <PropertyGroup> | ||
| <RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild> | ||
| <AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
| <LangVersion>preview</LangVersion> |
There was a problem hiding this comment.
Is this change intended?
There was a problem hiding this comment.
Yes, it is. Compiler began complaining after last VS update
| @@ -1,4 +1,6 @@ | |||
| using System; | |||
| using System.Diagnostics; | |||
| using System.Runtime.InteropServices.ComTypes; | |||
There was a problem hiding this comment.
Are you using this one?
There was a problem hiding this comment.
VS added it. This does no harm, specially in a Sample app.
1f836ca to
3d93b7c
Compare
3d93b7c to
d17bff2
Compare
| Debug.Assert(evaluation is not null); | ||
| Debug.Assert(evaluation.ErrorMessage is null); | ||
| Debug.Assert(evaluation.Value != defaultValue); | ||
| Debug.Assert(evaluation.Value.IsStructure); | ||
| Debug.Assert(evaluation.Value.AsStructure.ContainsKey("integer")); | ||
| Debug.Assert(evaluation.Value.AsStructure.GetValue("integer").AsInteger == 1); |
There was a problem hiding this comment.
I don't know if we use release builds when we run tests, but if we do, none of these assert will run.
There was a problem hiding this comment.
Uhm, good point. I'll change it
Summary of changes
Add full support for OpenFeature Value type evaluation (JSON)
Reason for change
Implementation details
Test coverage
Other details