Skip to content

chore: eliminate all 57 build warnings#86

Merged
cloud-hai-vo merged 2 commits intomainfrom
chore/zero-warnings
Mar 27, 2026
Merged

chore: eliminate all 57 build warnings#86
cloud-hai-vo merged 2 commits intomainfrom
chore/zero-warnings

Conversation

@cloud-hai-vo
Copy link
Copy Markdown
Contributor

Problem

Build produced 57 warnings across 3 categories, cluttering CI output and hiding real issues.

Fix

Warning Count Fix
CS8604 nullable arg 15 ! where null already checked upstream
CS8602 nullable deref 18 ! in test assertions
NU1701 package compat 12 <NoWarn> in Analyzers.Tests csproj
xUnit1031 blocking task 9 async Task + await Task.WhenAll
ExpressionBuilder null safety 3 Null check before nestedDel call (also a review fix)

Build now: 0 warnings across all TFMs.

Test plan

  • 348 unit tests pass
  • 0 warnings on dotnet build --configuration Release

🤖 Generated with Claude Code

cloud-hai-vo and others added 2 commits March 27, 2026 06:57
The "Update README with benchmark results" step only ran on push
events. Manual workflow_dispatch runs completed benchmarks but
skipped the README update step.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- CS8604 (nullable arg): add null-forgiving ! in Mapper.cs where
  source is guaranteed non-null by upstream checks
- CS8602 (nullable deref): add ! to test assertions in OpenGenericMapTests
- CS8604 in ExpressionBuilder: add null check before nestedDel call
  (also fixes review finding — self-referencing type null safety)
- xUnit1031 (blocking task): convert ThreadSafetyTests to async/await
- NU1701 (package compat): suppress in Analyzers.Tests csproj

Build now produces 0 warnings across all TFMs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cloud-hai-vo cloud-hai-vo enabled auto-merge (squash) March 27, 2026 00:04
@cloud-hai-vo cloud-hai-vo merged commit 3030b05 into main Mar 27, 2026
5 checks passed
@cloud-hai-vo cloud-hai-vo deleted the chore/zero-warnings branch March 27, 2026 00:05
@github-actions
Copy link
Copy Markdown
Contributor

📊 Benchmark Results

Generated: 2026-03-27 00:11 UTC  ·  Download full artifacts

Column guide:
Mean = average execution time  ·  Error = half of 99.9 % confidence interval  ·  StdDev = standard deviation  ·  Min / Median / Max = statistical range  ·  Ratio = vs Manual baseline (lower = closer to hand-written speed)  ·  RatioSD = ratio std dev  ·  Rank = 1 is fastest  ·  Gen0/1/2 = GC collections per 1 000 ops  ·  Allocated = managed heap per operation  ·  Alloc Ratio = allocation ratio vs baseline

🔵 Flat Mapping — 10-property object

Method Mean Error StdDev Min Median Max Ratio RatioSD Rank Gen0 Allocated Alloc Ratio
Manual 14.38 ns 2.998 ns 0.164 ns 14.24 ns 14.33 ns 14.56 ns 1.00 0.01 1 0.0048 80 B 1.00
EggMapper 25.03 ns 2.457 ns 0.135 ns 24.87 ns 25.09 ns 25.12 ns 1.74 0.02 2 0.0048 80 B 1.00
AutoMapper 80.10 ns 4.076 ns 0.223 ns 79.85 ns 80.17 ns 80.28 ns 5.57 0.06 3 0.0048 80 B 1.00
Mapster 27.63 ns 2.297 ns 0.126 ns 27.55 ns 27.56 ns 27.78 ns 1.92 0.02 2 0.0048 80 B 1.00
MapperlyMap 14.85 ns 0.870 ns 0.048 ns 14.81 ns 14.84 ns 14.90 ns 1.03 0.01 1 0.0048 80 B 1.00
AgileMapper 486.69 ns 22.273 ns 1.221 ns 485.84 ns 486.13 ns 488.09 ns 33.86 0.34 4 0.0200 344 B 4.30
EggMapperGenerator 15.08 ns 3.448 ns 0.189 ns 14.91 ns 15.06 ns 15.28 ns 1.05 0.02 1 0.0048 80 B 1.00
EggMapperClassMapper 15.35 ns 5.355 ns 0.294 ns 15.03 ns 15.44 ns 15.59 ns 1.07 0.02 1 0.0048 80 B 1.00

🟡 Flattening — 2 nested objects → 8 flat properties

