Skip to content

About

Deep CI runner telemetry. This action records CPU/memory/disk/network usage and pressure-stall information for each process/cgroup every 1 second and saves it to a CSV file which can be analyzed offline.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

ci-observe — deep CI runner telemetry

Records a GitHub Actions runner at 1-second resolution for the whole job — host CPU / memory / disk / network, per-process, per-cgroup, and PSI (pressure-stall: how much the job was blocked on CPU / IO / memory) — using Meta's below. On teardown it exports CSV dumps + a self-describing metadata.json and prints a digest into the job summary. The CSVs go up as a workflow artifact for offline analysis.

Usage

Set up GitHub Actions to record metrics

permissions:
  contents: read
steps:
  - uses: actions/checkout@v7

  - name: CI observability start (below)
    uses: dtinth/ci-observe@v1
    with: { phase: start }        # interval-s defaults to "1"

  # … your build / test steps …

  - name: CI observability report (below)
    if: always()
    uses: dtinth/ci-observe@v1
    with: { phase: report }

  - name: Upload runner telemetry
    if: always()
    uses: actions/upload-artifact@v7
    with:
      name: below-${{ github.job }}
      path: ${{ runner.temp }}/ci-observe/dump/
      retention-days: 1

start goes near the top (it records everything after it); report is the last step with if: always() so it runs even on failure. Both are best-effort — any problem downgrades to a ::warning:: and never fails the build.

Download the artifact

After the CI run, you will find an artifact. Download it, you will get a zip file.

Analyze it

The most effortless way would be to hand the zip file to your favorite coding agent; it most likely already knows how to understand this file, analyze it, generate a report, surface interesting insights, and suggest optimization opportunities, tailored to your project. (For more capable coding agents, you can ask it to pull down the artifact directly from GitHub.)

Alternatively, you can go through the data yourself. A web-based visualizer for the exported CSV/metadata lives at dtinth/ci-observe-viz.

Inputs

input default notes
phase — start or report (required)
interval-s 1 sampling interval, seconds
image ghcr.io/dtinth/below:v0.11.0 below image (multiarch: amd64 + arm64)
name job id label for the artifact / summary

Artifact contents (${RUNNER_TEMP}/ci-observe/dump/)

  • <name>.system.csv — host CPU / mem / paging / procs per sample
  • <name>.process.csv — per-process CPU / RSS / read / write / state / cgroup
  • <name>.cgroup.csv — per-cgroup CPU / mem / CPU·IO·mem pressure (PSI)
  • <name>.disk.csv, <name>.network.csv
  • <name>.metadata.json — repo / run id / sha / event / runner / below version

How it runs

below has no apt package or prebuilt binary, so it runs from an OCI image --privileged --pid=host --cgroupns=host (per below's docs/docker.md) with /sys/kernel/{btf,debug,tracing} bind-mounted so its eBPF exit-stat tracking attaches — that's what captures the sub-second processes (short-lived compilers / test procs) that a plain 1 Hz /proc walk misses. Dumps use CSV (~2.5× smaller than JSON overall, 3.4× on the process view).

The multiarch image

Upstream below publishes only a single-arch amd64 image (below/below:latest) — there is no arm64 build anywhere. So this repo builds its own multiarch image and publishes it to ghcr.io/dtinth/below.

The build (.github/workflows/build-image.yml) compiles below from a pinned upstream release for linux/amd64 and linux/arm64 natively (each arch on its own runner — no QEMU emulation), then stitches the two into one manifest-list tag. To rebuild / bump the pinned below version, run the workflow with a below_ref input (or push a below-vX.Y.Z tag).

About

Deep CI runner telemetry. This action records CPU/memory/disk/network usage and pressure-stall information for each process/cgroup every 1 second and saves it to a CSV file which can be analyzed offline.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages