Commit d18e84d
feat(csharp/Benchmarks): Add .NET Framework 4.7.2 support with TLS co… (#3682)
This commit enhances the CloudFetch benchmark suite to support testing
on .NET Framework 4.7.2, which is the runtime used by Power BI. There
are some notable difference in .NET472 vs .NET8.0, one of them is
/K4os.Compression.LZ4 use the DefaultArrayPool in .NET472 which has a 1
MB upper limit for array size, where .NET8.0 use the SharedArrayPool
which almost have no size limit.
Changes:
- Add net472 target framework to Benchmarks.csproj
- Make Tests project reference conditional (net8.0 only, since Tests
doesn't support net472)
- Enable TLS 1.2/1.3 in CloudFetchBenchmarkRunner for .NET Framework
- Enable TLS 1.2/1.3 in benchmark GlobalSetup for spawned processes
These changes are necessary because .NET Framework 4.7.2 doesn't enable
modern TLS protocols by default, which are required for Databricks HTTPS
connections. This allows accurate performance testing on the Power BI
runtime environment (net472 with DefaultArrayPool).
Command:
` dotnet run -c Release --project Benchmarks/Benchmarks.csproj
--framework net472 CloudFetchBenchmarkRunner`
Sample output:
| Method | ReadDelayMs | Mean | Min | Max | Median | Peak Memory (MB) |
Total Rows | Total Batches | Gen0 | Gen1 | Gen2 | Allocated |
|------------------ |------------
|--------:|--------:|--------:|--------:|-----------------:|-----------:|--------------:|------------:|-----------:|-----------:|----------:|
| ExecuteLargeQuery | 5 | 9.659 s | 9.016 s | 10.03 s | 9.928 s | 356.38
| 1,439,935 | 740 | 336000.0000 | 57000.0000 | 35000.0000 | 2.73 GB |
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 5be5ca7 commit d18e84d
3 files changed
Lines changed: 16 additions & 1 deletion
File tree
- csharp/Benchmarks
- Databricks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| |||
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
127 | 130 | | |
128 | 131 | | |
129 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
130 | 137 | | |
131 | 138 | | |
132 | 139 | | |
| |||
0 commit comments