Skip to content

docs: Prism.js syntax highlighting with eggspot brand theme#101

Merged
cloud-hai-vo merged 1 commit intomainfrom
docs/syntax-highlighting
Apr 18, 2026
Merged

docs: Prism.js syntax highlighting with eggspot brand theme#101
cloud-hai-vo merged 1 commit intomainfrom
docs/syntax-highlighting

Conversation

@cloud-hai-vo
Copy link
Copy Markdown
Contributor

Summary

  • prism-eggspot.css — custom Prism.js dark theme using eggspot brand colours: #FAB400 yellow for types/class names, #7b9eff blue for keywords, #7ec699 green for strings, #FAB8C4 pink for decorators/annotations, #f08d49 orange for numbers
  • 187 code blocks tagged with language-csharp, language-bash, language-powershell, or language-xml across all 20 pages; 37 plain-text/pseudo-code blocks left untagged
  • Prism core + autoloader injected via cdnjs CDN — language components fetched on demand, no bundle bloat
  • eggspot.css — removed hardcoded color: var(--text) from pre code so Prism token colours render correctly

Test plan

  • Open any content page and verify C# code blocks are syntax-highlighted
  • Check keyword colour (blue #7b9eff), string colour (green), type names (yellow)
  • Verify bash/shell blocks on Quick Start and Performance pages highlight correctly
  • Confirm inline <code> spans still use the amber colour (not affected by Prism)
  • Check no console errors about missing Prism language components

🤖 Generated with Claude Code

- Add prism-eggspot.css: custom dark theme using #FAB400 yellow (types),
  #7b9eff blue (keywords), #7ec699 green (strings), #FAB8C4 pink (decorators)
- Tag 187 code blocks across all 20 pages with language-csharp / language-bash /
  language-powershell / language-xml; 37 plain-text blocks left untagged
- Inject Prism core + autoloader from cdnjs CDN into every page
- Remove hardcoded color from pre code in eggspot.css so token colours show through

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 18, 2026 02:23
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Prism.js-based syntax highlighting to the EggMapper docs site, using an Eggspot-branded dark theme so code samples across the documentation render with consistent, readable token colors.

Changes:

  • Add a custom Prism theme (prism-eggspot.css) and include it across docs pages.
  • Tag code blocks with Prism language-* classes for C#, bash, PowerShell, and XML.
  • Inject Prism core + autoloader scripts via cdnjs and adjust existing code styling to allow Prism token colors to show.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 22 comments.

Show a summary per file
File Description
docs/index.html Includes Prism theme + Prism scripts; tags code blocks for highlighting.
docs/quick-start.html Includes Prism theme + Prism scripts; tags code blocks for highlighting.
docs/vs-automapper.html Includes Prism theme + Prism scripts; tags code blocks for highlighting.
docs/Getting-Started.html Includes Prism theme + Prism scripts; tags code blocks for highlighting.
docs/Configuration.html Includes Prism theme + Prism scripts; tags code blocks for highlighting.
docs/Profiles.html Includes Prism theme + Prism scripts; tags code blocks for highlighting.
docs/Dependency-Injection.html Includes Prism theme + Prism scripts; tags code blocks for highlighting.
docs/Advanced-Features.html Includes Prism theme + Prism scripts; tags code blocks for highlighting.
docs/Performance.html Includes Prism theme + Prism scripts; tags code blocks for highlighting.
docs/Migration-Guide.html Includes Prism theme + Prism scripts; tags code blocks for highlighting.
docs/API-Reference.html Includes Prism theme + Prism scripts; tags code blocks for highlighting.
docs/Tier2-Getting-Started.html Includes Prism theme + Prism scripts; tags code blocks for highlighting.
docs/Tier3-Getting-Started.html Includes Prism theme + Prism scripts; tags code blocks for highlighting.
docs/diagnostics/EGG1002.html Includes Prism theme + Prism scripts; tags code blocks for highlighting.
docs/diagnostics/EGG1003.html Includes Prism theme + Prism scripts; tags code blocks for highlighting.
docs/diagnostics/EGG2001.html Includes Prism theme + Prism scripts; tags code blocks for highlighting.
docs/diagnostics/EGG2002.html Includes Prism theme + Prism scripts; tags code blocks for highlighting.
docs/diagnostics/EGG3001.html Includes Prism theme + Prism scripts; tags code blocks for highlighting.
docs/diagnostics/EGG3002.html Includes Prism theme + Prism scripts; tags code blocks for highlighting.
docs/diagnostics/EGG3003.html Includes Prism theme + Prism scripts; tags code blocks for highlighting.
docs/assets/css/eggspot.css Removes pre code hardcoded color so Prism token colors can render.
docs/assets/css/prism-eggspot.css Adds the Eggspot-branded Prism token color theme.

Comment thread docs/Configuration.html
</footer>
<script src="assets/js/nav.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-core.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prism is loaded with prism-core + prism-autoloader, but nothing triggers highlighting. With this setup Prism will not automatically run, so the page’s code blocks will remain unhighlighted unless you call Prism.highlightAll() (or include the full prism.min.js build that auto-runs). Add an explicit init after these script tags (or a shared prism-init.js).

Suggested change
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script>
if (typeof Prism !== "undefined") {
Prism.highlightAll();
}
</script>

Copilot uses AI. Check for mistakes.
</footer>
<script src="assets/js/nav.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-core.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prism is loaded with prism-core + prism-autoloader, but nothing triggers highlighting. With this setup Prism will not automatically run, so the page’s code blocks will remain unhighlighted unless you call Prism.highlightAll() (or include the full prism.min.js build that auto-runs). Add an explicit init after these script tags (or a shared prism-init.js).

Suggested change
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script>
if (window.Prism && typeof window.Prism.highlightAll === "function") {
window.Prism.highlightAll();
}
</script>

Copilot uses AI. Check for mistakes.
Comment thread docs/API-Reference.html
</footer>
<script src="assets/js/nav.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-core.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prism is loaded with prism-core + prism-autoloader, but nothing triggers highlighting. With this setup Prism will not automatically run, so the page’s code blocks will remain unhighlighted unless you call Prism.highlightAll() (or include the full prism.min.js build that auto-runs). Add an explicit init after these script tags (or a shared prism-init.js).

Suggested change
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script>
if (window.Prism) {
Prism.highlightAll();
}
</script>

Copilot uses AI. Check for mistakes.
</footer>
<script src="../assets/js/nav.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-core.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prism is loaded with prism-core + prism-autoloader, but nothing triggers highlighting. With this setup Prism will not automatically run, so the page’s code blocks will remain unhighlighted unless you call Prism.highlightAll() (or include the full prism.min.js build that auto-runs). Add an explicit init after these script tags (or a shared prism-init.js).

Suggested change
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script>
if (window.Prism) {
Prism.highlightAll();
}
</script>

Copilot uses AI. Check for mistakes.
</footer>
<script src="../assets/js/nav.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-core.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prism is loaded with prism-core + prism-autoloader, but nothing triggers highlighting. With this setup Prism will not automatically run, so the page’s code blocks will remain unhighlighted unless you call Prism.highlightAll() (or include the full prism.min.js build that auto-runs). Add an explicit init after these script tags (or a shared prism-init.js).

Suggested change
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script>
if (window.Prism) {
Prism.highlightAll();
}
</script>

Copilot uses AI. Check for mistakes.
Comment thread docs/vs-automapper.html
</footer>
<script src="assets/js/nav.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-core.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prism is loaded with prism-core + prism-autoloader, but nothing triggers highlighting. With this setup Prism will not automatically run, so the page’s code blocks will remain unhighlighted unless you call Prism.highlightAll() (or include the full prism.min.js build that auto-runs). Add an explicit init after these script tags (or a shared prism-init.js).

Suggested change
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script>
if (window.Prism && typeof window.Prism.highlightAll === "function") {
window.Prism.highlightAll();
}
</script>

Copilot uses AI. Check for mistakes.
</footer>
<script src="../assets/js/nav.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-core.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prism is loaded with prism-core + prism-autoloader, but nothing triggers highlighting. With this setup Prism will not automatically run, so the page’s code blocks will remain unhighlighted unless you call Prism.highlightAll() (or include the full prism.min.js build that auto-runs). Add an explicit init after these script tags (or a shared prism-init.js).

Suggested change
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script>
if (window.Prism) {
Prism.highlightAll();
}
</script>

Copilot uses AI. Check for mistakes.
</footer>
<script src="assets/js/nav.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-core.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prism is loaded with prism-core + prism-autoloader, but nothing triggers highlighting. With this setup Prism will not automatically run, so the page’s code blocks will remain unhighlighted unless you call Prism.highlightAll() (or include the full prism.min.js build that auto-runs). Add an explicit init after these script tags (or a shared prism-init.js).

Suggested change
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script>
if (window.Prism) {
Prism.highlightAll();
}
</script>

Copilot uses AI. Check for mistakes.
Comment thread docs/Profiles.html
</footer>
<script src="assets/js/nav.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-core.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prism is loaded with prism-core + prism-autoloader, but nothing triggers highlighting. With this setup Prism will not automatically run, so the page’s code blocks will remain unhighlighted unless you call Prism.highlightAll() (or include the full prism.min.js build that auto-runs). Add an explicit init after these script tags (or a shared prism-init.js).

Suggested change
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script>
if (window.Prism && typeof window.Prism.highlightAll === "function") {
window.Prism.highlightAll();
}
</script>

Copilot uses AI. Check for mistakes.
Comment thread docs/Performance.html
</footer>
<script src="assets/js/nav.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-core.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prism is loaded with prism-core + prism-autoloader, but nothing triggers highlighting. With this setup Prism will not automatically run, so the page’s code blocks will remain unhighlighted unless you call Prism.highlightAll() (or include the full prism.min.js build that auto-runs). Add an explicit init after these script tags (or a shared prism-init.js).

Suggested change
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script>
if (window.Prism) {
Prism.highlightAll();
}
</script>

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

📊 Benchmark Results

Generated: 2026-04-18 02:30 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.87 ns 4.062 ns 0.223 ns 14.64 ns 14.88 ns 15.09 ns 1.00 0.02 1 0.0048 80 B 1.00
EggMapper 25.20 ns 5.817 ns 0.319 ns 24.85 ns 25.28 ns 25.48 ns 1.70 0.03 2 0.0048 80 B 1.00
AutoMapper 89.20 ns 3.171 ns 0.174 ns 89.01 ns 89.27 ns 89.33 ns 6.00 0.08 3 0.0048 80 B 1.00
Mapster 27.64 ns 3.060 ns 0.168 ns 27.47 ns 27.63 ns 27.80 ns 1.86 0.03 2 0.0048 80 B 1.00
MapperlyMap 14.53 ns 1.390 ns 0.076 ns 14.44 ns 14.55 ns 14.59 ns 0.98 0.01 1 0.0048 80 B 1.00
AgileMapper 490.81 ns 21.516 ns 1.179 ns 489.92 ns 490.35 ns 492.15 ns 33.01 0.43 4 0.0200 344 B 4.30
EggMapperGenerator 15.20 ns 2.622 ns 0.144 ns 15.06 ns 15.19 ns 15.35 ns 1.02 0.02 1 0.0048 80 B 1.00
EggMapperClassMapper 15.09 ns 5.396 ns 0.296 ns 14.77 ns 15.16 ns 15.35 ns 1.02 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.84 ns 2.449 ns 0.134 ns 18.68 ns 18.88 ns 18.94 ns 1.00 0.01 1 0.0048 80 B 1.00
EggMap 33.82 ns 9.589 ns 0.526 ns 33.31 ns 33.80 ns 34.36 ns 1.80 0.03 3 0.0048 80 B 1.00
AutoMapper 87.89 ns 4.807 ns 0.263 ns 87.60 ns 87.97 ns 88.11 ns 4.67 0.03 4 0.0048 80 B 1.00
Mapster 35.73 ns 10.998 ns 0.603 ns 35.27 ns 35.52 ns 36.41 ns 1.90 0.03 3 0.0048 80 B 1.00
MapperlyMap 23.82 ns 1.597 ns 0.088 ns 23.73 ns 23.84 ns 23.90 ns 1.26 0.01 2 0.0062 104 B 1.30
AgileMapper 493.73 ns 57.194 ns 3.135 ns 490.24 ns 494.68 ns 496.29 ns 26.21 0.22 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.27 ns 6.614 ns 0.363 ns 52.86 ns 53.42 ns 53.54 ns 1.00 0.01 1 0.0162 272 B 1.00
EggMapper 63.87 ns 0.709 ns 0.039 ns 63.83 ns 63.89 ns 63.90 ns 1.20 0.01 1 0.0162 272 B 1.00
AutoMapper 119.62 ns 28.048 ns 1.537 ns 117.85 ns 120.48 ns 120.53 ns 2.25 0.03 2 0.0162 272 B 1.00
Mapster 67.59 ns 4.064 ns 0.223 ns 67.34 ns 67.72 ns 67.73 ns 1.27 0.01 1 0.0162 272 B 1.00
MapperlyMap 51.33 ns 7.044 ns 0.386 ns 50.91 ns 51.41 ns 51.67 ns 0.96 0.01 1 0.0162 272 B 1.00
AgileMapper 527.33 ns 29.621 ns 1.624 ns 525.49 ns 527.93 ns 528.57 ns 9.90 0.06 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.37 ns 25.660 ns 1.407 ns 71.17 ns 72.02 ns 73.92 ns 1.00 0.02 1 0.0191 320 B 1.00
EggMapper 93.85 ns 11.485 ns 0.630 ns 93.13 ns 94.20 ns 94.23 ns 1.30 0.02 2 0.0191 320 B 1.00
AutoMapper 156.34 ns 13.656 ns 0.749 ns 155.48 ns 156.71 ns 156.83 ns 2.16 0.04 3 0.0196 328 B 1.02
Mapster 90.10 ns 11.492 ns 0.630 ns 89.37 ns 90.44 ns 90.49 ns 1.25 0.02 2 0.0191 320 B 1.00
MapperlyMap 71.41 ns 9.204 ns 0.504 ns 71.10 ns 71.13 ns 71.99 ns 0.99 0.02 1 0.0191 320 B 1.00
AgileMapper 577.75 ns 61.011 ns 3.344 ns 574.31 ns 577.94 ns 580.99 ns 7.99 0.14 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.742 μs 0.5113 μs 0.0280 μs 1.722 μs 1.729 μs 1.774 μs 1.00 0.02 1 0.5283 0.0172 8.65 KB 1.00
EggMapper 1.761 μs 0.8974 μs 0.0492 μs 1.727 μs 1.739 μs 1.817 μs 1.01 0.03 1 0.5283 0.0172 8.65 KB 1.00
AutoMapper 2.371 μs 0.3107 μs 0.0170 μs 2.360 μs 2.361 μs 2.390 μs 1.36 0.02 2 0.6065 0.0191 9.95 KB 1.15
Mapster 1.769 μs 0.2637 μs 0.0145 μs 1.754 μs 1.770 μs 1.783 μs 1.02 0.02 1 0.5283 0.0172 8.65 KB 1.00
MapperlyMap 1.748 μs 0.2200 μs 0.0121 μs 1.737 μs 1.747 μs 1.761 μs 1.00 0.02 1 0.5283 0.0172 8.65 KB 1.00
AgileMapper 2.560 μs 0.7501 μs 0.0411 μs 2.521 μs 2.557 μs 2.603 μs 1.47 0.03 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.297 μs 0.4120 μs 0.0226 μs 5.276 μs 5.294 μs 5.321 μs 1.00 0.01 1 1.6708 0.0916 27.4 KB 1.00
EggMapper 5.816 μs 1.2624 μs 0.0692 μs 5.746 μs 5.818 μs 5.884 μs 1.10 0.01 1 1.6708 0.0916 27.4 KB 1.00
AutoMapper 6.599 μs 1.6296 μs 0.0893 μs 6.520 μs 6.580 μs 6.696 μs 1.25 0.02 1 1.7548 0.1068 28.7 KB 1.05
Mapster 5.923 μs 1.9743 μs 0.1082 μs 5.858 μs 5.864 μs 6.048 μs 1.12 0.02 1 1.6708 0.0916 27.4 KB 1.00
MapperlyMap 5.433 μs 3.6149 μs 0.1981 μs 5.282 μs 5.359 μs 5.657 μs 1.03 0.03 1 1.6785 0.0992 27.42 KB 1.00
AgileMapper 5.337 μs 0.7891 μs 0.0433 μs 5.299 μs 5.327 μs 5.384 μs 1.01 0.01 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.55 μs 0.835 μs 0.046 μs 16.50 μs 16.55 μs 16.59 μs 1.00 0.00 1 5.2490 1.3123 85.99 KB 1.00
EggMapper 17.86 μs 10.368 μs 0.568 μs 17.26 μs 17.93 μs 18.39 μs 1.08 0.03 1 5.2490 1.3123 85.99 KB 1.00
AutoMapper 22.98 μs 2.336 μs 0.128 μs 22.90 μs 22.92 μs 23.13 μs 1.39 0.01 1 5.7678 1.4343 94.34 KB 1.10
Mapster 18.20 μs 9.209 μs 0.505 μs 17.65 μs 18.31 μs 18.65 μs 1.10 0.03 1 5.2490 1.3123 85.99 KB 1.00
MapperlyMap 18.69 μs 3.469 μs 0.190 μs 18.51 μs 18.68 μs 18.89 μs 1.13 0.01 1 5.2490 1.2817 86.02 KB 1.00
AgileMapper 20.32 μs 8.743 μs 0.479 μs 19.78 μs 20.48 μs 20.69 μs 1.23 0.03 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,352.690 μs 1,770.3107 μs 97.0367 μs 1,275.921 μs 1,320.392 μs 1,461.757 μs 1.003 0.09 3 5.8594 3.9063 95.43 KB 1.00
AutoMapperStartup 355.803 μs 1,048.2038 μs 57.4556 μs 319.518 μs 325.845 μs 422.046 μs 0.264 0.04 2 5.8594 - 104 KB 1.09
MapsterStartup 2.509 μs 0.8584 μs 0.0470 μs 2.462 μs 2.508 μs 2.556 μ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.356 ms 0.3836 ms 0.0210 ms 1.333 ms 1.362 ms 1.374 ms 1.00 0.02 1 5.8594 3.9063 96.46 KB 1.00
AutoMapper 4.024 ms 10.2585 ms 0.5623 ms 3.583 ms 3.832 ms 4.657 ms 2.97 0.36 2 15.6250 7.8125 311.87 KB 3.23
Mapster 4.596 ms 7.2101 ms 0.3952 ms 4.143 ms 4.778 ms 4.868 ms 3.39 0.26 2 39.0625 15.6250 757.67 KB 7.85

📝 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 '*'

@cloud-hai-vo cloud-hai-vo merged commit dc8b67c into main Apr 18, 2026
8 of 9 checks passed
@cloud-hai-vo cloud-hai-vo deleted the docs/syntax-highlighting branch April 18, 2026 02:30
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.

2 participants