본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)5.8k · #14593

build-perf-baseline

하는 일

이 스킬은 .NET 프로젝트의 공정한 빌드 시간 측정을 설정해, 개선을 증명할 수 있게 합니다. 무엇을 바꾸기 전에 빌드가 실제로 얼마나 느린지 알고 싶은 팀을 위한 스킬입니다.

사용하는 경우

  • ✓.NET 빌드가 느리고 무엇을 바꾸기 전에 믿을 만한 수치가 필요할 때.
  • ✓변경 전과 후의 빌드를 비교하고 싶을 때.
  • ✓콜드, 웜, 변경 없는 빌드를 따로 측정하고 싶을 때.

스킬 링크

https://github.com/dotnet/skills/blob/main/plugins/dotnet-msbuild/skills/build-perf-baseline/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/dotnet/skills/blob/main/plugins/dotnet-msbuild/skills/build-perf-baseline/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 .NET 솔루션을 콜드 상태에서 빌드한 시간과 작은 변경 후 빌드한 시간을 측정해서 기준선을 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트가 실행마다 설정을 같게 유지하고, 각 시나리오를 여러 번 반복하며, 각 샘플의 로그를 저장하고, 중앙값과 범위를 보고합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Build Performance Baseline & Optimization

Overview

Before optimizing a build, you need a baseline. Without measurements, optimization is guesswork. This skill covers how to establish baselines and apply systematic optimization techniques.

Related skills:

  • build-perf-diagnostics — binlog-based bottleneck identification
  • incremental-build — Inputs/Outputs and up-to-date checks
  • build-parallelism — parallel and graph build tuning
  • eval-performance — glob and import chain optimization

Step 1: Establish a Performance Baseline

Measure three scenarios to understand where time is spent. Keep the SDK, configuration, machine, environment variables, restore state, and build command consistent. Run each scenario at least three times, repeating its setup before every measured sample, and report the median plus the observed range; a single timing is not a baseline. Keep setup outside the timed interval. Save each sample's binlog under a unique name, outside generated output directories.

Cold Build (First Build)

No previous build output exists. Measures the full end-to-end time including restore, compilation, and all targets.

Before every cold sample, restore the same source state, run dotnet clean with the measured configuration, and remove only the confirmed, disposable output and intermediate directories for the measured projects. Include custom artifact paths, not just bin and obj, and obtain approval before deletion. Verify those outputs are absent before timing the next build.

This is an output-cold build, not necessarily a cold NuGet, OS, or compiler server cache. Choose and record a consistent cache/server policy for all samples; do not clear shared caches. If measuring uncached restore, use a separate, empty package cache for each sample.

# After repeating the cold setup; use a unique log name for each sample
dotnet build /bl:cold-build-1.binlog -m

Warm Build (Incremental Build)

Build output exists, some files have changed. Measures how well incremental build works.

Before every warm sample, restore the same baseline source contents and build successfully without timing it. Then apply the same small, build-relevant edit to the same source file and time the build. Keep the changed file set and edit identical across samples; do not let edits accumulate. Restore the baseline contents before the next sample and rebuild them outside the timed interval. Do not clean between that setup build and its measured build.

# Untimed setup after restoring baseline source contents
dotnet build -m

# Apply the same controlled source edit, then measure with a unique log name
dotnet build /bl:warm-build-1.binlog -m

No-Op Build (Nothing Changed)

Build output exists, nothing has changed. Compilation and correctly incremental targets should skip; compare timing with this build's other samples.

Before every no-op sample, restore the same baseline source contents and run an untimed setup build successfully. Then measure an identical build without edits, touching inputs, cleaning outputs, or changing properties. Keep restore and cache/server policy consistent with the other samples.

# Untimed setup after restoring baseline source contents
dotnet build -m

# Rebuild immediately without changes; use a unique log name for each sample
dotnet build /bl:noop-build-1.binlog -m

What Good Looks Like

Scenario Expected Behavior
Cold build Full compilation, all targets run. This is your absolute baseline
Warm build Only changed projects recompile. Time proportional to change scope
No-op build Compilation and correctly incremental custom targets skip; compare duration with this repo's repeated warm and cold samples

Red flags:

  • No-op time is repeatedly close to warm/cold time, or compilation targets rerun → investigate incrementality (see incremental-build)
  • Warm build recompiles everything → project dependency chain forces full rebuild
  • Restore dominates cold samples → measure dotnet restore and dotnet build --no-restore separately before changing project structure

Do not use universal duration or percentage thresholds to declare a bottleneck. Rank costs against the controlled samples and the build's own target/task timings.

Capture analyzer evidence

A binlog shows compiler/task timing, but granular analyzer timing requires an analyzer-reporting run. When su

자주 묻는 질문

각 시나리오를 여러 번 실행하는 이유는 무엇인가요?

한 번의 시간 측정은 잡음이 많으므로, 여러 번 실행해야 범위가 있는 공정한 기준선이 됩니다.

콜드 빌드란 무엇인가요?

이전 출력이 없는 첫 빌드이며, 복원과 모든 컴파일을 포함합니다.

느린 빌드를 고치나요?

아니요. 먼저 측정하며, 원인은 진단 스킬이 찾습니다.

상세 정보

작성자의 원본 설명

Establish MSBuild/.NET build performance baselines before optimizing. USE FOR: unranked slow builds; cold, warm, incremental or no-op measurements; before/after comparisons; CI output caching; static graph, artifacts output and dependency graph trimming. Start here before build-perf-diagnostics, incremental-build or build-parallelism. DO NOT USE FOR: known repeated-restore fixes (use eliminate-redundant-restores), non-MSBuild builds. For measured target/task/analyzer bottlenecks, use build-perf-diagnostics.

repo: dotnet/skills

인기도

GitHub 스타
5.8k
순위
#14593
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