Method Mean Error StdDev Min Median Max Ratio RatioSD Rank Gen0 Allocated Alloc Ratio
Manual 18.53 ns 2.156 ns 0.118 ns 18.39 ns 18.60 ns 18.60 ns 1.00 0.01 1 0.0048 80 B 1.00
EggMap 29.23 ns 10.672 ns 0.585 ns 28.58 ns 29.38 ns 29.71 ns 1.58 0.03 3 0.0048 80 B 1.00
AutoMapper 92.68 ns 3.158 ns 0.173 ns 92.49 ns 92.71 ns 92.83 ns 5.00 0.03 4 0.0048 80 B 1.00
Mapster 35.28 ns 2.258 ns 0.124 ns 35.18 ns 35.25 ns 35.42 ns 1.90 0.01 3 0.0048 80 B 1.00
MapperlyMap 23.31 ns 21.513 ns 1.179 ns 22.63 ns 22.63 ns 24.67 ns 1.26 0.06 2 0.0062 104 B 1.30
AgileMapper 506.28 ns 1.663 ns 0.091 ns 506.22 ns 506.24 ns 506.39 ns 27.32 0.15 5 0.0200 344 B 4.30

🟣 Deep Mapping — 2 nested address objects

Method Mean Error StdDev Min Median Max Ratio RatioSD Rank Gen0 Allocated Alloc Ratio
Manual 53.42 ns 15.473 ns 0.848 ns 52.49 ns 53.62 ns 54.16 ns 1.00 0.02 1 0.0162 272 B 1.00
EggMapper 63.30 ns 18.893 ns 1.036 ns 62.52 ns 62.89 ns 64.47 ns 1.19 0.02 1 0.0162 272 B 1.00
AutoMapper 117.36 ns 7.599 ns 0.417 ns 117.11 ns 117.12 ns 117.84 ns 2.20 0.03 2 0.0162 272 B 1.00
Mapster 66.42 ns 8.875 ns 0.486 ns 65.88 ns 66.54 ns 66.83 ns 1.24 0.02 1 0.0162 272 B 1.00
MapperlyMap 48.45 ns 5.750 ns 0.315 ns 48.12 ns 48.48 ns 48.75 ns 0.91 0.01 1 0.0162 272 B 1.00
AgileMapper 506.85 ns 31.783 ns 1.742 ns 505.15 ns 506.78 ns 508.63 ns 9.49 0.13 3 0.0248 424 B 1.56

🟢 Complex Mapping — nested object + collection

Method Mean Error StdDev Min Median Max Ratio RatioSD Rank Gen0 Allocated Alloc Ratio
Manual 72.14 ns 14.93 ns 0.818 ns 71.36 ns 72.08 ns 72.99 ns 1.00 0.01 1 0.0191 320 B 1.00
EggMapper 100.19 ns 17.52 ns 0.961 ns 99.09 ns 100.58 ns 100.89 ns 1.39 0.02 2 0.0191 320 B 1.00
AutoMapper 157.23 ns 18.10 ns 0.992 ns 156.15 ns 157.45 ns 158.09 ns 2.18 0.02 3 0.0196 328 B 1.02
Mapster 92.02 ns 14.70 ns 0.806 ns 91.10 ns 92.39 ns 92.58 ns 1.28 0.02 2 0.0191 320 B 1.00
MapperlyMap 72.19 ns 13.92 ns 0.763 ns 71.33 ns 72.48 ns 72.77 ns 1.00 0.01 1 0.0191 320 B 1.00
AgileMapper 572.44 ns 50.47 ns 2.767 ns 569.52 ns 572.80 ns 575.02 ns 7.94 0.08 4 0.0315 528 B 1.65

🟠 Collection — 100-item List<T>

Method Mean Error StdDev Min Median Max Ratio RatioSD Rank Gen0 Gen1 Allocated Alloc Ratio
Manual 1.732 μs 0.2412 μs 0.0132 μs 1.720 μs 1.729 μs 1.746 μs 1.00 0.01 1 0.5283 0.0172 8.65 KB 1.00
EggMapper 1.741 μs 0.2083 μs 0.0114 μs 1.729 μs 1.744 μs 1.752 μs 1.01 0.01 1 0.5283 0.0172 8.65 KB 1.00
AutoMapper 2.353 μs 0.5409 μs 0.0296 μs 2.319 μs 2.368 μs 2.372 μs 1.36 0.02 2 0.6065 0.0191 9.95 KB 1.15
Mapster 1.810 μs 0.7127 μs 0.0391 μs 1.774 μs 1.803 μs 1.852 μs 1.04 0.02 1 0.5283 0.0172 8.65 KB 1.00
MapperlyMap 1.854 μs 0.4237 μs 0.0232 μs 1.836 μs 1.845 μs 1.880 μs 1.07 0.01 1 0.5283 0.0172 8.65 KB 1.00
AgileMapper 2.615 μs 0.4369 μs 0.0239 μs 2.588 μs 2.624 μs 2.634 μs 1.51 0.02 2 0.5417 0.0153 8.91 KB 1.03

🟠 Collection — 100-item List<T>

