Skip to content

ci(measure): the timing job is sharded by file, each shard timing base and head on one runner - #1343

Merged
DrunkOnJava merged 3 commits into
mainfrom
ci/measure-timing-shards
Nov 4, 2026
Merged

DrunkOnJava merged 3 commits into
mainfrom
ci/measure-timing-shards

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

Measure's timing job is sharded by file. The build runs once, then four shards of about equal time each time base and head on a runner of their own, and a merge job puts their tables into the one table the single job wrote. A change in the shards' numbers is the proof run's.

Motivation

With -f timing=true the single "Timing (one runner)" job built both refs and exported every model, office file and sample three times each with both builds, in turn, on one runner. On run 41793618569 the other shards finished in 12.4 minutes and that job took 37 (07:37:59 to 08:14:57), so it was the long pole of every perf PR's Measure run. From run 41255129905's medians the files take about 44 minutes (base plus head, three rounds), the offices 12 of them and the 2024 samples 11.

The rule that keeps a ratio honest stays: base and head of a file are timed in turn on the same runner (runner CPUs differ by up to about a quarter), so each shard times both for its own files.

Changes

  • .github/workflows/measure.yml
    • plan outputs timing: the files as units with seconds that are their files' medians, base plus head, times three rounds, summed from the proof run 41797994751's table (the reference models 71, the four office files 329 when nordic, the samples as year ranges: to 2023 461, 2024 559, 2025 286, 2026 216, 2027 on 207, each cut to sample_years), packed into at most four shards largest first. With the inputs of a full run the shards weigh 559, 532, 536 and 502 s of 2,129. The proof run's four shards ran on four CPUs and no runner's rows skew clearly (its units took 0.98 to 1.21 of their time on run 41793618569's one runner), so the weights are not normalised.
    • timing-build builds rvt-ifc at both refs once (the cache, checkouts and build of the old job, unchanged) and uploads the two binaries as timing-bin.
    • timing is a matrix of the shards: it downloads the binaries (artifacts do not keep the executable bit, so it sets it), fetches only its files, runs tools/ci/measure-timing.sh on them and uploads measure-timing-shard-N (its table and its runner's CPU).
    • timing-merge puts the shards' rows into one table in the old format and order (the models, then the samples by name), writes the step summary with each shard's CPU, and uploads measure-timing with timing.md as before, plus timing-runners.txt. A shard that left no table fails this job after the others are merged.
    • The timing input's description says what it now does.
  • CONTRIBUTING.md: the Measure paragraph says the files are timed in shards and to compare ratios, not times, between rows.
  • No change to tools/ci/measure-timing.sh, which times what it is given.

Testing

Unit tests are banned in this repository: none added.

  • yaml parses (YAML.safe_load), actionlint reports the one finding main has (uses: $/.github/actions/fetch-corpus, line 630 here, 588 there) and none new; file modes unchanged (100644).
  • The planner, extracted from the workflow and run with seven input combinations (full, no offices, models only, sample_years 2015 2023 / 2026 2027 / 2025, timing off): every sample year and file is in exactly one shard, a range is cut to sample_years, and timing off gives the placeholder row.
  • Proof, Measure run 41797994751 (-f base=main -f samples=true -f nordic=true -f timing=true -f models="-" -f scorers=none, dispatched from this branch, whose code differs from main's by this workflow alone). Every job succeeded.
    • Shape: timing.md has the old header, 68 rows (the 10 models and offices and the 58 samples, the same 68 files as the old single job's table in run 41793618569) and the same order; the artifact is still measure-timing.
    • Ratios: head / base 0.96 to 1.02, mean 1.002, the totals 354.6 s and 355.2 s (1.002); 67 of 68 files within 0.97 to 1.03, the exception Terrain_Concrete_BuildingPermit, 0.96 (a small export). Peak memory 0.98 to 1.04 (2015-rme_basic 1.04: the same code on both sides).
    • Time: from the first job's start to the merge job's end 14 min 39 s, against the old single job's 36 min 58 s in run 41793618569 (0.40). Timing build 175 s; shards 356 s (offices), 572 s (samples 2024), 589 s (samples 2025 and 2026 and the reference models), 690 s (samples to 2023 and 2027 on); merge 6 s.

Audit-honesty checklist

Legal and contribution hygiene

  • I agree this work is licensable under Apache-2.0 (see CONTRIBUTING.md).
  • No Autodesk proprietary source, decompiled internals, or NDA'd SDK content.
  • No fixtures.

Breaking changes

None to the code. The measure-timing artifact keeps its name and timing.md keeps its table; the job named "Timing (one runner)" is now "Timing", with "Timing N (what)" shards and "Timing build" beside it.

Screenshots or output samples

The step summary names each shard's runner, and timing-runners.txt in the artifact has them:

- shard 1 (offices): Intel(R) Xeon(R) 6975P-C
- shard 2 (samples 2024): Intel(R) Xeon(R) 6973P-C
- shard 3 (samples to 2023, samples 2027 on): AMD EPYC 7763 64-Core Processor
- shard 4 (samples 2025, samples 2026, reference models): INTEL(R) XEON(R) PLATINUM 8573C

The four CPUs differ, which is what a ratio taken on one runner for each file is for: the same code reads 0.96 to 1.02 on all of them.

First rows of the merged table:

| file | base (ms) | head (ms) | head / base | base peak (MiB) | head peak (MiB) | peak head / base |
|---|---:|---:|---:|---:|---:|---:|
| 2024_Core_Interior | 5891 | 5933 | 1.01 | 309 | 308 | 1.00 |
| ARK_NordicLCA_Office_Concrete_As-Built | 26916 | 26859 | 1.00 | 919 | 919 | 1.00 |

The proof run's first weights (from run 41255129905) were off: the planner weighed the four office files at 720 s and they took 356, and the shard of samples to 2023 and 2027 on ran on the slower AMD runner, 690 s. The weights are now the proof run's own per-file times, which pack to 559, 532, 536 and 502 s (the planner run locally for the full, no-offices and sample_years cases: every unit lands in exactly one shard, one shard has the reference models and one the offices). No second proof run: only the weights changed, not the shapes; this PR's own Measure run checks that the workflow parses.

Related issues

None. Found while running #1333's unfiltered Measure.

@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 4, 2026 08:32
… proof run, and the units pack to 559, 532, 536 and 502 s
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) November 4, 2026 08:35
@DrunkOnJava
DrunkOnJava merged commit 4810c4d into main Nov 4, 2026
51 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/measure-timing-shards branch November 4, 2026 08:58
@DrunkOnJava DrunkOnJava mentioned this pull request Nov 4, 2026
4 tasks done
DrunkOnJava added a commit that referenced this pull request Nov 4, 2026
## Summary

Release 0.14.0:
- `rvt-rs-mcp` (#1324), a local, read-only MCP server, shipped as its
own crate and in the release archives and container image.
- One export pipeline, `rvt::ifc::run_export` (#1331).
- Rooms follow the export phase, and `rvt-ifc --phase` names another
(#1194, RE-326).
- Revit 2024 Area bodies (#763), and Revit 2015 to 2023 Areas where
their boundary is proven (#1261).
- Openings cut by rectangular wall openings (#1165).
- Stepped wall tops (#1067) and wall corner order (#1194).
- Conduits, conduit fittings and gutters (#1261).
- Plane faces split into tiling regions (#1144, #1247), and level beams
drawn as their box along the line (#1247).
- A lower export memory peak (#1075), faster Revit 2015 to 2023 exports
(#1237), and the residual field encodings (#1196).

## Changes

- Version 0.13.0 -> 0.14.0 in:
  - Cargo.toml;
  - rvt-py/Cargo.toml and its `=` pin;
  - rvt-mcp/Cargo.toml and its `=` pin;
  - rvt-wasm/Cargo.toml;
  - tools/stream_evidence/Cargo.toml;
  - viewer/package.json;
  - CITATION.cff (version and date);
  - Cargo.lock (rvt, rvt-py, rvt-rs-mcp, rvt-wasm) and fuzz/Cargo.lock.
- `python3 tools/release/changelog.py assemble`: 18 fragments go into
`[0.14.0] — 2026-11-04`, with an introduction and "Upgrading from 0.13".
- README: the latest release, a `cargo install rvt-rs-mcp` route, the
MCP server's release, and the "Upgrading from" pointer. docs/mcp.md:
install from crates.io.
- CI: `cargo package -p rvt -p rvt-rs-mcp --locked` packages and
verifies the MCP crate against the packaged `rvt`, so its first publish
is not the first time its package builds.

## Testing

- **Measure 41803457521** runs `main` at 4893028 against v0.13.0 on
every reference model, the samples, the held-out models and the
families, with timing (the sharded timing of #1343, 12 minutes end to
end). The introduction's figures come from its scorer diff and timing
table:
  - all 68 timed files are faster, and none peaks higher in memory;
  - nothing moves from equal to different;
- the values Revit's export does not write are unchanged except for the
office at permit, where they go from 14 to 16, both on the opening that
Revit writes only as built and that is counted apart.
- **Final run, Measure 41810374671:** release head 26cf9f8 (with #1344)
against v0.13.0.
- The scores are line for line run 41803457521's, apart from
`witness_version`.
  - All 111 `ifc.sha256` move, since the header names 0.14.0.
  - Everything after 26cf9f8 is changelog text.
- **Witness and fixtures:** the Core Interior witness observations and
verdicts, and the synthetic fixtures, are refreshed from this PR's CI
before merge. Only `witness_version`, the verdict hashes and the version
strings should change.
- **First publish of rvt-rs-mcp:** it is by hand after `rvt` 0.14.0 is
on crates.io (RELEASE.md step 8). Its trusted publisher is added after
that, and then `PUBLISH_RVT_RS_MCP` is set.

## #1344 landed first

On `main` as merged before 61ec9b2, `RevitFile::set_export_phase` and
`ExportOptions::with_phase`, both new in this release, kept the
production walk a handle had already read. A library caller that
exported one handle at two phases would have written the first phase's
rooms. #1344 (61ec9b2) landed first:
- a phase change drops the memoised walk;
- the walk's notes follow it;
- the export phase reaches Python, the viewer and `rvt-schedule
--phase`.

This branch takes it:
- its entry is under Added;
- the room-phase entry no longer says Python and the viewer export only
the last phase;
- "Upgrading from 0.13" lists the new phase API.

#1344's own byte-identity run (41806811909) found all 111 exports byte
for byte `main`'s. The final run of this head is Measure 41810374671
(see Testing).

## Audit-honesty checklist

- [x] The introduction keeps each entry's "not measured" caveats:
#1261's undelivered BIM Whale Areas, the room phase rule unmeasured
against a default-setup export, the beam body's length being the box's,
and #1075's 438 MB file.
- [x] No emojis, private paths or internal jargon.
- [x] **The one opening the permit file writes and Revit's permit export
lacks (14 to 16 values Revit does not write) is a decided exception.**
Its records are byte-identical to the as-built file's, where Revit's
export writes it. It is counted apart as a pair inconsistency, as
#1048's width is, by a generic rule with no ids in code. This was
decided when #1165 landed on 2026-11-03 ("Count it apart, ship"). It is
not an exporter disagreement on a value, which the leave-it-out rule
covers.

## Legal and contribution hygiene

- [x] Apache-2.0; no Autodesk proprietary source, decompiled internals
or NDA'd SDK content.

## Breaking changes

In the stable API, `IfcModel` gains a public field (`filler_sizes`), and
`walker::read_field_by_type` and `write_field_by_type` read the `0x02`
and `0x03` primitives at their measured widths. Everything else is
additive. Behaviour changes are listed under "Upgrading from 0.13".

## Related issues

Refs #1324, #1331, #1194, #763, #1261, #1165, #1067, #1144, #1247,
#1075, #1237, #1196.
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.

1 participant