bicep-perf-profiling
Skill3.6k starsChanged 2 months agoMITView on GitHub
Capture and analyze .NET traces for Bicep CLI compilation. Use when profiling Bicep builds, batch compilation, CPU hotspots, allocations, GC pressure, contention, or compiler performance with dotnet-trace and filtrace.
Trending
Quiet since March.thin dataabout the whole repository
Who's talking about Azure/bicep
- microsoft/azure-container-apps“Feature Request: Websockets and gRPC support are mutually exclusive (ingress transport 'auto' is 'http')”GitHub · Jan 13, 2023 · 9 reactions
- Azure/azure-rest-api-specs“Missing readonly `inboundIpAddress` property from Microsoft.Web/sites type definitions”GitHub · Feb 12, 2021 · 9 reactions
- zed-industries/extensions“Bicep Language Support”GitHub · Dec 9, 2024 · 7 reactions
- Azure/bicep-registry-modules“Disallow generic `object` and array of object parameter types (temporarily)”GitHub · Apr 4, 2022 · 7 reactions
- Azure/bicep-types-az“Microsoft.ManagedIdentity: Improve Federated Credentials Handling Issue with Bicep”GitHub · Feb 1, 2024 · 6 reactions
The biggest 5 of 8 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 8
Talked about on GitHub, Hacker News and Bluesky (8 times).
On GitHub · 6
- Jan 13, 2023Feature Request: Websockets and gRPC support are mutually exclusive (ingress transport 'auto' is 'http') — microsoft/azure-container-apps9 reactions · 11 comments
- Feb 12, 2021Missing readonly `inboundIpAddress` property from Microsoft.Web/sites type definitions — Azure/azure-rest-api-specs9 reactions · 4 comments
- Dec 9, 2024Bicep Language Support — zed-industries/extensions7 reactions
- Apr 4, 2022Disallow generic `object` and array of object parameter types (temporarily) — Azure/bicep-registry-modules7 reactions · 5 comments
- Feb 1, 2024Microsoft.ManagedIdentity: Improve Federated Credentials Handling Issue with Bicep — Azure/bicep-types-az6 reactions · 9 comments
1 more on GitHub
- Aug 30, 2022Please add reconcilePeriodSeconds as an option for cluster add-on — Azure/application-gateway-kubernetes-ingress6 reactions · 3 comments
On Hacker News · 1
On Bluesky · 1
- Mar 15, 2026Today's random GitHub ⭐! Azure/bicep Posted using Starrysky — @alexmg.dev1 likes and repost
In this repositoryOne other file it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 3 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Run commands from the Bicep repository root.
- Very specific: line 14
Ensure pwsh, the SDK pinned by global.json, and dotnet-trace are available.
- Very specific: line 15
If needed, install dotnet-trace with dotnet tool install --global dotnet-trace.
- Distinctive: line 19
Run the bundled profile script:
- Distinctive: line 34
Use filtrace in this order:
- Very specific: line 36
Run trace_info with the trace path and symbols=src/Bicep.Cli/bin/profile/Release.
- Very specific: line 38
Run CPU trace_rank with both self and inclusive measures.
- Very specific: line 40
Run allocation trace_rank with both measures and run trace_gc for collection count, pause time, peak heap, and promoted bytes.
- Very specific: line 41
Use trace_callers on hot framework leaves such as file I/O, JSON serialization, array growth, boxing, or locks until reaching the …
- Very specific: line 42
Use trace_tree for major Bicep phases and trace_lines or trace_heatmap only when matching PDBs provide sufficient source attribution.
- Distinctive: line 64
Call out capture limitations.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Bicep Performance Profiling
Capture a Release trace of bicep build --pattern, then use the filtrace MCP server to identify actionable compiler hotspots.
Prerequisites
- Run commands from the Bicep repository root.
- Ensure
pwsh, the SDK pinned byglobal.json, anddotnet-traceare available. - If needed, install
dotnet-tracewithdotnet tool install --global dotnet-trace.
Capture
Run the bundled profile script:
pwsh ./.github/skills/bicep-trace-analysis/scripts/BuildAndProfile.ps1 src/Bicep.Core.Samples/Files/user_submittedThe script:
- Builds
Bicep.Cliin Release mode undersrc/Bicep.Cli/bin/profile/Release. - Runs
bicep build --pattern <folder>/**/*.bicep. - Writes
profile-<UTC timestamp>.nettraceto the current directory. - Captures sampled thread stacks, common runtime events, verbose GC events, and sampled allocations.
Analyze
Use filtrace in this order:
- Run
trace_infowith the trace path andsymbols=src/Bicep.Cli/bin/profile/Release. - Require strong method-name resolution before interpreting rankings. Source mapping may be lower because framework PDBs are unavailable; ensure there are no PDB identity mismatches for Bicep assemblies.
- Run CPU
trace_rankwith bothselfandinclusivemeasures. - Scope compiler rankings with
root=Bicep.Cli.Commands.BuildCommand.Compile. Whole-process rankings include runtime service threads and sampled waits that can obscure compiler work. - Run allocation
trace_rankwith both measures and runtrace_gcfor collection count, pause time, peak heap, and promoted bytes. - Use
trace_callerson hot framework leaves such as file I/O, JSON serialization, array growth, boxing, or locks until reaching the Bicep-owned caller. - Use
trace_treefor major Bicep phases andtrace_linesortrace_heatmaponly when matching PDBs provide sufficient source attribution.
Useful first-pass analyses:
trace_info(path, symbols)
trace_rank(path, metric=cpu, measure=self, root=Bicep.Cli.Commands.BuildCommand.Compile, symbols=symbols)
trace_rank(path, metric=cpu, measure=inclusive, root=Bicep.Cli.Commands.BuildCommand.Compile, symbols=symbols)
trace_rank(path, metric=alloc, measure=self)
trace_rank(path, metric=alloc, measure=inclusive)
trace_gc(path)Report
Report the top five optimization areas. For each area include:
- The inclusive or self weight and percentage of the scoped compile workload.
- The Bicep-owned method or phase responsible for the cost.
- A concrete optimization hypothesis and the smallest experiment that could falsify it.
- Any overlap with another finding; inclusive percentages are not additive.
Call out capture limitations. Prefer a longer trace when a result has fewer than 200 samples, and do not claim allocation absence unless allocation capture is known to be enabled. Re-capture and compare like-for-like traces after any optimization.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

