Skip to content

ci: sustained-load GC / allocation profiling (#212) - #314

Merged
Chris-Wolfgang merged 1 commit into
vNextfrom
thorough/212-gc-profile
Jul 23, 2026
Merged

ci: sustained-load GC / allocation profiling (#212)#314
Chris-Wolfgang merged 1 commit into
vNextfrom
thorough/212-gc-profile

Conversation

@Chris-Wolfgang

Copy link
Copy Markdown
Owner

Summary

Adds a scheduled GC / allocation profile (issue #212) — the sustained-load metrics BDN micro-benchmarks don't capture: gen0/1/2 promotion, LOH pressure, finalizer-queue depth, thread-pool starvation under continuous ETL traffic.

  • tools/GcProfileWorkload — runs an in-memory extract → transform → load Pipeline (base-class ExtractorBaseTransformerBaseLoaderBase, per-stage progress + stage disposal) in a loop for a configurable duration, under ServerGC.
  • .github/workflows/gc-profile.yaml (weekly Sun 07:00 UTC + workflow_dispatch, duration_seconds input) runs the workload 10 min, attaches dotnet-counters by PID → System.Runtime counters to a CSV, summarises into the step summary, uploads reports/ as an artifact.
  • docs/GC-PROFILE.md — what runs, how to read the report, the ratchet policy.

Gate mode: informational — no regression gate yet; that needs a stable baseline the first several runs establish (GC metrics vary more run-to-run than benchmarks). Same land-informational-harden-later pattern as reproducible-build/semgrep/stryker; documented as the follow-on.

Validation

Ran the workload locally — builds clean and produces meaningful telemetry: ~90M records in 8s, 2 gen0 / 0 gen1 / 0 gen2 collections, ~6MB total allocated, ~1MB steady heap. The streaming pipeline is near-zero-alloc per record (consistent with the allocation-free hot-path tests, #217). The workflow's profiling job runs on schedule/dispatch (not this PR).

Acceptance criteria (#212)

  • Scheduled workflow runs the library against a high-volume workload for ≥10 min, captures runtime counters/traces
  • Reports surface heap-per-gen, gen2/LOH frequency, thread-pool queue, allocation (counters CSV + workload log + step summary)
  • [~] Regressions vs a baseline fail — deferred (informational until ~10 baseline runs establish a stable threshold; documented in GC-PROFILE.md)

Closes #212

Adds a scheduled GC / allocation profile — the sustained-load metrics BDN
micro-benchmarks don't capture (gen0/1/2 promotion, LOH pressure, finalizer-queue
depth, thread-pool starvation under continuous ETL traffic).

- tools/GcProfileWorkload — a workload that runs an in-memory extract -> transform
  -> load Pipeline (ExtractorBase -> TransformerBase -> LoaderBase, per-stage
  progress + stage disposal) in a loop for a configurable duration, under ServerGC.
- .github/workflows/gc-profile.yaml (weekly Sunday 07:00 UTC + workflow_dispatch)
  runs the workload for 10 minutes, attaches dotnet-counters by PID to sample the
  System.Runtime counter set to a CSV, summarises into the step summary, and
  uploads reports/ as an artifact.
- docs/GC-PROFILE.md documents what runs, how to read the report, and the ratchet
  policy.

Gate mode: informational (no regression gate yet — that needs a stable baseline
the first several runs establish; same land-informational-harden-later pattern as
reproducible-build/semgrep/stryker). Actions SHA-pinned per the repo convention.

Validated locally: the workload builds and runs — ~90M records in 8s with only
2 gen0 collections, 0 gen1/gen2, ~6MB allocated (the streaming pipeline is
near-zero-alloc per record, consistent with #217). The regression gate is the
documented follow-on once baseline runs accumulate.

Closes #212

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 23, 2026 01:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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