EncDotNet.S100.PerfRunner
PerfRunner runs scripted performance scenarios against the EncDotNet.S100 pipelines and renderers, and records the telemetry as files you can compare across runs. It also drives pan and zoom load against a running SoundCharts viewer. Use PerfReport to summarize, diff and gate the results.
PerfRunner has three commands:
| Command | What it does |
|---|---|
run <scenario> |
Runs one scenario. run list lists the scenarios. |
baseline |
Runs every scenario with fixed settings into a folder named after the current commit. |
viewer-stress |
Drives viewport changes against a running viewer's MCP endpoint, and times how long jumps and pans take to settle. |
Run a scenario
From the repository root:
dotnet run --project tools/EncDotNet.S100.PerfRunner -- run list
dotnet run --project tools/EncDotNet.S100.PerfRunner -- run s124-vector
With every option:
dotnet run --project tools/EncDotNet.S100.PerfRunner -- run s101-portray-warm \
--corpus tests/datasets \
--out ./perf-runs \
--warmup 3 \
--iterations 20 \
--tag branch=main \
--tag commit=abc1234
| Option | Default | Description |
|---|---|---|
--corpus <path> |
tests/datasets |
The folder the scenarios read their datasets from. |
--out <dir> |
./perf-runs |
The folder for the output files. |
--warmup <n> |
3 |
Warmup iterations. They run first and aren't measured. |
--iterations <n> |
20 |
Measured iterations. |
--tag <key=value> |
— | Extra metadata tags (repeatable). |
--profile <mode> |
none |
none, cpu or alloc. See Capture a CPU or allocation profile. |
--profile-sampling-interval-ms <ms> |
1 |
CPU sampling interval, for --profile cpu only. |
Warm scenarios discard the warmup iterations and report the distribution of the
measured ones, which limits the effect of random noise. Cold scenarios measure
start-up cost, so run them with --warmup 0 --iterations 1.
Scenarios
The scenarios read synthetic fixtures from the corpus folder, except the real-corpus scenarios.
| Name | What it measures |
|---|---|
s101-portray-cold |
Open, parse and portray an S-101 fixture once. With no warmup, it includes the first Lua and XSLT compile. |
s101-portray-warm |
The S-101 portrayal pipeline without rendering. |
s101-render-warm |
The S-101 pipeline plus a headless Mapsui layer build, with no Avalonia UI thread and no Skia GPU pass. |
s101-render-repeat |
Open an S-101 dataset once, then render it several times in each iteration. |
s102-coverage |
S-102 bathymetry: coverage pipeline and render. |
s102-coverage-open |
S-102: open the file and read the dataset header, without rendering. |
s102-coverage-render-large |
S-102: render a synthetic grid of about 1000 × 1000. |
s102-coverage-render-repeat |
S-102: open once, then render the large synthetic grid several times in each iteration. |
s102-coverage-viewport-fit |
S-102: render a viewport that covers about the full grid. |
s102-coverage-viewport-zoomed-in |
S-102: render a viewport of 10% of the grid at 800 × 600. |
s102-coverage-viewport-zoomed-out |
S-102: render a viewport of 4 times the grid extent at 800 × 600. |
s111-arrow-repeat |
S-111: open the bundled surface-current fixture once, then render it several times in each iteration. |
s124-vector |
S-124 navigational warnings: the XSLT vector pipeline. |
s201-vector |
S-201 aids to navigation information: the XSLT vector pipeline. |
exchange-set-open |
Open a synthetic exchange set and walk all its datasets. |
s101-real-cold |
Cold start on a real S-101 cell. |
s101-real-warm |
Warm pipeline and headless layer build on a real S-101 cell. |
s101-pick-warm |
Warm identify (pick) on a real S-101 cell. |
s102-real-warm |
Warm coverage render on a real S-102 file. |
s111-real-warm |
Warm surface-current render on a real S-111 file. |
Real-corpus scenarios
The *-real-* and s101-pick-warm scenarios use licensed trial data that
isn't in the repository. Set an environment variable to the path of one
dataset file:
| Variable | Used by |
|---|---|
ENC_DOTNET_PERF_REAL_S101 |
s101-real-cold, s101-real-warm, s101-pick-warm (a .000 file) |
ENC_DOTNET_PERF_REAL_S102 |
s102-real-warm (an .h5 file) |
ENC_DOTNET_PERF_REAL_S111 |
s111-real-warm (an .h5 file) |
When the variable isn't set or the file doesn't exist, the scenario fails with an error that names the variable. CI doesn't run these scenarios.
Output
Each run writes two files to the output folder:
<timestamp>-<scenario>.jsonl: the telemetry, as newline-delimited JSON spans and metrics.<timestamp>-<scenario>.md: a Markdown summary of the iteration statistics.
The runner sets ENC_DOTNET_OTEL_FILE so the file exporter captures every
EncDotNet.S100.* activity source and meter. It writes to a file in-process,
so it doesn't need an OpenTelemetry collector.
.jsonl schema (version 1)
Every line is a JSON object with a kind field that says what the line holds:
// First line: the schema header
{"kind":"header","version":1,"startedAtUtc":"2026-05-09T05:00:00Z"}
// A span
{"kind":"span","name":"s100.pipeline.vector.stage.lua",
"traceId":"…","spanId":"…","parentSpanId":"…",
"startUnixNs":…,"endUnixNs":…,"durationMs":13.4,
"status":"Ok",
"tags":{"s100.pipeline.stage":"lua","s100.product":"S-101"}}
// A histogram metric
{"kind":"metric","name":"s100.pipeline.duration",
"instrument":"histogram","unit":"ms",
"tags":{"s100.product":"S-101"},
"buckets":[{"sum":142.5,"count":20,"min":5.1,"max":12.3}]}
// A counter metric
{"kind":"metric","name":"s100.symbol.cache.hit.count",
"instrument":"counter","unit":"{hits}",
"tags":{"s100.product":"S-101"},"value":48}
Capture a CPU or allocation profile
--profile captures an in-process EventPipe trace next to the .jsonl file,
as <basename>.nettrace. You can open it in PerfView or the Visual Studio
profiler, or convert it for Speedscope or Perfetto.
dotnet run --project tools/EncDotNet.S100.PerfRunner -- run s101-portray-warm \
--warmup 3 --iterations 20 --profile cpu
dotnet run --project tools/EncDotNet.S100.PerfRunner -- run s101-portray-cold \
--warmup 0 --iterations 1 --profile alloc
dotnet run --project tools/EncDotNet.S100.PerfRunner -- baseline \
--scenarios s101-portray-warm --profile cpu
cpu samples call stacks. alloc records GC and allocation-tick events.
To convert a trace to a flame graph for Speedscope:
dotnet tool install -g dotnet-trace
dotnet-trace convert ./perf-runs/<basename>.nettrace --format speedscope
- The trace covers the measured iterations only, so warmup JIT and first-touch
costs aren't in it. With
--warmup 0 --iterations 1, it covers the whole run. - Profiling slows the run down, typically by 2–10% for
cpuand 20–40% foralloc. Don't use profiled runs as baselines or gate CI on them. - For scenarios under 100 ms, raise the sampling interval to reduce the
overhead, for example
--profile-sampling-interval-ms 5. --profilecan't be combined withbaseline --append.
Run a baseline
baseline runs every registered scenario in turn, with 3 warmup and 20
measured iterations by default, and writes the results to a folder named after
the short commit SHA:
dotnet run --project tools/EncDotNet.S100.PerfRunner -- baseline
dotnet run --project tools/EncDotNet.S100.PerfRunner -- baseline --out /tmp/perf
The default output root is tools/EncDotNet.S100.PerfRunner/baselines:
baselines/
CURRENT the SHA of the committed baseline
<git-sha>/
SUMMARY.md environment and a headline for each scenario
s101-portray-cold.jsonl
s101-portray-cold.md
s101-portray-warm.jsonl
s101-portray-warm.md
…
The real-corpus scenarios report an error unless their environment variables are set; the other scenarios still run.
| Option | Default | Description |
|---|---|---|
--out <dir> |
tools/EncDotNet.S100.PerfRunner/baselines |
The output root. |
--corpus <path> |
tests/datasets |
The corpus folder. |
--warmup <n> |
3 |
Warmup iterations for each scenario. |
--iterations <n> |
20 |
Measured iterations for each scenario. |
--scenarios <csv> |
all | Run only these scenarios. |
--append |
off | Append to the existing .jsonl files instead of overwriting them, and don't rewrite the .md files or SUMMARY.md. |
--round-tag <n> |
1 |
Tag every measured iteration with perf.round=<n>. |
--side <label> |
— | Tag every measured iteration with perf.side, such as baseline or candidate. |
--out-subdir <name> |
short SHA | Use this folder name instead of the commit SHA. |
--profile <mode> |
none |
As for run. |
--profile-sampling-interval-ms <ms> |
1 |
As for run. |
--append, --round-tag, --side, --scenarios and --out-subdir exist for
the CI orchestration described in CI performance gate.
Each measured iteration is wrapped in a perf.iteration activity, tagged with
perf.scenario, perf.round, perf.iter and, with --side, perf.side.
PerfReport's gate command uses these to compare medians.
Compare your branch to the committed baseline
On your branch, write a fresh baseline:
dotnet run --project tools/EncDotNet.S100.PerfRunner -- baseline --out /tmp/perfDiff each scenario against the committed baseline:
BASELINE_SHA=$(cat tools/EncDotNet.S100.PerfRunner/baselines/CURRENT) for s in s101-portray-cold s101-portray-warm s101-render-warm \ s102-coverage s124-vector exchange-set-open; do dotnet run --project tools/EncDotNet.S100.PerfReport -- diff \ tools/EncDotNet.S100.PerfRunner/baselines/$BASELINE_SHA/$s.jsonl \ /tmp/perf/*/$s.jsonl done
A single laptop run is informational, not authoritative. Timings vary with background load, thermal throttling and system state. The CI performance gate checks every pull request.
Update the committed baseline
After you merge a performance improvement:
- Run
baselinewith the default output root. - Review
baselines/<new-sha>/SUMMARY.md. - Commit the new folder and update
CURRENTto the new SHA.
Use a larger corpus
The default scenarios use the synthetic fixtures under tests/datasets/. To
download the larger external corpus, run:
tools/EncDotNet.S100.PerfRunner/scripts/fetch-corpus.sh
The script downloads each asset listed in tests/perf/corpus/corpus.json,
checks its SHA-256, and caches it in ~/.cache/encdotnet-perf-corpus. Set
ENC_DOTNET_PERF_CORPUS to use a different cache folder. When the variable is
set, baseline reports the corpus mode as full. For the inventory, see
tests/perf/corpus/INDEX.md.
CI performance gate
The perf.yml
workflow runs on every pull request to main:
- It publishes the base branch's PerfRunner and the pull request's PerfRunner into separate folders, so both are available at once.
tools/perf/interleave.shruns 5 rounds of 4 measured iterations on each side, with 3 warmup iterations. It randomizes which side goes first in each round, so both sides see the same noise.- PerfReport's
gatecommand compares the medians, with--threshold 10 --min-abs 100 --mad-k 3.0 --retry-zone-mult 2.0. Scenarios in the suspicious zone are written to<out>.suspicious.txtinstead of failing. - If any scenario is suspicious, the workflow runs 5 more rounds for only
those scenarios, then gates again with
--retry-zone-mult 1.0. There's no second retry. - It posts the gate report to the pull request.
For how the gate decides, see
gate in the PerfReport README.
Stress a running viewer
viewer-stress measures the live viewer, which the scenarios don't. It drives
viewport changes through the viewer's MCP endpoint and records render
statistics.
Build the viewer in Release, then start it with its own data folder, MCP and file telemetry:
mkdir -p /tmp/viewer-stress ENC_DOTNET_OTEL_FILE=/tmp/viewer-stress/tiles.jsonl \ src/EncDotNet.S100.Viewer/bin/Release/net10.0/<rid>/SoundCharts \ --data-dir /tmp/viewer-stress/data \ --mcp --mcp-port-file /tmp/viewer-stress/mcp.url \ path/to/exchange-setIn another terminal, run
viewer-stress:dotnet run --project tools/EncDotNet.S100.PerfRunner -- viewer-stress \ --port-file /tmp/viewer-stress/mcp.url \ --bbox 49.8,-6.5,59.0,2.0 \ --zoom-min 6 --zoom-max 12 \ --steps 96 --cycles 5 --step-delay-ms 0 \ --out /tmp/viewer-stressAnalyze the viewer's trace with PerfReport:
dotnet run --project tools/EncDotNet.S100.PerfReport -- \ tile-report /tmp/viewer-stress/tiles.jsonl \ --out /tmp/viewer-stress/tile-report.md dotnet run --project tools/EncDotNet.S100.PerfReport -- \ chrome-trace /tmp/viewer-stress/tiles.jsonl \ --out /tmp/viewer-stress/tile-timeline.jsontile-reportgives the P50, P95 and P99 tile latency and the main cause of each slow tile job. Open the Chrome trace in Perfetto to see the worker timeline.
How a run works:
- The route is a fixed path that snakes across
--bboxin WGS-84. Without--bbox, it covers the combined bounds of every loaded dataset, fromlist_datasets. - The zoom level rises from
--zoom-minto--zoom-maxand back. - Within a cycle, viewport changes don't wait for rendering to finish, so
--step-delay-ms 0gives the most queue pressure. - Before each cycle, the render statistics window is reset, so start-up
painting and earlier cycles don't affect the cycle's figures. After each
cycle, the command waits for the map to settle and reads
get_render_stats. - The command writes
<timestamp>-viewer-stress.jsonto--out: every requested viewport, the MCP round-trip times, the render-idle result and the render statistics. The viewer writes its own spans and metrics to theENC_DOTNET_OTEL_FILEpath.
To approximate normal navigation, use --scenario navigation --step-delay-ms 100. It pans and zooms in separate steps instead of changing both at once.
For method-level CPU detail inside a slow raster span, attach dotnet-trace
to the viewer process during the run and convert the .nettrace file to
Speedscope.
| Option | Default | Description |
|---|---|---|
--endpoint <url> |
— | The viewer's MCP endpoint. Use this or --port-file. |
--port-file <path> |
— | The file the viewer wrote with --mcp-port-file. Use this or --endpoint. |
--bbox <s,w,n,e> |
all loaded datasets | Route bounds in WGS-84, as south, west, north, east. |
--zoom-min <level> |
6 |
Minimum web-mercator zoom level, from 0 to 24. |
--zoom-max <level> |
12 |
Maximum web-mercator zoom level, from 0 to 24. |
--steps <n> |
64 |
Viewport changes in each cycle. |
--cycles <n> |
3 |
Number of times to run the route. |
--step-delay-ms <ms> |
16 |
Delay between viewport changes. |
--scenario <name> |
burst |
burst snakes with continuous zoom; navigation pans and zooms in separate steps. |
--idle-timeout-ms <ms> |
120000 |
The longest wait for rendering to settle after each cycle. |
--out <dir> |
./perf-runs |
The folder for the JSON manifest. |
Measure how long a view takes to settle
The jumps and pan scenarios of viewer-stress time how long SoundCharts
takes to show a finished chart after the view moves, and record CPU, GC and
memory for each move. They're the measurements the
map rendering architecture
judges each change by.
jumpsmoves the view to Seattle, Tacoma and Port Townsend at 1:44 300, one after another, and waits for the view to settle after each.pansettles at Seattle, then pans west across Elliott Bay towards Bainbridge Island in 40 small moves about a frame apart, crossing harbour and approach cell boundaries, then waits for the view to settle. It records the map paint times of the pan.
Each scenario runs in one of two modes:
| Mode | Starts from |
|---|---|
cold |
Empty portrayal, pattern-clip and tile caches. The background portrayal pre-warm is switched off for the session, so it can't warm cells between jumps. |
prewarm |
Warm caches: the harness switches the pre-warm on and waits until it reports complete (every load-as-you-pan cell is in the portrayal cache), then runs the route. The manifest's prewarm block records how long that took, the pre-warm's concurrency limit, and the CPU, GC and memory window over it (metrics). |
Data you need
The routes need the NOAA ENC cells for Washington in the SoundCharts Library, loading as you pan. CI doesn't have this data, so these runs are made by hand.
- In the SoundCharts Library, add the NOAA ENC cells for the state of Washington, so the Library has a source or collection named "Washington".
- Download the cells. The harness measures loading and drawing, not downloading.
The harness turns on load as you pan for the source if it's off. To use a
source with another name, pass --library-source <name>; to use whatever is
already on the map, pass --library-source "".
Run cold and after-pre-warm jumps
Build the viewer in Release first:
dotnet build src/EncDotNet.S100.Viewer -c Release
The simplest run lets the harness start a viewer for each Lua engine and mode:
dotnet run --project tools/EncDotNet.S100.PerfRunner -c Release -- viewer-stress \
--scenario jumps \
--launch src/EncDotNet.S100.Viewer/bin/Release/net10.0/SoundCharts.dll \
--mode both \
--engines luacsharp,moonsharp \
--out ./perf-runs/settle
For each engine and mode, the harness:
- Starts the viewer with
--mcp, a port file and--cache-dir, and withS100_LUA_ENGINEset to the engine. A cold run gets a new, empty cache folder under--out/caches, deleted afterwards. After-pre-warm runs share--out/caches/prewarm-<engine>, so the pre-warm fills it once per engine. - Turns on load as you pan for the Library source, switches the pre-warm off
(cold) or waits for it to finish (
prewarm), and waits for the starting view to settle. - Runs the route and writes the results.
- Closes the viewer.
--cache-dir moves only the render caches, so the viewer keeps your settings
and Library, and your own caches aren't touched. To run the viewer with a
separate profile too, pass --viewer-arg=--data-dir --viewer-arg=<folder>;
that folder needs its own Library with the Washington source.
To drive a viewer you started yourself, give its port file instead of
--launch. Start it with an empty cache folder for a cold run:
dotnet src/EncDotNet.S100.Viewer/bin/Release/net10.0/SoundCharts.dll \
--mcp --mcp-port-file /tmp/settle/mcp.url \
--cache-dir /tmp/settle/cold-caches
dotnet run --project tools/EncDotNet.S100.PerfRunner -c Release -- viewer-stress \
--scenario jumps --mode cold \
--port-file /tmp/settle/mcp.url \
--out ./perf-runs/settle
An attached viewer runs one engine and one mode. The harness reads the engine
from the viewer; pass --engines <name> to have it check. Start the viewer
with S100_LUA_ENGINE=moonsharp to measure MoonSharp. If the attached viewer
uses its normal caches, a cold run warns that it may not be cold.
Compare two runs
Each run writes <timestamp>-settle-<route>-<mode>-<engine>.json and a .md
summary to --out. Compare two runs, for example MoonSharp and Lua-CSharp,
with PerfReport:
dotnet run --project tools/EncDotNet.S100.PerfReport -- diff \
perf-runs/settle/<timestamp>-settle-jumps-cold-moonsharp.json \
perf-runs/settle/<timestamp>-settle-jumps-cold-luacsharp.json
diff compares every metric step by step and in total. summarise prints one
run's table. See PerfReport.
A single run is noisy. Use --repeat <n> for several runs of each engine and
mode, and compare medians.
Keep runs comparable on macOS
- App Nap. macOS throttles an app whose windows are all hidden or covered:
it lowers the app's CPU priority and coalesces its timers. A viewer in that
state settles several times slower, with three to four times the CPU time and
frame p95 in the hundreds of milliseconds. The viewer turns App Nap off when
the first perf-harness tool is called, so the window's visibility doesn't
matter. The manifest's
viewer.appNapDisabledrecords it, andsummarisemarks a macOS run with App Nap on. - Screen lock. With the screen locked the viewer doesn't paint, so
await_settledtimes out. Keep the screen unlocked. - Other work. On macOS the load average overstates how busy the machine is.
Wait for
topto show at least 85% idle before each run.
When a view is settled
The viewer's MCP tool await_settled decides. The view is settled when both
hold:
- Every cell in view is loaded. No viewport change is waiting for the lazy-load coordinator's 200 ms debounce, and no cell it ranks as visible for the current view is queued or loading. A cell that started loading ahead of the view and is now in it counts as visible. Cells ahead of the view, covered by finer cells, or without a footprint don't count.
- Every visible tile slot shows its own target tile. Every enabled tiled layer in range at the current scale has painted the current view, and in that frame drew each visible tile as itself: cached at the frame's pixel size, not held back for a sibling layer, and not stood in for by another SCAMIN scale class, a coarser or finer band, or a replaced layer's tiles. No visible tile of those layers is queued or rasterising. A layer that draws nothing in view (outside it, past its scale cap, or hidden by finer cells) counts as done.
The frame must also come after the set_viewport and after the last cell load
finished, so a just-loaded cell's layer has painted. The state must then hold
for --confirm-ms (default 250 ms). The settle time runs from set_viewport
to the frame that completed the view; the confirmation isn't included. A move
that doesn't settle within --settle-timeout-ms is recorded as timed out.
The tile renderer records what each layer showed only after the first
set_viewport or await_settled call, so a viewer without the harness does no
extra work per frame.
What each metric means
The viewer's get_process_metrics tool measures over a window that runs from
just before each move to just after it settles, including the confirmation
period.
| Metric | Meaning |
|---|---|
| Settle | Milliseconds from set_viewport to the frame that completed the settled view. |
| CPU | Process CPU time in the window, user and kernel, all threads. |
| Wall | Wall time of the window. |
| Cores busy | CPU ÷ wall: the average number of cores the process kept busy. cpuUtilisation divides that by Environment.ProcessorCount. |
| GC pause, pause share | GC pause time in the window (GC.GetTotalPauseDuration), and its share of wall time. |
| Gen 0, 1, 2 | Collections of each generation in the window. |
| Allocated | Bytes allocated in the window (GC.GetTotalAllocatedBytes), and per second. |
| GC heap | Managed heap size at the last collection (GCMemoryInfo.HeapSizeBytes). |
| GC committed | Memory the GC has committed from the OS (GCMemoryInfo.TotalCommittedBytes). With Server GC this can be several times the heap. |
| Tile native | Native bytes the tile raster caches and GPU tile textures hold, summed over every layer. |
| Working set | Resident memory. The peak is sampled every 100 ms through the window, because the process's own peak counter isn't reliable on macOS. |
| Frame p50, p95, max | Map paint times over the window, from get_render_stats. The pan scenario's frame times are the pan's. |
| Scheduler cores busy | Work scheduler worker time ÷ wall: how many of its workers were busy on average. |
| Visible job wait p95 | 95th percentile of the time from a visible job (a tile on screen) being queued, or promoted to visible, to a worker starting it. The totals take the largest step's p95. |
| Job run p95 | 95th percentile of how long a job held a worker per run, every class. |
Peaks of the GC heap, GC committed and tile native bytes are sampled the same
way. The manifest's totals add CPU, wall, GC pause and allocation over the
moves, divide for cores busy and pause share, and take the largest peaks and
job-wait percentiles.
Each step also keeps the raw MCP replies under raw.
Split a warm cell load by stage
With --trace (and --launch), each viewer writes its spans to
<stem>.jsonl next to the manifest. A cell load splits into these spans:
| Span | Covers |
|---|---|
s100.cell.parse |
Opening and parsing the cell. |
s100.cell.portray |
Portrayal, including the portrayal-cache read. |
s100.portrayal.cache.read |
The portrayal-cache read alone, tagged s100.cache.result = hit or miss. |
s100.cell.scene_build |
Building the Mapsui layers and scene, including the pattern clip. |
s100.cell.pattern_clip |
The pattern clip, tagged s100.cache.result = hit or miss. |
s100.cell.compose |
Composing the layer stack. A landing cell's compose runs as a background job, outside the load's trace. |
s100.cell.stack_wait |
Waiting for a layer stack with the landed cell to reach the map. |
Summarize them with dotnet run --project tools/EncDotNet.S100.PerfReport -- summarise <stem>.jsonl.
Settle options
| Option | Default | Description |
|---|---|---|
--scenario <name> |
burst |
jumps or pan for the settle runs. |
--mode <mode> |
cold |
cold, prewarm, or both (needs --launch). |
--engines <list> |
the viewer's | luacsharp, moonsharp, or both, comma-separated. Several need --launch. |
--launch <path> |
— | The viewer executable or SoundCharts.dll to start for each run. Use this, --port-file or --endpoint. |
--viewer-arg <arg> |
— | An extra argument for a launched viewer (repeatable). |
--library-source <name> |
Washington |
The Library source or collection to load as you pan; empty to skip. |
--jumps <stops> |
Seattle, Tacoma, Port Townsend | Jump stops as Name=lat,lon;Name=lat,lon. |
--pan <stops> |
Seattle → Bainbridge Island | The pan's start and end, in the same form. |
--pan-steps <n> |
40 |
Moves between the pan's ends. |
--pan-step-delay-ms <ms> |
16 |
Delay between pan moves. |
--scale <denominator> |
44300 |
Map scale. |
--settle-timeout-ms <ms> |
120000 |
Longest wait for each move to settle. |
--confirm-ms <ms> |
250 |
How long the view must stay settled. |
--prewarm-timeout-ms <ms> |
900000 |
Longest wait for the pre-warm to finish. |
--repeat <n> |
1 |
Runs of each engine and mode. |
--trace |
off | With --launch, write each viewer's spans and metrics to <stem>.jsonl. |
--keep-caches |
off | With --launch, keep cold runs' cache folders. |
--out <dir> |
./perf-runs |
The folder for manifests, summaries and traces. |
The move from the starting view to Seattle is the first recorded jump, so it
depends on where the viewer starts. To fix the starting view of a launched
viewer, pass --viewer-arg=--center --viewer-arg=<lat,lon> --viewer-arg=--zoom --viewer-arg=<level>.
What the scenarios don't measure
The warm scenarios measure library work: parsing, portrayal and, for the
render scenarios, a headless Mapsui layer build. They don't run the Avalonia
window and binding loop, tile rasterization in the live viewer, or Skia GPU
drawing. Use the scenarios to catch pipeline regressions, and
viewer-stress with a viewer trace for live
rendering.
To profile the live viewer by hand, start it and attach dotnet-trace:
dotnet run --project src/EncDotNet.S100.Viewer
dotnet-trace collect --process-id <viewer-pid> \
--providers Microsoft-DotNETCore-SampleProfiler
Pan, zoom and repaint the map while the trace runs.
Add a scenario
Add a class that implements
IPerfScenariounderScenarios/. Give it a short kebab-caseNameand a one-lineDescription.Register it in
ScenarioRegistry.cs:Register(() => new Scenarios.MyNewScenario());Use
SharedInfrastructure.CreatePipelineFactory()for a pipeline factory with the bundled catalogues, the Lua engine and the CRS transforms.
run list, baseline and the CI gate pick up every registered scenario.