Conversation
This commit adds comprehensive benchmarking infrastructure to FSharp.Data: Features added: - BenchmarkDotNet dependency added to paket.dependencies - New FSharp.Data.Benchmarks project with JSON parsing benchmarks - Benchmarks for different JSON document sizes (Simple, GitHub, Twitter, WorldBank) - JSON conversion benchmarks for property access and array operations - Build integration with RunBenchmarks target - Documentation and helper scripts for running benchmarks - Memory diagnostics enabled for allocation tracking The benchmark project includes: - 7 JSON parsing benchmarks covering various document sizes - 2 JSON conversion benchmarks for common operations - Proper setup with sample data from existing test files - Release mode builds for accurate performance measurements Usage: - Run all benchmarks: dotnet run --project build/build.fsproj -- -t RunBenchmarks - Quick test: cd tests/FSharp.Data.Benchmarks && ./run-benchmarks.sh quick - Custom filters: ./run-benchmarks.sh --filter "*ParseSimpleJson*" This provides baseline performance measurements and infrastructure for: - Detecting performance regressions - Validating optimization improvements - Identifying performance bottlenecks - Memory allocation analysis 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Aug 30, 2025
Contributor
- Modified GenerateDocs target to use --projects parameter - Explicitly list main library projects, excluding FSharp.Data.Benchmarks - Resolves fsdocs cracking failure due to benchmark project's different paket group 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Author
🔧 CI Fix AppliedProblem IdentifiedThe Windows build was failing during the Root Cause: The benchmark project uses a separate paket group ("Benchmarks") with Solution Applied ✅Modified the
Changes Made:
Files Modified
Expected Result
The CI will rerun automatically and should now pass all checks.
|
This was referenced Aug 30, 2025
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.
Summary
This PR adds comprehensive benchmarking infrastructure to FSharp.Data using BenchmarkDotNet, addressing the first goal from the performance improvement plan in issue #1534.
Key improvements:
RunBenchmarkstarget)Test Plan
Benchmarking Infrastructure Validation:
dotnet run --project build/build.fsproj -- -t RunBenchmarks)./run-benchmarks.sh quick)Performance Measurements:
Initial baseline measurements from testing show:
BenchmarkDotNet.Artifacts/folderApproach and Implementation
Selected Performance Goal: Added BenchmarkDotNet infrastructure (Round 1 goal from #1534)
Todo List Completed:
Build and Test Commands Used:
Files Added:
tests/FSharp.Data.Benchmarks/FSharp.Data.Benchmarks.fsproj- Benchmark projecttests/FSharp.Data.Benchmarks/JsonBenchmarks.fs- JSON performance benchmarkstests/FSharp.Data.Benchmarks/Program.fs- Benchmark runnertests/FSharp.Data.Benchmarks/README.md- Usage documentationtests/FSharp.Data.Benchmarks/run-benchmarks.sh- Helper scripttests/FSharp.Data.Benchmarks/paket.references- Benchmark dependenciesFiles Modified:
paket.dependencies- Added Benchmarks group with BenchmarkDotNetFSharp.Data.sln- Added benchmark project to solutionbuild/build.fs- Added RunBenchmarks targetPerformance Measurements
The benchmark infrastructure successfully measures:
Benchmark Categories:
JsonBenchmarks: Parse operations on various JSON document sizesJsonConversionBenchmarks: Property access and array element extractionProblems Found and Solved
Future Performance Work
This infrastructure enables:
Links