Method Mean Error StdDev Min Median Max Ratio RatioSD Rank Gen0 Gen1 Allocated Alloc Ratio
Manual 5.174 μs 0.3606 μs 0.0198 μs 5.161 μs 5.164 μs 5.196 μs 1.00 0.00 1 1.6708 0.0916 27.4 KB 1.00
EggMapper 5.646 μs 0.4772 μs 0.0262 μs 5.616 μs 5.656 μs 5.666 μs 1.09 0.01 1 1.6708 0.0916 27.4 KB 1.00
AutoMapper 6.372 μs 0.4758 μs 0.0261 μs 6.346 μs 6.373 μs 6.398 μs 1.23 0.01 1 1.7548 0.1068 28.7 KB 1.05
Mapster 5.694 μs 0.6734 μs 0.0369 μs 5.653 μs 5.704 μs 5.725 μs 1.10 0.01 1 1.6708 0.0916 27.4 KB 1.00
MapperlyMap 5.285 μs 1.6353 μs 0.0896 μs 5.208 μs 5.264 μs 5.383 μs 1.02 0.02 1 1.6785 0.0992 27.42 KB 1.00
AgileMapper 5.146 μs 0.3460 μs 0.0190 μs 5.134 μs 5.137 μs 5.168 μs 0.99 0.00 1 1.0223 0.0610 16.72 KB 0.61

🟠 Collection — 100-item List<T>

Method Mean Error StdDev Min Median Max Ratio RatioSD Rank Gen0 Gen1 Allocated Alloc Ratio
Manual 16.50 μs 3.727 μs 0.204 μs 16.35 μs 16.41 μs 16.73 μs 1.00 0.02 1 5.2490 1.3123 85.99 KB 1.00
EggMapper 17.76 μs 1.684 μs 0.092 μs 17.65 μs 17.80 μs 17.82 μs 1.08 0.01 1 5.2490 1.3123 85.99 KB 1.00
AutoMapper 21.00 μs 0.666 μs 0.036 μs 20.97 μs 20.98 μs 21.04 μs 1.27 0.01 1 5.7678 1.4343 94.34 KB 1.10
Mapster 17.05 μs 3.607 μs 0.198 μs 16.84 μs 17.09 μs 17.23 μs 1.03 0.02 1 5.2490 1.3123 85.99 KB 1.00
MapperlyMap 18.17 μs 0.527 μs 0.029 μs 18.15 μs 18.17 μs 18.20 μs 1.10 0.01 1 5.2490 1.2817 86.02 KB 1.00
AgileMapper 20.27 μs 2.938 μs 0.161 μs 20.13 μs 20.24 μs 20.45 μs 1.23 0.02 1 5.2795 1.3123 86.25 KB 1.00

⚪ Startup / Configuration time

Method Mean Error StdDev Min Median Max Ratio RatioSD Rank Gen0 Gen1 Allocated Alloc Ratio
EggMapperStartup 1,306.824 μs 1,389.9702 μs 76.1890 μs 1,230.727 μs 1,306.641 μs 1,383.104 μs 1.002 0.07 3 3.9063 1.9531 94.82 KB 1.00
AutoMapperStartup 452.114 μs 888.0934 μs 48.6794 μs 408.306 μs 443.518 μs 504.519 μs 0.347 0.04 2 5.8594 - 104.07 KB 1.10
MapsterStartup 2.477 μs 0.5669 μs 0.0311 μs 2.447 μs 2.475 μs 2.509 μs 0.002 0.00 1 0.7019 0.0267 11.51 KB 0.12

EggMapper.Benchmarks.ColdStartBenchmark-report-github

Method Mean Error StdDev Min Median Max Ratio RatioSD Rank Gen0 Gen1 Allocated Alloc Ratio
EggMapper 1.289 ms 1.710 ms 0.0937 ms 1.231 ms 1.238 ms 1.397 ms 1.00 0.09 1 3.9063 1.9531 95.33 KB 1.00
AutoMapper 3.871 ms 9.205 ms 0.5046 ms 3.435 ms 3.754 ms 4.424 ms 3.01 0.39 2 15.6250 7.8125 310.22 KB 3.25
Mapster 4.496 ms 9.104 ms 0.4990 ms 3.929 ms 4.695 ms 4.865 ms 3.50 0.40 2 39.0625 15.6250 757.6 KB 7.95

📝 Notes
  • Each benchmark class is decorated with [MemoryDiagnoser] and [RankColumn].
  • The global config (see src/EggMapper.Benchmarks/Program.cs) adds Min, Median, and Max columns.
  • Manual is the hand-written baseline (ratio = 1.00). A ratio < 1 means faster than manual.
  • Benchmarks run on GitHub-hosted runners — absolute times may vary between runs; focus on Ratio for comparisons.
  • To reproduce locally:
    cd src/EggMapper.Benchmarks
    dotnet run --configuration Release -- --filter '*'

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