Skip to content

[00056] Align cross-language benchmark data generation#19

Merged
rorychatt merged 1 commit into
mainfrom
plan-00056-Ivy.NativeJsonDiff
Apr 12, 2026
Merged

[00056] Align cross-language benchmark data generation#19
rorychatt merged 1 commit into
mainfrom
plan-00056-Ivy.NativeJsonDiff

Conversation

@rorychatt

Copy link
Copy Markdown
Collaborator

Summary

Replaced System.Random-based numeric generation in GenerateVeryLargeStateTree() with deterministic arithmetic expressions that match the Rust generate_very_large_state_tree() in diff_bench.rs. This ensures cross-language benchmark comparisons use identical numeric values for salary, skill level, years of experience, and performance score. Added a test validating representative values match the expected formulas.

Files Modified

  • Benchmark data generator: src/Ivy.NativeJsonDiff.Benchmarks/TestData/JsonPayloadGenerator.cs — Replaced Random calls with arithmetic expressions in GenerateVeryLargeStateTree(), removed Random rng parameter from BuildEmployee
  • Tests: src/Ivy.NativeJsonDiff.Tests/JsonPayloadGeneratorTests.cs — Added VeryLargeStateTree_UsesArithmeticFormulasMatchingRust test

Commits

  • d9e3dbc [00056] Replace Random-based values with deterministic arithmetic in VeryLargeStateTree

…VeryLargeStateTree

Align C# GenerateVeryLargeStateTree() numeric values with Rust
diff_bench.rs by replacing System.Random calls with identical
arithmetic expressions (e.g. salary, skill level, yearsExperience,
performanceScore). Add test validating formula outputs.
@rorychatt
rorychatt merged commit 43525ff into main Apr 12, 2026
2 checks passed
@rorychatt
rorychatt deleted the plan-00056-Ivy.NativeJsonDiff branch April 12, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant