Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4a0668b24 | ||
|
|
41945912a3 | ||
|
|
faf890d9f0 | ||
|
|
3ceba21bb2 | ||
|
|
b12e0cc2c4 | ||
|
|
01843eb75a | ||
|
|
5e02142a8f | ||
|
|
07ef771a35 | ||
|
|
eb54042032 | ||
|
|
a1c77c053f | ||
|
|
51cbfd27df | ||
|
|
e13ae4c89b | ||
|
|
b2bb912bbb | ||
|
|
126a6bcdac |
No files matched your search
@@ -4,6 +4,69 @@ All notable changes to lucisv are recorded here. Versions follow
|
||||
[semantic versioning](https://semver.org/); until 1.0 the CLI's exit codes
|
||||
(see `README.md`) are the only frozen contract.
|
||||
|
||||
## 0.53.0 — 2026-09-09
|
||||
|
||||
### The 0.52.0 review — one correctness fix
|
||||
|
||||
- **A symlink-aliased directory is indexed once at startup.** 0.52.0's
|
||||
startup scan walks the open file's folder before the rest of the
|
||||
workspace, and the two walks kept separate visited sets: a directory
|
||||
reachable by two spellings (`a_alias -> z_real`) was indexed twice, so
|
||||
go-to-definition offered two targets and a valid rename was refused as
|
||||
ambiguous until the next rescan (found by the independent review of
|
||||
0.52.0). The two walks now share one directory identity; when an alias
|
||||
sorts before the open folder the scan takes the single canonical walk;
|
||||
an alias only the remaining walk can see requests one ordinary rescan
|
||||
so the spellings converge; and a same-named symlink to an open buffer
|
||||
is never a second copy of it. Startup, rescan and restart agree on
|
||||
index paths, definitions, rename and diagnostics across nine alias
|
||||
shapes, and a genuine duplicate declaration is still refused.
|
||||
- The load probe in `tools/perf/` primes a warm store before timing and
|
||||
stamps scan completion from the scan's own end event.
|
||||
- No performance number moved; the CLI is unchanged.
|
||||
|
||||
## 0.52.0 — 2026-09-09
|
||||
|
||||
### Performance take 5 — the review round
|
||||
|
||||
An independent review of 0.51.0 (`docs/performance_take5_review.md`)
|
||||
named four remaining costs with gates; all four are implemented and
|
||||
measured (`docs/perf/README.md`, the 2026-09-08 review-round entry).
|
||||
Behaviour is unchanged everywhere the suites and byte-identity gates can
|
||||
see; two pre-existing gaps the round found are filed, not hidden.
|
||||
|
||||
- **A rename refuses cheaply.** A cursor with no symbol used to read,
|
||||
parse and index every file in the workspace before refusing (2 s on
|
||||
opentitan); an engine-owned preflight now refuses from the request
|
||||
buffer alone in 0.3 ms with the same sentence and precedence. Refusals
|
||||
the workspace index would have to answer stay on the slow road, because
|
||||
a wrong rename refusal is terminal.
|
||||
- **One lint pass per buffer revision.** The diagnostics publish and the
|
||||
quick-fix discovery share one result, keyed by value on every input
|
||||
(rule set, options, width, tab width, waiver *contents*) and cleared by
|
||||
every index change; a cursor move on a 42 000-line file costs 1 ms
|
||||
instead of 23, and the navigation queued behind it likewise.
|
||||
- **The first answer after opening a file.** A workspace start now
|
||||
walks, indexes and publishes the open file's own folders before it
|
||||
discovers the rest of the workspace, one scan, every file once: the
|
||||
first go-to-definition answers in about 80 ms cold and 115 ms warm,
|
||||
correct every session, and a warm start settles under one second.
|
||||
- **Scans under load.** A scan publishes at most once per 512 files
|
||||
instead of once per burst of requests (a publish costs the size of the
|
||||
index): at the same offered load the median request wait falls from
|
||||
112 ms to 2 ms and the scan finishes about twice as fast. An empty
|
||||
navigation answer computed while the index is still growing is no
|
||||
longer an answer — it is asked again at the next publish or at the
|
||||
scan's end — and a cancel for such a request is honoured where it
|
||||
lands.
|
||||
- **Rename reuses the index's own records.** For the files a rename
|
||||
selects but never analyses, the engine now takes the index cache's
|
||||
record instead of parsing, and only when the file's bytes hash to what
|
||||
that record was written for. The hierarchical-tail rename falls from
|
||||
380 to 314 ms, the duplicate-module refusal from 2 s to 0.7 s; every
|
||||
edit and every warning byte-identical.
|
||||
- The CLI is unchanged in this release.
|
||||
|
||||
## 0.51.0 — 2026-09-08
|
||||
|
||||
### Performance take 5 — the implementation round
|
||||
|
||||
Generated
+8
-8
@@ -97,7 +97,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lucisv"
|
||||
version = "0.51.0"
|
||||
version = "0.53.0"
|
||||
dependencies = [
|
||||
"lucisv_core",
|
||||
"rayon",
|
||||
@@ -108,11 +108,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lucisv_core"
|
||||
version = "0.51.0"
|
||||
version = "0.53.0"
|
||||
|
||||
[[package]]
|
||||
name = "lucisv_server"
|
||||
version = "0.51.0"
|
||||
version = "0.53.0"
|
||||
dependencies = [
|
||||
"lsp-server",
|
||||
"lsp-types",
|
||||
@@ -248,14 +248,14 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
||||
|
||||
[[package]]
|
||||
name = "vlog_formatter"
|
||||
version = "0.51.0"
|
||||
version = "0.53.0"
|
||||
dependencies = [
|
||||
"vlog_parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "vlog_linter"
|
||||
version = "0.51.0"
|
||||
version = "0.53.0"
|
||||
dependencies = [
|
||||
"lucisv_core",
|
||||
"vlog_formatter",
|
||||
@@ -265,11 +265,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "vlog_parser"
|
||||
version = "0.51.0"
|
||||
version = "0.53.0"
|
||||
|
||||
[[package]]
|
||||
name = "vlog_refactor"
|
||||
version = "0.51.0"
|
||||
version = "0.53.0"
|
||||
dependencies = [
|
||||
"vlog_formatter",
|
||||
"vlog_parser",
|
||||
@@ -278,7 +278,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "vlog_semantic"
|
||||
version = "0.51.0"
|
||||
version = "0.53.0"
|
||||
dependencies = [
|
||||
"vlog_parser",
|
||||
]
|
||||
+1
-1
@@ -12,7 +12,7 @@ members = [
|
||||
]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.51.0"
|
||||
version = "0.53.0"
|
||||
authors = ["Guoliang Chen"]
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
|
||||
@@ -4714,6 +4714,25 @@ in 0.49.0. Take 4's findings are in the loop-3 list above.
|
||||
already stat'd and could hand on), then `cache_open` 89 ms; warm settle
|
||||
~1.04–1.10 s against the plan's < 1 s, the rest being the store open
|
||||
the refused reuse would remove.
|
||||
- **review round §61.2 filed:** a `format::indent_width` form taking an
|
||||
already-read `FileConfig`, so the code-action path's run and the
|
||||
publish path do one `Discovery` walk, not two (+0.1 ms today).
|
||||
- **review round §61.3 filed:** a bounded local-record load of the index
|
||||
store for the open folder's head (measured ~26 ms vs the 89 ms whole
|
||||
open, but the 61 ms checksum verification is owed either way and it
|
||||
breaks `Load::canonical`) — its own experiment if the first answer
|
||||
needs the 89 ms; and a walk that can skip an already-walked subtree so
|
||||
the two-phase discovery stops walking the open folder twice (+2.5–5 %
|
||||
on the 1/10-buffer settle).
|
||||
- **review round §61.5 filed (QA, pre-existing):** a `bind` file's own
|
||||
occurrence of a renamed name (`aes_bind.sv` for a bound name or a
|
||||
two-level hierarchical tail) is neither edited nor warned about,
|
||||
identically before and after the reuse — the whole-scope engine's
|
||||
answer, so a missing warning at least (QA task `task_834abda3`); the
|
||||
scope reuse's collateral for the other refactorings (`_with` doors for
|
||||
extract/inline/imports/ports/references — the resolves and the extract
|
||||
edit are the candidates, the 805 ms refusal is after the build); the
|
||||
31 ms store decode the one-place tie costs.
|
||||
Sections after §46 are planned when reached.
|
||||
|
||||
## 45. Small items, round 4 (planned 2026-09-05) — topo §2.9-29, 30, 17, 22
|
||||
@@ -6166,7 +6185,464 @@ semantic build/facts owners. Serialized after 60.1–60.3.
|
||||
— 2026-09-08: nothing reopened it; the first-after-edit row after
|
||||
P1 is inside the frame, and no user command still blocks navigation
|
||||
for a whole scan on the startup path
|
||||
- [ ] `docs/perf/README.md` entry with the accepted numbers; topo
|
||||
- [x] `docs/perf/README.md` entry with the accepted numbers; topo
|
||||
edges/handshakes for every contract amended; the plan's status
|
||||
line updated; a release cut from the clean tree with its assets
|
||||
verified
|
||||
verified — done 2026-09-08: **0.51.0** (bc59336, v0.51.0), 8
|
||||
assets, the darwin-arm64 vsix at 0.51.0 with both binaries,
|
||||
`hierarchySections.js`, `extract.js`, no `*_test.js`.
|
||||
|
||||
## 61. Performance take 5 — the review round (owner request 2026-09-08)
|
||||
|
||||
`docs/performance_take5_review.md` (Codex, 2026-09-08, at 0.51.0) is the
|
||||
spec; its "Follow-up experiment queue" in `docs/perf/take5-tracking.md`
|
||||
(R1a–R4) is the ledger every lane fills; `docs/perf/take5-review-20260908/`
|
||||
is the baseline evidence (0.51.0 review cells are fixed). Same protocol as
|
||||
§60: serial lanes in the main tree, dev (Opus) → QA (Sonnet) → lead
|
||||
review → commit; a feature README per lane under
|
||||
`docs/features/perf5r-<lane>/`; every number by `tools/perf/` under
|
||||
`tools/guard.sh -m 8 -t 1800`, opentitan read-only, no build during a
|
||||
timed session, paired against the 0.51.0 review baseline cells;
|
||||
no `sleep` over 60 s, waits bounded and keyed on a PID or a file, never
|
||||
`pgrep -f`. Order chosen by cost-of-entry and what each measurement
|
||||
unlocks: the preflights first (cheap, large), then the action path, then
|
||||
the first answer, then the scan, then rename reuse if its measurement
|
||||
justifies it.
|
||||
|
||||
### 61.1 R3a + the refusal preflights (engine-owned)
|
||||
|
||||
Review §3 items 5–6. A `textDocument/rename` on a cursor with no symbol
|
||||
materializes the whole workspace (`server/rename.rs`: `rename_name_at`
|
||||
→ `None` → `ws.sources()`, 3 976 files) and the engine builds the scope
|
||||
(3 975 parses, 1.9 s) before `locate` refuses in 0.1 ms; the duplicate-
|
||||
module refusal and the "meaning would change" refusal take the same
|
||||
road; the extract at the `aes_wrap.sv` inline-site selection spends
|
||||
805 ms building a scope before its safety checks refuse. Files:
|
||||
`vlog_refactor/src/{rename/mod.rs,extract/mod.rs,lib.rs}`,
|
||||
`lucisv_server/src/{rename.rs,extract.rs}`, tests.
|
||||
- [x] engine-owned rename preflight over the request file alone (its
|
||||
parse + analysis; `prepare_rename_here` is the existing one-file
|
||||
shape — reuse it): `check_new_name`, then the cursor refusal, with
|
||||
today's error precedence (invalid new name → out-of-scope /
|
||||
unavailable file → no symbol here) and the exact sentences; the
|
||||
server calls it before selecting sources and materializes nothing
|
||||
when it refuses; a symbol found → today's path unchanged
|
||||
— `vlog_refactor::rename_preflight` (`rename/preflight.rs`), additive,
|
||||
**without** the `external`/`index` parameters the brief proposed: every
|
||||
refusal they could answer is one the staleness argument forbids taking,
|
||||
so they would have been unused. Takes rules 1, 4, 5, 6, 11a and — only
|
||||
for a non-file-scope declaration in the buffer — rule 2
|
||||
- [x] duplicate-declaration refusal moved ahead of materialization ONLY
|
||||
with the evidence the review asks for (the index is current and
|
||||
authoritative for that name — the workspace's `declared_twice`
|
||||
already gates the ports offer on it; state the argument or leave
|
||||
it on the slow road)
|
||||
— **left on the slow road, with the argument.** `state/mod.rs::set_document`
|
||||
reads the index and never writes it, so an unsaved edit that adds or
|
||||
removes a file-scope declaration is not in it; `rename` is the authority
|
||||
that re-derives the count. A wrong *offer* costs a lightbulb, a wrong
|
||||
*refusal* costs the work. `rstmgr_por` keeps its ~2.0 s, asserted by
|
||||
`a_name_declared_in_two_files_stays_on_the_slow_road`
|
||||
- [x] extract preflight: the selection's own checks that read only the
|
||||
request file's parse (the region, the item kinds, the refusal
|
||||
shapes `extract_site`/`Region::read` already know) run before
|
||||
`Scope::build`; exact refusal sentence preserved, no optimistic edit
|
||||
— **they already do, by two mechanisms**, which the new `extractrefuse`
|
||||
phase measures: `execute`'s `site_at` gate *is* `extract_site_in`, whose
|
||||
first two statements are the parse-diagnostic check and `Region::read`;
|
||||
and `plain_identifier`/occupied are `extract_module`'s own first
|
||||
statements, ahead of `Extraction::plan`. A preflight was written, wired,
|
||||
measured and **removed** as redundant
|
||||
- [x] measured: no-symbol rename ≤ 16 ms with zero closed-workspace
|
||||
parses; the `aes_wrap.sv` extract refusal with its parse count;
|
||||
the successful renames and the extract capture unchanged
|
||||
(fingerprints); R3a/R3c cells + experiment entries
|
||||
— no-symbol **2 012.3 → 0.34 ms**, `trace_parses` **3 975 → 0**,
|
||||
peak RSS 909 → 429 MiB, sentence identical. `aes_wrap.sv` extract
|
||||
refusal **761.1 → 767.8 ms (unchanged)**; its stage is
|
||||
`boundary::Crossing::read`, scope-dependent at depth — deferred to §61.5.
|
||||
All fingerprints identical (`b39defb21265…`, `fa7e31c78382…`,
|
||||
`090e92e7736e…`). R3a/R3c cells and both experiment records filed
|
||||
- [x] QA: refusal-precedence matrix old vs new (13 shapes: invalid name,
|
||||
keyword, unsaved/closed file, untitled, no symbol, comment, string,
|
||||
macro, duplicate module, existing name, same name, large-file
|
||||
buffer, cursor on a reference vs a declaration); parse counts;
|
||||
fingerprints; numbers re-taken
|
||||
— **PASS.** Rule table rebuilt independently from `renaming`/`Scope::
|
||||
locate`/`declaration` vs `rename_preflight`/`declared_here`, agrees
|
||||
with the dev's; oracle sabotaged twice (an invented refusal, a
|
||||
reworded sentence) and caught both; gates clean (fmt/clippy/4 322-test
|
||||
guarded run, matching a same-tree baseline + the 17 added tests
|
||||
exactly — the README's "4 328" was a slip, corrected); fresh guarded
|
||||
wire re-runs against the sha256-matched candidate binary over
|
||||
OpenTitan reproduce no-symbol 0/0 parses and ≤1 ms, the duplicate-
|
||||
module and common-port rows unchanged (3 975 parses, same sentence),
|
||||
the `aes_wrap.sv` extract refusal unchanged with its `Crossing::read`
|
||||
sentence, and the `aes.sv` capture fingerprint identical; all 12
|
||||
tracker R3a/R3c-x numbers and 5 fingerprints traced verbatim in
|
||||
`~/.cache/lucisv-perf/take5r-1/`. QA log in
|
||||
`docs/features/perf5r-preflight/README.md`
|
||||
|
||||
### 61.2 R1a + R1b — the code-action path on a large file
|
||||
|
||||
Review §1. `lint.rs::fixable` still runs `lint_with` on every request:
|
||||
23 of the 25 ms all-family menu on the pinmux comment; the first action
|
||||
after an edit is 136 ms. Files: `lucisv_server/src/{lint.rs,
|
||||
code_action.rs,fences.rs,server/dispatch.rs}` + a new small module for
|
||||
the snapshot; `state/` for one field at most; tests.
|
||||
- [x] R1b first: a `--verbose` stage trace for one `codeAction` on the
|
||||
pinmux comment — config/waiver load, dirty-buffer flush (the
|
||||
`Document` rebuild), lint, fence, serialization — for the first
|
||||
request, an unchanged repeat, the first after a one-character
|
||||
edit, and the definition queued behind each; harness rows
|
||||
— `lint_trace.rs`, one `timing: codeaction …` line per request that
|
||||
linted anything, two groups (`flush{…} action{…}`) divided by the
|
||||
flush; phases `actionprofile` and `ruleablation` in
|
||||
`tools/perf/phases_r1.py`. **The 23 ms is `lint_with`** (20.9 of 22.0;
|
||||
config I/O 0.04, run build 0.01, serialization 0.03, fence skipped) and
|
||||
**three semantic rules are the whole of it** — `unused-signal` +8.2,
|
||||
`multiply-driven` +7.5, `undriven-net` +7.4 ms over a 1.3 ms floor, the
|
||||
other 55 default rules ≤ +2.2 each. **The 136 ms is 78% the flush**:
|
||||
99.7 of 127.5 ms, of which 21.1 is the diagnostics pass, leaving
|
||||
~78.6 ms of `Document::new` on 1.3 MB; the handler then lints the same
|
||||
revision a **second** time for 20.2 ms. Deviation: the flush is one
|
||||
traced stage plus its parse count, not split into parse/analysis/overlay
|
||||
— those live in `state/mod.rs`, outside this lane's ownership, and
|
||||
flush-minus-diagnostics answers the question asked
|
||||
- [x] the dependency/invalidation table written BEFORE any cache:
|
||||
document content/revision, effective rules and options, tab width,
|
||||
external waiver contents, project/index inputs the workspace rules
|
||||
read (index generation); each row names the test that flips it
|
||||
— 14 rows in `docs/features/perf5r-lint-snapshot/README.md`, derived from
|
||||
the arguments of the `lint_with(ctx, rules, external)` call it guards, so
|
||||
the list is complete by construction. Three mechanisms only: **identity**
|
||||
(the buffer, `doc.large`, close/reopen — `set_document` builds a new
|
||||
`Document`), the **key by value** (rules, options, width, indent, waiver
|
||||
*contents*), and **one explicit drop** (`Document::refresh_overlay`, which
|
||||
every index mutation in `state/` already ends in). Row 12 is the one that
|
||||
decides the config question: the `lucisv.toml` and the waiver files are
|
||||
**not watched** (`watch::SOURCE_GLOB` is sources plus the filelist), so
|
||||
the per-request read is the only thing that ever notices them changing
|
||||
- [x] R1a: a lint-result snapshot keyed by that table, consumed by the
|
||||
diagnostics pass and the quick-fix discovery alike; recomputed on
|
||||
any mismatch; bounded (one per open document); the fence authority
|
||||
and execute-time validation untouched
|
||||
— `lint_snapshot.rs`: `Key` compared **by value, never hashed**, and
|
||||
`Slot`, one `Mutex<Option<…>>` field on the `Document`. One `found(doc,
|
||||
run)` in `lint.rs` that both doors call; the tab width moved onto the
|
||||
`LintRun` (read through `format::indent_width`, whose call the dispatcher
|
||||
no longer makes) so the two doors build the same context and share one
|
||||
slot. `fence.rs` and the shared-fence contract untouched; `vlog_linter`
|
||||
untouched
|
||||
- [x] measured: unchanged pinmux menu and queued definition ≤ 16 ms;
|
||||
first-after-edit improved and reported separately with its stage
|
||||
split; no stale diagnostic or fix under any invalidation; R1a/R1b
|
||||
cells + experiments
|
||||
— paired against trunk `51cbfd2`: **all families 22.61 → 0.98 ms
|
||||
(−95.6%)**, **quickfix only 24.51 → 0.11 (−99.5%)**, **queued definition
|
||||
22.39/22.38 → 0.78/0.76 (−96.5%)** — both gates met with two orders of
|
||||
magnitude of margin. **First-after-edit 125.65 → 106.89 ms (−14.9%)**,
|
||||
and its split names the remaining stage: ~84 ms `Document::new` plus the
|
||||
21.9 ms diagnostics pass, with the code-action lint at **0.00 ms**.
|
||||
Diagnostics publish +0.3%, idle RSS at 100 open buffers each holding a
|
||||
snapshot 574.0 → 574.6 MiB (+0.1%), take-3 `codeaction` cells within
|
||||
1.5%. Config-discovery memo **not taken**: the trace measures that I/O at
|
||||
0.04–0.16 ms and its failure mode would be a stale rule selection.
|
||||
R1a/R1b cells and both experiment records filed
|
||||
- [x] QA: every invalidation row forces a fresh result (change the
|
||||
buffer, the config, a waiver file, a dependency file the workspace
|
||||
rules read, close/reopen, a UTF-16 range); stale-fix attack; memory
|
||||
bound; numbers re-taken
|
||||
— PASS. All 14 rows attacked over real stdio JSON-RPC against the
|
||||
release binary on an independent fixture workspace (two standalone
|
||||
scripts, not the dev's own tests); three targeted sabotage cuts
|
||||
(waiver text, the `refresh_overlay` drop, `tab_width` in the key)
|
||||
each caught by exactly the predicted test and reverted clean; gates
|
||||
cross-checked against a from-scratch clone of `51cbfd2` with
|
||||
matching binary sha256es and a name-level test diff (+21/-0);
|
||||
100-buffer RSS and the stage trace reproduced independently within
|
||||
noise; 12 tracker numbers traced verbatim (some as documented
|
||||
medians) in `~/.cache/lucisv-perf/take5r-2/`; opentitan clean and
|
||||
zero guard kills throughout. QA log in
|
||||
`docs/features/perf5r-lint-snapshot/README.md`
|
||||
|
||||
### 61.3 R2a + R2b — the first useful answer
|
||||
|
||||
Review §2. Warm first answer 325 ms = 205 ms workspace discovery +
|
||||
92 ms store open before the open buffer's folder is even stepped.
|
||||
Files: `lucisv_core/src/walk.rs` (an additive handshake: hand on the
|
||||
metadata the walk already stat'd), `lucisv_server/src/{state/,
|
||||
scan_order.rs,server/startup.rs,server/index.rs,index_cache.rs}`, tests.
|
||||
- [x] R2a: measure the walk's stages (gitignore/config handling, the
|
||||
size-cap `metadata` per file, path sorting) and the store open;
|
||||
then the walk metadata hand-off (one `stat` per file, not two) —
|
||||
the handshake recorded in `lucisv_core`'s README and topo before
|
||||
the interface changes — **the split says the cap's second `stat` is
|
||||
6.9 ms of a 165 ms discovery, not the ~45 §P4b3 guessed, and the
|
||||
walk is 95 % of it; the hand-off (`collect_files_with`, additive)
|
||||
takes `stats` 3 979 → 0 and `cap` 6.92 → 0.10 ms, and the first
|
||||
answer does not move. Kept as a tidy-up; R2b is the lever.** The
|
||||
handshake went into the code's doc comments as the interface
|
||||
changed and into the feature README after, not before — recorded
|
||||
as a deviation; the topo edge is a request for the lead
|
||||
- [x] R2b: the raised-folder work begins before the remaining discovery
|
||||
finishes — one coherent scan (the folder walked, stepped and
|
||||
published first; the rest of the workspace discovered and stepped
|
||||
after; paths and facts deduplicated; configured scope, exclusions,
|
||||
filelists, size cap, unsaved-buffer precedence preserved; never two
|
||||
complete scans, never an answer from only the open file); if the
|
||||
store open remains the barrier, a measured design for bounded
|
||||
local-record loading before any format change — **shipped, bounded
|
||||
twice (rung 2 only, strict descendants of a root only,
|
||||
`HEAD_WALK_MAX` 512) and `collect_files_below` carries the root's
|
||||
`.gitignore` down so the two halves of one scan cannot disagree
|
||||
about which files exist. `OPENING_FILE_WAIT` (25 ms, inside the
|
||||
staging window) closes the didOpen-vs-configuration race that left
|
||||
2 sessions in 8 paying the old cost. The store open is 61 ms of
|
||||
checksum: the bounded local load was designed and measured (~26 ms,
|
||||
~50 ms first answer) and NOT shipped — it moves cost rather than
|
||||
removing it and changes `Load::canonical`, which the compaction
|
||||
skip and the byte-identical store rest on. Filed as its own
|
||||
experiment.**
|
||||
- [x] measured: first definition ≤ 200 ms warm and cold, equal to the
|
||||
settled target (not merely non-empty); warm quiet scan ≤ 1.0 s if
|
||||
reachable, reported honestly; RSS reduction kept; startup ordering
|
||||
cases (config before/after didOpen, late/no reply, unsaved buffer,
|
||||
multiple folders, root-level file, a dependency outside the first
|
||||
folder) pinned; R2a/R2b cells + experiments — **first definition
|
||||
265.9 → 77.9 ms cold (−70.7 %) and 301.3 → 115.1 warm (−61.8 %),
|
||||
result count 1 in 12 of 12; warm quiet settle 1 033.9 → 997.4 ms
|
||||
(≤ 1 s, first time, by less than the spread); idle RSS −8.6 % cold;
|
||||
store byte-identical (three sha256s over 28 stores); 24 of 24 scope
|
||||
cells; `mismatched_answers` 0 AND the new stricter
|
||||
`unsettled_answers` 0. Named costs: settled +2.5 % / +4.8 % at 1/10
|
||||
open buffers (the neighbourhood subtree walked twice), and the
|
||||
"equal to the settled target" gate is met on the measured cursor
|
||||
and all 54 probe requests but is NOT true by construction for a
|
||||
cross-folder cursor — pinned by a test and filed as a
|
||||
`server/dispatch.rs` handshake.** Feature README
|
||||
`docs/features/perf5r-first-answer/`; 4 343 → 4 360 tests
|
||||
- [x] QA: the ordering matrix; coherence (`mismatched_answers` 0 with the
|
||||
settled-equality check, not the non-empty one); persistence
|
||||
attacks re-run; numbers re-taken
|
||||
— PASS. Gates green (4 360 tests, +17/−0 vs `a1c77c0`, fmt/clippy
|
||||
clean); walk hand-off sabotage caught by exactly the predicted 12
|
||||
tests; `collect_files_below` attacked with 5 fixtures beyond the
|
||||
dev's own 4 (nested exclusion, intermediate `.gitignore`, symlink
|
||||
outside root — pinned, agrees with the plain walk, not a
|
||||
regression — missing folder, `gitignore:false`), all correct;
|
||||
`HEAD_WALK_MAX` fallback has **no shipped test** but independently
|
||||
verified correct via a constructed fixture (filed for the lead);
|
||||
ordering matrix (a–h) read and sampled across 17 wire tests, `f`
|
||||
pinned (`open_next` finishes the *whole* pending discovery before
|
||||
reordering, never a targeted walk); `unsettled_answers` confirmed
|
||||
to count empty mid-scan answers against a non-empty settled one;
|
||||
cross-folder `[]` exception reported, not failed; `index_cache.rs`
|
||||
diff confirmed empty; opentitan clean, zero guard kills. QA log in
|
||||
`docs/features/perf5r-first-answer/README.md`
|
||||
|
||||
### 61.4 R4 — publication cost under load
|
||||
|
||||
Review §4. Files: `tools/perf/` (a fixed-arrival-rate probe), then
|
||||
`lucisv_server/src/{server/index.rs,state/,candidates.rs,includes.rs}`.
|
||||
- [x] the probe: a definition every N ms of wall clock (not after the
|
||||
previous response), recording queue latency, publications, per-
|
||||
publication cost (index absorb / candidates / includes / overlays)
|
||||
and scan completion under the same offered load, 1 / 10 / many
|
||||
buffers — **`tools/perf/phases_r4.py`: `scanload` (warm),
|
||||
`scanloadcold`, `scanloadcross`, plus a quiet control in the same
|
||||
series. A fixed request *count* over a fixed window, because the
|
||||
first draft stopped sending when the server went quiet, which made
|
||||
the offered load a function of the server — `scanserve`'s own
|
||||
confound in a new place. The split at `eb54042`, warm, one open
|
||||
buffer, a definition every 100 ms: 34 publishes, `absorb` 2 433 ms
|
||||
(78 %), `candidates` 623 (20 %), `includes` 47, `overlay` 2.4
|
||||
(0.08 %) — 3 105 ms of publication in a 4 206 ms scan whose quiet
|
||||
form takes 1 005. Cold: 88 publishes, 7 973 of 10 675 against a
|
||||
2 766 ms quiet scan. `absorb` is the cost because it ends in a
|
||||
whole-index merge; the overlay refresh, which this item expected to
|
||||
matter, is 0.08 % at one buffer and 9.6 % at 101**
|
||||
- [x] then reduce duplicate publication work (incremental candidates and
|
||||
includes tables, or a bounded publish cadence) preserving the
|
||||
coherent-prefix contract; quiet-scan decode/merge only after an
|
||||
allocation profile shows duplication — **the cadence
|
||||
(`Scan::publish_is_due`, `PUBLISH_EVERY` 512): one merge per 512
|
||||
staged records instead of one per burst of requests, with the drain
|
||||
that has something *waiting* — the session's first useful answer —
|
||||
exempt. A quiet scan still publishes nothing. The candidates
|
||||
rebuild and the overlay refresh were **measured and not rebuilt**:
|
||||
the cadence takes both down with it, and the overlay is noise at
|
||||
every buffer count an editor has. `WorkspaceIndex::absorb`'s
|
||||
whole-index merge is named as a finding for a later lane —
|
||||
`update_facts` has a targeted merge beside it and `absorb` does
|
||||
not, but that is a `vlog_semantic` change this lane may not make**
|
||||
- [x] measured: same offered load, better queue latency AND completion;
|
||||
never fewer served requests reported as a speedup; R4 cells —
|
||||
**same offered load, requests answered equal in every cell:
|
||||
publication −78 to −88 %, the traced scan −48 to −65 %, the median
|
||||
request wait −98 to −99.5 % (warm 112.3 → 1.9 ms at one buffer,
|
||||
1 960 → 10.4 at 101; cold 137.7 → 1.5, and 4 706 → 2.1 at two).
|
||||
Across the sixteen loaded cells the tail improved in ten, was level
|
||||
in two and rose in four — three of them single-open-buffer cells,
|
||||
worst warm 168 → 422 ms, against cold 9 308 → 1 583 at 101 buffers.
|
||||
Quiet warm scan 1 005 → 985 ms (≤ 1 s kept), quiet cold 2 724 →
|
||||
2 694, first useful answer 78.2 → 80.8 cold / 115.1 → 115.8 warm,
|
||||
idle RSS −0.2 %, store size identical, 24 of 24 scope cells equal,
|
||||
`scanserve` cold median 122.2 → 45.6 with the same 13 requests
|
||||
served. `mismatched_answers` 0 and `unsettled_answers` 0
|
||||
everywhere — and on a new cross-folder cursor the reference is
|
||||
unsettled 12 of 270 with one buffer and 270 of 270 with eleven
|
||||
where the candidate is 0. Feature README
|
||||
`docs/features/perf5r-publication/`; 4 360 → 4 365 tests**
|
||||
- [x] the lead's §61.3 rulings, both on this drain path: **an empty
|
||||
navigation answer computed mid-startup-scan is not answered — the
|
||||
request is asked again at the next publish and at the latest when
|
||||
the scan ends, where `[]` is honest. Three methods
|
||||
(definition / typeDefinition / references), a hover untouched and
|
||||
pinned. The `HEAD_WALK_MAX` fixture QA asked for is in
|
||||
`server/tests/startup.rs` and was sabotage-checked**
|
||||
- [x] QA: coherence under load; the probe's arrival discipline verified;
|
||||
numbers re-taken — **PASS. Coherence sabotage-tested (a direct
|
||||
index/candidates-agreement test, failed when `publish_scan`'s
|
||||
candidates absorb is disabled). The "never re-ask" sabotage produces
|
||||
the lost-request failure this task guards against; the shipped rule
|
||||
does not. `HEAD_WALK_MAX` sabotage reproduces "515 files (the folder
|
||||
first)". `scanload`/`scanloadcross` re-run independently on the dev's
|
||||
own binaries: `mismatched_answers` 0 and `unsettled_answers` 0 for the
|
||||
candidate in every cell, matching the archived record. Quiet
|
||||
scan/RSS controls re-run within ±10% (widest +6.9%). Tail
|
||||
characterized: the CAND max attributed to cadence spacing, not
|
||||
deferral; a T=100 ms secondary bound estimated to give back most of
|
||||
this cell's publication win since the reference's own pre-cadence
|
||||
publish spacing (~123 ms) is already close to 100 ms. One
|
||||
non-blocking gap found and pinned by a new test: a `$/cancelRequest`
|
||||
against a request sitting in `Server::deferred`, arriving outside a
|
||||
batch that reunites it with a publish, is silently ineffective
|
||||
(exactly-one-response held; `cancel-request`'s README needs a dated
|
||||
amendment, filed as a handshake). QA log in
|
||||
`docs/features/perf5r-publication/README.md`**
|
||||
|
||||
### 61.5 R3b + R3c — rename scope reuse (conditional)
|
||||
|
||||
Review §3 items 1–4, after 61.1's measurement of the 229 ms scope stage
|
||||
(parse / analysis / index assembly / allocation split). Request-local
|
||||
reuse of open documents' analyses and closed files' cached facts, tied
|
||||
to the selected source bytes, unsaved-buffer precedence kept, cross-file
|
||||
resolution rebuilt for the candidate workspace, a memory budget stated;
|
||||
the 51 ms warning pass profiled and tightened without changing a
|
||||
sentence; the selection set stays the correctness reference (P2d).
|
||||
- [x] lead ruling from 61.1's split: go / defer — **go — 34.3 %.** The
|
||||
tail rename's 242.4 ms scope stage is `lead` 0.4 + `kept` 133.5 +
|
||||
**`other` 83.1** + `merge` 23.4, where `other` is the 103 container
|
||||
files analysed for their index record and never read again; 83.1 /
|
||||
242.4 = 34.3 %, against a 30 % condition. Agreed by every other
|
||||
multi-file row (25.0 / 33.0 / 35.8 / 36.0 %, and **87.8 %** on the
|
||||
duplicate-module refusal); 0 % on the two rows where every selected
|
||||
file spells the name, which is the case the reuse is not for. The
|
||||
split is now shipped in the engine's trace (`IndexTrace`,
|
||||
`WarnTrace`), and a trace-only build put the inside of one analysis
|
||||
at **lex 34 %, parse 32 %, analyse 20 %, read-off 13 %** — the
|
||||
review's "parser versus index" question answered as *parser*. The
|
||||
49.7 ms warning pass is **84 % the macro-argument scan**, which is
|
||||
one per-file lex already shared by all five scans (§P2d): no
|
||||
duplicated work left in it, and retaining tokens instead is refused
|
||||
on the `clk_i` row's 1.9 GiB peak
|
||||
- [x] if go: the reuse, ≥ 20 % wire-time on the large rename at bounded
|
||||
peak RSS, ordinary / common-port / collision / macro-bind /
|
||||
hierarchical-tail / fallback cases compared, verifier untouched —
|
||||
**shipped as an engine door (`vlog_refactor::KnownFacts`) with one
|
||||
server implementation: a caller may hand back the index record it
|
||||
holds for exactly the bytes it is handing over, and the engine skips
|
||||
that file's parse. The tie is `IndexCache`'s own store entry —
|
||||
record and FNV-1a written by one read and compared in one function —
|
||||
never the workspace index's record, which carries no hash. No
|
||||
persistent decoded-analysis cache; nothing retained past the
|
||||
request; unsaved-buffer precedence falls out of the content key.
|
||||
Paired against `07ef771` with the order alternated per phase: tail
|
||||
**380.2 → 314.0 ms (−17.4 %)**, parses **240 → 137** = `(K − 103) +
|
||||
E`; fallback `clk_i` −17.4 %, conflict −18.8 %, new-name-many-uses
|
||||
−18.5 %, duplicate-module refusal **2 053 → 695 ms (−66.1 %, 3 975
|
||||
→ 14 parses)**; `aes` −0.5 %, extract refusal −0.7 %, resolves
|
||||
within ±1.4 %; peak RSS lower or level everywhere. Parity: 36 rows
|
||||
equal on fingerprint/message/status/counts/titles and **1 750
|
||||
warning sentences compared line by line** by a new `renamewarn`
|
||||
phase — identical. `check/` no diff. **The ≥ 20 % gate is missed at
|
||||
−17.4 %** against the paired reference (−21.2 % against the review's
|
||||
own 398.3 baseline; the absolute ≤ 318 ms form met at 314.0), and
|
||||
the remaining stage is named: the reuse's own **31.1 ms of store
|
||||
decode**, the price of the one-place tie. Collateral for the other
|
||||
refactorings **not taken** — measured nil, and reaching them needs a
|
||||
`_with` entry point in five files this lane does not own. Feature
|
||||
README `docs/features/perf5r-scope-reuse/`; 4 366 → 4 374 tests**
|
||||
- [x] QA — **PASS** (2026-09-09). The tie verified as one comparison
|
||||
(`entry_for`) fed by one store entry, never the workspace index;
|
||||
stale-disk, unsaved-buffer, misfiled-record and identical-content
|
||||
cross-path attacks all forgiven correctly; two sabotage variants
|
||||
(hash check removed; workspace-index record substituted) both caught
|
||||
by existing tests. Index equality re-checked at the query level
|
||||
(`defines`, `member`, `references_to`, `members_of_chain`,
|
||||
`hierarchical_declarations`) over a macro-table + re-export fixture.
|
||||
`check/` no diff; `(K-reused)+E` formula sabotage-verified. 36-row and
|
||||
1 750-sentence parity, and the 34.3 % go arithmetic, re-derived from
|
||||
raw evidence, not just read. Three QA-chosen renames (wildcard
|
||||
import, bind-visible name, two-level hierarchical tail) run directly
|
||||
against the real opentitan tree: byte-identical outcomes across
|
||||
no-reuse/full-reuse/half-reuse. One out-of-scope observation flagged
|
||||
separately (a bind-file's own occurrence going unedited/unwarned,
|
||||
reproducible at HEAD, unrelated to the reuse door). Full log:
|
||||
`docs/features/perf5r-scope-reuse/README.md`'s QA log.
|
||||
|
||||
### 61.6 Closing
|
||||
|
||||
- [x] `docs/perf/README.md` entry; topo for every contract amended; the
|
||||
review's status line; release 0.52.0 with assets verified — entry,
|
||||
topo and status lines done 2026-09-09; **0.52.0** released
|
||||
(b12e0cc, v0.52.0): 8 assets, the darwin-arm64 vsix at 0.52.0 with
|
||||
both binaries, `hierarchySections.js`, `extract.js`, no `*_test.js`.
|
||||
|
||||
## 62. The 0.52.0 review (Codex, 2026-09-09) — F1/F2/F3 and the next lanes
|
||||
|
||||
`docs/performance_052_review.md` (findings F1–F3, next actions 3–5) and
|
||||
`docs/052_implementation_plan.md` (the other agent's plan; its Phase 1
|
||||
was implemented in the tree before the lead saw it) are the spec; the
|
||||
tracker's "Follow-up findings" and N1–N3 rows are the ledger; evidence in
|
||||
`docs/perf/review-052-20260909/`. Same protocol as §60/§61.
|
||||
|
||||
### 62.1 F1 — directory aliases in the split startup scan (correctness)
|
||||
|
||||
The neighbourhood walk and the rest walk had separate visited sets, so a
|
||||
directory reachable by two spellings (`a_alias -> z_real`) was indexed
|
||||
twice at startup: two definition targets, a false "declared in more than
|
||||
one file" rename refusal, healed only by a rescan. Fix (the other agent +
|
||||
the lead's finishing lane): one `DirectoryTracker` shared across both
|
||||
walks; a pre-check that falls back to the single canonical walk when an
|
||||
alias sorts before the open folder or an ancestor; the `HEAD_WALK_MAX`
|
||||
fallback discards the head instead of unioning it; an alias found only
|
||||
by the rest walk requests an ordinary rescan so path spellings converge;
|
||||
the open-buffer alias check stats only same-named files.
|
||||
- [x] tracker shared, pre-check, fallback, conflict → rescan; `stats` 0
|
||||
on opentitan again; discovery and the 100-buffer cell unchanged
|
||||
- [x] fixtures: alias before / after / multiple / ancestor / sibling
|
||||
(outside the chain) / cycle / ignore rules / unsaved buffer /
|
||||
genuine duplicate declarations (still refused) — startup, rescan
|
||||
and restart agree on index paths, definitions and prepareRename
|
||||
- [x] QA: the matrix re-attacked, stat counts, numbers re-taken
|
||||
|
||||
### 62.2 F2 + F3 — the load probe (harness)
|
||||
|
||||
- [x] F2: a warm `scanload` cell primes an empty store untimed; per-trial
|
||||
cache hits/misses in the row; a warm trial with 0 hits is an error
|
||||
- [x] F3: scan completion stamped from the scan's own end event, not the
|
||||
request window; responses partitioned by it; arrival stamps kept
|
||||
- [x] QA: a brand-new store, a window longer than the scan
|
||||
|
||||
### 62.3 N1–N3 — deferred to loop 3 unless the owner asks
|
||||
|
||||
N1 the dirty-buffer parse (114 ms first-after-edit), N2 the retained-
|
||||
analysis parse work and the 31 ms facts decode, N3 the whole-index merge
|
||||
per publication. Filed with the review's baselines; not started.
|
||||
|
||||
### 62.4 Closing
|
||||
|
||||
- [ ] `docs/perf/README.md` note; topo (the walk tracker); release 0.53.0
|
||||
with assets verified
|
||||
+393
-19
@@ -2,7 +2,7 @@
|
||||
//! `.gitignore` subset documented in
|
||||
//! `docs/features/parallel-files/README.md`.
|
||||
|
||||
use std::collections::HashSet;
|
||||
use std::collections::HashMap;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
/// File extensions lucisv formats when walking a directory.
|
||||
@@ -48,27 +48,134 @@ pub fn collect_files(
|
||||
gitignore: bool,
|
||||
files: &mut Vec<PathBuf>,
|
||||
warn: &mut dyn FnMut(Warning),
|
||||
) -> Result<(), String> {
|
||||
collect_files_with(input, exclude, gitignore, &mut |path, _| files.push(path), warn)
|
||||
}
|
||||
|
||||
/// [`collect_files`] with the size the walk already read handed on beside each
|
||||
/// path.
|
||||
///
|
||||
/// The same walk, the same order, the same warnings — the only difference is
|
||||
/// where a file goes when it is found. A directory walk already calls
|
||||
/// `metadata` on every entry to answer "directory?", so the length is a field
|
||||
/// of a struct it holds anyway; a caller that has to know how big a file is —
|
||||
/// the server's `lucisv.index.maxFileSize` cap — would otherwise ask the
|
||||
/// filesystem the same question a second time, once per file.
|
||||
/// `docs/features/perf5r-first-answer/README.md` measured that second `stat`
|
||||
/// at 6.9 ms of a 165 ms discovery over 3 976 files — small, because the walk
|
||||
/// has just warmed every one of those inodes, and 3 976 system calls that buy
|
||||
/// a number already in hand all the same.
|
||||
///
|
||||
/// **`None` means the walk did not look.** `input` naming a file rather than a
|
||||
/// directory is handed straight over, exactly as [`collect_files`] hands it
|
||||
/// over, with no `metadata` call added to a path that never needed one — so a
|
||||
/// caller that wants a size there asks for it itself. Every path a *directory
|
||||
/// walk* yields carries `Some`.
|
||||
pub fn collect_files_with(
|
||||
input: &str,
|
||||
exclude: &[String],
|
||||
gitignore: bool,
|
||||
found: &mut dyn FnMut(PathBuf, Option<u64>),
|
||||
warn: &mut dyn FnMut(Warning),
|
||||
) -> Result<(), String> {
|
||||
let mut tracker = DirectoryTracker::new();
|
||||
collect_files_tracked(input, exclude, gitignore, &mut tracker, found, warn)
|
||||
}
|
||||
|
||||
/// [`collect_files_with`] using an existing [`DirectoryTracker`].
|
||||
pub fn collect_files_tracked(
|
||||
input: &str,
|
||||
exclude: &[String],
|
||||
gitignore: bool,
|
||||
tracker: &mut DirectoryTracker,
|
||||
found: &mut dyn FnMut(PathBuf, Option<u64>),
|
||||
warn: &mut dyn FnMut(Warning),
|
||||
) -> Result<(), String> {
|
||||
let path = Path::new(input);
|
||||
if path.is_dir() {
|
||||
let mut walk = Walk {
|
||||
exclude,
|
||||
gitignore,
|
||||
ignores: Vec::new(),
|
||||
rel: Vec::new(),
|
||||
visited: HashSet::new(),
|
||||
files,
|
||||
warn,
|
||||
};
|
||||
let mut walk =
|
||||
Walk { exclude, gitignore, ignores: Vec::new(), rel: Vec::new(), tracker, found, warn };
|
||||
walk.dir(path);
|
||||
} else if path.is_file() {
|
||||
files.push(path.to_path_buf());
|
||||
found(path.to_path_buf(), None);
|
||||
} else {
|
||||
return Err(format!("{input}: no such file or directory"));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// [`collect_files_with`] over `input`, which lies **under** `root`, finding
|
||||
/// exactly what a walk of `root` would have found there.
|
||||
///
|
||||
/// The difference from walking `input` directly is the `.gitignore` files
|
||||
/// between the two. A walk reads ignore rules from its own starting directory
|
||||
/// downwards, so `collect_files_with("<root>/hw/ip/aes")` never sees the rule
|
||||
/// `<root>/.gitignore` writes about `hw/ip/aes/gen/` — and a caller walking a
|
||||
/// subtree *of a scope whose rung is the root* would then index files that
|
||||
/// scope excludes. This one walks the ancestor chain first: it reads each
|
||||
/// ancestor's `.gitignore` onto the stack with the depth it belongs at, and it
|
||||
/// stops without yielding anything when one of those ancestors is itself
|
||||
/// ignored or excluded — because a walk of `root` would never have descended
|
||||
/// into it.
|
||||
///
|
||||
/// `input` not being under `root` is the caller's mistake and is answered the
|
||||
/// way a walk of an unknown path is: nothing found, and no error, since there
|
||||
/// is no ancestor chain to apply.
|
||||
///
|
||||
/// Everything else is [`collect_files_with`]: the same order, the same cycle
|
||||
/// guard, the same warnings, the same lengths.
|
||||
pub fn collect_files_below(
|
||||
root: &Path,
|
||||
input: &Path,
|
||||
exclude: &[String],
|
||||
gitignore: bool,
|
||||
found: &mut dyn FnMut(PathBuf, Option<u64>),
|
||||
warn: &mut dyn FnMut(Warning),
|
||||
) -> Result<(), String> {
|
||||
let mut tracker = DirectoryTracker::new();
|
||||
collect_files_below_tracked(root, input, exclude, gitignore, &mut tracker, found, warn)
|
||||
}
|
||||
|
||||
/// [`collect_files_below`] using an existing [`DirectoryTracker`].
|
||||
pub fn collect_files_below_tracked(
|
||||
root: &Path,
|
||||
input: &Path,
|
||||
exclude: &[String],
|
||||
gitignore: bool,
|
||||
tracker: &mut DirectoryTracker,
|
||||
found: &mut dyn FnMut(PathBuf, Option<u64>),
|
||||
warn: &mut dyn FnMut(Warning),
|
||||
) -> Result<(), String> {
|
||||
let Ok(below) = input.strip_prefix(root) else { return Ok(()) };
|
||||
if !input.is_dir() {
|
||||
return Err(format!("{}: no such file or directory", input.display()));
|
||||
}
|
||||
let mut walk =
|
||||
Walk { exclude, gitignore, ignores: Vec::new(), rel: Vec::new(), tracker, found, warn };
|
||||
// The root's own `.gitignore` sits at depth 0, exactly where a walk of the
|
||||
// root would have put it.
|
||||
walk.push_ignore(root);
|
||||
let mut here = root.to_path_buf();
|
||||
let names: Vec<String> = below.iter().map(|name| name.to_string_lossy().into_owned()).collect();
|
||||
for (at, name) in names.iter().enumerate() {
|
||||
here.push(name);
|
||||
if is_excluded(&here, exclude) {
|
||||
return Ok(());
|
||||
}
|
||||
walk.rel.push(name.clone());
|
||||
if is_ignored(&walk.ignores, &walk.rel, true) {
|
||||
return Ok(());
|
||||
}
|
||||
// Not `input`'s own — `Walk::dir` pushes that one itself, and pushing
|
||||
// it twice would apply its rules at two different depths.
|
||||
if at + 1 < names.len() {
|
||||
walk.push_ignore(&here);
|
||||
}
|
||||
}
|
||||
walk.dir(input);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// How a directory is recognised as one the walk has already entered. Two
|
||||
/// names for the same directory — a symlink and its target, or two symlinks
|
||||
/// pointing at one place — must map to the same identity, or a cycle has no
|
||||
@@ -76,24 +183,78 @@ pub fn collect_files(
|
||||
/// elsewhere it is the canonical path, which resolves symlinks the same way
|
||||
/// at the cost of a real path lookup.
|
||||
#[cfg(unix)]
|
||||
type DirId = (u64, u64);
|
||||
pub type DirId = (u64, u64);
|
||||
#[cfg(not(unix))]
|
||||
type DirId = PathBuf;
|
||||
pub type DirId = PathBuf;
|
||||
|
||||
/// The identity of the directory at `path`, or `None` when it cannot be
|
||||
/// read — a dangling symlink, or a directory that vanished mid-walk.
|
||||
#[cfg(unix)]
|
||||
fn dir_id(path: &Path) -> Option<DirId> {
|
||||
pub fn dir_id(path: &Path) -> Option<DirId> {
|
||||
use std::os::unix::fs::MetadataExt;
|
||||
let meta = std::fs::metadata(path).ok()?;
|
||||
Some((meta.dev(), meta.ino()))
|
||||
}
|
||||
|
||||
#[cfg(not(unix))]
|
||||
fn dir_id(path: &Path) -> Option<DirId> {
|
||||
pub fn dir_id(path: &Path) -> Option<DirId> {
|
||||
std::fs::canonicalize(path).ok()
|
||||
}
|
||||
|
||||
/// What happened when attempting to enter a directory with [`DirectoryTracker`].
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum DirStatus {
|
||||
/// Entered for the first time.
|
||||
EnteredFirstTime,
|
||||
/// Already visited under the same or an earlier path.
|
||||
AlreadyVisited,
|
||||
/// Previously entered under `recorded`, but `dir < recorded` indicating
|
||||
/// out-of-order traversal relative to a canonical root walk.
|
||||
PrecedenceConflict { recorded: PathBuf },
|
||||
}
|
||||
|
||||
/// Tracks visited directories across one or more walks to ensure cycle termination
|
||||
/// and detect order divergence.
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct DirectoryTracker {
|
||||
visited: HashMap<DirId, PathBuf>,
|
||||
has_conflict: bool,
|
||||
}
|
||||
|
||||
impl DirectoryTracker {
|
||||
/// Creates an empty directory tracker.
|
||||
pub fn new() -> Self {
|
||||
Self::default()
|
||||
}
|
||||
|
||||
/// Records `dir` as entered and returns its [`DirStatus`].
|
||||
pub fn enter(&mut self, dir: &Path) -> DirStatus {
|
||||
let Some(id) = dir_id(dir) else {
|
||||
return DirStatus::AlreadyVisited;
|
||||
};
|
||||
match self.visited.entry(id) {
|
||||
std::collections::hash_map::Entry::Vacant(v) => {
|
||||
v.insert(dir.to_path_buf());
|
||||
DirStatus::EnteredFirstTime
|
||||
}
|
||||
std::collections::hash_map::Entry::Occupied(o) => {
|
||||
let recorded = o.get();
|
||||
if dir < recorded.as_path() {
|
||||
self.has_conflict = true;
|
||||
DirStatus::PrecedenceConflict { recorded: recorded.clone() }
|
||||
} else {
|
||||
DirStatus::AlreadyVisited
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether any precedence conflict was observed across walks.
|
||||
pub fn has_conflict(&self) -> bool {
|
||||
self.has_conflict
|
||||
}
|
||||
}
|
||||
|
||||
/// True when `path` names one of the source files lucisv formats.
|
||||
fn is_source(path: &Path) -> bool {
|
||||
path.extension().and_then(|e| e.to_str()).is_some_and(|ext| EXTENSIONS.contains(&ext))
|
||||
@@ -109,8 +270,10 @@ struct Walk<'a> {
|
||||
gitignore: bool,
|
||||
ignores: Vec<Ignore>,
|
||||
rel: Vec<String>,
|
||||
visited: HashSet<DirId>,
|
||||
files: &'a mut Vec<PathBuf>,
|
||||
tracker: &'a mut DirectoryTracker,
|
||||
/// Where a source file goes when the walk finds one, with the length the
|
||||
/// walk's own `metadata` call already read.
|
||||
found: &'a mut dyn FnMut(PathBuf, Option<u64>),
|
||||
warn: &'a mut dyn FnMut(Warning),
|
||||
}
|
||||
|
||||
@@ -169,7 +332,10 @@ impl Walk<'_> {
|
||||
if meta.is_dir() {
|
||||
self.dir(&path);
|
||||
} else if meta.is_file() && is_source(&path) {
|
||||
self.files.push(path);
|
||||
// The length comes off the `metadata` above — the same
|
||||
// call that answered "directory?" — so a caller wanting it
|
||||
// costs the walk nothing at all.
|
||||
(self.found)(path, Some(meta.len()));
|
||||
}
|
||||
}
|
||||
self.rel.pop();
|
||||
@@ -192,7 +358,7 @@ impl Walk<'_> {
|
||||
///
|
||||
/// A directory whose identity cannot be read is not entered.
|
||||
fn enter(&mut self, dir: &Path) -> bool {
|
||||
dir_id(dir).is_some_and(|id| self.visited.insert(id))
|
||||
matches!(self.tracker.enter(dir), DirStatus::EnteredFirstTime)
|
||||
}
|
||||
|
||||
/// Reads `dir`'s `.gitignore`, if there is one, onto the rule stack.
|
||||
@@ -680,6 +846,181 @@ mod tests {
|
||||
assert_eq!(tree.walk(""), ["keep.sv"]);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// The metadata hand-off — `docs/features/perf5r-first-answer/README.md`
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
/// Every path `collect_files_with` yields under `rel`, with its length.
|
||||
#[cfg(unix)]
|
||||
fn walked_with(tree: &TempTree, rel: &str) -> Vec<(String, Option<u64>)> {
|
||||
let start = if rel.is_empty() { tree.path.clone() } else { tree.path.join(rel) };
|
||||
let mut out = Vec::new();
|
||||
collect_files_with(
|
||||
start.to_str().expect("utf-8 temp path"),
|
||||
&[],
|
||||
true,
|
||||
&mut |path, len| out.push((tree.rel_of(&path), len)),
|
||||
&mut |_| {},
|
||||
)
|
||||
.expect("the walk finishes");
|
||||
out
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn the_metadata_entry_yields_exactly_the_paths_the_plain_one_does() {
|
||||
// The claim the server's cap rests on: `collect_files` is
|
||||
// `collect_files_with` with the length thrown away, so the two cannot
|
||||
// disagree about which files exist — not about order, not about
|
||||
// `.gitignore`, not about a symlink cycle, not about a broken link.
|
||||
let tree = TempTree::new("handoffsame");
|
||||
tree.write(".gitignore", "build\n");
|
||||
tree.source("a.sv");
|
||||
tree.source("rtl/b.sv");
|
||||
tree.source("rtl/deep/c.svh");
|
||||
tree.source("build/hidden.sv");
|
||||
tree.write("rtl/notsource.txt", "x");
|
||||
tree.link("rtl/loop", "..");
|
||||
tree.link("rtl/dangling.sv", "nowhere.sv");
|
||||
|
||||
let mut plain = Vec::new();
|
||||
collect_files(tree.path.to_str().expect("utf-8"), &[], true, &mut plain, &mut |_| {})
|
||||
.expect("the walk finishes");
|
||||
let plain: Vec<String> = plain.iter().map(|p| tree.rel_of(p)).collect();
|
||||
let handed: Vec<String> =
|
||||
walked_with(&tree, "").into_iter().map(|(path, _)| path).collect();
|
||||
assert_eq!(plain, handed, "the same paths in the same order, byte for byte");
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn a_walked_file_carries_the_length_the_walk_already_read() {
|
||||
let tree = TempTree::new("handofflen");
|
||||
tree.write("small.sv", "module m;\nendmodule\n");
|
||||
tree.write("big.sv", &"// pad\n".repeat(500));
|
||||
let found = walked_with(&tree, "");
|
||||
let sizes: Vec<(String, Option<u64>)> = found;
|
||||
assert_eq!(
|
||||
sizes,
|
||||
[("big.sv".to_string(), Some(3_500)), ("small.sv".to_string(), Some(20))],
|
||||
"the length is the file's own, not a guess"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn a_path_named_directly_is_handed_over_without_a_stat() {
|
||||
// `None` is the walk saying it did not look — the file was named, not
|
||||
// walked to, and adding a `metadata` call for it would be a cost
|
||||
// `collect_files` never paid.
|
||||
let tree = TempTree::new("handoffnamed");
|
||||
tree.source("one.sv");
|
||||
let found = walked_with(&tree, "one.sv");
|
||||
assert_eq!(found, [("one.sv".to_string(), None)]);
|
||||
}
|
||||
|
||||
/// What `collect_files_below(root, root/rel)` finds, relative to the tree.
|
||||
#[cfg(unix)]
|
||||
fn below(tree: &TempTree, rel: &str, exclude: &[&str]) -> Vec<String> {
|
||||
let patterns: Vec<String> = exclude.iter().map(|p| p.to_string()).collect();
|
||||
let mut out = Vec::new();
|
||||
collect_files_below(
|
||||
&tree.path,
|
||||
&tree.path.join(rel),
|
||||
&patterns,
|
||||
true,
|
||||
&mut |path, _| out.push(tree.rel_of(&path)),
|
||||
&mut |_| {},
|
||||
)
|
||||
.expect("the walk finishes");
|
||||
out.sort();
|
||||
out
|
||||
}
|
||||
|
||||
/// What a walk of the whole tree finds under `rel` — the answer `below`
|
||||
/// has to reproduce.
|
||||
#[cfg(unix)]
|
||||
fn whole_under(tree: &TempTree, rel: &str, exclude: &[&str]) -> Vec<String> {
|
||||
let patterns: Vec<String> = exclude.iter().map(|p| p.to_string()).collect();
|
||||
let mut out = Vec::new();
|
||||
collect_files(tree.path.to_str().expect("utf-8"), &patterns, true, &mut out, &mut |_| {})
|
||||
.expect("the walk finishes");
|
||||
let prefix = format!("{rel}/");
|
||||
let mut under: Vec<String> =
|
||||
out.iter().map(|p| tree.rel_of(p)).filter(|p| p.starts_with(&prefix)).collect();
|
||||
under.sort();
|
||||
under
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn a_walk_that_starts_below_a_root_still_obeys_that_roots_gitignore() {
|
||||
// The whole reason `collect_files_below` exists. Starting the walk at
|
||||
// `hw/ip/aes` loses every rule written above it, and a scope whose
|
||||
// rung *is* the root would then index files that scope excludes.
|
||||
let tree = TempTree::new("belowignore");
|
||||
tree.write(".gitignore", "gen/\n*_generated.sv\n");
|
||||
tree.write("hw/.gitignore", "vendor/\n");
|
||||
tree.source("hw/ip/aes/rtl/aes.sv");
|
||||
tree.source("hw/ip/aes/rtl/aes_generated.sv");
|
||||
tree.source("hw/ip/aes/gen/made.sv");
|
||||
tree.source("hw/ip/aes/vendor/third.sv");
|
||||
tree.source("hw/ip/aes/dv/tb.sv");
|
||||
|
||||
let seen = below(&tree, "hw/ip/aes", &[]);
|
||||
assert_eq!(seen, ["hw/ip/aes/dv/tb.sv", "hw/ip/aes/rtl/aes.sv"]);
|
||||
assert_eq!(seen, whole_under(&tree, "hw/ip/aes", &[]), "the root walk agrees");
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn a_directory_the_root_walk_never_entered_yields_nothing_below_it() {
|
||||
// An ancestor the root's own rules ignore is an ancestor the root walk
|
||||
// never descended into, so nothing under it is in scope however
|
||||
// directly it is named.
|
||||
let tree = TempTree::new("belowblocked");
|
||||
tree.write(".gitignore", "hw/vendor/\n");
|
||||
tree.source("hw/vendor/ip/aes/aes.sv");
|
||||
tree.source("hw/ip/aes/aes.sv");
|
||||
assert!(below(&tree, "hw/vendor/ip/aes", &[]).is_empty());
|
||||
assert_eq!(below(&tree, "hw/ip/aes", &[]), ["hw/ip/aes/aes.sv"]);
|
||||
// An excluded ancestor is the same answer by the other filter.
|
||||
assert!(below(&tree, "hw/ip/aes", &["ip"]).is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn a_negation_below_the_root_still_wins_over_the_root_rule() {
|
||||
// The precedence a root walk gives — deeper file last, so its `!` line
|
||||
// re-includes — must survive the ancestor chain being pre-loaded.
|
||||
let tree = TempTree::new("belownegate");
|
||||
tree.write(".gitignore", "*.sv\n");
|
||||
tree.write("hw/ip/aes/.gitignore", "!keep.sv\n");
|
||||
tree.source("hw/ip/aes/keep.sv");
|
||||
tree.source("hw/ip/aes/drop.sv");
|
||||
let seen = below(&tree, "hw/ip/aes", &[]);
|
||||
assert_eq!(seen, ["hw/ip/aes/keep.sv"]);
|
||||
assert_eq!(seen, whole_under(&tree, "hw/ip/aes", &[]), "the root walk agrees");
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn a_start_that_is_not_under_the_root_finds_nothing() {
|
||||
let tree = TempTree::new("belowoutside");
|
||||
tree.source("a/x.sv");
|
||||
let mut out = Vec::new();
|
||||
collect_files_below(
|
||||
&tree.path.join("a"),
|
||||
&tree.path,
|
||||
&[],
|
||||
true,
|
||||
&mut |path, _| out.push(path),
|
||||
&mut |_| {},
|
||||
)
|
||||
.expect("no error, nothing found");
|
||||
assert!(out.is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn unsupported_syntax_degrades_to_plain_globbing() {
|
||||
// `**` is just two stars inside one component; documented.
|
||||
@@ -689,4 +1030,37 @@ mod tests {
|
||||
assert!(ignored("x?.sv", "x?.sv"));
|
||||
assert!(!ignored("x?.sv", "xa.sv"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn tracker_detects_precedence_conflict_when_alias_sorts_before() {
|
||||
let tree = TempTree::new("trackconflict");
|
||||
tree.source("z_real/child.sv");
|
||||
tree.link("a_alias", "z_real");
|
||||
|
||||
let mut tracker = DirectoryTracker::new();
|
||||
assert_eq!(tracker.enter(&tree.path.join("z_real")), DirStatus::EnteredFirstTime);
|
||||
assert!(!tracker.has_conflict());
|
||||
|
||||
// Entering a_alias afterwards detects that a_alias sorts before z_real
|
||||
let status = tracker.enter(&tree.path.join("a_alias"));
|
||||
assert!(matches!(status, DirStatus::PrecedenceConflict { .. }));
|
||||
assert!(tracker.has_conflict());
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn tracker_allows_alias_sorting_after_without_conflict() {
|
||||
let tree = TempTree::new("trackorder");
|
||||
tree.source("a_real/child.sv");
|
||||
tree.link("z_alias", "a_real");
|
||||
|
||||
let mut tracker = DirectoryTracker::new();
|
||||
assert_eq!(tracker.enter(&tree.path.join("a_real")), DirStatus::EnteredFirstTime);
|
||||
assert!(!tracker.has_conflict());
|
||||
|
||||
// Entering z_alias afterwards: already visited, no precedence conflict
|
||||
assert_eq!(tracker.enter(&tree.path.join("z_alias")), DirStatus::AlreadyVisited);
|
||||
assert!(!tracker.has_conflict());
|
||||
}
|
||||
}
|
||||
@@ -33,19 +33,36 @@ pub fn code_actions(
|
||||
doc: &Document,
|
||||
range: Range,
|
||||
only: Option<&[CodeActionKind]>,
|
||||
tab_width: usize,
|
||||
) -> Vec<CodeActionOrCommand> {
|
||||
let violations = crate::lint::fixable(run, doc);
|
||||
// Timed apart from the lint pass that found them: a menu that is slow
|
||||
// because it *renders* a thousand fixes is a different problem from one
|
||||
// that is slow because it found them (review round §R1b).
|
||||
let actions = crate::lint_trace::stage(crate::lint_trace::Stage::Serialize, || {
|
||||
offered(uri, doc, range, only, &violations)
|
||||
});
|
||||
crate::lint_trace::saw_actions(actions.len());
|
||||
actions
|
||||
}
|
||||
|
||||
/// The quick fixes and the fix-all action `only` asks for, built from
|
||||
/// violations already found.
|
||||
fn offered(
|
||||
uri: &Uri,
|
||||
doc: &Document,
|
||||
range: Range,
|
||||
only: Option<&[CodeActionKind]>,
|
||||
violations: &[Violation],
|
||||
) -> Vec<CodeActionOrCommand> {
|
||||
let positions = doc.positions();
|
||||
let violations = crate::lint::fixable(run, doc, tab_width);
|
||||
let mut actions = Vec::new();
|
||||
if wanted(only, &CodeActionKind::QUICKFIX) {
|
||||
let quick = violations.iter().filter_map(|v| quick_fix(uri, &positions, v, range));
|
||||
actions.extend(quick.map(CodeActionOrCommand::CodeAction));
|
||||
}
|
||||
if wanted(only, &CodeActionKind::new(FIX_ALL)) {
|
||||
actions.extend(
|
||||
fix_all(uri, doc, &positions, &violations).map(CodeActionOrCommand::CodeAction),
|
||||
);
|
||||
actions
|
||||
.extend(fix_all(uri, doc, &positions, violations).map(CodeActionOrCommand::CodeAction));
|
||||
}
|
||||
actions
|
||||
}
|
||||
@@ -184,7 +201,7 @@ mod tests {
|
||||
fn actions_of(ws: &Workspace) -> Vec<CodeAction> {
|
||||
let doc = ws.document(&uri()).expect("open");
|
||||
let whole = doc.positions().whole_document();
|
||||
code_actions(&LintRun::default(), &uri(), doc, whole, None, 2)
|
||||
code_actions(&LintRun::default(), &uri(), doc, whole, None)
|
||||
.into_iter()
|
||||
.map(|a| match a {
|
||||
CodeActionOrCommand::CodeAction(action) => action,
|
||||
@@ -268,7 +285,6 @@ mod tests {
|
||||
doc,
|
||||
line1,
|
||||
Some(&[CodeActionKind::QUICKFIX]),
|
||||
2,
|
||||
);
|
||||
assert_eq!(actions.len(), 1, "the cursor's line only: {actions:#?}");
|
||||
}
|
||||
@@ -341,14 +357,8 @@ mod tests {
|
||||
start: Position { line: fenced_line, character: 0 },
|
||||
end: Position { line: fenced_line, character: 0 },
|
||||
};
|
||||
let actions = code_actions(
|
||||
&LintRun::default(),
|
||||
&uri(),
|
||||
doc,
|
||||
at,
|
||||
Some(&[CodeActionKind::QUICKFIX]),
|
||||
2,
|
||||
);
|
||||
let actions =
|
||||
code_actions(&LintRun::default(), &uri(), doc, at, Some(&[CodeActionKind::QUICKFIX]));
|
||||
assert!(actions.is_empty(), "no quick fix inside a fence: {actions:#?}");
|
||||
// The unfenced tab one line further down still has one.
|
||||
let at = Range {
|
||||
@@ -356,15 +366,8 @@ mod tests {
|
||||
end: Position { line: 4, character: 0 },
|
||||
};
|
||||
assert_eq!(
|
||||
code_actions(
|
||||
&LintRun::default(),
|
||||
&uri(),
|
||||
doc,
|
||||
at,
|
||||
Some(&[CodeActionKind::QUICKFIX]),
|
||||
2
|
||||
)
|
||||
.len(),
|
||||
code_actions(&LintRun::default(), &uri(), doc, at, Some(&[CodeActionKind::QUICKFIX]),)
|
||||
.len(),
|
||||
1
|
||||
);
|
||||
}
|
||||
@@ -409,19 +412,14 @@ mod tests {
|
||||
let doc = ws.document(&uri()).expect("open");
|
||||
let whole = doc.positions().whole_document();
|
||||
let fix_all_only = [CodeActionKind::new(FIX_ALL)];
|
||||
let actions = code_actions(&LintRun::default(), &uri(), doc, whole, Some(&fix_all_only), 2);
|
||||
let actions = code_actions(&LintRun::default(), &uri(), doc, whole, Some(&fix_all_only));
|
||||
assert_eq!(actions.len(), 1, "no quick fixes when only fixAll was asked for");
|
||||
// `source` is a prefix filter for `source.fixAll.lucisv`.
|
||||
let source = [CodeActionKind::SOURCE];
|
||||
assert_eq!(
|
||||
code_actions(&LintRun::default(), &uri(), doc, whole, Some(&source), 2).len(),
|
||||
1
|
||||
);
|
||||
assert_eq!(code_actions(&LintRun::default(), &uri(), doc, whole, Some(&source)).len(), 1);
|
||||
// And an unrelated filter selects nothing.
|
||||
let refactor = [CodeActionKind::REFACTOR];
|
||||
assert!(
|
||||
code_actions(&LintRun::default(), &uri(), doc, whole, Some(&refactor), 2).is_empty()
|
||||
);
|
||||
assert!(code_actions(&LintRun::default(), &uri(), doc, whole, Some(&refactor)).is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -431,12 +429,11 @@ mod tests {
|
||||
let doc = ws.document(&uri()).expect("open");
|
||||
let whole = doc.positions().whole_document();
|
||||
let actions = code_actions(
|
||||
&LintRun::default(),
|
||||
&LintRun::default().with_tab_width(4),
|
||||
&uri(),
|
||||
doc,
|
||||
whole,
|
||||
Some(&[CodeActionKind::QUICKFIX]),
|
||||
4,
|
||||
);
|
||||
let CodeActionOrCommand::CodeAction(fix) = &actions[0] else { panic!("an action") };
|
||||
assert_eq!(applied(text, fix), "module m;\n wire a;\nendmodule\n");
|
||||
@@ -467,18 +464,14 @@ mod tests {
|
||||
let ws = workspace(src);
|
||||
let doc = ws.document(&uri()).expect("open");
|
||||
let whole = doc.positions().whole_document();
|
||||
let (external, problems) = vlog_linter::ExternalWaivers::parse(
|
||||
std::path::Path::new("team.waiver"),
|
||||
"waive --rule=no-tabs\n",
|
||||
);
|
||||
assert!(problems.is_empty(), "{problems:?}");
|
||||
let waived = LintRun::default().with_external(external);
|
||||
let waived = LintRun::default()
|
||||
.with_waivers(std::path::Path::new("team.waiver"), "waive --rule=no-tabs\n");
|
||||
assert!(
|
||||
code_actions(&waived, &uri(), doc, whole, None, 2).is_empty(),
|
||||
code_actions(&waived, &uri(), doc, whole, None).is_empty(),
|
||||
"no quick fix and no fix-all for a waived finding"
|
||||
);
|
||||
assert!(
|
||||
!code_actions(&LintRun::default(), &uri(), doc, whole, None, 2).is_empty(),
|
||||
!code_actions(&LintRun::default(), &uri(), doc, whole, None).is_empty(),
|
||||
"the same buffer without the waiver is fixable"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -137,6 +137,16 @@ pub fn execute(
|
||||
true => Home::NewFile,
|
||||
false => Home::SameFile,
|
||||
};
|
||||
// No preflight here, and the take 5 review round (§61.1) is why: every
|
||||
// refusal one could take is already taken before a scope is built. The
|
||||
// `site_at` gate above **is** `extract_site_in`, which returns `None` on a
|
||||
// parse diagnostic and on every `Region::read` refusal, so neither can
|
||||
// reach the engine; and `extract_module` checks the new name and the
|
||||
// occupied target as its own first two statements, ahead of
|
||||
// `Extraction::plan`. The 805 ms at `aes_wrap.sv` is none of those — it is
|
||||
// `boundary::Crossing::read`, which needs the instantiated modules' port
|
||||
// directions and so needs the scope. See
|
||||
// `docs/features/perf5r-preflight/README.md`.
|
||||
let refactoring = vlog_refactor::extract_module(&files, &path, start, end, &name, home)?;
|
||||
Ok((workspace_edit(ws, &refactoring)?, refactoring.warnings))
|
||||
}
|
||||
@@ -381,4 +391,76 @@ endmodule
|
||||
assert!(crate::code_action::wanted(Some(&filter), &kind()));
|
||||
assert!(!crate::code_action::wanted(Some(&filter), &CodeActionKind::QUICKFIX));
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// Where the extract refusals are actually taken (take 5 review §3 item 5,
|
||||
// TODO §61.1). No preflight was added — every refusal below is already
|
||||
// reached before a scope exists, and these pin that it stays so.
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
fn run(
|
||||
ws: &Workspace,
|
||||
uri: &Uri,
|
||||
range: Range,
|
||||
name: &str,
|
||||
create: bool,
|
||||
) -> Result<(), String> {
|
||||
let arguments = vec![
|
||||
serde_json::to_value(uri).expect("uri"),
|
||||
serde_json::to_value(range).expect("range"),
|
||||
Value::String(name.to_string()),
|
||||
];
|
||||
execute(ws, &arguments, create).map(|_| ())
|
||||
}
|
||||
|
||||
/// A bad new name is refused by `extract_module`'s own first statement,
|
||||
/// and a selection covering no whole item is refused by the `site_at` gate
|
||||
/// — neither reaches `Extraction::plan`, so neither builds a scope.
|
||||
#[test]
|
||||
fn the_cheap_refusals_reach_the_wire_in_the_engines_words() {
|
||||
let tree = Tree::new("preflightrefusals");
|
||||
let (ws, uri) = opened(&tree);
|
||||
|
||||
let bad = run(&ws, &uri, selection(), "1bad", true).expect_err("a bad name");
|
||||
assert!(bad.contains("plain SystemVerilog identifier"), "{bad}");
|
||||
|
||||
// Half of `assign s = a + b;`, which covers no whole item.
|
||||
let partial = Range {
|
||||
start: Position { line: 6, character: 6 },
|
||||
end: Position { line: 6, character: 19 },
|
||||
};
|
||||
assert_eq!(
|
||||
run(&ws, &uri, partial, "sum", true),
|
||||
Err(NOTHING.to_string()),
|
||||
"the `site_at` gate answers a partial selection before the engine is asked"
|
||||
);
|
||||
}
|
||||
|
||||
/// A file already sitting where the new module would go is refused before
|
||||
/// `Extraction::plan`, and the question is asked of the source set the
|
||||
/// engine was handed rather than of the disk behind its back.
|
||||
#[test]
|
||||
fn an_occupied_target_is_refused_with_the_engines_sentence() {
|
||||
let tree = Tree::new("preflightoccupied");
|
||||
tree.write("sum.sv", "module sum;\nendmodule\n");
|
||||
let (ws, uri) = opened(&tree);
|
||||
let refusal = run(&ws, &uri, selection(), "sum", true).expect_err("occupied");
|
||||
assert!(refusal.contains("there is already a"), "{refusal}");
|
||||
assert!(refusal.contains("sum.sv"), "and it names the file: {refusal}");
|
||||
|
||||
// Into the same file nothing is occupied, so the early check passes
|
||||
// and the engine refuses for its own, later reason: the workspace
|
||||
// already declares that name — an index question, answered by the
|
||||
// stage that owns the index.
|
||||
let deferred = run(&ws, &uri, selection(), "sum", false).expect_err("already declared");
|
||||
assert!(deferred.contains("the workspace already declares"), "{deferred}");
|
||||
}
|
||||
|
||||
/// The control: a whole, movable item still extracts.
|
||||
#[test]
|
||||
fn a_whole_movable_selection_still_extracts() {
|
||||
let tree = Tree::new("preflightok");
|
||||
let (ws, uri) = opened(&tree);
|
||||
assert!(run(&ws, &uri, selection(), "sum", true).is_ok());
|
||||
}
|
||||
}
|
||||
@@ -31,3 +31,10 @@ use crate::state::Document;
|
||||
pub fn of(doc: &Document) -> &[Region] {
|
||||
doc.fences.get_or_init(|| fence::protected_regions(&doc.text))
|
||||
}
|
||||
|
||||
/// Whether the answer is already in hand — asked *before* [`of`], so a
|
||||
/// `--verbose` trace can say whether this request paid the parse or read the
|
||||
/// memo (review round §R1b, `crate::lint_trace`). Decides nothing.
|
||||
pub fn held(doc: &Document) -> bool {
|
||||
doc.fences.get().is_some()
|
||||
}
|
||||
@@ -215,6 +215,28 @@ impl IndexCache {
|
||||
self.dir.as_deref()
|
||||
}
|
||||
|
||||
/// The entry that asserts *exactly these bytes*, if there is one.
|
||||
///
|
||||
/// The one place the record and the key it is filed under are read
|
||||
/// together: an entry holds the FNV-1a of the bytes its facts were read
|
||||
/// off, and this is the only comparison anything in the server makes
|
||||
/// against it. Both readers below go through here, so "the store answers
|
||||
/// for this text" means one thing in a scan and in a refactoring alike.
|
||||
fn entry_for(&self, path: &Path, text: &str) -> Option<&Entry> {
|
||||
self.entries.get(path).filter(|entry| entry.content == content_hash(text.as_bytes()))
|
||||
}
|
||||
|
||||
/// [`IndexCache::facts_for`] asked by something that is **not** a scan.
|
||||
///
|
||||
/// The same question, the same entry, the same answer — but the work is
|
||||
/// not counted into [`IndexCache::work`], because that counter is what a
|
||||
/// scan's own trace subtracts to say what *it* did. A refactoring reading
|
||||
/// records between two scans would otherwise show up as decodes the next
|
||||
/// scan never made (review round §R3b, `crate::state::Workspace::known_facts`).
|
||||
pub fn facts_now(&self, path: &Path, text: &str) -> Option<FileFacts> {
|
||||
FileFacts::decode(&self.entry_for(path, text)?.facts)
|
||||
}
|
||||
|
||||
/// The facts a previous session read off this exact text, if it did.
|
||||
///
|
||||
/// The hash is of the text the server is about to index — an open buffer's
|
||||
@@ -226,8 +248,7 @@ impl IndexCache {
|
||||
/// gets here.
|
||||
pub fn facts_for(&self, path: &Path, text: &str) -> Option<FileFacts> {
|
||||
let looking = Instant::now();
|
||||
let found =
|
||||
self.entries.get(path).filter(|entry| entry.content == content_hash(text.as_bytes()));
|
||||
let found = self.entry_for(path, text);
|
||||
let mut work = self.work.get();
|
||||
work.lookup_ns += elapsed_ns(looking);
|
||||
let Some(entry) = found else {
|
||||
@@ -713,6 +734,42 @@ mod tests {
|
||||
assert!(reopened.facts_for(Path::new("/nowhere.sv"), M).is_none());
|
||||
}
|
||||
|
||||
/// **The R3b tie, both ways.** `facts_now` is the same content key
|
||||
/// `facts_for` is — a record answers for the bytes it was read off and for
|
||||
/// no others — and it leaves the scan's own work counters alone.
|
||||
///
|
||||
/// The stale case is the one that matters: a record written from one text
|
||||
/// must never be handed to a refactoring reading a different text, because
|
||||
/// the refactoring would index it as that file's facts and edit against an
|
||||
/// index describing bytes nobody has.
|
||||
#[test]
|
||||
fn a_request_local_read_answers_for_these_bytes_and_counts_as_no_scan_work() {
|
||||
let dir = TempDir::new("factsnow");
|
||||
let file = dir.file("m.sv", M);
|
||||
let mut cache = IndexCache::open(Some(dir.path.clone()));
|
||||
cache.record(&facts(&file, M), M);
|
||||
cache.compact();
|
||||
|
||||
let reopened = IndexCache::open(Some(dir.path.clone()));
|
||||
let before = reopened.work();
|
||||
assert_eq!(reopened.facts_now(&file, M), Some(facts(&file, M)), "these bytes");
|
||||
// Every way the bytes can differ, and the wrong path too.
|
||||
const EDITED: &str = "module m;\n sub u ();\n wire added;\nendmodule\n";
|
||||
assert!(reopened.facts_now(&file, EDITED).is_none(), "a stale record must not be served");
|
||||
assert!(reopened.facts_now(&file, "").is_none(), "nor an empty buffer's");
|
||||
assert!(reopened.facts_now(&file, &M[..M.len() - 1]).is_none(), "nor one byte short");
|
||||
assert!(reopened.facts_now(Path::new("/nowhere.sv"), M).is_none(), "nor another path's");
|
||||
let after = reopened.work();
|
||||
assert_eq!(
|
||||
(after.hits, after.misses, after.decode_ns, after.lookup_ns),
|
||||
(before.hits, before.misses, before.decode_ns, before.lookup_ns),
|
||||
"a refactoring's reads are not a scan's work"
|
||||
);
|
||||
// The counted reader, asked the same questions, answers the same way.
|
||||
assert_eq!(reopened.facts_for(&file, M), reopened.facts_now(&file, M));
|
||||
assert_eq!(reopened.facts_for(&file, EDITED), reopened.facts_now(&file, EDITED));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_record_survives_a_session_that_never_compacted() {
|
||||
// The crash case: records are written through as they are made, so a
|
||||
|
||||
@@ -23,6 +23,7 @@ pub use project::{ConfigProblems, ProblemLog, ProjectLint};
|
||||
|
||||
use std::collections::BTreeSet;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::Arc;
|
||||
|
||||
use lsp_types::{Diagnostic, DiagnosticSeverity, NumberOrString};
|
||||
use lucisv_core::config::FileConfig;
|
||||
@@ -35,6 +36,8 @@ use vlog_semantic::{FileId, SymbolKind, WorkspaceIndex};
|
||||
|
||||
use crate::convert::Positions;
|
||||
use crate::diagnostics::SOURCE;
|
||||
use crate::lint_snapshot::{Key, Slot};
|
||||
use crate::lint_trace::{self, Fences, Reuse, Stage};
|
||||
use crate::settings::ClientSettings;
|
||||
use crate::state::{Document, Workspace};
|
||||
|
||||
@@ -53,10 +56,29 @@ pub struct LintRun<'a> {
|
||||
/// The width `line-length` holds this buffer to — the width the formatter
|
||||
/// would wrap it to, so the two halves of lucisv cannot disagree.
|
||||
line_length: usize,
|
||||
/// The width a `no-tabs` fix writes where a tab was — the same ladder
|
||||
/// `format::indent_width` walks, read off the `FileConfig` this pass
|
||||
/// already discovered.
|
||||
///
|
||||
/// On the run rather than passed to [`fixable`] since the review round's
|
||||
/// §R1a: the diagnostics pass and the quick-fix pass must build the *same*
|
||||
/// `LintContext` to share one snapshot. Nothing published moves — the
|
||||
/// width reaches only `no-tabs`' fix *text*, and the diagnostics path
|
||||
/// never reads a fix.
|
||||
tab_width: usize,
|
||||
/// The external waiver files in force for this buffer, from its
|
||||
/// `lucisv.toml` and from `lucisv.lint.waivers`. Empty unless one is
|
||||
/// configured, and then costing the pass nothing.
|
||||
external: ExternalWaivers,
|
||||
/// Those files' paths and contents, in the order they were read — the
|
||||
/// snapshot key's row 7. Empty when no waiver file is configured.
|
||||
///
|
||||
/// **Written in the same step as `external`**, by `waiver_files` and by
|
||||
/// `with_waivers` and by nothing else, so a run can never carry a waiver
|
||||
/// its key cannot see. A run whose key missed a waiver would offer a fix
|
||||
/// for a finding the waiver had silenced, which is the stale-fix failure
|
||||
/// this whole key exists to prevent.
|
||||
waiver_texts: Vec<(PathBuf, String)>,
|
||||
/// What the buffer's `lucisv.toml` asked for and did not get. Reported by
|
||||
/// whoever can talk to the client — [`ProblemLog`] keeps it to once per
|
||||
/// (config file, message) — and never fatal here: §42.2.
|
||||
@@ -70,7 +92,9 @@ impl Default for LintRun<'_> {
|
||||
oracle: None,
|
||||
options: RuleOptions::new(),
|
||||
line_length: DEFAULT_LINE_LENGTH,
|
||||
tab_width: DEFAULT_TAB_WIDTH,
|
||||
external: ExternalWaivers::default(),
|
||||
waiver_texts: Vec::new(),
|
||||
problems: ConfigProblems::default(),
|
||||
}
|
||||
}
|
||||
@@ -80,6 +104,11 @@ impl Default for LintRun<'_> {
|
||||
/// editor says otherwise — `vlog_formatter::Config`'s own default.
|
||||
const DEFAULT_LINE_LENGTH: usize = 100;
|
||||
|
||||
/// The indent width a buffer's fixes are written at when neither its
|
||||
/// `lucisv.toml` nor the editor says otherwise — `vlog_formatter::Config`'s
|
||||
/// own default, which is what `format::indent_width` falls back to.
|
||||
const DEFAULT_TAB_WIDTH: usize = 2;
|
||||
|
||||
impl<'a> LintRun<'a> {
|
||||
/// The pass this workspace's settings and index describe for one buffer.
|
||||
///
|
||||
@@ -90,25 +119,12 @@ impl<'a> LintRun<'a> {
|
||||
/// cross-file evidence behind them, which is the false-positive mode this
|
||||
/// whole round exists to close.
|
||||
pub fn for_document(ws: &'a Workspace, doc: &Document) -> LintRun<'a> {
|
||||
let index = ws.index();
|
||||
let own = doc.path.as_deref().and_then(|path| index.file_id(path));
|
||||
let workspace = index.files().len() > usize::from(own.is_some());
|
||||
let oracle = workspace.then_some(IndexMentions { index, own });
|
||||
// One discovery for the whole pass: the selection, the options, the
|
||||
// width and the waiver paths all read the same `FileConfig`, so
|
||||
// reading the project's rules costs no extra stat and no extra open.
|
||||
let (options, line_length, file, mut messages) = configured(ws.client_settings(), doc);
|
||||
let (from_file, bad_names) = ProjectLint::read(&file);
|
||||
messages.extend(bad_names);
|
||||
let rules = enabled_rules(ws.client_settings(), &from_file, workspace);
|
||||
let (mut external, bad_waivers) = external_waivers(&project_waivers(&file));
|
||||
messages.extend(bad_waivers);
|
||||
// The editor's own waiver files are read separately and their
|
||||
// problems dropped: `notification::apply_settings` already said them
|
||||
// once, where the setting arrived.
|
||||
external.absorb(external_waivers(&editor_waivers(ws.client_settings(), ws.roots())).0);
|
||||
let problems = ConfigProblems::new(&file, messages);
|
||||
LintRun { rules, oracle, options, line_length, external, problems }
|
||||
// Two stages, so `--verbose` can say which of them the request spent
|
||||
// its milliseconds in: everything read from disk, then everything
|
||||
// decided from what was read (review round §R1b, `crate::lint_trace`).
|
||||
let found = lint_trace::stage(Stage::Config, || Discovered::read(ws, doc));
|
||||
lint_trace::saw_config(found.file.source.is_some(), found.texts.len());
|
||||
lint_trace::stage(Stage::Build, || found.into_run(ws, doc))
|
||||
}
|
||||
|
||||
/// What this buffer's `lucisv.toml` asked for and did not get, for a
|
||||
@@ -117,17 +133,53 @@ impl<'a> LintRun<'a> {
|
||||
&self.problems
|
||||
}
|
||||
|
||||
/// A run carrying these external waivers — for the tests that pin what a
|
||||
/// waiver keeps out of the code actions.
|
||||
/// A run carrying this waiver file — for the tests that pin what a waiver
|
||||
/// keeps out of the code actions.
|
||||
///
|
||||
/// Takes the file's **text**, not a parsed `ExternalWaivers`, for the same
|
||||
/// reason `waiver_files` returns both: the waivers a run lints with and
|
||||
/// the texts its snapshot key holds must be written in one step, or a run
|
||||
/// could carry waivers its key cannot see. The bad-line messages are
|
||||
/// dropped here; the caller asserts about them itself where it cares.
|
||||
#[cfg(test)]
|
||||
pub(crate) fn with_external(mut self, external: ExternalWaivers) -> Self {
|
||||
self.external = external;
|
||||
pub(crate) fn with_waivers(mut self, path: &Path, text: &str) -> Self {
|
||||
self.external.absorb(ExternalWaivers::parse(path, text).0);
|
||||
self.waiver_texts.push((path.to_path_buf(), text.to_string()));
|
||||
self
|
||||
}
|
||||
|
||||
/// A run whose fixes are written at this indent width — for the tests
|
||||
/// that pin what a `no-tabs` fix writes. The server itself reads the
|
||||
/// width off the buffer's own configuration in [`Discovered::read`].
|
||||
#[cfg(test)]
|
||||
pub(crate) fn with_tab_width(mut self, tab_width: usize) -> Self {
|
||||
self.tab_width = tab_width;
|
||||
self
|
||||
}
|
||||
|
||||
/// What this run would lint with, as the snapshot compares it.
|
||||
///
|
||||
/// Every field is an argument of the `lint_with` call it guards; the
|
||||
/// buffer itself and the workspace index are settled by identity and by
|
||||
/// `Document::refresh_overlay` instead. The feature README's table is the
|
||||
/// whole argument.
|
||||
fn key(&self) -> Key {
|
||||
Key {
|
||||
rules: self.rules.iter().map(|rule| rule.name()).collect(),
|
||||
options: self.options.clone(),
|
||||
line_length: self.line_length,
|
||||
tab_width: self.tab_width,
|
||||
has_oracle: self.oracle.is_some(),
|
||||
waivers: self.waiver_texts.clone(),
|
||||
}
|
||||
}
|
||||
|
||||
/// This run's context over a buffer's own parse products.
|
||||
fn context<'d>(&'d self, doc: &'d Document) -> LintContext<'d> {
|
||||
let ctx = context(doc).with_options(&self.options).with_line_length(self.line_length);
|
||||
let ctx = context(doc)
|
||||
.with_options(&self.options)
|
||||
.with_line_length(self.line_length)
|
||||
.with_tab_width(self.tab_width);
|
||||
match &self.oracle {
|
||||
Some(oracle) => ctx.with_oracle(oracle),
|
||||
None => ctx,
|
||||
@@ -135,6 +187,76 @@ impl<'a> LintRun<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Everything one lint pass reads **from disk**: the `lucisv.toml` governing
|
||||
/// the buffer, what its `[lint]` table said, and the external waiver files in
|
||||
/// force.
|
||||
///
|
||||
/// Split out of [`LintRun::for_document`] so the I/O has a name and a stage of
|
||||
/// its own on the `--verbose` channel — "config read plus lint" was as far as
|
||||
/// take 5 §P1 could attribute the pinmux menu's 23 ms, and that is two
|
||||
/// answers. Nothing about *what* is read changed: the calls below are
|
||||
/// `for_document`'s own, in its own order, so the messages a config problem
|
||||
/// produces arrive in the order §42.2 fixed.
|
||||
struct Discovered {
|
||||
options: RuleOptions,
|
||||
line_length: usize,
|
||||
tab_width: usize,
|
||||
file: FileConfig,
|
||||
project: ProjectLint,
|
||||
external: ExternalWaivers,
|
||||
/// Each waiver file's path and the text it was parsed from — the
|
||||
/// snapshot key's only I/O-derived field.
|
||||
texts: Vec<(PathBuf, String)>,
|
||||
messages: Vec<String>,
|
||||
}
|
||||
|
||||
impl Discovered {
|
||||
/// One discovery for the whole pass: the selection, the options, the
|
||||
/// width, the indent and the waiver paths all read the same `FileConfig`,
|
||||
/// so reading the project's rules costs no extra stat and no extra open.
|
||||
fn read(ws: &Workspace, doc: &Document) -> Discovered {
|
||||
let (options, line_length, file, mut messages) = configured(ws.client_settings(), doc);
|
||||
let (project, bad_names) = ProjectLint::read(&file);
|
||||
messages.extend(bad_names);
|
||||
let (mut external, bad_waivers, mut texts) = waiver_files(&project_waivers(&file));
|
||||
messages.extend(bad_waivers);
|
||||
// The editor's own waiver files are read separately and their
|
||||
// problems dropped: `notification::apply_settings` already said them
|
||||
// once, where the setting arrived.
|
||||
let editor = waiver_files(&editor_waivers(ws.client_settings(), ws.roots()));
|
||||
external.absorb(editor.0);
|
||||
texts.extend(editor.2);
|
||||
// `format::indent_width` stays the one authority on the indent ladder
|
||||
// (`lucisv.toml` > `lucisv.indent` > the formatter's default): reading
|
||||
// it here rather than spelling the ladder a second time costs a second
|
||||
// `Discovery` walk, which the R1b trace measures at hundredths of a
|
||||
// millisecond against a 21 ms pass.
|
||||
let tab_width = crate::format::indent_width(doc.path.as_deref(), ws.client_settings());
|
||||
Discovered { options, line_length, tab_width, file, project, external, texts, messages }
|
||||
}
|
||||
|
||||
/// What this buffer's index and settings make of it: the census oracle and
|
||||
/// the rule ladder, neither of which touches the filesystem.
|
||||
fn into_run<'a>(self, ws: &'a Workspace, doc: &Document) -> LintRun<'a> {
|
||||
let index = ws.index();
|
||||
let own = doc.path.as_deref().and_then(|path| index.file_id(path));
|
||||
let workspace = index.files().len() > usize::from(own.is_some());
|
||||
let oracle = workspace.then_some(IndexMentions { index, own });
|
||||
let rules = enabled_rules(ws.client_settings(), &self.project, workspace);
|
||||
let problems = ConfigProblems::new(&self.file, self.messages);
|
||||
LintRun {
|
||||
rules,
|
||||
oracle,
|
||||
options: self.options,
|
||||
line_length: self.line_length,
|
||||
tab_width: self.tab_width,
|
||||
external: self.external,
|
||||
waiver_texts: self.texts,
|
||||
problems,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The per-rule options and the line width governing one buffer.
|
||||
///
|
||||
/// **Precedence for an option, highest first: the editor, then the buffer's
|
||||
@@ -237,18 +359,37 @@ fn editor_waivers(client: &ClientSettings, roots: &[PathBuf]) -> Vec<PathBuf> {
|
||||
/// pass, which runs on every keystroke, drops them silently rather than
|
||||
/// logging the same line a hundred times.
|
||||
pub fn external_waivers(paths: &[PathBuf]) -> (ExternalWaivers, Vec<String>) {
|
||||
let (waivers, problems, _) = waiver_files(paths);
|
||||
(waivers, problems)
|
||||
}
|
||||
|
||||
/// [`external_waivers`], keeping each file's **text** as well.
|
||||
///
|
||||
/// The text is what the lint snapshot's key holds (review round §R1a): a
|
||||
/// waiver file is not watched — `watch::SOURCE_GLOB` covers sources and the
|
||||
/// filelist alone — so comparing its contents is the only thing that ever
|
||||
/// notices one being rewritten under a running server.
|
||||
///
|
||||
/// One read, not two. `ExternalWaivers::read` is `read_to_string` followed by
|
||||
/// `ExternalWaivers::parse`, and both halves are public, so the bytes are
|
||||
/// taken once and handed to the parser; the sentence an unreadable file
|
||||
/// produces is `read`'s own, byte for byte.
|
||||
fn waiver_files(paths: &[PathBuf]) -> (ExternalWaivers, Vec<String>, Vec<(PathBuf, String)>) {
|
||||
let mut waivers = ExternalWaivers::default();
|
||||
let mut problems = Vec::new();
|
||||
let mut texts = Vec::new();
|
||||
for path in paths {
|
||||
match ExternalWaivers::read(path) {
|
||||
Ok((file, bad)) => {
|
||||
match std::fs::read_to_string(path) {
|
||||
Ok(text) => {
|
||||
let (file, bad) = ExternalWaivers::parse(path, &text);
|
||||
problems.extend(bad);
|
||||
waivers.absorb(file);
|
||||
texts.push((path.clone(), text));
|
||||
}
|
||||
Err(problem) => problems.push(problem),
|
||||
Err(problem) => problems.push(format!("{}: {problem}", path.display())),
|
||||
}
|
||||
}
|
||||
(waivers, problems)
|
||||
(waivers, problems, texts)
|
||||
}
|
||||
|
||||
/// Which rules a buffer is linted with, given what the editor's settings and
|
||||
@@ -419,16 +560,43 @@ fn context(doc: &Document) -> LintContext<'_> {
|
||||
/// waiver was dead, and a server never has one — it lints the buffers a user
|
||||
/// happens to have open. `lucisv check` is what reports an unused external
|
||||
/// waiver; see `docs/features/waiver-files/README.md`.
|
||||
pub fn violations_in(doc: &Document, run: &LintRun) -> Vec<Violation> {
|
||||
lint_with(&run.context(doc), &run.rules, &run.external).0
|
||||
pub fn violations_in(doc: &Document, run: &LintRun) -> Arc<[Violation]> {
|
||||
found(doc, run)
|
||||
}
|
||||
|
||||
/// The findings a code action may offer a fix for, with their fixes built for
|
||||
/// `tab_width`.
|
||||
/// The one place `vlog_linter::lint_with` is called for an open buffer.
|
||||
///
|
||||
/// The code-action path passes the indent width of the `lucisv.toml` governing
|
||||
/// the buffer, so a quick fix that replaces a tab writes exactly what `lucisv`
|
||||
/// would have written there.
|
||||
/// One place, so there is one snapshot to read (review round §R1a) and one
|
||||
/// site that says on the `--verbose` channel what a pass ran, what it found,
|
||||
/// and whether it ran at all. Both doors — the diagnostics publish and
|
||||
/// quick-fix discovery — arrive here with the *same* context, which is why the
|
||||
/// tab width lives on the [`LintRun`] rather than being handed to [`fixable`].
|
||||
fn found(doc: &Document, run: &LintRun) -> Arc<[Violation]> {
|
||||
let key = run.key();
|
||||
let (violations, hit) = lint_trace::stage(Stage::Lint, || {
|
||||
snapshot(doc).read_or(&key, || lint_with(&run.context(doc), &run.rules, &run.external).0)
|
||||
});
|
||||
let reuse = if hit { Reuse::Hit } else { Reuse::Miss };
|
||||
lint_trace::saw_lint(run.rules.len(), violations.len(), reuse);
|
||||
violations
|
||||
}
|
||||
|
||||
/// The slot this buffer's findings are kept in.
|
||||
///
|
||||
/// A field on the `Document`, so it is dropped with the buffer and cannot
|
||||
/// outlive the text it was computed from: `Workspace::set_document` builds a
|
||||
/// new `Document` for every flushed change. One per open document and nothing
|
||||
/// else — no map, no eviction, no second analysis cache.
|
||||
fn snapshot(doc: &Document) -> &Slot {
|
||||
&doc.lint
|
||||
}
|
||||
|
||||
/// The findings a code action may offer a fix for.
|
||||
///
|
||||
/// The fixes are written at the run's own indent width — the `lucisv.toml`
|
||||
/// governing the buffer, else `lucisv.indent`, else the formatter's default —
|
||||
/// so a quick fix that replaces a tab writes exactly what `lucisv` would have
|
||||
/// written there.
|
||||
///
|
||||
/// A finding whose fix would edit bytes inside a `// verilog_format: off`
|
||||
/// region is dropped here, so the editor keeps the same promise `lucisv check
|
||||
@@ -437,14 +605,13 @@ pub fn violations_in(doc: &Document, run: &LintRun) -> Vec<Violation> {
|
||||
/// just has no lightbulb. Which bytes count as fenced is
|
||||
/// [`fence::protected_regions`]' answer, the one the CLI asks too; see
|
||||
/// `docs/features/shared-fence-filter/README.md`.
|
||||
pub fn fixable(run: &LintRun, doc: &Document, tab_width: usize) -> Vec<Violation> {
|
||||
pub fn fixable(run: &LintRun, doc: &Document) -> Arc<[Violation]> {
|
||||
// The buffer's own run: its enabled rules and its external waiver files,
|
||||
// so a fix is never offered — nor applied by fix-on-save — for a finding
|
||||
// the diagnostics pass would not have shown. Found by §39's QA: with
|
||||
// `default_rules()` and no waivers here, `source.fixAll.lucisv` rewrote a
|
||||
// line a checked-in waiver file had waived.
|
||||
let ctx = run.context(doc).with_tab_width(tab_width);
|
||||
let found = lint_with(&ctx, &run.rules, &run.external).0;
|
||||
let violations = found(doc, run);
|
||||
// The fence answer is a whole second tolerant parse of the buffer:
|
||||
// `protected_regions` takes text and parses internally, on purpose — one
|
||||
// fence answer for every front end, none of which can feed it a stale tree
|
||||
@@ -453,15 +620,24 @@ pub fn fixable(run: &LintRun, doc: &Document, tab_width: usize) -> Vec<Violation
|
||||
// and nothing to ask: the filter below would be the identity. Skipping it
|
||||
// there is take 5 §P1a. The per-keystroke diagnostics path pays nothing
|
||||
// either, because it never reads a fix.
|
||||
if !found.iter().any(|violation| violation.fix.is_some()) {
|
||||
return found;
|
||||
if !violations.iter().any(|violation| violation.fix.is_some()) {
|
||||
lint_trace::saw_fences(Fences::Skipped);
|
||||
return violations;
|
||||
}
|
||||
// Asked once per document revision rather than once per request: the text
|
||||
// a `Document` holds cannot change without a new `Document` (§P1b,
|
||||
// `crate::fences`). The question itself is unchanged — still
|
||||
// `protected_regions` over this buffer's text.
|
||||
let regions = crate::fences::of(doc);
|
||||
found.into_iter().filter(|violation| !fix_touches_fence(violation, regions)).collect()
|
||||
let held = crate::fences::held(doc);
|
||||
let regions = lint_trace::stage(Stage::Fence, || crate::fences::of(doc));
|
||||
lint_trace::saw_fences(if held { Fences::Memo } else { Fences::Computed });
|
||||
// The snapshot's own findings when the fence drops nothing, which is every
|
||||
// buffer with no `// lucisv: off` region in it: the filter would be the
|
||||
// identity, and copying the findings to prove it would undo the reuse.
|
||||
if !violations.iter().any(|violation| fix_touches_fence(violation, regions)) {
|
||||
return violations;
|
||||
}
|
||||
violations.iter().filter(|v| !fix_touches_fence(v, regions)).cloned().collect()
|
||||
}
|
||||
|
||||
/// True when a violation carries a fix any edit of which lands in a fenced
|
||||
@@ -645,7 +821,7 @@ mod tests {
|
||||
let doc = ws.document(&uri).expect("open");
|
||||
let diags = diagnostics(doc);
|
||||
assert_eq!(diags.len(), 2, "both tabs are reported: {diags:#?}");
|
||||
let offered = fixable(&LintRun::default(), doc, 2);
|
||||
let offered = fixable(&LintRun::default(), doc);
|
||||
assert_eq!(offered.len(), 1, "only the unfenced one may be fixed: {offered:#?}");
|
||||
let free = text.find("\twire b").expect("the unfenced tab") as u32;
|
||||
assert_eq!(offered[0].span.start, free);
|
||||
@@ -665,7 +841,7 @@ mod tests {
|
||||
.any(|d| d.code == Some(NumberOrString::String("no-tabs".into()))),
|
||||
"still reported"
|
||||
);
|
||||
assert!(fixable(&LintRun::default(), doc, 2).is_empty(), "and still not fixable");
|
||||
assert!(fixable(&LintRun::default(), doc).is_empty(), "and still not fixable");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -913,7 +1089,7 @@ mod tests {
|
||||
#[test]
|
||||
fn an_unfenced_file_offers_every_fix() {
|
||||
let (ws, uri) = doc_of("module m;\n// just a note\n\twire a;\nendmodule\n");
|
||||
assert_eq!(fixable(&LintRun::default(), ws.document(&uri).expect("open"), 2).len(), 1);
|
||||
assert_eq!(fixable(&LintRun::default(), ws.document(&uri).expect("open")).len(), 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -921,7 +1097,7 @@ mod tests {
|
||||
let (ws, uri) = doc_of("module m;\n\twire a;\nendmodule\n");
|
||||
let doc = ws.document(&uri).expect("open");
|
||||
for width in [2usize, 4] {
|
||||
let found = fixable(&LintRun::default(), doc, width);
|
||||
let found = fixable(&LintRun::default().with_tab_width(width), doc);
|
||||
let fix = found[0].fix.as_ref().expect("no-tabs offers a fix");
|
||||
assert_eq!(fix.edits[0].1, " ".repeat(width));
|
||||
}
|
||||
@@ -958,6 +1134,79 @@ mod tests {
|
||||
assert!(waiver_paths(&ClientSettings::default(), &roots, &FileConfig::default()).is_empty());
|
||||
}
|
||||
|
||||
/// The run's indent width is the formatter's own ladder, read through
|
||||
/// `format::indent_width` rather than spelled a second time — pinned at
|
||||
/// each rung, because the width is a fix's bytes and this lane moved
|
||||
/// where it is read (review round §R1a).
|
||||
#[test]
|
||||
fn the_runs_tab_width_is_the_formatters_own_ladder() {
|
||||
let dir = std::env::temp_dir().join(format!("lucisv_lint_{}_indent", std::process::id()));
|
||||
let _ = std::fs::remove_dir_all(&dir);
|
||||
std::fs::create_dir_all(&dir).expect("temp dir");
|
||||
std::fs::write(dir.join("m.sv"), "module m;\n\twire a;\nendmodule\n").expect("write");
|
||||
let path = dir.join("m.sv");
|
||||
let uri = Uri::from_str(&format!("file://{}", path.display())).expect("uri");
|
||||
|
||||
// Rung by rung: the built-in default, the editor's setting, and a
|
||||
// `lucisv.toml` that outranks it.
|
||||
let rungs: Vec<(Option<&str>, Option<usize>, usize)> = vec![
|
||||
(None, None, 2),
|
||||
(None, Some(8), 8),
|
||||
(Some("indent = 4\n"), Some(8), 4),
|
||||
(Some("indent = 3\n"), None, 3),
|
||||
];
|
||||
for (toml, editor, want) in rungs {
|
||||
match toml {
|
||||
Some(text) => std::fs::write(dir.join("lucisv.toml"), text).expect("write"),
|
||||
None => {
|
||||
let _ = std::fs::remove_file(dir.join("lucisv.toml"));
|
||||
}
|
||||
}
|
||||
let mut ws = Workspace::default();
|
||||
ws.set_client_settings(ClientSettings { indent: editor, ..Default::default() });
|
||||
ws.set_document(uri.clone(), "module m;\n\twire a;\nendmodule\n".to_string());
|
||||
let doc = ws.document(&uri).expect("open");
|
||||
let run = LintRun::for_document(&ws, doc);
|
||||
assert_eq!(run.tab_width, want, "toml={toml:?} editor={editor:?}");
|
||||
assert_eq!(
|
||||
run.tab_width,
|
||||
crate::format::indent_width(Some(&path), ws.client_settings()),
|
||||
"the two readings of the ladder agree"
|
||||
);
|
||||
assert_eq!(
|
||||
fixable(&run, doc)[0].fix.as_ref().expect("a fix").edits[0].1,
|
||||
" ".repeat(want)
|
||||
);
|
||||
}
|
||||
let _ = std::fs::remove_dir_all(&dir);
|
||||
}
|
||||
|
||||
/// The snapshot is a memo and not a second implementation: what it hands
|
||||
/// back is what a pass computed from scratch would have, violation for
|
||||
/// violation, and both doors get the same object.
|
||||
#[test]
|
||||
fn a_reused_snapshot_is_what_a_fresh_pass_would_have_found() {
|
||||
let (ws, uri) = doc_of("module m;\n\twire a; \nendmodule\n");
|
||||
let doc = ws.document(&uri).expect("open");
|
||||
let run = LintRun::default();
|
||||
let fresh: Vec<Violation> = lint_with(&run.context(doc), &run.rules, &run.external).0;
|
||||
let first = violations_in(doc, &run);
|
||||
let second = fixable(&run, doc);
|
||||
assert!(Arc::ptr_eq(&first, &second), "the diagnostics and the fixes are one pass");
|
||||
assert_eq!(first.len(), fresh.len(), "{fresh:#?}");
|
||||
for (held, made) in first.iter().zip(&fresh) {
|
||||
assert_eq!(
|
||||
(held.rule, held.span, &held.message),
|
||||
(made.rule, made.span, &made.message)
|
||||
);
|
||||
assert_eq!(
|
||||
held.fix.as_ref().map(|fix| &fix.edits),
|
||||
made.fix.as_ref().map(|fix| &fix.edits),
|
||||
"the fix bytes are the fresh pass's too"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// A waiver file that is missing, and one with a bad line, are both
|
||||
/// described rather than fatal — and the good directives of the second
|
||||
/// still apply. TODO §39.
|
||||
|
||||
@@ -0,0 +1,245 @@
|
||||
//! One lint pass's findings, kept for as long as they are still the answer.
|
||||
//!
|
||||
//! Take 5 **review** round §R1a (`docs/features/perf5r-lint-snapshot/README.md`,
|
||||
//! `docs/performance_take5_review.md` §1). A `textDocument/codeAction` on
|
||||
//! `pinmux_reg_top.sv` spends **21 of its 22 ms in `lint_with`**, and the first
|
||||
//! request after an edit runs that pass **twice** on one revision — once to
|
||||
//! publish diagnostics, once to discover quick fixes. This module is what lets
|
||||
//! the second one read the first one's answer.
|
||||
//!
|
||||
//! **The whole design is in [`Key`].** A snapshot is legitimate only while
|
||||
//! every input of `lint_with(ctx, rules, external)` is what it was, and the
|
||||
//! key is those inputs *by value* — no hash, no mtime, no generation number,
|
||||
//! so "could this offer a stale fix?" is a question about `PartialEq` and not
|
||||
//! about collision probability. What the key deliberately does **not** carry
|
||||
//! is the two things identity already settles:
|
||||
//!
|
||||
//! * the **buffer** — a [`Slot`] is a field on the `Document`, and
|
||||
//! `Workspace::set_document` builds a new `Document` for every flushed
|
||||
//! change, so a slot cannot outlive the text it was computed from (the
|
||||
//! argument `crate::fences` already rests on);
|
||||
//! * the **workspace index** the census oracle reads — every index mutation in
|
||||
//! `state/mod.rs` ends by calling `Document::refresh_overlay` on every open
|
||||
//! buffer, and that is where the slot is cleared.
|
||||
//!
|
||||
//! The invalidation table in the feature README has one row per input, the
|
||||
//! mechanism for each, and the test that flips it.
|
||||
//!
|
||||
//! **Bounded by construction:** one slot per open document, holding that
|
||||
//! document's own violations, dropped with the `Document` on `didClose`. There
|
||||
//! is no map, no eviction policy and no second unbounded analysis cache.
|
||||
|
||||
use std::path::PathBuf;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use vlog_linter::{RuleOptions, Violation};
|
||||
|
||||
/// Everything a lint result depends on that is **not** settled by the
|
||||
/// `Document`'s own identity.
|
||||
///
|
||||
/// Compared by value, field by field. Every field is an argument of the
|
||||
/// `lint_with` call it guards, which is what makes the list complete: see the
|
||||
/// feature README's table, which derives it from that call's signature.
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct Key {
|
||||
/// The enabled rules' names, in registry order — the whole of what the
|
||||
/// `lucisv.lint.*` ladder and the project's `[lint]` table decided.
|
||||
pub rules: Vec<&'static str>,
|
||||
/// The merged per-rule options: the buffer's `lucisv.toml` overlaid with
|
||||
/// the editor's `lucisv.lint.options`.
|
||||
pub options: RuleOptions,
|
||||
/// The width `line-length` holds this buffer to.
|
||||
pub line_length: usize,
|
||||
/// The width a `no-tabs` fix writes. It changes a fix's *text* and
|
||||
/// nothing else, but a fix's text is what a user applies.
|
||||
pub tab_width: usize,
|
||||
/// Whether the pass had a census to ask. The oracle's *answers* are
|
||||
/// covered by `refresh_overlay`; whether there is one at all is decided
|
||||
/// from the index's file count, which can move without any one file's
|
||||
/// facts moving.
|
||||
pub has_oracle: bool,
|
||||
/// Every external waiver file in force, path and **contents**, in the
|
||||
/// order they were read.
|
||||
///
|
||||
/// The contents, not a digest and not an mtime: a waiver file is not
|
||||
/// watched (`watch::SOURCE_GLOB` covers sources and the filelist alone),
|
||||
/// so the only thing that ever notices a rewritten one is this
|
||||
/// comparison. The text is already in hand — the pass read it to parse
|
||||
/// it — so keeping it costs a copy per open document and no I/O.
|
||||
pub waivers: Vec<(PathBuf, String)>,
|
||||
}
|
||||
|
||||
/// One document's lint snapshot: the key it was computed under, and what it
|
||||
/// found.
|
||||
struct Held {
|
||||
key: Key,
|
||||
violations: Arc<[Violation]>,
|
||||
}
|
||||
|
||||
/// The snapshot slot a `Document` carries.
|
||||
///
|
||||
/// A `Mutex` rather than a `RefCell` so a `Document` stays `Sync` exactly as
|
||||
/// its `OnceLock` fence memo leaves it; the lock is uncontended (one message
|
||||
/// loop) and is never held across the pass itself.
|
||||
#[derive(Default)]
|
||||
pub struct Slot(Mutex<Option<Held>>);
|
||||
|
||||
impl Slot {
|
||||
/// An empty slot — what every `Document` is built with.
|
||||
pub fn new() -> Slot {
|
||||
Slot(Mutex::new(None))
|
||||
}
|
||||
|
||||
/// Forget whatever is held.
|
||||
///
|
||||
/// Called from `Document::refresh_overlay`, which is the one place a
|
||||
/// `Document` is told the workspace index moved. Dropping here rather
|
||||
/// than keying on an index generation is deliberate: the four call sites
|
||||
/// that mutate the index all end in that loop, so there is no way for the
|
||||
/// index to move without this running, and no counter to keep in step.
|
||||
pub fn clear(&mut self) {
|
||||
if let Ok(mut held) = self.0.lock() {
|
||||
*held = None;
|
||||
}
|
||||
}
|
||||
|
||||
/// The violations for `key`, computing them when what is held is for
|
||||
/// anything else.
|
||||
///
|
||||
/// Returns `(violations, answered_from_the_snapshot)`. A poisoned lock —
|
||||
/// which this server has no way to produce, having one message loop and no
|
||||
/// panicking library code — degrades to computing every time rather than
|
||||
/// to an error a user would see.
|
||||
pub fn read_or(
|
||||
&self,
|
||||
key: &Key,
|
||||
compute: impl FnOnce() -> Vec<Violation>,
|
||||
) -> (Arc<[Violation]>, bool) {
|
||||
if let Ok(held) = self.0.lock() {
|
||||
if let Some(held) = held.as_ref().filter(|held| held.key == *key) {
|
||||
return (Arc::clone(&held.violations), true);
|
||||
}
|
||||
}
|
||||
// Computed with the lock released: `lint_with` is the expensive part
|
||||
// and it reads nothing this slot owns.
|
||||
let violations: Arc<[Violation]> = compute().into();
|
||||
if let Ok(mut held) = self.0.lock() {
|
||||
*held = Some(Held { key: key.clone(), violations: Arc::clone(&violations) });
|
||||
}
|
||||
(violations, false)
|
||||
}
|
||||
|
||||
/// Whether anything is held at all — for the tests that assert a slot was
|
||||
/// filled, or was not.
|
||||
#[cfg(test)]
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.0.lock().map_or(true, |held| held.is_none())
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for Slot {
|
||||
/// Says whether a snapshot is held and nothing about it: a `Document`'s
|
||||
/// `Debug` must not print a thousand violations.
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
let held = self.0.lock().map(|held| held.is_some()).unwrap_or(false);
|
||||
f.debug_tuple("Slot").field(&held).finish()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use vlog_parser::TextRange;
|
||||
|
||||
fn key() -> Key {
|
||||
Key {
|
||||
rules: vec!["no-tabs"],
|
||||
options: RuleOptions::new(),
|
||||
line_length: 100,
|
||||
tab_width: 2,
|
||||
has_oracle: false,
|
||||
waivers: Vec::new(),
|
||||
}
|
||||
}
|
||||
|
||||
fn violation(message: &str) -> Violation {
|
||||
Violation::new("no-tabs", message, TextRange::new(0, 1))
|
||||
}
|
||||
|
||||
/// The second ask for the same key does not compute, and answers with the
|
||||
/// same findings.
|
||||
#[test]
|
||||
fn a_matching_key_answers_without_computing() {
|
||||
let slot = Slot::new();
|
||||
let (first, hit) = slot.read_or(&key(), || vec![violation("one")]);
|
||||
assert!(!hit, "an empty slot cannot hit");
|
||||
let (again, hit) = slot.read_or(&key(), || panic!("must not recompute"));
|
||||
assert!(hit);
|
||||
assert_eq!(again.len(), 1);
|
||||
assert_eq!(again[0].message, first[0].message);
|
||||
}
|
||||
|
||||
/// Every field of the key is load-bearing: change any one and the pass
|
||||
/// runs again. This is the table's row set in miniature — the per-input
|
||||
/// server tests assert the same thing through the real doors.
|
||||
#[test]
|
||||
fn every_field_of_the_key_forces_a_recompute() {
|
||||
let mut options = RuleOptions::new();
|
||||
options.set_raw("line-length", "length", "80").expect("a real option");
|
||||
let changes: Vec<(&str, Key)> = vec![
|
||||
("rules", Key { rules: vec!["no-tabs", "posix-eof"], ..key() }),
|
||||
("options", Key { options, ..key() }),
|
||||
("line_length", Key { line_length: 120, ..key() }),
|
||||
("tab_width", Key { tab_width: 4, ..key() }),
|
||||
("has_oracle", Key { has_oracle: true, ..key() }),
|
||||
(
|
||||
"waivers",
|
||||
Key {
|
||||
waivers: vec![(PathBuf::from("/w.waiver"), "waive --rule=no-tabs\n".into())],
|
||||
..key()
|
||||
},
|
||||
),
|
||||
];
|
||||
for (what, moved) in changes {
|
||||
let slot = Slot::new();
|
||||
slot.read_or(&key(), || vec![violation("old")]);
|
||||
let (found, hit) = slot.read_or(&moved, || vec![violation("new")]);
|
||||
assert!(!hit, "{what} did not invalidate the snapshot");
|
||||
assert_eq!(found[0].message, "new", "{what} answered stale");
|
||||
// ... and the new answer is what is held afterwards, so the stale
|
||||
// one cannot come back on the next request.
|
||||
let (again, hit) = slot.read_or(&moved, || panic!("must not recompute"));
|
||||
assert!(hit);
|
||||
assert_eq!(again[0].message, "new", "{what} left the old answer held");
|
||||
}
|
||||
}
|
||||
|
||||
/// A waiver file rewritten to the same length with different bytes is a
|
||||
/// different key: the contents are compared, not a size or a time.
|
||||
#[test]
|
||||
fn a_waiver_rewritten_in_place_is_a_different_key() {
|
||||
let one = |text: &str| Key {
|
||||
waivers: vec![(PathBuf::from("/w.waiver"), text.to_string())],
|
||||
..key()
|
||||
};
|
||||
let slot = Slot::new();
|
||||
slot.read_or(&one("waive --rule=no-tabs\n"), || vec![violation("old")]);
|
||||
let (found, hit) =
|
||||
slot.read_or(&one("waive --rule=posix-eof\n"), || vec![violation("new")]);
|
||||
assert!(!hit, "same length, different bytes");
|
||||
assert_eq!(found[0].message, "new");
|
||||
}
|
||||
|
||||
/// Clearing is what `refresh_overlay` does when the index moves.
|
||||
#[test]
|
||||
fn clearing_forces_the_next_pass_to_compute() {
|
||||
let mut slot = Slot::new();
|
||||
slot.read_or(&key(), || vec![violation("old")]);
|
||||
assert!(!slot.is_empty());
|
||||
slot.clear();
|
||||
assert!(slot.is_empty());
|
||||
let (found, hit) = slot.read_or(&key(), || vec![violation("new")]);
|
||||
assert!(!hit, "a cleared slot cannot hit");
|
||||
assert_eq!(found[0].message, "new");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,400 @@
|
||||
//! Where a lint-answering request's milliseconds went.
|
||||
//!
|
||||
//! Take 5 **review** round §R1b (`docs/performance_take5_review.md` §1,
|
||||
//! `docs/features/perf5r-lint-snapshot/README.md`). The review's own note is
|
||||
//! that the pinmux code-action menu costs **25 ms of which 23 is quickfix**,
|
||||
//! and that the first request after a one-character edit costs **136 ms** —
|
||||
//! but "config read plus lint" was as far as the previous lane could
|
||||
//! attribute it, and *config read plus lint* is two answers, not one. This
|
||||
//! module splits the request into the five stages a reader can act on:
|
||||
//!
|
||||
//! | stage | what it is |
|
||||
//! |---|---|
|
||||
//! | `config` | `Discovery::for_file`, `ProjectLint::read` and every waiver file read |
|
||||
//! | `build` | the rest of [`crate::lint::LintRun::for_document`] — the oracle, the rule ladder |
|
||||
//! | `lint` | `vlog_linter::lint_with`, and how many times it ran |
|
||||
//! | `fence` | `crate::fences::of` — computed, taken from the memo, or skipped |
|
||||
//! | `serialize` | turning violations into `CodeAction`s |
|
||||
//!
|
||||
//! and reports the **flush** — the debounced `Document` rebuild `answer_request`
|
||||
//! performs before any handler runs — as its own group, with the diagnostics
|
||||
//! pass that publishes inside it split the same five ways. That separation is
|
||||
//! the review's item 4: if the dirty-buffer stage dominates the 136 ms, a lint
|
||||
//! cache alone cannot fix it, and only a number can say.
|
||||
//!
|
||||
//! **Nothing here decides anything.** A trace is armed by
|
||||
//! [`crate::server`]'s request wrapper when `--verbose` asked for one, written
|
||||
//! as the request runs, logged once and dropped.
|
||||
//!
|
||||
//! Off is the shipped state and costs **one thread-local `Cell<bool>` read**
|
||||
//! per traced site — no clock read, no allocation, no line — which is the same
|
||||
//! bargain `Server::timer` makes for the rest of `docs/features/verbose-timing/`.
|
||||
//!
|
||||
//! Per thread, deliberately, for `vlog_parser::stats`' reason: a request is
|
||||
//! answered on one thread, so a thread-local accumulator is that request's
|
||||
//! number exactly, and `cargo test`'s parallel binaries cannot add to each
|
||||
//! other's.
|
||||
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
/// One stage of a lint-answering request.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Stage {
|
||||
/// Reading the project's configuration: the `lucisv.toml` discovery walk,
|
||||
/// its `[lint]` table, and the external waiver files.
|
||||
Config,
|
||||
/// The rest of the `LintRun`: the census oracle and the rule ladder.
|
||||
Build,
|
||||
/// `vlog_linter::lint_with` itself.
|
||||
Lint,
|
||||
/// The formatter's fenced-region answer.
|
||||
Fence,
|
||||
/// Turning violations into what goes on the wire.
|
||||
Serialize,
|
||||
}
|
||||
|
||||
impl Stage {
|
||||
/// The name this stage is counted under in the `timing:` line.
|
||||
fn label(self) -> &'static str {
|
||||
match self {
|
||||
Stage::Config => "config",
|
||||
Stage::Build => "build",
|
||||
Stage::Lint => "lint",
|
||||
Stage::Fence => "fence",
|
||||
Stage::Serialize => "serialize",
|
||||
}
|
||||
}
|
||||
|
||||
/// Every stage, in the order a request passes through them — so a line
|
||||
/// always carries the same fields whether or not a stage ran.
|
||||
const ALL: [Stage; 5] =
|
||||
[Stage::Config, Stage::Build, Stage::Lint, Stage::Fence, Stage::Serialize];
|
||||
}
|
||||
|
||||
/// What the fence filter did, when a pass reached it at all.
|
||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
|
||||
pub enum Fences {
|
||||
/// No finding carried a fix, so the filter would have been the identity
|
||||
/// and was not asked (take 5 §P1a).
|
||||
#[default]
|
||||
Skipped,
|
||||
/// `protected_regions` parsed the buffer for this `Document`.
|
||||
Computed,
|
||||
/// The `Document`'s memo answered (take 5 §P1b).
|
||||
Memo,
|
||||
}
|
||||
|
||||
impl Fences {
|
||||
fn label(self) -> &'static str {
|
||||
match self {
|
||||
Fences::Skipped => "skipped",
|
||||
Fences::Computed => "computed",
|
||||
Fences::Memo => "memo",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether a lint pass was answered from the snapshot (review round §R1a).
|
||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
|
||||
pub enum Reuse {
|
||||
/// No pass ran.
|
||||
#[default]
|
||||
None,
|
||||
/// The `Document` held no snapshot, or held one for other inputs.
|
||||
Miss,
|
||||
/// The snapshot matched and `lint_with` did not run.
|
||||
Hit,
|
||||
}
|
||||
|
||||
impl Reuse {
|
||||
fn label(self) -> &'static str {
|
||||
match self {
|
||||
Reuse::None => "none",
|
||||
Reuse::Miss => "miss",
|
||||
Reuse::Hit => "hit",
|
||||
}
|
||||
}
|
||||
|
||||
/// A hit only survives while every pass hit: one recompute in a request
|
||||
/// is a miss for that request, which is what a reader wants to know.
|
||||
fn saw(self, other: Reuse) -> Reuse {
|
||||
match (self, other) {
|
||||
(Reuse::Miss, _) | (_, Reuse::Miss) => Reuse::Miss,
|
||||
(Reuse::Hit, _) | (_, Reuse::Hit) => Reuse::Hit,
|
||||
_ => Reuse::None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// One group of stages: the flush's, or the handler's own.
|
||||
#[derive(Debug, Clone, Default, PartialEq)]
|
||||
pub struct Group {
|
||||
ms: [f64; Stage::ALL.len()],
|
||||
/// How many times `lint_with` ran in this group.
|
||||
passes: u32,
|
||||
/// How many violations the last pass found.
|
||||
violations: usize,
|
||||
/// How many rules that pass ran.
|
||||
rules: usize,
|
||||
/// How many actions were serialized.
|
||||
actions: usize,
|
||||
/// How many waiver files were read from disk.
|
||||
waivers: usize,
|
||||
/// Whether a `lucisv.toml` was found and read.
|
||||
toml: bool,
|
||||
fences: Fences,
|
||||
reuse: Reuse,
|
||||
}
|
||||
|
||||
impl Group {
|
||||
/// The `const` form `thread_local!`'s initializer needs; `Default` is not
|
||||
/// callable there.
|
||||
const EMPTY: Group = Group {
|
||||
ms: [0.0; Stage::ALL.len()],
|
||||
passes: 0,
|
||||
violations: 0,
|
||||
rules: 0,
|
||||
actions: 0,
|
||||
waivers: 0,
|
||||
toml: false,
|
||||
fences: Fences::Skipped,
|
||||
reuse: Reuse::None,
|
||||
};
|
||||
|
||||
fn add(&mut self, stage: Stage, took: Duration) {
|
||||
self.ms[stage as usize] += took.as_secs_f64() * 1_000.0;
|
||||
}
|
||||
|
||||
/// This group's fields, in the `key=value` shape `tools/perf` parses.
|
||||
fn fields(&self) -> String {
|
||||
let stages: Vec<String> = Stage::ALL
|
||||
.iter()
|
||||
.map(|stage| format!("{}={:.2}ms", stage.label(), self.ms[*stage as usize]))
|
||||
.collect();
|
||||
format!(
|
||||
"{} passes={} rules={} violations={} actions={} waivers={} toml={} fences={} \
|
||||
snapshot={}",
|
||||
stages.join(" "),
|
||||
self.passes,
|
||||
self.rules,
|
||||
self.violations,
|
||||
self.actions,
|
||||
self.waivers,
|
||||
self.toml,
|
||||
self.fences.label(),
|
||||
self.reuse.label(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/// One request's trace: what the flush cost, and what the handler cost.
|
||||
#[derive(Debug, Clone, Default, PartialEq)]
|
||||
pub struct Trace {
|
||||
/// The stages the debounced `Document` rebuild and its diagnostics
|
||||
/// publish passed through, closed by [`close_flush`].
|
||||
pub flush: Group,
|
||||
/// How long the whole flush took, publish included.
|
||||
pub flush_ms: f64,
|
||||
/// Buffers the flush rebuilt.
|
||||
pub flush_buffers: usize,
|
||||
/// Whole-file parses the flush performed (`vlog_parser::stats`).
|
||||
pub flush_parses: u64,
|
||||
/// The handler's own stages.
|
||||
pub action: Group,
|
||||
}
|
||||
|
||||
impl Trace {
|
||||
/// Whether this request touched the lint path at all. A trace that did
|
||||
/// not is not worth a line.
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.flush == Group::default() && self.action == Group::default() && self.flush_buffers == 0
|
||||
}
|
||||
|
||||
/// The whole trace as one `timing:`-style fragment.
|
||||
pub fn line(&self) -> String {
|
||||
format!(
|
||||
"flush{{wall={:.2}ms buffers={} parses={} {}}} action{{{}}}",
|
||||
self.flush_ms,
|
||||
self.flush_buffers,
|
||||
self.flush_parses,
|
||||
self.flush.fields(),
|
||||
self.action.fields(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
thread_local! {
|
||||
/// One branch is the whole of what verbose-off costs at a traced site.
|
||||
static ARMED: Cell<bool> = const { Cell::new(false) };
|
||||
static TRACE: RefCell<Trace> = const { RefCell::new(Trace {
|
||||
flush: Group::EMPTY,
|
||||
flush_ms: 0.0,
|
||||
flush_buffers: 0,
|
||||
flush_parses: 0,
|
||||
action: Group::EMPTY,
|
||||
}) };
|
||||
/// Which group the stages recorded right now belong to.
|
||||
static IN_FLUSH: Cell<bool> = const { Cell::new(true) };
|
||||
}
|
||||
|
||||
/// Start a fresh trace for one request. Called by the request wrapper when
|
||||
/// `--verbose` asked for timing, and by nothing else.
|
||||
pub fn arm() {
|
||||
ARMED.set(true);
|
||||
IN_FLUSH.set(true);
|
||||
TRACE.with_borrow_mut(|trace| *trace = Trace::default());
|
||||
}
|
||||
|
||||
/// Whether a trace is being written — the one branch a caller checks before
|
||||
/// reading a clock of its own.
|
||||
pub fn armed() -> bool {
|
||||
ARMED.get()
|
||||
}
|
||||
|
||||
/// Stop tracing and return what was written, or `None` when nothing armed it.
|
||||
pub fn disarm() -> Option<Trace> {
|
||||
if !ARMED.replace(false) {
|
||||
return None;
|
||||
}
|
||||
Some(TRACE.with_borrow(Clone::clone))
|
||||
}
|
||||
|
||||
/// Close the flush group: everything recorded from here on is the handler's.
|
||||
///
|
||||
/// `parses` is the `vlog_parser::stats::parses()` delta across the flush and
|
||||
/// `buffers` is how many dirty buffers it rebuilt, so the `Document` rebuild
|
||||
/// is readable beside the diagnostics pass that follows it.
|
||||
pub fn close_flush(took: Duration, buffers: usize, parses: u64) {
|
||||
if !ARMED.get() {
|
||||
return;
|
||||
}
|
||||
TRACE.with_borrow_mut(|trace| {
|
||||
trace.flush_ms = took.as_secs_f64() * 1_000.0;
|
||||
trace.flush_buffers = buffers;
|
||||
trace.flush_parses = parses;
|
||||
});
|
||||
IN_FLUSH.set(false);
|
||||
}
|
||||
|
||||
/// Run `work`, counting what it took against `stage`.
|
||||
///
|
||||
/// Untimed and unallocated when nothing armed a trace, which is every session
|
||||
/// but a `--verbose` one.
|
||||
pub fn stage<T>(stage: Stage, work: impl FnOnce() -> T) -> T {
|
||||
if !ARMED.get() {
|
||||
return work();
|
||||
}
|
||||
let started = Instant::now();
|
||||
let out = work();
|
||||
let took = started.elapsed();
|
||||
group(|held| held.add(stage, took));
|
||||
out
|
||||
}
|
||||
|
||||
/// Record what a lint pass ran and found.
|
||||
pub fn saw_lint(rules: usize, violations: usize, reuse: Reuse) {
|
||||
group(|held| {
|
||||
held.passes += 1;
|
||||
held.rules = rules;
|
||||
held.violations = violations;
|
||||
held.reuse = held.reuse.saw(reuse);
|
||||
});
|
||||
}
|
||||
|
||||
/// Record what the configuration read found: a `lucisv.toml`, and how many
|
||||
/// waiver files it and the editor's settings between them named.
|
||||
pub fn saw_config(toml: bool, waivers: usize) {
|
||||
group(|held| {
|
||||
held.toml |= toml;
|
||||
held.waivers += waivers;
|
||||
});
|
||||
}
|
||||
|
||||
/// Record what the fence filter did.
|
||||
pub fn saw_fences(fences: Fences) {
|
||||
group(|held| held.fences = fences);
|
||||
}
|
||||
|
||||
/// Record how many actions were put on the wire.
|
||||
pub fn saw_actions(actions: usize) {
|
||||
group(|held| held.actions += actions);
|
||||
}
|
||||
|
||||
/// Apply `write` to whichever group is being filled, or to nothing at all.
|
||||
fn group(write: impl FnOnce(&mut Group)) {
|
||||
if !ARMED.get() {
|
||||
return;
|
||||
}
|
||||
let flushing = IN_FLUSH.get();
|
||||
TRACE.with_borrow_mut(|trace| {
|
||||
write(if flushing { &mut trace.flush } else { &mut trace.action })
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
/// Nothing is written when nothing armed a trace — the shipped state.
|
||||
#[test]
|
||||
fn an_unarmed_trace_records_nothing_and_returns_the_work() {
|
||||
assert_eq!(disarm(), None);
|
||||
assert_eq!(stage(Stage::Lint, || 7), 7);
|
||||
saw_lint(3, 4, Reuse::Miss);
|
||||
assert_eq!(disarm(), None, "still nothing to say");
|
||||
}
|
||||
|
||||
/// The two groups are kept apart, and `close_flush` is what separates
|
||||
/// them: a stage before it is the flush's, one after it the handler's.
|
||||
#[test]
|
||||
fn close_flush_divides_the_request_into_its_two_halves() {
|
||||
arm();
|
||||
saw_lint(9, 100, Reuse::Miss);
|
||||
close_flush(Duration::from_millis(110), 1, 1);
|
||||
saw_lint(9, 100, Reuse::Hit);
|
||||
saw_actions(2);
|
||||
saw_fences(Fences::Memo);
|
||||
let trace = disarm().expect("armed");
|
||||
assert_eq!(trace.flush.passes, 1);
|
||||
assert_eq!(trace.flush.violations, 100);
|
||||
assert_eq!(trace.flush.actions, 0, "the flush serializes nothing");
|
||||
assert_eq!(trace.flush_buffers, 1);
|
||||
assert_eq!(trace.flush_parses, 1);
|
||||
assert!((trace.flush_ms - 110.0).abs() < 5.0, "{}", trace.flush_ms);
|
||||
assert_eq!(trace.action.passes, 1);
|
||||
assert_eq!(trace.action.actions, 2);
|
||||
assert_eq!(trace.action.fences, Fences::Memo);
|
||||
assert_eq!(trace.action.reuse, Reuse::Hit);
|
||||
assert_eq!(disarm(), None, "disarming twice says nothing twice");
|
||||
}
|
||||
|
||||
/// One recompute in a request is a miss for that request: a reader asking
|
||||
/// "did this menu re-lint?" must not be told "hit" because the second
|
||||
/// pass reused what the first one had just computed.
|
||||
#[test]
|
||||
fn a_single_recompute_makes_the_whole_request_a_miss() {
|
||||
arm();
|
||||
close_flush(Duration::ZERO, 0, 0);
|
||||
saw_lint(9, 100, Reuse::Hit);
|
||||
saw_lint(9, 100, Reuse::Miss);
|
||||
assert_eq!(disarm().expect("armed").action.reuse, Reuse::Miss);
|
||||
}
|
||||
|
||||
/// Every stage is named in the line whether or not it ran, so a reader
|
||||
/// (and `tools/perf/phases_r1.py`) always parses the same fields.
|
||||
#[test]
|
||||
fn the_line_names_every_stage_in_both_groups() {
|
||||
arm();
|
||||
stage(Stage::Config, || {});
|
||||
close_flush(Duration::from_millis(1), 1, 1);
|
||||
stage(Stage::Lint, || {});
|
||||
let line = disarm().expect("armed").line();
|
||||
for stage in Stage::ALL {
|
||||
assert_eq!(line.matches(&format!("{}=", stage.label())).count(), 2, "{line}");
|
||||
}
|
||||
assert!(line.contains("buffers=1"), "{line}");
|
||||
assert!(line.contains("snapshot=none"), "{line}");
|
||||
assert!(!line.contains(" "), "no empty field: {line}");
|
||||
}
|
||||
}
|
||||
@@ -31,6 +31,8 @@ mod large;
|
||||
mod lens;
|
||||
mod linked;
|
||||
mod lint;
|
||||
mod lint_snapshot;
|
||||
mod lint_trace;
|
||||
mod locate;
|
||||
mod module_select;
|
||||
mod nav;
|
||||
|
||||
@@ -17,6 +17,7 @@ use std::path::PathBuf;
|
||||
|
||||
use lsp_types::{PrepareRenameResponse, TextEdit, Uri, WorkspaceEdit};
|
||||
use vlog_parser::LineIndex;
|
||||
use vlog_semantic::FileFacts;
|
||||
|
||||
use crate::convert::Positions;
|
||||
use crate::locate::display_name;
|
||||
@@ -65,6 +66,26 @@ pub fn rename_traced(
|
||||
) -> Result<(WorkspaceEdit, Vec<String>), String> {
|
||||
let doc = ws.document(uri).ok_or_else(|| UNSAVED.to_string())?;
|
||||
let path = doc.path.clone().ok_or_else(|| UNSAVED.to_string())?;
|
||||
// The engine's own first look at the request, over the buffer it is about
|
||||
// to be handed anyway. It refuses only what `vlog_refactor::rename` is
|
||||
// certain to refuse in the same words — so this is still one voice
|
||||
// deciding, just asked before the workspace is materialized for it. A
|
||||
// cursor on nothing used to read, parse and index all 3 976 files before
|
||||
// saying so (take 5 review §3 item 6); now it reads none.
|
||||
//
|
||||
// Sound because both selectors below hand the engine this very buffer, so
|
||||
// the out-of-scope refusal that outranks a cursor refusal cannot fire.
|
||||
//
|
||||
// A refusal here still writes a trace, because "where did the time go" is
|
||||
// a question about the fast refusals too — and the answer, nowhere, is
|
||||
// only believable if the line says `selected=0` and `parses=0` in the same
|
||||
// fields the slow road fills.
|
||||
if let Err(refusal) = vlog_refactor::rename_preflight(&doc.semantics, offset, new_name) {
|
||||
let (selection, engine) =
|
||||
(SelectionTrace::default(), vlog_refactor::RenameTrace::default());
|
||||
*trace = Some(format!("{} {} preflight=true", selection.line(), engine.line()));
|
||||
return Err(refusal);
|
||||
}
|
||||
// The name the cursor sits on, read off the buffer, is what the index is
|
||||
// asked for the fan-out. No refusal is taken here: `vlog_refactor::rename`
|
||||
// is the one voice that decides, and it decides over the files below. A
|
||||
@@ -80,7 +101,9 @@ pub fn rename_traced(
|
||||
}
|
||||
};
|
||||
let mut engine = vlog_refactor::RenameTrace::default();
|
||||
let outcome = vlog_refactor::rename_traced(&sources, &path, offset, new_name, &mut engine);
|
||||
let known = Known(ws);
|
||||
let outcome =
|
||||
vlog_refactor::rename_traced_with(&sources, &path, offset, new_name, &known, &mut engine);
|
||||
*trace = Some(format!("{} {}", selection.line(), engine.line()));
|
||||
let refactoring = outcome?;
|
||||
|
||||
@@ -116,6 +139,23 @@ pub fn rename_traced(
|
||||
Ok((WorkspaceEdit::new(changes), warnings))
|
||||
}
|
||||
|
||||
/// The workspace answering the engine's `KnownFacts` question, and nothing
|
||||
/// else: one call, to the one query that ties a record to the bytes it was
|
||||
/// read off ([`Workspace::known_facts`]).
|
||||
///
|
||||
/// A newtype rather than an `impl` on `Workspace` so that the promise this
|
||||
/// makes to `vlog_refactor` is written where a reader of the rename can see
|
||||
/// it, and so that no other handler can acquire it by accident — the facts a
|
||||
/// refactoring may reuse are the facts of the very texts it was handed, which
|
||||
/// is a property of *this* call site.
|
||||
struct Known<'a>(&'a Workspace);
|
||||
|
||||
impl vlog_refactor::KnownFacts for Known<'_> {
|
||||
fn facts_for(&self, path: &std::path::Path, text: &str) -> Option<FileFacts> {
|
||||
self.0.known_facts(path, text)
|
||||
}
|
||||
}
|
||||
|
||||
/// One sentence per file that writes the old name inside a macro invocation,
|
||||
/// a directive line or an attribute and was **not** among the files the engine
|
||||
/// was handed.
|
||||
@@ -213,6 +253,118 @@ mod tests {
|
||||
(ws, uri)
|
||||
}
|
||||
|
||||
/// A third file that spells nothing this rename is about, kept open so
|
||||
/// the open-buffer rung selects it: the "container" class in miniature —
|
||||
/// a file the engine must index and never analyses.
|
||||
const BYSTANDER: &str = "module bystander;\n logic unrelated;\nendmodule\n";
|
||||
|
||||
/// `sub.sv`, `top.sv` and `quiet.sv`, with the last two open and a
|
||||
/// persistent index store behind the workspace — so a rename is handed
|
||||
/// records keyed on the very bytes it reads.
|
||||
fn three_with_store(tree: &Tree, store: Option<&Tree>) -> (Workspace, Uri) {
|
||||
tree.write("sub.sv", SUB);
|
||||
let top = tree.write("top.sv", TOP);
|
||||
let quiet = tree.write("bystander.sv", BYSTANDER);
|
||||
let mut ws = Workspace::default();
|
||||
ws.set_client_settings(crate::settings::ClientSettings {
|
||||
index_cache_path: store.map(|s| s.path.to_string_lossy().into_owned()),
|
||||
index_scope: crate::settings::IndexScope::Workspace,
|
||||
..Default::default()
|
||||
});
|
||||
ws.open_whole_workspace(vec![tree.path.clone()]);
|
||||
let uri = path_to_uri(&top).expect("uri");
|
||||
ws.set_document(uri.clone(), TOP.to_string());
|
||||
ws.set_document(path_to_uri(&quiet).expect("uri"), BYSTANDER.to_string());
|
||||
(ws, uri)
|
||||
}
|
||||
|
||||
/// Every edit and every warning one rename produced, with the workspace's
|
||||
/// own scratch path taken out — the fingerprint the parity proof compares.
|
||||
fn print(result: &(WorkspaceEdit, Vec<String>), root: &Path) -> String {
|
||||
let (edit, warnings) = result;
|
||||
let mut lines: Vec<String> = Vec::new();
|
||||
for (uri, edits) in edit.changes.iter().flatten() {
|
||||
for one in edits {
|
||||
lines.push(format!(
|
||||
"{} {:?}..{:?} -> {}",
|
||||
uri.as_str(),
|
||||
one.range.start,
|
||||
one.range.end,
|
||||
one.new_text
|
||||
));
|
||||
}
|
||||
}
|
||||
lines.sort();
|
||||
lines.extend(warnings.iter().map(|w| format!("warn {w}")));
|
||||
lines.join("\n").replace(root.to_str().expect("utf-8"), "")
|
||||
}
|
||||
|
||||
/// **§R3b's server-side proof.** The same rename over the same files, once
|
||||
/// with a warm index store behind it — where the engine is handed every
|
||||
/// file's record and stops parsing the ones nothing analyses — and once
|
||||
/// with no store at all, where it parses them all: byte-identical edits,
|
||||
/// byte-identical warnings.
|
||||
///
|
||||
/// The reuse is asserted to have happened *and* to have removed a parse,
|
||||
/// so a store that silently stopped answering would fail this rather than
|
||||
/// pass it for the wrong reason.
|
||||
#[test]
|
||||
fn a_rename_over_a_warm_store_says_exactly_what_one_with_no_store_says() {
|
||||
let tree = Tree::new("reuse_store");
|
||||
let store = Tree::new("reuse_store_cache");
|
||||
let (warm, uri) = three_with_store(&tree, Some(&store));
|
||||
let mut line = None;
|
||||
let with_store = rename_traced(&warm, &uri, at(TOP, "clk"), "clk_x", &mut line)
|
||||
.expect("the rename succeeds");
|
||||
let trace = line.expect("a trace is always written");
|
||||
assert!(trace.contains("selected=3"), "all three files are selected: {trace}");
|
||||
assert!(trace.contains("reused_files=3"), "and every record came from the store: {trace}");
|
||||
assert!(trace.contains("other_files=1"), "bystander.sv is the unread one: {trace}");
|
||||
assert!(trace.contains("parses{index=2"), "so only the two analysed files: {trace}");
|
||||
|
||||
let bare = Tree::new("reuse_none");
|
||||
let (plain, plain_uri) = three_with_store(&bare, None);
|
||||
let mut plain_line = None;
|
||||
let no_store = rename_traced(&plain, &plain_uri, at(TOP, "clk"), "clk_x", &mut plain_line)
|
||||
.expect("the rename succeeds");
|
||||
let plain_trace = plain_line.expect("a trace is always written");
|
||||
assert!(plain_trace.contains("reused_files=0"), "premise: no store, no reuse");
|
||||
assert!(plain_trace.contains("parses{index=3"), "premise: all three parsed");
|
||||
|
||||
assert_eq!(
|
||||
print(&with_store, &tree.path),
|
||||
print(&no_store, &bare.path),
|
||||
"the reuse changed an edit or a warning"
|
||||
);
|
||||
}
|
||||
|
||||
/// **Unsaved-buffer precedence, for free.** A buffer whose text disagrees
|
||||
/// with the file on disk is not the bytes any record was written from, so
|
||||
/// the store answers nothing for it and it is parsed — and the rename acts
|
||||
/// on the buffer's text, which is the precedence it always had.
|
||||
///
|
||||
/// Nothing in the reuse arranges this: the key is the content, so unsaved
|
||||
/// text misses the same way changed text does.
|
||||
#[test]
|
||||
fn an_unsaved_buffer_is_parsed_and_renamed_from_its_own_text() {
|
||||
let tree = Tree::new("reuse_unsaved");
|
||||
let store = Tree::new("reuse_unsaved_cache");
|
||||
let (mut ws, uri) = three_with_store(&tree, Some(&store));
|
||||
// A signal that exists only in the buffer. Its record cannot be in a
|
||||
// store keyed on what is on disk.
|
||||
let edited = "module top;\n logic only_here;\n sub u_sub (.clk(only_here));\nendmodule\n";
|
||||
ws.set_document(uri.clone(), edited.to_string());
|
||||
|
||||
let mut line = None;
|
||||
let (edit, _) = rename_traced(&ws, &uri, at(edited, "only_here"), "renamed", &mut line)
|
||||
.expect("the buffer's own declaration renames");
|
||||
let trace = line.expect("a trace is always written");
|
||||
assert!(trace.contains("reused_files=1"), "only the untouched buffer's record: {trace}");
|
||||
assert!(trace.contains("lead=0.0ms") || trace.contains("parses{index=1"), "{trace}");
|
||||
let edits = edit.changes.as_ref().expect("changes").values().flatten().count();
|
||||
assert_eq!(edits, 2, "the declaration and its one use, both in the buffer");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn prepare_offers_the_identifier_and_its_placeholder() {
|
||||
let tree = Tree::new("prepare");
|
||||
@@ -1030,4 +1182,106 @@ mod tests {
|
||||
"and it is the engine's sentence, not the census's: {warning}"
|
||||
);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// The engine-owned preflight (take 5 review §3 item 6, TODO §61.1)
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
/// A cursor on nothing used to select every in-scope file, parse all of
|
||||
/// them and index them before the engine's 0.1 ms refusal. The preflight
|
||||
/// is only worth having if that is now literally no parses at all — not
|
||||
/// fewer, none — so the gate is asserted, not measured.
|
||||
#[test]
|
||||
fn a_rename_on_a_cursor_with_no_symbol_parses_nothing() {
|
||||
let tree = Tree::new("nosymbolparses");
|
||||
let (ws, uri) = opened(&tree);
|
||||
let at_comment = TOP.len() as u32 - 1; // the newline after `endmodule`
|
||||
|
||||
let before = vlog_parser::stats::parses();
|
||||
let mut trace = None;
|
||||
let refusal =
|
||||
rename_traced(&ws, &uri, at_comment, "probe", &mut trace).expect_err("no symbol there");
|
||||
let parses = vlog_parser::stats::parses() - before;
|
||||
|
||||
assert_eq!(parses, 0, "the refusal parsed {parses} whole files");
|
||||
assert_eq!(refusal, "there is no symbol to rename at this position.");
|
||||
|
||||
// And the `--verbose` channel says so in its own fields, so the phase
|
||||
// that measures this row reads the parse count instead of trusting it.
|
||||
let trace = trace.expect("a refusal traces too");
|
||||
assert!(trace.contains("selected=0"), "{trace}");
|
||||
assert!(trace.contains("parses=0"), "{trace}");
|
||||
assert!(trace.contains("preflight=true"), "{trace}");
|
||||
}
|
||||
|
||||
/// …and it is the same sentence the whole workspace produced, taken from
|
||||
/// the engine over every in-scope file rather than from this module.
|
||||
#[test]
|
||||
fn the_preflights_refusal_is_the_whole_workspaces_refusal() {
|
||||
let tree = Tree::new("preflightparity");
|
||||
let (ws, uri) = opened(&tree);
|
||||
let path = tree.path.join("top.sv");
|
||||
for (case, offset) in [
|
||||
("past the last item", TOP.len() as u32 - 1),
|
||||
("on the `module` keyword", at(TOP, "module")),
|
||||
("on a literal", at(TOP, "1'b0")),
|
||||
] {
|
||||
let fast = rename(&ws, &uri, offset, "probe").expect_err(case);
|
||||
let slow = vlog_refactor::rename(&ws.sources(), &path, offset, "probe")
|
||||
.expect_err("the whole workspace refuses too");
|
||||
assert_eq!(fast, slow, "{case}");
|
||||
}
|
||||
}
|
||||
|
||||
/// Precedence, in the two places the preflight could have disturbed it: an
|
||||
/// unusable buffer is refused by this module before the engine is asked
|
||||
/// anything, and an invalid new name outranks whatever the cursor is on.
|
||||
#[test]
|
||||
fn the_preflight_does_not_disturb_the_refusal_order() {
|
||||
let tree = Tree::new("preflightorder");
|
||||
let (ws, uri) = opened(&tree);
|
||||
|
||||
let untitled = Uri::from_str("untitled:Untitled-1").expect("uri");
|
||||
let mut with_untitled = Workspace::default();
|
||||
with_untitled.set_document(untitled.clone(), TOP.to_string());
|
||||
assert_eq!(
|
||||
rename(&with_untitled, &untitled, at(TOP, "u_sub"), "probe").expect_err("unsaved"),
|
||||
UNSAVED,
|
||||
"an untitled buffer is refused before the engine sees the cursor"
|
||||
);
|
||||
|
||||
// A cursor on nothing *and* a keyword for a new name: the name's
|
||||
// sentence, which is the one `renaming` reaches first.
|
||||
let refusal = rename(&ws, &uri, TOP.len() as u32 - 1, "module").expect_err("a keyword");
|
||||
assert_eq!(refusal, "`module` is a Verilog keyword.");
|
||||
}
|
||||
|
||||
/// The one buffer the preflight must never judge: on the large-file fast
|
||||
/// path every field but the text is the analysis of the *empty* file, so a
|
||||
/// preflight over it would refuse every cursor as symbolless. The
|
||||
/// large-buffer gate refuses the whole request first, and this pins that
|
||||
/// it still does.
|
||||
#[test]
|
||||
fn a_large_buffer_is_refused_before_the_preflight_could_see_it() {
|
||||
let tree = Tree::new("preflightlarge");
|
||||
tree.write("sub.sv", SUB);
|
||||
let top = tree.write("top.sv", TOP);
|
||||
let mut ws = Workspace::default();
|
||||
ws.set_client_settings(crate::settings::ClientSettings {
|
||||
index_scope: crate::settings::IndexScope::Workspace,
|
||||
large_file_threshold: 1,
|
||||
..Default::default()
|
||||
});
|
||||
ws.open_whole_workspace(vec![tree.path.clone()]);
|
||||
let uri = path_to_uri(&top).expect("uri");
|
||||
ws.set_document(uri.clone(), TOP.to_string());
|
||||
|
||||
let doc = ws.document(&uri).expect("open");
|
||||
assert!(doc.large, "premise: the buffer took the fast path");
|
||||
assert!(
|
||||
vlog_refactor::rename_preflight(&doc.semantics, at(TOP, "u_sub"), "probe").is_err(),
|
||||
"premise: the empty analysis would refuse a real cursor, which is why \
|
||||
`server/large_file.rs` must answer this method before we are reached"
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -167,6 +167,46 @@ pub struct ScanTrace {
|
||||
/// 2026-09-08 that happens at the step that indexes each one, and is
|
||||
/// `read_ms` below (`docs/features/perf5-p4/README.md` §P4b3).
|
||||
pub discovery_ms: f64,
|
||||
|
||||
// -- discovery, split (TODO §61.3) ----------------------------------
|
||||
//
|
||||
// Five disjoint parts of `discovery_ms` and one counter. They are a split
|
||||
// *of* that stage, not stages beside it, so nothing that adds the scan up
|
||||
// may add these as well
|
||||
// (`docs/features/perf5r-first-answer/README.md`).
|
||||
/// Reading each walk root's `lucisv.toml` for its `exclude` patterns —
|
||||
/// `Discovery::for_dir`, cached per instance, so a second root under the
|
||||
/// same config costs a map lookup.
|
||||
pub config_ms: f64,
|
||||
/// The directory walks themselves: `read_dir`, `.gitignore` parsing, the
|
||||
/// cycle guard, and the one `metadata` per entry the walk has always made.
|
||||
pub walk_ms: f64,
|
||||
/// How many roots were walked — one per scope directory, so a folder scope
|
||||
/// over three open buffers' folders is three.
|
||||
pub walk_dirs: usize,
|
||||
/// Reading a filelist, when rung 1 is the one in force.
|
||||
pub filelist_ms: f64,
|
||||
/// Sorting the walk's output into path order and dropping the paths two
|
||||
/// overlapping walks both found.
|
||||
pub sort_ms: f64,
|
||||
/// Applying `lucisv.index.maxFileSize` to every walked file.
|
||||
pub cap_ms: f64,
|
||||
/// `metadata` calls the cap made *itself* — the ones the walk's hand-off
|
||||
/// did not already answer. Zero for a walked scope since 2026-09-08;
|
||||
/// a filelist's entries are not walked and still cost one each.
|
||||
pub stats: usize,
|
||||
/// Taking every open buffer's text and its finished analysis, and letting
|
||||
/// it override the disk copy of its own path.
|
||||
pub buffers_ms: f64,
|
||||
/// Directories the remaining walk met under a spelling the root walk
|
||||
/// would have preferred — a directory alias outside the open folder's own
|
||||
/// chain ([`crate::state::Scan::wants_rescan`]). 0 in every ordinary
|
||||
/// session; 1 says this scan's paths are the head's spelling.
|
||||
pub conflict: usize,
|
||||
/// Whole rescans this scan asked for on its way out. One per `conflict`,
|
||||
/// and nothing else sets it.
|
||||
pub rescan_requested: usize,
|
||||
|
||||
/// Sorting into index order and putting the user's own neighbourhood at
|
||||
/// the front ([`crate::scan_order`]).
|
||||
pub order_ms: f64,
|
||||
@@ -365,7 +405,8 @@ impl ScanTrace {
|
||||
pub fn stage_line(&self) -> String {
|
||||
let c = &self.cache;
|
||||
format!(
|
||||
"scan {} stages ({}, {} files): discovery={:.2} order={:.2} cache_open={:.2} \
|
||||
"scan {} stages ({}, {} files): discovery={:.2} config={:.2} walk={:.2} \
|
||||
filelist={:.2} sort={:.2} cap={:.2} buffers={:.2} order={:.2} cache_open={:.2} \
|
||||
read={:.2} lookup={:.2} decode={:.2} parse={:.2} encode={:.2} store_write={:.2} \
|
||||
publish_absorb={:.2} publish_candidates={:.2} publish_includes={:.2} \
|
||||
publish_overlay={:.2} gone={:.2} absorb={:.2} compact={:.2} candidates={:.2} \
|
||||
@@ -374,6 +415,12 @@ impl ScanTrace {
|
||||
self.kind,
|
||||
self.read,
|
||||
self.discovery_ms,
|
||||
self.config_ms,
|
||||
self.walk_ms,
|
||||
self.filelist_ms,
|
||||
self.sort_ms,
|
||||
self.cap_ms,
|
||||
self.buffers_ms,
|
||||
self.order_ms,
|
||||
self.cache_open_ms,
|
||||
self.read_ms,
|
||||
@@ -402,13 +449,17 @@ impl ScanTrace {
|
||||
pub fn count_line(&self) -> String {
|
||||
let c = &self.cache;
|
||||
format!(
|
||||
"scan {} counts ({}): read={} read_kib={} skipped={} hits={} misses={} buffers={} \
|
||||
"scan {} counts ({}): read={} read_kib={} walk_dirs={} stats={} skipped={} \
|
||||
hits={} misses={} buffers={} \
|
||||
records={} repeats={} decoded_kib={} written_kib={} opens={} compactions={} \
|
||||
publishes={} published={} first_publish={:.2} overlays={}",
|
||||
publishes={} published={} first_publish={:.2} overlays={} \
|
||||
conflict={} rescan_requested={}",
|
||||
self.number,
|
||||
self.kind,
|
||||
self.read,
|
||||
kib(self.read_bytes),
|
||||
self.walk_dirs,
|
||||
self.stats,
|
||||
self.skipped,
|
||||
c.hits,
|
||||
c.misses,
|
||||
@@ -423,6 +474,8 @@ impl ScanTrace {
|
||||
self.published,
|
||||
self.first_publish_ms,
|
||||
self.overlays,
|
||||
self.conflict,
|
||||
self.rescan_requested,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ pub(super) fn cancelled_in(batch: &[Message]) -> HashSet<RequestId> {
|
||||
/// The request id a `$/cancelRequest` names, or `None` for any other message.
|
||||
/// Both id forms the protocol allows are read; a cancel whose params do not
|
||||
/// parse is dropped, because there is no id to act on.
|
||||
fn cancelled_id(message: &Message) -> Option<RequestId> {
|
||||
pub(super) fn cancelled_id(message: &Message) -> Option<RequestId> {
|
||||
let Message::Notification(notification) = message else { return None };
|
||||
if notification.method != Cancel::METHOD {
|
||||
return None;
|
||||
|
||||
@@ -45,10 +45,29 @@ use super::client::ms;
|
||||
use super::Server;
|
||||
use crate::{
|
||||
code_action, completion, design_hierarchy, extract, file_ops, folding, format, hierarchy,
|
||||
hover, imports, includes, inlay, inline, inline_module, lens, linked, lint, nav, pairs, ports,
|
||||
rename, selection, signature, symbols, tokens, type_def, type_hierarchy,
|
||||
hover, imports, includes, inlay, inline, inline_module, lens, linked, lint, lint_trace, nav,
|
||||
pairs, ports, rename, selection, signature, symbols, tokens, type_def, type_hierarchy,
|
||||
};
|
||||
|
||||
/// The requests whose empty answer may mean "this scan has not reached the
|
||||
/// file yet" rather than "there is nowhere to go".
|
||||
///
|
||||
/// All three answer with a **list of places** and with an empty list when they
|
||||
/// find none, so `[]` is exactly the shape that carries no information. Every
|
||||
/// other request is left alone: a hover's `null`, a completion's empty list and
|
||||
/// a code-action menu with no offers all mean what they say whatever the scan
|
||||
/// has reached, and deferring one would be withholding an answer rather than
|
||||
/// waiting for a better one. `textDocument/implementation` would belong here;
|
||||
/// this server does not answer it, so it is not written down as if it did.
|
||||
const NAVIGATION: [&str; 3] =
|
||||
[GotoDefinition::METHOD, GotoTypeDefinition::METHOD, References::METHOD];
|
||||
|
||||
/// Whether a response says **nowhere**: an answer, not a failure, and an empty
|
||||
/// list of places. See [`NAVIGATION`].
|
||||
pub(super) fn names_nowhere(response: &Response) -> bool {
|
||||
matches!(&response.response_result, Ok(Value::Array(found)) if found.is_empty())
|
||||
}
|
||||
|
||||
impl Server {
|
||||
/// Answer one request, timing it when `--verbose` asked.
|
||||
///
|
||||
@@ -61,18 +80,92 @@ impl Server {
|
||||
pub(super) fn request(&mut self, request: Request) -> Response {
|
||||
let Some(started) = self.timer() else { return self.answer_request(request) };
|
||||
let method = request.method.clone();
|
||||
// One trace per request, armed here so the flush this request triggers
|
||||
// is inside it: the diagnostics pass that publishes during the flush is
|
||||
// the *other* consumer of a lint result, and the two are only readable
|
||||
// against each other when one line carries both (review round §R1b).
|
||||
lint_trace::arm();
|
||||
let response = self.answer_request(request);
|
||||
self.timing(format!("{method} answered in {}", ms(started)));
|
||||
// Silent for every request that never linted anything, which is all of
|
||||
// them but the code actions and the flushes that publish diagnostics.
|
||||
if let Some(trace) = lint_trace::disarm().filter(|trace| !trace.is_empty()) {
|
||||
self.timing(format!(
|
||||
"codeaction method={method} total={} {}",
|
||||
ms(started),
|
||||
trace.line()
|
||||
));
|
||||
}
|
||||
response
|
||||
}
|
||||
|
||||
/// A copy of `request` to ask again at the scan's next publish, when an
|
||||
/// empty answer to it right now would mean "not scanned yet" rather than
|
||||
/// "nowhere".
|
||||
///
|
||||
/// **The lead's ruling from §61.3, as a rule in the drain.** A held
|
||||
/// startup request is answered the moment the user's own folder is
|
||||
/// published, and a definition whose target lives in another folder was
|
||||
/// answered `[]` there — coherent, and wrong by the time the scan ended.
|
||||
/// Rather than teach the drain to work out whether the published prefix
|
||||
/// resolves *this* request's target, the answer is computed through the
|
||||
/// ordinary handler and, when it names nowhere and the index is still
|
||||
/// growing, put back ([`Server::deferred`]).
|
||||
///
|
||||
/// **Only while a scan is running**, so a settled server answers empty
|
||||
/// exactly as it always did — including the last try, after the scan ends.
|
||||
/// **Only the three navigation methods that answer with a list of places**
|
||||
/// ([`NAVIGATION`]): a hover, a completion, a code action or a rename is
|
||||
/// unaffected, and so is every request whose empty answer means something
|
||||
/// else. `textDocument/implementation` is not on the list because this
|
||||
/// server does not answer it.
|
||||
pub(super) fn ask_again_if_empty(&self, request: &Request) -> Option<Request> {
|
||||
if !self.scanning || !NAVIGATION.contains(&request.method.as_str()) {
|
||||
return None;
|
||||
}
|
||||
Some(Request::new(request.id.clone(), request.method.clone(), request.params.clone()))
|
||||
}
|
||||
|
||||
/// `--verbose`: that a navigation answer was set aside for the next
|
||||
/// publish rather than sent, and how many are waiting with it.
|
||||
pub(super) fn say_deferred(&self, request: &Request) {
|
||||
if !self.verbose {
|
||||
return;
|
||||
}
|
||||
self.timing(format!(
|
||||
"{} DEFERRED to the next publish (empty mid-scan, already deferred={})",
|
||||
request.method,
|
||||
self.deferred.len()
|
||||
));
|
||||
}
|
||||
|
||||
/// [`Server::flush_dirty`], with the dirty-buffer stage measured apart
|
||||
/// from the handler that follows it.
|
||||
///
|
||||
/// The review's item 4: *if the dirty-buffer stage dominates the 136 ms, a
|
||||
/// lint cache alone cannot fix it*. The flush rebuilds each dirty
|
||||
/// `Document` (parse and analysis, counted as whole-file parses) and then
|
||||
/// publishes its diagnostics, which lints; the handler lints again. One
|
||||
/// line carrying both is what makes the two comparable.
|
||||
fn flush_dirty_traced(&mut self) {
|
||||
if !lint_trace::armed() {
|
||||
return self.flush_dirty();
|
||||
}
|
||||
let buffers = self.dirty.len();
|
||||
let before = vlog_parser::stats::parses();
|
||||
let started = std::time::Instant::now();
|
||||
self.flush_dirty();
|
||||
let parses = vlog_parser::stats::parses().saturating_sub(before);
|
||||
lint_trace::close_flush(started.elapsed(), buffers, parses);
|
||||
}
|
||||
|
||||
fn answer_request(&mut self, request: Request) -> Response {
|
||||
// A request answers from a buffer's analysis, so any change the client
|
||||
// has already sent is in effect before it is answered — the order
|
||||
// contract the loop has always promised. Here is also where a typing
|
||||
// burst is coalesced: the changes before this request all become one
|
||||
// `set_document` in `flush_dirty`.
|
||||
self.flush_dirty();
|
||||
self.flush_dirty_traced();
|
||||
let id = request.id.clone();
|
||||
let method = request.method.clone();
|
||||
// The large-file fast path answers first, and for most methods it
|
||||
@@ -262,9 +355,9 @@ impl Server {
|
||||
if code_action::wants_fixes(only.as_deref()) {
|
||||
// A code-action request carries no `tabSize`, so the width a
|
||||
// `no-tabs` fix writes comes from the buffer's own `lucisv.toml`
|
||||
// or from the built-in default.
|
||||
let tab_width =
|
||||
format::indent_width(doc.path.as_deref(), self.workspace.client_settings());
|
||||
// or from the built-in default — read by the run itself, off
|
||||
// the `FileConfig` it discovers anyway, so this path no longer
|
||||
// walks for a config file twice (review round §R1a).
|
||||
let run = lint::LintRun::for_document(&self.workspace, doc);
|
||||
actions.extend(code_action::code_actions(
|
||||
&run,
|
||||
@@ -272,7 +365,6 @@ impl Server {
|
||||
doc,
|
||||
p.range,
|
||||
only.as_deref(),
|
||||
tab_width,
|
||||
));
|
||||
}
|
||||
// The port refactorings answer for the cursor, not for a range:
|
||||
|
||||
@@ -221,9 +221,29 @@ impl Server {
|
||||
self.scanning = false;
|
||||
// A neighbourhood can only be owed by a scan, and there is none now.
|
||||
self.head_owed = false;
|
||||
self.answer_what_was_deferred();
|
||||
warnings
|
||||
}
|
||||
|
||||
/// Answer whatever the empty-answer rule set aside, now that the index has
|
||||
/// stopped growing.
|
||||
///
|
||||
/// **The other half of that rule, and the reason it can never strand a
|
||||
/// request.** A navigation answer was deferred because `[]` might have
|
||||
/// meant "not scanned yet"; here it cannot mean that any more, so an empty
|
||||
/// answer is the honest one and goes out. The scan is over, so
|
||||
/// [`Server::ask_again_if_empty`] defers nothing this time round — and a
|
||||
/// request the order contract still holds, one behind something already
|
||||
/// `held`, is put back by `process_batch`'s own rule exactly as any other
|
||||
/// message would be.
|
||||
pub(super) fn answer_what_was_deferred(&mut self) {
|
||||
let deferred = std::mem::take(&mut self.deferred);
|
||||
if deferred.is_empty() || self.stopped {
|
||||
return;
|
||||
}
|
||||
self.stopped = !matches!(self.process_batch(deferred), Ok(false));
|
||||
}
|
||||
|
||||
/// One whole scan: the bar up, every file indexed with the client's
|
||||
/// messages answered between two of them, the bar down.
|
||||
///
|
||||
@@ -241,24 +261,54 @@ impl Server {
|
||||
let verbose = started.is_some();
|
||||
let bar = self.begin_indexing();
|
||||
let mut scan = self.watching(bar.as_ref(), |ws, watch| ws.begin_scan(watch, verbose));
|
||||
let interleave = scan.total() > INTERLEAVE_ABOVE;
|
||||
// A scan that has walked the user's own folders and owes itself the
|
||||
// rest of the workspace **always** interleaves, whatever its work list
|
||||
// says today: the whole point of leading with that neighbourhood is
|
||||
// that the request waiting for it is answered the moment it is in
|
||||
// (`docs/features/perf5r-first-answer/README.md`).
|
||||
let interleave = scan.total() > INTERLEAVE_ABOVE || scan.discovery_pending();
|
||||
let total = scan.total();
|
||||
if started.is_some() {
|
||||
// Whether it interleaves is said here because it is decided here,
|
||||
// and because it is the answer to "why did my hover wait?" — a
|
||||
// scan that does not interleave answers nothing until it is done.
|
||||
let interleaving = if interleave { ", interleaved" } else { "" };
|
||||
self.timing(format!("scan started: {total} file{}{interleaving}", plural(total)));
|
||||
let staged = if scan.discovery_pending() { " (the folder first)" } else { "" };
|
||||
self.timing(format!(
|
||||
"scan started: {total} file{}{staged}{interleaving}",
|
||||
plural(total)
|
||||
));
|
||||
}
|
||||
while self.watching(bar.as_ref(), |workspace, watch| workspace.scan_step(&mut scan, watch))
|
||||
{
|
||||
loop {
|
||||
// **No bar while the denominator can still grow.** The work list
|
||||
// is the neighbourhood so far, and a percentage against it would
|
||||
// fall to a twentieth of itself the moment the rest of the
|
||||
// workspace lands. The per-file log still runs — it names files,
|
||||
// not fractions — and the first percentage the client sees is the
|
||||
// first measured one (`docs/features/indexing-ux/README.md`).
|
||||
let showing = if scan.discovery_pending() { None } else { bar.as_ref() };
|
||||
let stepped =
|
||||
self.watching(showing, |workspace, watch| workspace.scan_step(&mut scan, watch));
|
||||
if !stepped {
|
||||
break;
|
||||
}
|
||||
if interleave && self.answer_what_is_waiting(&mut scan) {
|
||||
// Nothing after this may speak to a client that has gone, the
|
||||
// timing line included.
|
||||
return Vec::new();
|
||||
}
|
||||
}
|
||||
let total = scan.total();
|
||||
let (skipped, cached) = (scan.skipped(), scan.cached());
|
||||
// A split discovery whose two halves reached one directory by two
|
||||
// spellings: nothing was indexed twice, and every answer this scan
|
||||
// gives is the right one, but the paths are the head's and a plain
|
||||
// walk of the same tree spells them the other way
|
||||
// ([`Scan::wants_rescan`]). One ordinary rescan *is* that plain walk,
|
||||
// so it converges them — asked for with the same flag a save or a
|
||||
// settings change sets, and therefore run when this scan ends, with
|
||||
// every request held for the whole of it.
|
||||
self.rescan_wanted |= scan.wants_rescan();
|
||||
let warnings = self.workspace.finish_scan(scan);
|
||||
self.end_indexing(bar, skipped, cached);
|
||||
self.timed(started, |took| {
|
||||
@@ -313,13 +363,22 @@ impl Server {
|
||||
/// **This is the round's whole point, and its whole cost.** Polling costs
|
||||
/// one `try_recv` per file and finds nothing in a scan nobody is waiting
|
||||
/// on, so a quiet scan pays nothing at all; a scan somebody *is* waiting
|
||||
/// on pays one merge per burst to make the records it has taken since the
|
||||
/// last one answerable ([`Workspace::publish_scan`]). The messages then go
|
||||
/// on pays a merge to make the records it has taken since the last one
|
||||
/// answerable ([`Workspace::publish_scan`]). The messages then go
|
||||
/// through the same `process_batch` the loop uses, so a `didChange` queued
|
||||
/// ahead of a hover is applied before that hover is answered and a cancel
|
||||
/// beside its request still answers it `RequestCancelled` — the order
|
||||
/// contract is the loop's, unchanged, because it is the loop's code.
|
||||
///
|
||||
/// **A merge per burst was the cost; a merge per 512 files is what it is
|
||||
/// now.** [`Scan::publish_is_due`] is the cadence, and the one drain
|
||||
/// exempt from it is the one with something *waiting* — the startup's held
|
||||
/// requests, drained the moment the neighbourhood is in, which is the
|
||||
/// session's first useful answer and must not be a file later than it was
|
||||
/// (`docs/features/perf5r-first-answer/README.md`). Everything else reads
|
||||
/// a coherent prefix that is at most a cadence older, which is the trade
|
||||
/// `docs/features/perf5r-publication/README.md` measures.
|
||||
///
|
||||
/// An error here is a client that has gone: there is nobody to report it
|
||||
/// to and no reason to go on scanning, so it stops the scan the same way a
|
||||
/// `shutdown` does.
|
||||
@@ -329,9 +388,24 @@ impl Server {
|
||||
// would be `[]` (`docs/features/perf5-p4/README.md` §P4b3).
|
||||
self.head_owed = !scan.neighbourhood_indexed();
|
||||
let mut batch = self.waiting_for_this_scan();
|
||||
let owed = !batch.is_empty();
|
||||
let mut arrived = Vec::new();
|
||||
while let Ok(message) = self.queue.try_recv() {
|
||||
batch.push(message);
|
||||
arrived.push(message);
|
||||
}
|
||||
// A quiet scan pays nothing at all, and that is a promise: the cadence
|
||||
// is asked only when there is something for a publish to be *for*.
|
||||
if !owed && arrived.is_empty() && self.deferred.is_empty() {
|
||||
return false;
|
||||
}
|
||||
if owed || scan.publish_is_due() {
|
||||
self.workspace.publish_scan(scan);
|
||||
// A navigation answer this scan could not give yet is asked again
|
||||
// off the prefix that has just grown — behind whatever was already
|
||||
// waiting, ahead of everything newer ([`Server::deferred`]).
|
||||
batch.append(&mut self.deferred);
|
||||
}
|
||||
batch.append(&mut arrived);
|
||||
if batch.is_empty() {
|
||||
return false;
|
||||
}
|
||||
@@ -343,14 +417,13 @@ impl Server {
|
||||
// recomputed below once the new head segment is known.
|
||||
let opened = !opened_in(&batch).is_empty();
|
||||
self.head_owed |= opened;
|
||||
self.workspace.publish_scan(scan);
|
||||
self.stopped = !matches!(self.process_batch(batch), Ok(false));
|
||||
// The files the user has just opened, and the folders around them, are
|
||||
// what they are looking at, so they are indexed next rather than when
|
||||
// the alphabet reaches them — the open-first rule, for buffers opened
|
||||
// after the work list was taken.
|
||||
if opened {
|
||||
self.workspace.open_next(scan);
|
||||
self.watching(None, |workspace, watch| workspace.open_next(scan, watch));
|
||||
self.head_owed = !scan.neighbourhood_indexed();
|
||||
}
|
||||
self.stopped
|
||||
|
||||
@@ -46,7 +46,8 @@ use lsp_types::{SemanticToken, Uri};
|
||||
|
||||
use crate::state::Workspace;
|
||||
|
||||
use batch::{burst, cancelled_in, cancelled_response};
|
||||
use batch::{burst, cancelled_id, cancelled_in, cancelled_response};
|
||||
use dispatch::names_nowhere;
|
||||
|
||||
mod batch;
|
||||
mod client;
|
||||
@@ -227,6 +228,23 @@ pub struct Server {
|
||||
/// [`Server::must_wait`] — this is the order contract, not a queue of its
|
||||
/// own.
|
||||
held: Vec<Message>,
|
||||
/// Navigation requests a scan answered **empty** while it was still
|
||||
/// growing the index, to be asked again at its next publish.
|
||||
///
|
||||
/// **Not a second `held`, and deliberately not part of
|
||||
/// [`Server::must_wait`].** A held request is one the order contract says
|
||||
/// nothing newer may overtake; this is one whose answer was computed,
|
||||
/// found to name nowhere, and set aside because the reason it named
|
||||
/// nowhere may be that the file it wants has not been scanned yet
|
||||
/// (`docs/features/perf5r-publication/README.md`). Nothing else is owed
|
||||
/// anything by it — a hover, a completion or a code action behind one is
|
||||
/// answered exactly as before — and it is asked again at most once per
|
||||
/// publish, so the re-computation is bounded by the cadence and not by the
|
||||
/// scan's file count. A scan ending runs whatever is left through the
|
||||
/// dispatch one last time, with itself already over — so nothing is
|
||||
/// deferred that time round and an empty answer, which is now the honest
|
||||
/// one, goes out ([`Server::answer_what_was_deferred`]).
|
||||
deferred: Vec<Message>,
|
||||
/// `--verbose`: whether every operation says how long it took, in the
|
||||
/// client's log channel. Off is the shipped state and the whole of what it
|
||||
/// costs is the branch that reads this field — see
|
||||
@@ -393,7 +411,20 @@ impl Server {
|
||||
let response = if cancelled.remove(&request.id) {
|
||||
cancelled_response(request.id)
|
||||
} else {
|
||||
self.request(request)
|
||||
// A navigation request whose answer would be `[]` only
|
||||
// because the scan has not reached its target yet is
|
||||
// asked again at the next publish rather than answered
|
||||
// with nowhere ([`Server::deferred`]).
|
||||
let again = self.ask_again_if_empty(&request);
|
||||
let response = self.request(request);
|
||||
match again.filter(|_| names_nowhere(&response)) {
|
||||
Some(request) => {
|
||||
self.say_deferred(&request);
|
||||
self.deferred.push(Message::Request(request));
|
||||
continue;
|
||||
}
|
||||
None => response,
|
||||
}
|
||||
};
|
||||
self.connection.sender.send(Message::Response(response))?;
|
||||
}
|
||||
@@ -402,7 +433,14 @@ impl Server {
|
||||
// already been done above. Kept only so that a request behind
|
||||
// one that has to wait takes its cancel with it.
|
||||
Message::Notification(notification) if notification.method == Cancel::METHOD => {
|
||||
consumed_cancels.push(Message::Notification(notification));
|
||||
let cancel = Message::Notification(notification);
|
||||
// A request the empty-answer rule set aside is not in this
|
||||
// burst, so `cancelled_in` cannot see it — but it is still
|
||||
// a request the client is waiting on, and a cancel for it
|
||||
// is honoured where it lands: answered `RequestCancelled`
|
||||
// now, and never asked again (QA, perf5r-publication).
|
||||
self.cancel_deferred(&cancel)?;
|
||||
consumed_cancels.push(cancel);
|
||||
}
|
||||
Message::Notification(notification) => self.notification(notification),
|
||||
Message::Response(response) => self.response(response),
|
||||
@@ -411,6 +449,22 @@ impl Server {
|
||||
Ok(false)
|
||||
}
|
||||
|
||||
/// Honour a `$/cancelRequest` naming a request in [`Server::deferred`]:
|
||||
/// take it out and answer it cancelled. A cancel naming anything else is
|
||||
/// left to the batch's own rule.
|
||||
fn cancel_deferred(&mut self, cancel: &Message) -> Result<(), Box<dyn Error + Sync + Send>> {
|
||||
let Some(id) = cancelled_id(cancel) else { return Ok(()) };
|
||||
let found = self
|
||||
.deferred
|
||||
.iter()
|
||||
.position(|message| matches!(message, Message::Request(request) if request.id == id));
|
||||
if let Some(at) = found {
|
||||
self.deferred.remove(at);
|
||||
self.connection.sender.send(Message::Response(cancelled_response(id)))?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Whether a request reaching the dispatch right now must wait instead of
|
||||
/// being answered.
|
||||
///
|
||||
|
||||
@@ -45,6 +45,26 @@ use crate::state::Workspace;
|
||||
/// nothing does not leave a workspace unindexed.
|
||||
pub(super) const CONFIGURATION_WAIT: Duration = Duration::from_secs(2);
|
||||
|
||||
/// How long a startup waits, *after* the settings answer, for the editor to
|
||||
/// say which file it has open.
|
||||
///
|
||||
/// **Only when that name changes what the scan does.** A workspace-scoped scan
|
||||
/// with a buffer open walks that buffer's folder first, indexes it, and
|
||||
/// answers the request waiting for it in ~115 ms; without the name it walks
|
||||
/// all 3 976 files first and answers in ~290
|
||||
/// (`docs/features/perf5r-first-answer/README.md`). The two messages are
|
||||
/// written by the client at the same moment — the settings answer by whatever
|
||||
/// handles server-initiated requests, the `didOpen` by the editor — so which
|
||||
/// arrives first is a coin toss, and losing it costs 175 ms of the thing this
|
||||
/// round is about. This is that coin toss removed.
|
||||
///
|
||||
/// It is spent **only** by a session that is going to walk a whole workspace
|
||||
/// and has no buffer at all yet: a folder-scoped session has nothing to lead
|
||||
/// with, and a session whose buffer is already in hand stops waiting the
|
||||
/// moment it applies one. So the session that pays the full bound is the one
|
||||
/// with an empty editor, where nothing is waiting on the scan.
|
||||
pub(super) const OPENING_FILE_WAIT: Duration = Duration::from_millis(25);
|
||||
|
||||
/// Everything a session starts with that is not the connection or the roots.
|
||||
///
|
||||
/// One struct rather than six more parameters: `started` is the seam every
|
||||
@@ -147,6 +167,7 @@ impl Server {
|
||||
answering_a_rescan: false,
|
||||
stopped: false,
|
||||
held: Vec::new(),
|
||||
deferred: Vec::new(),
|
||||
verbose,
|
||||
born: Instant::now(),
|
||||
}
|
||||
@@ -233,10 +254,45 @@ impl Server {
|
||||
self.staging = true;
|
||||
self.request_configuration();
|
||||
self.await_configuration(wait);
|
||||
// Inside the staging window, because it is the same window: every
|
||||
// request is still held, and the scan has still not begun.
|
||||
if !wait.is_zero() && !self.stopped {
|
||||
self.await_opening_file(OPENING_FILE_WAIT);
|
||||
}
|
||||
self.staging = false;
|
||||
self.rescan_wanted = false;
|
||||
}
|
||||
|
||||
/// Wait a bounded moment for the editor's first `didOpen`, when knowing
|
||||
/// which folder the user is in is what decides the shape of the scan
|
||||
/// about to run ([`OPENING_FILE_WAIT`]).
|
||||
///
|
||||
/// Silent for every session that would not spend the knowledge: only a
|
||||
/// workspace-scoped scan leads with a folder, and only one with nothing
|
||||
/// open has a folder still to learn. The loop stops on the first buffer
|
||||
/// rather than draining the bound, so the ordinary session pays what the
|
||||
/// message took to arrive and nothing more.
|
||||
///
|
||||
/// **Not a scope decision.** Which files the scan indexes is settled by
|
||||
/// the settings that have just landed; this decides only which of them it
|
||||
/// indexes *first*, which `vlog_semantic::IndexBuilder` cannot see
|
||||
/// (`crate::scan_order`).
|
||||
fn await_opening_file(&mut self, wait: Duration) {
|
||||
if !self.workspace.leads_with_a_folder() {
|
||||
return;
|
||||
}
|
||||
let asked = Instant::now();
|
||||
while self.workspace.open_uris().is_empty() {
|
||||
let Some(left) = wait.checked_sub(asked.elapsed()) else { return };
|
||||
let Ok(message) = self.queue.recv_timeout(left) else { return };
|
||||
let batch = burst(&self.queue, message);
|
||||
self.stopped = !matches!(self.process_batch(batch), Ok(false));
|
||||
if self.stopped {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Read the client's messages until it answers the settings pull, the
|
||||
/// bound runs out, or it goes away.
|
||||
///
|
||||
|
||||
@@ -386,3 +386,35 @@ fn a_cancel_naming_a_server_initiated_id_does_not_touch_response_routing() {
|
||||
// cancel did not intercept it.
|
||||
session.answer(server_id, Value::Null);
|
||||
}
|
||||
|
||||
/// A request the empty-answer rule set aside (`Server::deferred`,
|
||||
/// perf5r-publication) is not in any burst, so the burst's own cancel rule
|
||||
/// cannot see it. A cancel for it must still be honoured where it lands:
|
||||
/// answered `RequestCancelled` at once, taken out of the deferred set, and
|
||||
/// never asked again when the scan ends. Found by QA on §61.4; the request is
|
||||
/// planted directly because a real deferral lives only inside a running scan.
|
||||
#[test]
|
||||
fn a_cancel_for_a_deferred_request_answers_it_cancelled_and_forgets_it() {
|
||||
let (_tree, mut session, uri) = cancelling_session("cancel-deferred", ONE_MODULE);
|
||||
let parked = Request::new(
|
||||
RequestId::from(41),
|
||||
GotoDefinition::METHOD.to_string(),
|
||||
serde_json::json!({
|
||||
"textDocument": { "uri": uri },
|
||||
"position": { "line": 0, "character": 7 }
|
||||
}),
|
||||
);
|
||||
session.server.deferred.push(Message::Request(parked));
|
||||
|
||||
session.server.process_batch(vec![cancel(serde_json::json!(41))]).expect("a burst");
|
||||
assert_eq!(outcomes(&session), vec![(RequestId::from(41), Some(CANCELLED))]);
|
||||
assert!(session.server.deferred.is_empty(), "the cancelled request is not asked again");
|
||||
|
||||
// And the scan's end finds nothing left to answer: exactly one response.
|
||||
session.server.answer_what_was_deferred();
|
||||
assert!(outcomes(&session).is_empty(), "a cancelled request is answered once");
|
||||
|
||||
// A cancel naming a request that is *not* deferred changes nothing.
|
||||
session.server.process_batch(vec![cancel(serde_json::json!(42))]).expect("a burst");
|
||||
assert!(outcomes(&session).is_empty());
|
||||
}
|
||||
@@ -0,0 +1,370 @@
|
||||
//! One test per row of the lint snapshot's invalidation table.
|
||||
//!
|
||||
//! Take 5 **review** round §R1a
|
||||
//! (`docs/features/perf5r-lint-snapshot/README.md`). A `Document` keeps the
|
||||
//! findings of one `lint_with` pass so that the diagnostics publish and
|
||||
//! quick-fix discovery do not run the same 21 ms twice on one revision. What
|
||||
//! makes that legitimate is that **every input which can change the answer
|
||||
//! either builds a new `Document`, or is in the key, or clears the slot** —
|
||||
//! and the README's table has one row per input.
|
||||
//!
|
||||
//! This file walks that table through the real doors: a `didChange`, a
|
||||
//! `didChangeConfiguration`, a `lucisv.toml` rewritten on disk, a waiver file
|
||||
//! rewritten in place, a watched file in **another** buffer, a close and
|
||||
//! reopen, a UTF-16 range, a large buffer — and one attack, a fix offered for
|
||||
//! a span the buffer no longer has.
|
||||
//!
|
||||
//! Reuse is observed by pointer, not by a stopwatch: two passes that share a
|
||||
//! snapshot answer with the same `Arc`, and one that recomputed cannot. A
|
||||
//! timing assertion on a lint pass would be a flake; `Arc::ptr_eq` is not.
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use vlog_linter::Violation;
|
||||
|
||||
use super::*;
|
||||
use crate::lint::{fixable, violations_in, LintRun};
|
||||
|
||||
/// A module with one tab in it: one `no-tabs` finding, carrying a Safe fix
|
||||
/// whose text is the indent width. Line 1 is the tab.
|
||||
const TABBED: &str = "module m;\n\twire a;\nendmodule\n";
|
||||
|
||||
/// A session over `tree` with `m.sv` open, its diagnostics already published.
|
||||
fn opened(tree: &Tree, text: &str) -> (Session, Uri) {
|
||||
let mut session = Session::wide(vec![tree.path.clone()], true);
|
||||
let uri = session.open(&tree.path.join("m.sv"), text);
|
||||
let _ = session.drain();
|
||||
(session, uri)
|
||||
}
|
||||
|
||||
/// The findings quick-fix discovery would offer for `uri` right now, taken
|
||||
/// through the same two calls the dispatcher makes.
|
||||
fn offered(session: &Session, uri: &Uri) -> Arc<[Violation]> {
|
||||
let doc = session.server.workspace.document(uri).expect("an open buffer");
|
||||
let run = LintRun::for_document(&session.server.workspace, doc);
|
||||
fixable(&run, doc)
|
||||
}
|
||||
|
||||
/// The rules that fired, by name, in the order they fired.
|
||||
fn rules(found: &[Violation]) -> Vec<&'static str> {
|
||||
found.iter().map(|violation| violation.rule).collect()
|
||||
}
|
||||
|
||||
/// The replacement text of the first fix, for the rows about fix bytes.
|
||||
fn fix_text(found: &[Violation]) -> String {
|
||||
let fix = found.first().and_then(|v| v.fix.as_ref()).expect("a fix");
|
||||
fix.edits.first().map(|(_, text)| text.clone()).expect("an edit")
|
||||
}
|
||||
|
||||
/// Push one `lucisv.lint.*` section and let the republish it triggers settle.
|
||||
fn push_lint_settings(session: &mut Session, lint: Value) {
|
||||
session.notify(
|
||||
DidChangeConfiguration::METHOD,
|
||||
serde_json::json!({ "settings": { "lucisv": { "lint": lint } } }),
|
||||
);
|
||||
let _ = session.drain();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// the headline: one pass, two consumers
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
/// The whole point of the round. A `didOpen` publishes diagnostics, which
|
||||
/// lints; the code action that follows reads **that** answer rather than
|
||||
/// running the rules again, and the two are the same object.
|
||||
#[test]
|
||||
fn the_diagnostics_publish_and_the_quick_fix_pass_share_one_lint() {
|
||||
let tree = Tree::new("lsshare");
|
||||
let (session, uri) = opened(&tree, TABBED);
|
||||
let doc = session.server.workspace.document(&uri).expect("open");
|
||||
assert!(
|
||||
!doc.lint.is_empty(),
|
||||
"the publish that answered the didOpen left its findings on the document"
|
||||
);
|
||||
let run = LintRun::for_document(&session.server.workspace, doc);
|
||||
let published = violations_in(doc, &run);
|
||||
let fixes = fixable(&run, doc);
|
||||
assert!(Arc::ptr_eq(&published, &fixes), "one pass answers both doors");
|
||||
assert_eq!(rules(&published), vec!["no-tabs"]);
|
||||
// ... and asking twice more does not compute twice more.
|
||||
assert!(Arc::ptr_eq(&fixes, &fixable(&run, doc)));
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// row 1 — the buffer's own text
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
#[test]
|
||||
fn an_edited_buffer_is_relinted() {
|
||||
let tree = Tree::new("lsedit");
|
||||
let (mut session, uri) = opened(&tree, TABBED);
|
||||
assert_eq!(rules(&offered(&session, &uri)), vec!["no-tabs"], "premise");
|
||||
|
||||
change(
|
||||
&mut session,
|
||||
&uri,
|
||||
2,
|
||||
serde_json::json!([{ "text": "module m;\n wire a;\nendmodule\n" }]),
|
||||
);
|
||||
assert!(
|
||||
offered(&session, &uri).is_empty(),
|
||||
"the tab is gone, so the finding and its fix are gone"
|
||||
);
|
||||
|
||||
change(&mut session, &uri, 3, serde_json::json!([{ "text": TABBED }]));
|
||||
assert_eq!(rules(&offered(&session, &uri)), vec!["no-tabs"], "and back again");
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// row 2 — the large-file fast path
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
#[test]
|
||||
fn a_large_buffer_lints_nothing_and_stores_nothing() {
|
||||
let tree = Tree::new("lslarge");
|
||||
let mut session = Session::wide(vec![tree.path.clone()], true);
|
||||
session.notify(
|
||||
DidChangeConfiguration::METHOD,
|
||||
serde_json::json!({ "settings": { "lucisv": { "largeFile": { "threshold": 16 } } } }),
|
||||
);
|
||||
let uri = session.open(&tree.path.join("m.sv"), TABBED);
|
||||
let _ = session.drain();
|
||||
let doc = session.server.workspace.document(&uri).expect("open");
|
||||
assert!(doc.large, "premise: over the threshold");
|
||||
assert!(doc.lint.is_empty(), "a large buffer's publish lints nothing to keep");
|
||||
let menu = session.result(
|
||||
CodeActionRequest::METHOD,
|
||||
serde_json::json!({
|
||||
"textDocument": { "uri": uri },
|
||||
"range": { "start": { "line": 1, "character": 1 },
|
||||
"end": { "line": 1, "character": 1 } },
|
||||
"context": { "diagnostics": [] },
|
||||
}),
|
||||
);
|
||||
assert_eq!(menu, serde_json::json!([]), "and offers nothing");
|
||||
let doc = session.server.workspace.document(&uri).expect("open");
|
||||
assert!(doc.lint.is_empty(), "the request left no snapshot behind either");
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// rows 3 and 11 — the rule selection, pushed by the editor
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
#[test]
|
||||
fn a_pushed_rule_selection_is_relinted() {
|
||||
let tree = Tree::new("lsselect");
|
||||
let (mut session, uri) = opened(&tree, TABBED);
|
||||
assert_eq!(rules(&offered(&session, &uri)), vec!["no-tabs"], "premise");
|
||||
|
||||
push_lint_settings(&mut session, serde_json::json!({ "ignore": ["no-tabs"] }));
|
||||
assert!(offered(&session, &uri).is_empty(), "the setting silenced the rule and its fix");
|
||||
|
||||
push_lint_settings(&mut session, serde_json::json!({ "ignore": [] }));
|
||||
assert_eq!(rules(&offered(&session, &uri)), vec!["no-tabs"], "and un-silenced it");
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// rows 4, 5, 8 and 12 — the `lucisv.toml`, rewritten under a running server
|
||||
// with no watcher event of any kind
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
#[test]
|
||||
fn a_rewritten_toml_is_relinted() {
|
||||
let tree = Tree::new("lstoml");
|
||||
tree.write("lucisv.toml", "[lint]\nignore = [\"no-tabs\"]\n");
|
||||
let (session, uri) = opened(&tree, TABBED);
|
||||
assert!(offered(&session, &uri).is_empty(), "premise: the project ignores the rule");
|
||||
|
||||
// Rewritten behind the server's back. `watch::SOURCE_GLOB` covers
|
||||
// `**/*.{v,vh,sv,svh}` and the filelist, so **no event is sent** — the
|
||||
// only thing that can notice is the per-request read and the key.
|
||||
tree.write("lucisv.toml", "[lint]\nignore = [\"posix-eof\"]\n");
|
||||
assert_eq!(
|
||||
rules(&offered(&session, &uri)),
|
||||
vec!["no-tabs"],
|
||||
"the next request read the new file"
|
||||
);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// row 6 — the indent width, which is a fix's bytes
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
#[test]
|
||||
fn a_tab_width_change_rewrites_the_fix() {
|
||||
let tree = Tree::new("lsindent");
|
||||
let (session, uri) = opened(&tree, TABBED);
|
||||
assert_eq!(fix_text(&offered(&session, &uri)), " ", "premise: the default indent");
|
||||
|
||||
tree.write("lucisv.toml", "indent = 4\n");
|
||||
assert_eq!(
|
||||
fix_text(&offered(&session, &uri)),
|
||||
" ",
|
||||
"the same finding, a different fix — and the snapshot must not hand back the old one"
|
||||
);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// row 7 — an external waiver file, rewritten in place
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
#[test]
|
||||
fn a_rewritten_waiver_file_is_relinted() {
|
||||
let tree = Tree::new("lswaiver");
|
||||
tree.write("lucisv.toml", "[lint]\nwaivers = [\"team.waiver\"]\n");
|
||||
tree.write("team.waiver", "waive --rule=no-tabs\n");
|
||||
let (session, uri) = opened(&tree, TABBED);
|
||||
assert!(offered(&session, &uri).is_empty(), "premise: the waiver silences it");
|
||||
|
||||
// Rewritten to name a different rule. The two texts are different
|
||||
// lengths, so this row alone would pass on a length check too — the
|
||||
// same-length case is `lint_snapshot::tests`'
|
||||
// `a_waiver_rewritten_in_place_is_a_different_key`.
|
||||
tree.write("team.waiver", "waive --rule=posix-eof\n");
|
||||
assert_eq!(rules(&offered(&session, &uri)), vec!["no-tabs"], "the waiver moved");
|
||||
|
||||
tree.write("team.waiver", "waive --rule=no-tabs\n");
|
||||
assert!(offered(&session, &uri).is_empty(), "and moved back");
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// rows 9 and 10 — the workspace index the census oracle reads
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
/// A change in **another** file, which is the row a document-revision key
|
||||
/// could not have covered: this buffer's bytes never move, and what the
|
||||
/// semantic rules say about it does.
|
||||
#[test]
|
||||
fn a_change_in_another_file_relints_this_one() {
|
||||
let tree = Tree::new("lsoracle");
|
||||
let dut = "module dut;\n logic dbg_probe;\nendmodule\n";
|
||||
tree.write("dut.sv", dut);
|
||||
tree.write(
|
||||
"tb.sv",
|
||||
"module tb;\n dut d ();\n initial $display(\"%b\", d.dbg_probe);\nendmodule\n",
|
||||
);
|
||||
let mut session = Session::wide(vec![tree.path.clone()], true);
|
||||
let uri = session.open(&tree.path.join("dut.sv"), dut);
|
||||
let _ = session.drain();
|
||||
assert!(
|
||||
offered(&session, &uri).is_empty(),
|
||||
"premise: another file reads the signal, so it is not unused"
|
||||
);
|
||||
|
||||
// The other file stops mentioning it, and the watcher says so.
|
||||
tree.write("tb.sv", "module tb;\n dut d ();\nendmodule\n");
|
||||
session.watched(&[tree.path.join("tb.sv")]);
|
||||
let _ = session.drain();
|
||||
assert_eq!(
|
||||
rules(&offered(&session, &uri)),
|
||||
vec!["unused-signal"],
|
||||
"the index moved, so the snapshot had to go"
|
||||
);
|
||||
|
||||
tree.write(
|
||||
"tb.sv",
|
||||
"module tb;\n dut d ();\n initial $display(\"%b\", d.dbg_probe);\nendmodule\n",
|
||||
);
|
||||
session.watched(&[tree.path.join("tb.sv")]);
|
||||
let _ = session.drain();
|
||||
assert!(offered(&session, &uri).is_empty(), "and back");
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// row 13 — close and reopen
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
#[test]
|
||||
fn a_closed_and_reopened_buffer_is_relinted() {
|
||||
let tree = Tree::new("lsreopen");
|
||||
let (mut session, uri) = opened(&tree, TABBED);
|
||||
assert_eq!(rules(&offered(&session, &uri)), vec!["no-tabs"], "premise");
|
||||
|
||||
session.notify(
|
||||
DidCloseTextDocument::METHOD,
|
||||
serde_json::json!({ "textDocument": { "uri": uri } }),
|
||||
);
|
||||
let _ = session.drain();
|
||||
assert!(session.server.workspace.document(&uri).is_none(), "the snapshot went with it");
|
||||
|
||||
let uri = session.open(&tree.path.join("m.sv"), "module m;\n wire a;\nendmodule\n");
|
||||
let _ = session.drain();
|
||||
assert!(offered(&session, &uri).is_empty(), "reopened with different text, relinted");
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// row 14 — a fix's range, in UTF-16 units, off a reused snapshot
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
/// The snapshot holds byte spans; the range on the wire is built per request
|
||||
/// from the buffer's text. A reused snapshot must therefore still produce
|
||||
/// UTF-16 columns, which is the one place a cached *position* would have gone
|
||||
/// wrong.
|
||||
#[test]
|
||||
fn a_snapshot_fix_keeps_its_utf16_range() {
|
||||
let tree = Tree::new("lsutf16");
|
||||
// The `é` is two bytes and one UTF-16 unit; `🎉` is four bytes and two.
|
||||
let text = "module m;\n // é 🎉\twire a;\nendmodule\n";
|
||||
let (mut session, uri) = opened(&tree, text);
|
||||
let ask = serde_json::json!({
|
||||
"textDocument": { "uri": uri },
|
||||
"range": { "start": { "line": 1, "character": 9 },
|
||||
"end": { "line": 1, "character": 9 } },
|
||||
"context": { "diagnostics": [] },
|
||||
});
|
||||
// Twice: the first request may compute, the second is the reuse — and
|
||||
// both must name the same UTF-16 column.
|
||||
let first = session.result(CodeActionRequest::METHOD, ask.clone());
|
||||
let again = session.result(CodeActionRequest::METHOD, ask);
|
||||
assert_eq!(first, again, "the reused answer is the computed one");
|
||||
let edit = &first[0]["edit"]["changes"][uri.as_str()][0];
|
||||
assert_eq!(edit["range"]["start"]["character"], 9, "in UTF-16 units, not bytes");
|
||||
assert_eq!(edit["range"]["start"]["line"], 1);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// the attack
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
/// The failure the previous lane deferred this memo over: a **stale fix
|
||||
/// offer**. The buffer is edited so the bytes a previously offered fix named
|
||||
/// no longer exist; the next menu must not offer that fix, and must not offer
|
||||
/// an edit whose range runs past the end of the buffer.
|
||||
#[test]
|
||||
fn a_fix_is_never_offered_for_a_span_the_buffer_no_longer_has() {
|
||||
let tree = Tree::new("lsattack");
|
||||
// Two tabs, far apart, so the second fix's span is deep into the buffer.
|
||||
let long = format!("module m;\n\twire a;\n{}\twire z;\nendmodule\n", " // pad\n".repeat(40));
|
||||
let (mut session, uri) = opened(&tree, &long);
|
||||
let before = offered(&session, &uri);
|
||||
assert_eq!(before.len(), 2, "two tabs, two fixes: {:?}", rules(&before));
|
||||
let deepest = before.iter().map(|v| v.span.end).max().expect("a span");
|
||||
assert!(deepest as usize > 40, "premise: the fix is deep in the buffer");
|
||||
|
||||
// Now the buffer becomes three lines long. Every byte the second fix
|
||||
// named is gone.
|
||||
let after_text = "module m;\n wire a;\nendmodule\n";
|
||||
change(&mut session, &uri, 2, serde_json::json!([{ "text": after_text }]));
|
||||
let after = offered(&session, &uri);
|
||||
assert!(after.is_empty(), "no fix survives the text that justified it: {:?}", rules(&after));
|
||||
|
||||
// ... and through the wire, where a stale span would be a range past the
|
||||
// end of a three-line document.
|
||||
let menu = session.result(
|
||||
CodeActionRequest::METHOD,
|
||||
serde_json::json!({
|
||||
"textDocument": { "uri": uri },
|
||||
"range": { "start": { "line": 0, "character": 0 },
|
||||
"end": { "line": 2, "character": 9 } },
|
||||
// The fix families alone: an extraction is offered for any whole
|
||||
// selection and is not what this row is about.
|
||||
"context": { "diagnostics": [], "only": ["quickfix", "source.fixAll.lucisv"] },
|
||||
}),
|
||||
);
|
||||
assert_eq!(menu, serde_json::json!([]), "and nothing is offered: {menu:#?}");
|
||||
assert_eq!(
|
||||
session.server.workspace.document(&uri).expect("open").text,
|
||||
after_text,
|
||||
"the buffer the answer describes is the buffer the client has"
|
||||
);
|
||||
}
|
||||
@@ -55,6 +55,7 @@ mod formatting;
|
||||
mod hierarchy_reach;
|
||||
mod index;
|
||||
mod large_file;
|
||||
mod lint_snapshot;
|
||||
mod progress;
|
||||
mod pull_diagnostics;
|
||||
mod requests;
|
||||
@@ -98,6 +99,15 @@ impl Tree {
|
||||
}
|
||||
std::fs::write(&path, text).expect("write");
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
fn link(&self, rel: &str, target: &str) {
|
||||
let path = self.path.join(rel);
|
||||
if let Some(parent) = path.parent() {
|
||||
std::fs::create_dir_all(parent).expect("parent");
|
||||
}
|
||||
std::os::unix::fs::symlink(target, &path).expect("symlink");
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for Tree {
|
||||
|
||||
@@ -286,3 +286,39 @@ fn a_startup_scan_with_no_files_opens_no_store_and_a_warm_rescan_rewrites_none()
|
||||
);
|
||||
let _ = std::fs::remove_dir_all(&storage);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_discovery_split_is_a_split_of_discovery_and_not_stages_beside_it() {
|
||||
// §61.3. `config`, `walk`, `filelist`, `sort`, `cap` and `buffers` are
|
||||
// disjoint parts of `discovery`, so they may never add up to more than it
|
||||
// — and anything that sums the scan (`the_stages_add_up_to_the_scan_they
|
||||
// _describe`) must not sum these as well, which is why they are absent
|
||||
// from that test's list. The slack is `collect_sources`'s own bookkeeping:
|
||||
// the `spoken_for` set, the `Vec` pushes, the `Scope` moves.
|
||||
let tree = trace_tree("tracediscovery", 30);
|
||||
let session = Session::verbose_wide(vec![tree.path.clone()], None);
|
||||
let lines = scan_lines(&session);
|
||||
let stages = line_of(&lines, "stages");
|
||||
let discovery = number(&stages, "discovery");
|
||||
let parts: f64 = ["config", "walk", "filelist", "sort", "cap", "buffers"]
|
||||
.iter()
|
||||
.map(|key| number(&stages, key))
|
||||
.sum();
|
||||
assert!(discovery > 0.0, "a walk of 30 files takes measurable time: {stages}");
|
||||
assert!(parts <= discovery * 1.02, "the parts cannot exceed the whole: {parts} of {discovery}");
|
||||
assert!(parts > 0.0, "and at least one of them was timed: {stages}");
|
||||
// Not asserted: that the parts account for *most* of discovery. On a
|
||||
// fixture this small the whole is well under a millisecond and the
|
||||
// bookkeeping slack — the `spoken_for` set, the `Vec` pushes — rivals the
|
||||
// walk, so a ratio bound is a stopwatch under the workspace suite's
|
||||
// parallel load (it tripped once at 50 % in the lead's gate run and
|
||||
// passed alone three times). On opentitan the walk is 95 % of discovery
|
||||
// (`docs/features/perf5r-first-answer/README.md`); that ratio is the
|
||||
// README's measurement, not this test's claim.
|
||||
assert_eq!(number(&stages, "filelist"), 0.0, "no filelist is in force: {stages}");
|
||||
// Nothing was walked twice: one root, and the cap read the walk's own
|
||||
// lengths rather than asking the filesystem again.
|
||||
let counts = line_of(&lines, "counts");
|
||||
assert_eq!(field(&counts, "walk_dirs"), "1", "one root, walked once: {counts}");
|
||||
assert_eq!(field(&counts, "stats"), "0", "the cap stats nothing the walk already read");
|
||||
}
|
||||
@@ -20,6 +20,8 @@ use std::time::Instant;
|
||||
use super::scan::{positions, symbol_request};
|
||||
use super::scan_trace::{field, is_trace_line, line_of, trace_tree};
|
||||
use super::*;
|
||||
use crate::server::startup::OPENING_FILE_WAIT;
|
||||
use crate::state::discover::HEAD_WALK_MAX;
|
||||
|
||||
/// A client that answers `workspace/configuration` and is told what a scan
|
||||
/// spent its time on.
|
||||
@@ -55,6 +57,16 @@ fn the_whole_workspace() -> Value {
|
||||
serde_json::json!({ "index": { "scope": "workspace", "logFiles": true } })
|
||||
}
|
||||
|
||||
/// [`the_whole_workspace`] with the folder scope's raise turned off, so the
|
||||
/// folder a split leads with is the open buffer's own directory — the
|
||||
/// settings `docs/performance_052_review.md` F1 reproduces with, and what
|
||||
/// every alias fixture below needs to reach the split at all.
|
||||
fn the_whole_workspace_flat() -> Value {
|
||||
serde_json::json!({
|
||||
"index": { "scope": "workspace", "scopeDepth": 0, "logFiles": true }
|
||||
})
|
||||
}
|
||||
|
||||
/// A `textDocument/didOpen` over the wire, as the client sends it.
|
||||
fn did_open(path: &Path, text: &str) -> Message {
|
||||
Message::Notification(Notification::new(
|
||||
@@ -527,3 +539,950 @@ fn an_answer_behind_a_held_request_is_not_stranded_for_the_whole_bound() {
|
||||
assert_eq!(positions(&said, 7).1, None, "a short scan answers nothing mid-way: {said:#?}");
|
||||
assert_eq!(session.server.held.len(), 1, "and the request is still owed an answer");
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// §61.3 (R2b): the neighbourhood is walked, stepped and published before
|
||||
// the rest of the workspace is discovered at all.
|
||||
// `docs/features/perf5r-first-answer/README.md`
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
/// The `scan started:` line, which says whether the scan led with a folder
|
||||
/// and how many files it had when it began.
|
||||
fn scan_started(messages: &[Message]) -> String {
|
||||
log_lines(messages)
|
||||
.into_iter()
|
||||
.find(|line| line.starts_with("timing: scan started"))
|
||||
.expect("a verbose scan says it started")
|
||||
}
|
||||
|
||||
/// A `textDocument/definition` on `path` at `line`:`character`.
|
||||
fn definition_at(id: i32, path: &Path, line: u32, character: u32) -> Message {
|
||||
Message::Request(Request::new(
|
||||
RequestId::from(id),
|
||||
GotoDefinition::METHOD.to_string(),
|
||||
serde_json::json!({
|
||||
"textDocument": { "uri": path_to_uri(path).expect("uri") },
|
||||
"position": { "line": line, "character": character },
|
||||
}),
|
||||
))
|
||||
}
|
||||
|
||||
/// The result of the response to `id`, or `None` when it never came.
|
||||
fn result_of(messages: &[Message], id: i32) -> Option<Value> {
|
||||
messages.iter().find_map(|message| match message {
|
||||
Message::Response(response) if response.id == RequestId::from(id) => {
|
||||
response.response_result.clone().ok()
|
||||
}
|
||||
_ => None,
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_users_folder_is_walked_and_stepped_before_the_rest_of_the_workspace() {
|
||||
// **The whole of R2b.** Before it, a workspace-scoped session walked all
|
||||
// 3 976 opentitan files — 155 ms — before it could step the 124 in the
|
||||
// folder the user was looking at, and the request waiting for that folder
|
||||
// paid the whole walk. Now the folder is walked, stepped and published
|
||||
// first and the walk of the rest happens behind the answer.
|
||||
//
|
||||
// The claim is readable off two numbers on the wire: the scan *starts*
|
||||
// with the folder's file count and *finishes* over the whole workspace.
|
||||
let tree = a_block_and_a_crowd("splitfolderfirst", INTERLEAVE_ABOVE + 6);
|
||||
let opened = tree.path.join("ip/aes/dv/tb/tb.sv");
|
||||
let text = std::fs::read_to_string(&opened).expect("read");
|
||||
let session = Session::staged(
|
||||
vec![tree.path.clone()],
|
||||
pulling_with_a_bar(),
|
||||
true,
|
||||
CONFIGURATION_WAIT,
|
||||
vec![
|
||||
configuration_answer(the_whole_workspace()),
|
||||
did_open(&opened, &text),
|
||||
definition_at(7, &opened, 1, 3),
|
||||
],
|
||||
);
|
||||
let said = session.drain();
|
||||
let started = scan_started(&said);
|
||||
assert!(
|
||||
started.contains("2 files (the folder first)"),
|
||||
"the scan begins with the block's two files, not the workspace's {}: {started}",
|
||||
INTERLEAVE_ABOVE + 8
|
||||
);
|
||||
|
||||
// One scan, and it lands over everything: the split bought the order,
|
||||
// never a smaller index.
|
||||
let lines = trace_lines(&said);
|
||||
assert_eq!(lines.len(), 3, "one scan, three trace lines: {lines:#?}");
|
||||
for line in &lines {
|
||||
assert!(line.starts_with("timing: scan 1 "), "no second scan ran: {line}");
|
||||
}
|
||||
assert_eq!(
|
||||
field(&line_of(&lines, "counts"), "read"),
|
||||
(INTERLEAVE_ABOVE + 8).to_string(),
|
||||
"and the work list ends as the whole workspace"
|
||||
);
|
||||
assert_eq!(session.server.workspace.index().files().len(), INTERLEAVE_ABOVE + 8);
|
||||
|
||||
// And the answer the folder bought is the right one, given inside the
|
||||
// scan.
|
||||
let (ended, answered) = positions(&said, 7);
|
||||
let answered = answered.expect("the definition is answered at all");
|
||||
assert!(answered < ended.expect("the bar comes down"), "inside the scan: {said:#?}");
|
||||
let found = result_of(&said, 7).expect("a result");
|
||||
assert_eq!(
|
||||
found[0]["uri"],
|
||||
serde_json::json!(path_to_uri(&tree.path.join("ip/aes/rtl/aes.sv")).expect("uri")),
|
||||
"the module in the folder next door: {found}"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_split_head_obeys_a_gitignore_written_at_the_workspace_root() {
|
||||
// **The correctness the split could most easily have broken.** A walk
|
||||
// starting at `ip/aes` reads no `.gitignore` above itself, so the folder
|
||||
// half of the scan would have indexed files the rest of it excludes — two
|
||||
// answers to "which files exist" inside one scan. `collect_files_below`
|
||||
// carries the ancestor rules down, and this is the file that proves it.
|
||||
let tree = a_block_and_a_crowd("splitgitignore", 4);
|
||||
tree.write(".gitignore", "*_generated.sv\n");
|
||||
tree.write("ip/aes/rtl/aes_generated.sv", "module aes_generated;\nendmodule\n");
|
||||
let opened = tree.path.join("ip/aes/dv/tb/tb.sv");
|
||||
let text = std::fs::read_to_string(&opened).expect("read");
|
||||
let session = Session::staged(
|
||||
vec![tree.path.clone()],
|
||||
pulling(),
|
||||
true,
|
||||
CONFIGURATION_WAIT,
|
||||
vec![configuration_answer(the_whole_workspace()), did_open(&opened, &text)],
|
||||
);
|
||||
let said = session.drain();
|
||||
assert!(scan_started(&said).contains("(the folder first)"), "{}", scan_started(&said));
|
||||
let indexed: Vec<String> = session
|
||||
.server
|
||||
.workspace
|
||||
.index()
|
||||
.files()
|
||||
.iter()
|
||||
.map(|path| path.display().to_string())
|
||||
.collect();
|
||||
assert!(
|
||||
!indexed.iter().any(|path| path.ends_with("aes_generated.sv")),
|
||||
"the root's rule reaches into the folder the head walked: {indexed:#?}"
|
||||
);
|
||||
// Six: two in the block, four in the crowd. The generated one is out.
|
||||
assert_eq!(indexed.len(), 6, "{indexed:#?}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_buffer_opened_from_the_workspace_root_is_no_neighbourhood_to_lead_with() {
|
||||
// The bound. A file opened from the root raises to the root, so "its
|
||||
// folder" is the whole workspace — leading with it would be leading with
|
||||
// everything, and waiting for it would be waiting out the entire scan
|
||||
// before answering anything. `splits_discovery` refuses, the scan is
|
||||
// ordered exactly as it was before this round, and
|
||||
// `scan_order::worth_waiting` decides the drain as it always did.
|
||||
let tree = a_block_and_a_crowd("splitrootlevel", INTERLEAVE_ABOVE + 6);
|
||||
tree.write("top.sv", "module top;\n aes dut ();\nendmodule\n");
|
||||
let opened = tree.path.join("top.sv");
|
||||
let text = std::fs::read_to_string(&opened).expect("read");
|
||||
let session = Session::staged(
|
||||
vec![tree.path.clone()],
|
||||
pulling_with_a_bar(),
|
||||
true,
|
||||
CONFIGURATION_WAIT,
|
||||
vec![
|
||||
configuration_answer(the_whole_workspace()),
|
||||
did_open(&opened, &text),
|
||||
definition_at(7, &opened, 1, 3),
|
||||
],
|
||||
);
|
||||
let said = session.drain();
|
||||
let started = scan_started(&said);
|
||||
assert!(
|
||||
!started.contains("the folder first"),
|
||||
"the root is not a folder to lead with: {started}"
|
||||
);
|
||||
// No deadlock: the request is still answered, and with the right place.
|
||||
// **It used to be answered `[]` inside the scan** — the drain reached it
|
||||
// before the alphabet reached `ip/aes/rtl`, and `[]` was what the prefix
|
||||
// said. Since §61.4 an empty *navigation* answer computed while the index
|
||||
// is still growing is not an answer at all: the request is asked again at
|
||||
// the scan's next publish and, in a workspace this small, at the scan's
|
||||
// end — which is later, and right (`perf5r-publication`).
|
||||
let found = result_of(&said, 7).expect("the definition is answered at all");
|
||||
assert_eq!(
|
||||
found[0]["uri"],
|
||||
serde_json::json!(path_to_uri(&tree.path.join("ip/aes/rtl/aes.sv")).expect("uri")),
|
||||
"the module the buffer instantiates, not the empty prefix: {found}"
|
||||
);
|
||||
assert_eq!(session.server.workspace.index().files().len(), INTERLEAVE_ABOVE + 9);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn two_buffers_in_two_folders_put_both_folders_in_the_head() {
|
||||
// The multiple-folder case. The head is the union of what each buffer
|
||||
// raises to, so a definition into *either* block is answered off it —
|
||||
// and every file is still stepped exactly once, which is what the
|
||||
// finished index's file count says.
|
||||
let tree = a_block_and_a_crowd("splittwofolders", INTERLEAVE_ABOVE + 6);
|
||||
tree.write("ip/kmac/rtl/kmac.sv", "module kmac;\n localparam W = 2;\nendmodule\n");
|
||||
tree.write("ip/kmac/dv/tb/ktb.sv", "module ktb;\n kmac dut ();\nendmodule\n");
|
||||
let aes_tb = tree.path.join("ip/aes/dv/tb/tb.sv");
|
||||
let kmac_tb = tree.path.join("ip/kmac/dv/tb/ktb.sv");
|
||||
let aes_text = std::fs::read_to_string(&aes_tb).expect("read");
|
||||
let kmac_text = std::fs::read_to_string(&kmac_tb).expect("read");
|
||||
let session = Session::staged(
|
||||
vec![tree.path.clone()],
|
||||
pulling_with_a_bar(),
|
||||
true,
|
||||
CONFIGURATION_WAIT,
|
||||
vec![
|
||||
configuration_answer(the_whole_workspace()),
|
||||
did_open(&aes_tb, &aes_text),
|
||||
did_open(&kmac_tb, &kmac_text),
|
||||
definition_at(7, &kmac_tb, 1, 3),
|
||||
],
|
||||
);
|
||||
let said = session.drain();
|
||||
let started = scan_started(&said);
|
||||
assert!(started.contains("4 files (the folder first)"), "both blocks lead: {started}");
|
||||
let found = result_of(&said, 7).expect("a result");
|
||||
assert_eq!(
|
||||
found[0]["uri"],
|
||||
serde_json::json!(path_to_uri(&tree.path.join("ip/kmac/rtl/kmac.sv")).expect("uri")),
|
||||
"the second buffer's own block is in the head too: {found}"
|
||||
);
|
||||
assert_eq!(
|
||||
session.server.workspace.index().files().len(),
|
||||
INTERLEAVE_ABOVE + 10,
|
||||
"every file once, the head's included"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn an_unsaved_buffer_leads_with_its_own_text_and_not_the_disk_copy() {
|
||||
// Unsaved-buffer precedence, at the head. The buffer names a module the
|
||||
// file on disk does not, and the definition sent behind it must resolve
|
||||
// — which it can only do if the head indexed the buffer's own text.
|
||||
let tree = a_block_and_a_crowd("splitunsaved", INTERLEAVE_ABOVE + 6);
|
||||
let opened = tree.path.join("ip/aes/dv/tb/tb.sv");
|
||||
// On disk the testbench instantiates nothing at all.
|
||||
tree.write("ip/aes/dv/tb/tb.sv", "module tb;\nendmodule\n");
|
||||
let session = Session::staged(
|
||||
vec![tree.path.clone()],
|
||||
pulling_with_a_bar(),
|
||||
true,
|
||||
CONFIGURATION_WAIT,
|
||||
vec![
|
||||
configuration_answer(the_whole_workspace()),
|
||||
did_open(&opened, "module tb;\n aes dut ();\nendmodule\n"),
|
||||
definition_at(7, &opened, 1, 3),
|
||||
],
|
||||
);
|
||||
let said = session.drain();
|
||||
assert!(scan_started(&said).contains("(the folder first)"), "{}", scan_started(&said));
|
||||
let found = result_of(&said, 7).expect("a result");
|
||||
assert_eq!(
|
||||
found[0]["uri"],
|
||||
serde_json::json!(path_to_uri(&tree.path.join("ip/aes/rtl/aes.sv")).expect("uri")),
|
||||
"the head indexed the buffer, not the file under it: {found}"
|
||||
);
|
||||
}
|
||||
|
||||
/// The cross-folder fixture: the buffer's folder is `ip/aes`, and what it
|
||||
/// instantiates lives in `ip/kmac` — so the head the split publishes first
|
||||
/// cannot answer the definition in it.
|
||||
fn a_block_that_instantiates_the_block_next_door(tag: &str) -> Tree {
|
||||
let tree = a_block_and_a_crowd(tag, INTERLEAVE_ABOVE + 6);
|
||||
tree.write("ip/kmac/rtl/kmac.sv", "module kmac;\nendmodule\n");
|
||||
tree.write("ip/aes/dv/tb/tb.sv", "module tb;\n kmac dut ();\nendmodule\n");
|
||||
tree
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_target_outside_the_head_is_asked_again_rather_than_answered_nowhere() {
|
||||
// **§61.3's honest limit, closed by §61.4's rule.** A held request is
|
||||
// drained the moment the user's own folder is published, and a definition
|
||||
// whose target lives in *another* folder used to be answered `[]` there —
|
||||
// coherent, and wrong by the time the scan ended. The rule now says an
|
||||
// empty **navigation** answer computed while the index is still growing is
|
||||
// not an answer: the request is put back and asked again at the scan's
|
||||
// next publish, and at the latest when the scan ends
|
||||
// (`docs/features/perf5r-publication/README.md`).
|
||||
//
|
||||
// This fixture stages under `PUBLISH_EVERY` files, so there is exactly one
|
||||
// publish — the head's — and the request is answered where the second half
|
||||
// of the rule catches it: at the end of the scan, with the right location.
|
||||
let tree = a_block_that_instantiates_the_block_next_door("splitcrossfolder");
|
||||
let opened = tree.path.join("ip/aes/dv/tb/tb.sv");
|
||||
let text = std::fs::read_to_string(&opened).expect("read");
|
||||
let session = Session::staged(
|
||||
vec![tree.path.clone()],
|
||||
pulling_with_a_bar(),
|
||||
true,
|
||||
CONFIGURATION_WAIT,
|
||||
vec![
|
||||
configuration_answer(the_whole_workspace()),
|
||||
did_open(&opened, &text),
|
||||
definition_at(7, &opened, 1, 3),
|
||||
],
|
||||
);
|
||||
let said = session.drain();
|
||||
let found = result_of(&said, 7).expect("a result, not a failure");
|
||||
assert_eq!(
|
||||
found[0]["uri"],
|
||||
serde_json::json!(path_to_uri(&tree.path.join("ip/kmac/rtl/kmac.sv")).expect("uri")),
|
||||
"the block next door, which is the settled answer: {found}"
|
||||
);
|
||||
|
||||
// Once, not twice: the deferral puts the request back, it does not answer
|
||||
// it and then answer it again.
|
||||
let answers = said
|
||||
.iter()
|
||||
.filter(|message| matches!(message, Message::Response(r) if r.id == RequestId::from(7)))
|
||||
.count();
|
||||
assert_eq!(answers, 1, "one response for one request: {said:#?}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_navigation_answer_that_is_genuinely_empty_is_answered_when_the_scan_ends() {
|
||||
// **The rule defers; it never withholds.** A cursor on a name nothing in
|
||||
// the workspace declares is empty at every publish and empty at settle,
|
||||
// and the request is answered all the same — with `[]`, once the scan has
|
||||
// stopped being a reason to doubt it.
|
||||
let tree = a_block_and_a_crowd("crossfoldergenuinelyempty", INTERLEAVE_ABOVE + 6);
|
||||
tree.write("ip/aes/dv/tb/tb.sv", "module tb;\n nowhere dut ();\nendmodule\n");
|
||||
let opened = tree.path.join("ip/aes/dv/tb/tb.sv");
|
||||
let text = std::fs::read_to_string(&opened).expect("read");
|
||||
let session = Session::staged(
|
||||
vec![tree.path.clone()],
|
||||
pulling_with_a_bar(),
|
||||
true,
|
||||
CONFIGURATION_WAIT,
|
||||
vec![
|
||||
configuration_answer(the_whole_workspace()),
|
||||
did_open(&opened, &text),
|
||||
definition_at(7, &opened, 1, 3),
|
||||
],
|
||||
);
|
||||
let said = session.drain();
|
||||
let found = result_of(&said, 7).expect("a result, not a failure");
|
||||
assert_eq!(
|
||||
found.as_array().map(Vec::len),
|
||||
Some(0),
|
||||
"nothing declares `nowhere`, and the answer says so: {found}"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_type_definition_outside_the_head_is_asked_again_too() {
|
||||
// The rule is three methods wide and the definition test only walks one of
|
||||
// them. A `typeDefinition` on the instance name answers with the module it
|
||||
// instantiates, which lives in the block next door: empty off the head,
|
||||
// right once the scan has been all the way round.
|
||||
let tree = a_block_that_instantiates_the_block_next_door("splitcrossfoldertype");
|
||||
let opened = tree.path.join("ip/aes/dv/tb/tb.sv");
|
||||
let text = std::fs::read_to_string(&opened).expect("read");
|
||||
let ask = Message::Request(Request::new(
|
||||
RequestId::from(7),
|
||||
GotoTypeDefinition::METHOD.to_string(),
|
||||
serde_json::json!({
|
||||
"textDocument": { "uri": path_to_uri(&opened).expect("uri") },
|
||||
"position": { "line": 1, "character": 7 },
|
||||
}),
|
||||
));
|
||||
let session = Session::staged(
|
||||
vec![tree.path.clone()],
|
||||
pulling_with_a_bar(),
|
||||
true,
|
||||
CONFIGURATION_WAIT,
|
||||
vec![configuration_answer(the_whole_workspace()), did_open(&opened, &text), ask],
|
||||
);
|
||||
let found = result_of(&session.drain(), 7).expect("a result, not a failure");
|
||||
assert_eq!(
|
||||
found[0]["uri"],
|
||||
serde_json::json!(path_to_uri(&tree.path.join("ip/kmac/rtl/kmac.sv")).expect("uri")),
|
||||
"the instance's module, from the block next door: {found}"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_hover_is_never_deferred_however_empty_it_is() {
|
||||
// **The rule is three methods wide, and this is the wall.** A hover
|
||||
// answers `null` for a name the index has not reached, and `null` is what
|
||||
// a hover means by "nothing to say" whatever the scan has done — so it is
|
||||
// answered where every mid-scan request is answered, inside the scan and
|
||||
// before the bar comes down. Deferring it would be withholding an answer
|
||||
// rather than waiting for a better one.
|
||||
let tree = a_block_that_instantiates_the_block_next_door("crossfolderhover");
|
||||
let opened = tree.path.join("ip/aes/dv/tb/tb.sv");
|
||||
let text = std::fs::read_to_string(&opened).expect("read");
|
||||
let hover = Message::Request(Request::new(
|
||||
RequestId::from(7),
|
||||
HoverRequest::METHOD.to_string(),
|
||||
serde_json::json!({
|
||||
"textDocument": { "uri": path_to_uri(&opened).expect("uri") },
|
||||
"position": { "line": 1, "character": 3 },
|
||||
}),
|
||||
));
|
||||
let session = Session::staged(
|
||||
vec![tree.path.clone()],
|
||||
pulling_with_a_bar(),
|
||||
true,
|
||||
CONFIGURATION_WAIT,
|
||||
vec![configuration_answer(the_whole_workspace()), did_open(&opened, &text), hover],
|
||||
);
|
||||
let said = session.drain();
|
||||
let (ended, answered) = positions(&said, 7);
|
||||
let answered = answered.expect("the hover is answered at all");
|
||||
assert!(
|
||||
answered < ended.expect("the bar comes down"),
|
||||
"inside the scan, at the head publish, like every other mid-scan request: {said:#?}"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_folder_bigger_than_the_head_bound_is_scanned_exactly_as_it_always_was() {
|
||||
// **`HEAD_WALK_MAX`, pinned** — the bound QA found untested in §61.3. Past
|
||||
// 512 files the neighbourhood is not provably a minority of anything, so
|
||||
// the split is refused: the walk is finished there and then, the two lists
|
||||
// are merged in path order, and the scan is the one every scan before the
|
||||
// split was. The proof is in three parts — the scan does not say "the
|
||||
// folder first", every file is indexed once, and the index it lands is the
|
||||
// one a session with nothing open lands.
|
||||
let tree = a_block_and_a_crowd("headwalkmax", 4);
|
||||
for n in 0..=HEAD_WALK_MAX {
|
||||
tree.package(&format!("ip/aes/rtl/big{n:04}.sv"), &format!("big{n:04}"));
|
||||
}
|
||||
let opened = tree.path.join("ip/aes/dv/tb/tb.sv");
|
||||
let text = std::fs::read_to_string(&opened).expect("read");
|
||||
let session = Session::staged(
|
||||
vec![tree.path.clone()],
|
||||
pulling(),
|
||||
true,
|
||||
CONFIGURATION_WAIT,
|
||||
vec![configuration_answer(the_whole_workspace()), did_open(&opened, &text)],
|
||||
);
|
||||
let started = scan_started(&session.drain());
|
||||
assert!(
|
||||
!started.contains("the folder first"),
|
||||
"a neighbourhood over the bound is walked with everything else: {started}"
|
||||
);
|
||||
|
||||
// Every file once: the whole tree is `crowd/` (4) + `ip/aes/rtl` (1 + the
|
||||
// padding) + `ip/aes/dv/tb` (1) + `ip/kmac` (none here).
|
||||
let files = session.server.workspace.index().files();
|
||||
let expected = 4 + 1 + (HEAD_WALK_MAX + 1) + 1;
|
||||
assert_eq!(files.len(), expected, "every file, and none of them twice");
|
||||
let mut sorted = files.to_vec();
|
||||
sorted.sort();
|
||||
sorted.dedup();
|
||||
assert_eq!(sorted.len(), files.len(), "no path is in the index twice");
|
||||
|
||||
// And the index is the one the bound's other side would have built.
|
||||
let quiet = Session::staged(
|
||||
vec![tree.path.clone()],
|
||||
pulling(),
|
||||
true,
|
||||
CONFIGURATION_WAIT,
|
||||
vec![configuration_answer(the_whole_workspace())],
|
||||
);
|
||||
let _ = quiet.drain();
|
||||
assert_eq!(
|
||||
session.server.workspace.index().fingerprint(),
|
||||
quiet.server.workspace.index().fingerprint(),
|
||||
"the open buffer bought the order, never a different index"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_bar_paints_no_percentage_until_the_denominator_is_final() {
|
||||
// `docs/features/indexing-ux/README.md`: the percentage only counts up,
|
||||
// and every one of them is measured. While the neighbourhood is being
|
||||
// stepped the denominator is the head — which is about to grow twentyfold
|
||||
// — so no report is sent at all, and the first one the client sees is
|
||||
// against the finished work list. The per-file log still names every
|
||||
// file, head included.
|
||||
let tree = a_block_and_a_crowd("splitbar", INTERLEAVE_ABOVE + 6);
|
||||
let opened = tree.path.join("ip/aes/dv/tb/tb.sv");
|
||||
let text = std::fs::read_to_string(&opened).expect("read");
|
||||
let session = Session::staged(
|
||||
vec![tree.path.clone()],
|
||||
pulling_with_a_bar(),
|
||||
true,
|
||||
CONFIGURATION_WAIT,
|
||||
vec![configuration_answer(the_whole_workspace()), did_open(&opened, &text)],
|
||||
);
|
||||
let said = session.drain();
|
||||
let percentages: Vec<u64> = said
|
||||
.iter()
|
||||
.filter_map(|message| match message {
|
||||
Message::Notification(n) if n.method == Progress::METHOD => {
|
||||
n.params["value"]["percentage"].as_u64()
|
||||
}
|
||||
_ => None,
|
||||
})
|
||||
.collect();
|
||||
assert!(!percentages.is_empty(), "the bar does report: {said:#?}");
|
||||
assert!(
|
||||
percentages.windows(2).all(|pair| pair[0] <= pair[1]),
|
||||
"a percentage never falls: {percentages:?}"
|
||||
);
|
||||
// The head is two files of `INTERLEAVE_ABOVE + 8`; a report against the
|
||||
// head alone would have opened at 50%.
|
||||
assert!(percentages[0] < 50, "the first report is measured, not invented: {percentages:?}");
|
||||
|
||||
// And the head's files are still named in the log.
|
||||
let logged: Vec<String> = log_lines(&said)
|
||||
.into_iter()
|
||||
.filter(|line| line.starts_with("indexing: ") || line.starts_with("analyzed: "))
|
||||
.collect();
|
||||
assert!(
|
||||
logged.iter().any(|line| line.ends_with("tb.sv")),
|
||||
"the buffer's own step is logged: {logged:#?}"
|
||||
);
|
||||
assert!(
|
||||
logged.iter().any(|line| line.ends_with("aes.sv")),
|
||||
"and so is the folder's: {logged:#?}"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_session_that_opens_nothing_waits_only_the_opening_bound_and_scans() {
|
||||
// The cost side of `OPENING_FILE_WAIT`, and its bound. A workspace-scoped
|
||||
// session whose editor has no file open waits the whole of it — nothing
|
||||
// is waiting on the scan, which is why it is affordable — and then scans
|
||||
// the workspace exactly as it did before.
|
||||
assert_eq!(
|
||||
OPENING_FILE_WAIT,
|
||||
Duration::from_millis(25),
|
||||
"the shipped bound, which no test may quietly move"
|
||||
);
|
||||
let tree = trace_tree("splitnoopen", 9);
|
||||
let began = Instant::now();
|
||||
let session = Session::staged(
|
||||
vec![tree.path.clone()],
|
||||
pulling(),
|
||||
true,
|
||||
CONFIGURATION_WAIT,
|
||||
vec![configuration_answer(the_whole_workspace())],
|
||||
);
|
||||
let took = began.elapsed();
|
||||
assert!(took < Duration::from_secs(1), "bounded, and by the small bound: {took:?}");
|
||||
let said = session.drain();
|
||||
let lines = trace_lines(&said);
|
||||
assert_eq!(lines.len(), 3, "one scan: {lines:#?}");
|
||||
assert_eq!(field(&line_of(&lines, "counts"), "read"), "9", "the whole workspace");
|
||||
assert!(!scan_started(&said).contains("the folder first"), "nothing to lead with");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_rescan_does_not_lead_with_a_folder_because_nothing_may_be_answered_inside_it() {
|
||||
// The other half of the bound. A whole rescan is one a message asked for,
|
||||
// and `must_wait`'s `answering_a_rescan` holds every request for the whole
|
||||
// of it — so leading with the user's folder buys no answer any sooner and
|
||||
// costs the neighbourhood one extra directory traversal. Only the startup
|
||||
// scan, which nothing is queued ahead of, takes the split.
|
||||
let tree = a_block_and_a_crowd("splitrescan", INTERLEAVE_ABOVE + 6);
|
||||
let opened = tree.path.join("ip/aes/dv/tb/tb.sv");
|
||||
let text = std::fs::read_to_string(&opened).expect("read");
|
||||
let mut session = Session::staged(
|
||||
vec![tree.path.clone()],
|
||||
pulling(),
|
||||
true,
|
||||
CONFIGURATION_WAIT,
|
||||
vec![configuration_answer(the_whole_workspace()), did_open(&opened, &text)],
|
||||
);
|
||||
assert!(scan_started(&session.drain()).contains("(the folder first)"), "premise");
|
||||
|
||||
// A changed `exclude` is a scope change, which is a whole rescan.
|
||||
session.notify(
|
||||
DidChangeConfiguration::METHOD,
|
||||
serde_json::json!({ "settings": { "lucisv": {
|
||||
"index": { "scope": "workspace", "logFiles": true },
|
||||
"exclude": ["**/p000.sv"],
|
||||
} } }),
|
||||
);
|
||||
let said = session.drain();
|
||||
let started: Vec<String> = log_lines(&said)
|
||||
.into_iter()
|
||||
.filter(|line| line.starts_with("timing: scan started"))
|
||||
.collect();
|
||||
assert_eq!(started.len(), 1, "one rescan: {started:#?}");
|
||||
assert!(
|
||||
!started[0].contains("the folder first"),
|
||||
"a rescan takes the plain order: {started:?}"
|
||||
);
|
||||
assert_eq!(
|
||||
session.server.workspace.index().files().len(),
|
||||
INTERLEAVE_ABOVE + 7,
|
||||
"and the exclusion took one file out"
|
||||
);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Directory aliases across a split discovery (F1)
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// A symlinked directory gives every file under it a second path, and a walk
|
||||
// reports each file under the **first spelling that reaches it**
|
||||
// (`docs/features/walk-cycles/README.md`). The startup scan walks the user's
|
||||
// own folder before it walks the workspace, so the two halves must share that
|
||||
// rule or one module lands in the index twice and cannot be renamed — the
|
||||
// regression `docs/performance_052_review.md` F1 found and every fixture here
|
||||
// pins.
|
||||
//
|
||||
// Each one makes the same three asks of the same tree — after the startup
|
||||
// scan, after a whole rescan, and of a fresh session — and they must agree.
|
||||
|
||||
/// The testbench every fixture opens: it names `child`, which is what the
|
||||
/// definition and the rename below are asked about.
|
||||
#[cfg(unix)]
|
||||
const TB: &str = "module tb;\n child u();\nendmodule\n";
|
||||
|
||||
/// A `child` module and the testbench that instantiates it, in `dir`.
|
||||
#[cfg(unix)]
|
||||
fn alias_pair(tree: &Tree, dir: &str) {
|
||||
tree.write(&format!("{dir}/child.sv"), "module child;\nendmodule\n");
|
||||
tree.write(&format!("{dir}/tb.sv"), TB);
|
||||
}
|
||||
|
||||
/// Where `child` is named in [`TB`] — the cursor every claim below is made at.
|
||||
#[cfg(unix)]
|
||||
fn at_child(uri: &Uri) -> Value {
|
||||
serde_json::json!({
|
||||
"textDocument": { "uri": uri },
|
||||
"position": { "line": 1, "character": 3 },
|
||||
})
|
||||
}
|
||||
|
||||
/// What one session says about a fixture: which files the index holds, where
|
||||
/// the definition of `child` goes, whether that name may be renamed, and what
|
||||
/// the open buffer's diagnostics are.
|
||||
///
|
||||
/// The four together are the review's acceptance: a duplicate shows up as a
|
||||
/// second file, as a second target, and as a refusal to rename — and every
|
||||
/// answer the index feeds moves with it, which is what the diagnostics are
|
||||
/// here to catch.
|
||||
#[cfg(unix)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
struct Says {
|
||||
files: Vec<String>,
|
||||
defs: Vec<Value>,
|
||||
renamable: bool,
|
||||
diagnostics: Vec<Value>,
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
fn says(session: &mut Session, uri: &Uri) -> Says {
|
||||
let answer = session.result(GotoDefinition::METHOD, at_child(uri));
|
||||
let defs: Vec<Value> = serde_json::from_value(answer).expect("definition targets");
|
||||
let prepared = session.request(PrepareRenameRequest::METHOD, at_child(uri));
|
||||
let files =
|
||||
session.server.workspace.index().files().iter().map(|p| p.display().to_string()).collect();
|
||||
// The `resultId` is a generation counter and moves with every rebuild, so
|
||||
// what is compared is what the user sees: each diagnostic's sentence and
|
||||
// where it points.
|
||||
let report = document_pull(session, uri, None);
|
||||
let items = report["items"].as_array().cloned().expect("a full diagnostic report");
|
||||
let diagnostics = items
|
||||
.into_iter()
|
||||
.map(|item| serde_json::json!({ "message": item["message"], "range": item["range"] }))
|
||||
.collect();
|
||||
Says { files, defs, renamable: prepared.response_result.is_ok(), diagnostics }
|
||||
}
|
||||
|
||||
/// Index `tree` with `opened` open, then ask a whole rescan and a fresh
|
||||
/// session the same four questions. Reports what all three said.
|
||||
///
|
||||
/// The rescan trigger is the review's own: a watched-file notification naming
|
||||
/// more than one in-scope file is the whole rebuild rather than the one-file
|
||||
/// incremental path (`server/notification.rs`). No source byte changes, so a
|
||||
/// disagreement is the scan disagreeing with itself.
|
||||
#[cfg(unix)]
|
||||
fn startup_rescan_and_restart_agree(tree: &Tree, opened: &Path, text: &str) -> Says {
|
||||
let uri = path_to_uri(opened).expect("uri");
|
||||
let fresh = || {
|
||||
let session = Session::staged(
|
||||
vec![tree.path.clone()],
|
||||
pulling(),
|
||||
true,
|
||||
CONFIGURATION_WAIT,
|
||||
vec![configuration_answer(the_whole_workspace_flat()), did_open(opened, text)],
|
||||
);
|
||||
session.drain();
|
||||
session
|
||||
};
|
||||
let mut session = fresh();
|
||||
let startup = says(&mut session, &uri);
|
||||
let changed: Vec<PathBuf> = startup.files.iter().map(PathBuf::from).collect();
|
||||
assert!(changed.len() > 1, "the whole-rebuild trigger names more than one file");
|
||||
session.watched(&changed);
|
||||
session.drain();
|
||||
let rescan = says(&mut session, &uri);
|
||||
let restart = says(&mut fresh(), &uri);
|
||||
assert_eq!(startup, rescan, "the startup scan and a whole rescan must agree");
|
||||
assert_eq!(startup, restart, "the startup scan and a fresh session must agree");
|
||||
startup
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn an_alias_sorting_before_its_target_is_indexed_once_under_the_root_walks_spelling() {
|
||||
// The review's own reproduction. A walk of the root reaches `a_alias`
|
||||
// first, so `a_alias/child.sv` is the canonical spelling and the head —
|
||||
// which would lead with `z_real` — must not be led with at all.
|
||||
let tree = Tree::new("aliasbefore");
|
||||
alias_pair(&tree, "z_real");
|
||||
tree.link("a_alias", "z_real");
|
||||
let said = startup_rescan_and_restart_agree(&tree, &tree.path.join("z_real/tb.sv"), TB);
|
||||
assert_eq!(said.defs.len(), 1, "one definition target: {:#?}", said.defs);
|
||||
assert!(said.renamable, "a module declared once may be renamed");
|
||||
assert!(
|
||||
said.files.iter().any(|file| file.ends_with("a_alias/child.sv")),
|
||||
"the root walk's own spelling: {:#?}",
|
||||
said.files
|
||||
);
|
||||
assert!(said.diagnostics.is_empty(), "and nothing is wrong with it: {:#?}", said.diagnostics);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn an_alias_sorting_after_its_target_leaves_the_head_leading() {
|
||||
// Nothing precedes `a_real`, so this one keeps the split — and the
|
||||
// remaining walk must still recognise `z_alias` as the folder it has.
|
||||
let tree = Tree::new("aliasafter");
|
||||
alias_pair(&tree, "a_real");
|
||||
tree.link("z_alias", "a_real");
|
||||
let said = startup_rescan_and_restart_agree(&tree, &tree.path.join("a_real/tb.sv"), TB);
|
||||
assert_eq!(said.defs.len(), 1, "one definition target: {:#?}", said.defs);
|
||||
assert!(said.renamable, "a module declared once may be renamed");
|
||||
assert!(
|
||||
said.files.iter().any(|file| file.ends_with("a_real/child.sv")),
|
||||
"the target's own spelling: {:#?}",
|
||||
said.files
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn several_aliases_of_one_directory_contribute_one_copy_between_them() {
|
||||
let tree = Tree::new("multialias");
|
||||
alias_pair(&tree, "real");
|
||||
tree.link("a1_alias", "real");
|
||||
tree.link("a2_alias", "real");
|
||||
tree.link("z_alias", "real");
|
||||
let said = startup_rescan_and_restart_agree(&tree, &tree.path.join("real/tb.sv"), TB);
|
||||
assert_eq!(said.defs.len(), 1, "one definition target: {:#?}", said.defs);
|
||||
assert!(said.renamable, "three aliases are still one declaration");
|
||||
assert_eq!(said.files.len(), 2, "one child, one buffer: {:#?}", said.files);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn an_alias_of_an_ancestor_of_the_open_folder_falls_back_to_the_one_walk() {
|
||||
// The head would lead with `z_real/sub`, but the root walk reaches the
|
||||
// whole of `z_real` through `a_link` — so the folder's *ancestors* are
|
||||
// what the check has to look at, not the folder alone.
|
||||
let tree = Tree::new("aliasancestor");
|
||||
alias_pair(&tree, "z_real/sub");
|
||||
tree.link("a_link", "z_real");
|
||||
let said = startup_rescan_and_restart_agree(&tree, &tree.path.join("z_real/sub/tb.sv"), TB);
|
||||
assert_eq!(said.defs.len(), 1, "one definition target: {:#?}", said.defs);
|
||||
assert!(said.renamable, "a module declared once may be renamed");
|
||||
assert!(
|
||||
said.files.iter().any(|file| file.ends_with("a_link/sub/child.sv")),
|
||||
"the root walk's own spelling: {:#?}",
|
||||
said.files
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn an_ancestor_cycle_inside_the_neighbourhood_ends_and_names_each_file_once() {
|
||||
// `sub/up -> ..` is a link out of the neighbourhood and back to the top,
|
||||
// so the head walk finds the root's own file under `sub/up/top.sv` while
|
||||
// a walk of the root spells it `top.sv`. One spelling reaches the index,
|
||||
// and the rescan the conflict asks for is what settles which.
|
||||
let tree = Tree::new("ancestorcycle");
|
||||
alias_pair(&tree, "sub");
|
||||
tree.write("top.sv", "module top;\nendmodule\n");
|
||||
tree.link("sub/up", "..");
|
||||
let said = startup_rescan_and_restart_agree(&tree, &tree.path.join("sub/tb.sv"), TB);
|
||||
assert_eq!(said.defs.len(), 1, "one definition target: {:#?}", said.defs);
|
||||
assert!(said.renamable, "the cycle did not duplicate `child`");
|
||||
assert_eq!(said.files.len(), 3, "child, top and the buffer: {:#?}", said.files);
|
||||
assert!(
|
||||
said.files.iter().any(|file| file.ends_with("/top.sv") && !file.contains("/up/")),
|
||||
"the root's file under the root's own spelling: {:#?}",
|
||||
said.files
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn an_ignored_alias_is_excluded_by_both_halves_of_the_scan() {
|
||||
let tree = Tree::new("ignorealias");
|
||||
tree.write(".gitignore", "a_alias/\n");
|
||||
alias_pair(&tree, "z_real");
|
||||
tree.link("a_alias", "z_real");
|
||||
let said = startup_rescan_and_restart_agree(&tree, &tree.path.join("z_real/tb.sv"), TB);
|
||||
assert_eq!(said.defs.len(), 1, "one definition target: {:#?}", said.defs);
|
||||
assert!(said.renamable, "a module declared once may be renamed");
|
||||
assert!(
|
||||
said.files.iter().all(|file| !file.contains("a_alias")),
|
||||
"the ignored alias is in nobody's scope: {:#?}",
|
||||
said.files
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn an_open_unsaved_buffer_is_not_indexed_again_under_an_alias() {
|
||||
// The buffer is `z_real/tb.sv` and the walk's own spelling of it is
|
||||
// `a_alias/tb.sv`: two paths, one file, and an index holding both would
|
||||
// hold `tb` twice while showing the user only one of them.
|
||||
let tree = Tree::new("unsavedalias");
|
||||
alias_pair(&tree, "z_real");
|
||||
tree.link("a_alias", "z_real");
|
||||
let unsaved = "module tb;\n child u();\n localparam UNSAVED = 1;\nendmodule\n";
|
||||
let opened = tree.path.join("z_real/tb.sv");
|
||||
let said = startup_rescan_and_restart_agree(&tree, &opened, unsaved);
|
||||
assert_eq!(said.defs.len(), 1, "one definition target: {:#?}", said.defs);
|
||||
assert!(said.renamable, "`child` is declared once");
|
||||
assert_eq!(said.files.len(), 2, "one child, one buffer: {:#?}", said.files);
|
||||
|
||||
// And the buffer's own name, which is the one the alias would have
|
||||
// duplicated: renamable, and the unsaved text is what was indexed.
|
||||
let uri = path_to_uri(&opened).expect("uri");
|
||||
let mut session = Session::staged(
|
||||
vec![tree.path.clone()],
|
||||
pulling(),
|
||||
true,
|
||||
CONFIGURATION_WAIT,
|
||||
vec![configuration_answer(the_whole_workspace_flat()), did_open(&opened, unsaved)],
|
||||
);
|
||||
let _ = session.drain();
|
||||
let at_tb = serde_json::json!({
|
||||
"textDocument": { "uri": &uri },
|
||||
"position": { "line": 0, "character": 8 },
|
||||
});
|
||||
let prepared = session.request(PrepareRenameRequest::METHOD, at_tb);
|
||||
assert!(prepared.response_result.is_ok(), "one `tb`: {:?}", prepared.response_result);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn a_genuine_duplicate_declaration_is_still_ambiguous_at_startup_and_after_a_rescan() {
|
||||
// The other side of the fix, and the reason deduplicating by *name* was
|
||||
// never an option: two physical files really do declare `dup`, and a
|
||||
// rename that picked one of them would be a wrong edit.
|
||||
let tree = Tree::new("legitdup");
|
||||
tree.write("dir1/dup.sv", "module dup;\nendmodule\n");
|
||||
tree.write("dir2/dup.sv", "module dup;\nendmodule\n");
|
||||
let opened = tree.path.join("dir1/dup.sv");
|
||||
let text = std::fs::read_to_string(&opened).expect("read");
|
||||
let uri = path_to_uri(&opened).expect("uri");
|
||||
let at_dup = serde_json::json!({
|
||||
"textDocument": { "uri": &uri },
|
||||
"position": { "line": 0, "character": 8 },
|
||||
});
|
||||
|
||||
let mut session = Session::staged(
|
||||
vec![tree.path.clone()],
|
||||
pulling(),
|
||||
true,
|
||||
CONFIGURATION_WAIT,
|
||||
vec![configuration_answer(the_whole_workspace()), did_open(&opened, &text)],
|
||||
);
|
||||
session.drain();
|
||||
let refused = session.request(PrepareRenameRequest::METHOD, at_dup.clone());
|
||||
let error = refused.response_result.expect_err("two declarations are ambiguous");
|
||||
assert!(error.message.contains("declared in more than one indexed file"), "{}", error.message);
|
||||
|
||||
session.watched(&[opened.clone(), tree.path.join("dir2/dup.sv")]);
|
||||
session.drain();
|
||||
let again = session.request(PrepareRenameRequest::METHOD, at_dup);
|
||||
let rescanned = again.response_result.expect_err("a rescan refuses it the same way");
|
||||
assert_eq!(rescanned.message, error.message, "the same sentence, word for word");
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn an_alias_beside_the_open_folder_indexes_once_and_asks_for_one_rescan() {
|
||||
// The case no pre-check can see: `other/link` is nowhere on the open
|
||||
// folder's own chain, so the head leads with `z_real` and only the
|
||||
// remaining walk finds out that a walk of the root would have spelled
|
||||
// those files `other/link/…`. Nothing is indexed twice — and the scan
|
||||
// asks for the canonical walk once, which is where the spelling
|
||||
// converges.
|
||||
let tree = Tree::new("siblingalias");
|
||||
alias_pair(&tree, "z_real");
|
||||
tree.link("other/link", "../z_real");
|
||||
let opened = tree.path.join("z_real/tb.sv");
|
||||
let uri = path_to_uri(&opened).expect("uri");
|
||||
|
||||
let mut session = Session::staged(
|
||||
vec![tree.path.clone()],
|
||||
pulling(),
|
||||
true,
|
||||
CONFIGURATION_WAIT,
|
||||
vec![configuration_answer(the_whole_workspace_flat()), did_open(&opened, TB)],
|
||||
);
|
||||
let messages = session.drain();
|
||||
let traces = trace_lines(&messages);
|
||||
let counts: Vec<&String> = traces.iter().filter(|line| line.contains(" counts (")).collect();
|
||||
assert_eq!(counts.len(), 2, "the startup scan and the one rescan it asked for: {traces:#?}");
|
||||
assert_eq!(field(counts[0], "conflict"), "1", "{}", counts[0]);
|
||||
assert_eq!(field(counts[0], "rescan_requested"), "1", "{}", counts[0]);
|
||||
assert_eq!(field(counts[1], "conflict"), "0", "the rescan is one whole walk: {}", counts[1]);
|
||||
assert_eq!(
|
||||
field(counts[1], "rescan_requested"),
|
||||
"0",
|
||||
"and it cannot ask for another: {}",
|
||||
counts[1]
|
||||
);
|
||||
|
||||
// What the startup indexed, from the per-file log: the head's spelling,
|
||||
// one copy of `child`, and no `other/link` beside it.
|
||||
let indexed: Vec<String> =
|
||||
log_lines(&messages).into_iter().filter(|line| line.contains("child.sv")).collect();
|
||||
assert_eq!(indexed.len(), 2, "one `child` per scan, never two: {indexed:#?}");
|
||||
assert!(indexed[0].contains("z_real/child.sv"), "the startup's spelling: {}", indexed[0]);
|
||||
assert!(indexed[1].contains("other/link/child.sv"), "the rescan's: {}", indexed[1]);
|
||||
|
||||
// And what the rescan left: the spelling a plain walk of this tree gives,
|
||||
// which is what every later scan and every restart will produce.
|
||||
let said = says(&mut session, &uri);
|
||||
assert_eq!(said.defs.len(), 1, "one definition target: {:#?}", said.defs);
|
||||
assert!(said.renamable, "`child` is declared once");
|
||||
assert!(
|
||||
said.files.iter().any(|file| file.ends_with("other/link/child.sv")),
|
||||
"the canonical spelling won: {:#?}",
|
||||
said.files
|
||||
);
|
||||
let plain = startup_rescan_and_restart_agree(&tree, &opened, TB);
|
||||
assert_eq!(said, plain, "and it is stable under a rescan and a restart");
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn a_same_named_file_symlink_outside_the_head_is_not_a_second_copy_of_the_buffer() {
|
||||
// QA's (f) on §62.1: the head walk asked `Aliased` about a same-named
|
||||
// file, the remaining walk did not, so a file symlink to the open buffer
|
||||
// living outside its folder was indexed a second time and `tb` was
|
||||
// falsely declared twice. Now both walks ask.
|
||||
let tree = Tree::new("filealias");
|
||||
alias_pair(&tree, "z_real");
|
||||
tree.link("alias_dir/tb.sv", "../z_real/tb.sv");
|
||||
let said = startup_rescan_and_restart_agree(&tree, &tree.path.join("z_real/tb.sv"), TB);
|
||||
assert_eq!(
|
||||
said.files.iter().filter(|file| file.ends_with("tb.sv")).count(),
|
||||
1,
|
||||
"one `tb.sv`, the buffer's: {:#?}",
|
||||
said.files
|
||||
);
|
||||
assert_eq!(said.defs.len(), 1, "one definition target: {:#?}", said.defs);
|
||||
assert!(said.renamable, "`tb` is declared once, whatever the disk spells");
|
||||
assert!(said.diagnostics.is_empty(), "{:#?}", said.diagnostics);
|
||||
}
|
||||
@@ -0,0 +1,794 @@
|
||||
//! Which files a scan will index, how they were found, and what the finding
|
||||
//! cost.
|
||||
//!
|
||||
//! The scope ladder ([`Workspace::source_files`]) and the overlay that lets an
|
||||
//! open buffer beat the disk ([`Workspace::collect_sources`]), lifted out of
|
||||
//! `state/mod.rs` on 2026-09-08 (TODO §61.3) when discovery grew a stage split
|
||||
//! and a second entry point. It answers one question — *which files exist as
|
||||
//! far as this server is concerned, and how big are they* — and every rung of
|
||||
//! the ladder is in this file.
|
||||
//!
|
||||
//! **The size a walked file reports is the walk's own.** `lucisv_core`'s walk
|
||||
//! calls `metadata` on every directory entry to answer "directory?", so the
|
||||
//! length is a field it already holds; asking the filesystem again, once per
|
||||
//! file, was 6.9 ms of a 165 ms discovery over 3 976 files — measured, not
|
||||
//! assumed, and smaller than it looks because the walk has just warmed every
|
||||
//! one of those inodes (`docs/features/perf5r-first-answer/README.md`). A path
|
||||
//! the walk did not stat — a filelist entry, an input named rather than walked
|
||||
//! — carries no length and is stat'd here, exactly as every path used to be.
|
||||
//!
|
||||
//! **And the walk is split in two when it pays to be.** A workspace-scoped
|
||||
//! session with a buffer open walks that buffer's own folders first, so the
|
||||
//! scan can index and publish them before it discovers the other 3 850 files
|
||||
//! ([`Workspace::first_scope`]). One scan, one work list, every file once.
|
||||
//!
|
||||
//! **"Every file once" is a claim about directory identity, not about paths.**
|
||||
//! A symlinked directory gives every file under it a second path, and a walk
|
||||
//! answers that by entering each directory identity once and reporting its
|
||||
//! files under the first spelling that reached it
|
||||
//! (`docs/features/walk-cycles/README.md`). Two walks with two visited sets do
|
||||
//! not have that rule *between* them, which is how the split came to index a
|
||||
//! module twice (`docs/performance_052_review.md` F1). So the two halves share
|
||||
//! one [`DirectoryTracker`]; the head is not led with at all when a walk of the
|
||||
//! root would reach the user's own folder by an earlier name
|
||||
//! ([`Workspace::has_preceding_alias`]); and where only the remaining walk can
|
||||
//! find that out, it says so and the scan asks for one canonical walk
|
||||
//! ([`Scan::wants_rescan`](super::Scan::wants_rescan)).
|
||||
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use lucisv_core::config::Discovery;
|
||||
use lucisv_core::walk::{
|
||||
collect_files_below_tracked, collect_files_tracked, dir_id, DirectoryTracker, EXTENSIONS,
|
||||
};
|
||||
|
||||
use crate::scan_trace::ScanTrace;
|
||||
|
||||
use super::scan::{Analyzed, HeldAnalyses, IndexEvent, PendingDiscovery, Sources};
|
||||
use super::Workspace;
|
||||
|
||||
/// One in-scope file, and the length whoever found it already knew.
|
||||
///
|
||||
/// `len` is `None` for a path nothing stat'd on the way here — a filelist
|
||||
/// entry, or an input named rather than walked. It is not "unknown size": it
|
||||
/// is "nobody has looked yet", and [`oversize`] is what looks.
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub(super) struct Found {
|
||||
pub(super) path: PathBuf,
|
||||
pub(super) len: Option<u64>,
|
||||
}
|
||||
|
||||
impl Found {
|
||||
/// A path nothing has stat'd.
|
||||
fn unmeasured(path: PathBuf) -> Found {
|
||||
Found { path, len: None }
|
||||
}
|
||||
|
||||
/// One path on its own, for a caller asking the cap about a single file
|
||||
/// rather than about a walk ([`Workspace::current_text`]).
|
||||
pub(super) fn of(path: &Path) -> Found {
|
||||
Found::unmeasured(path.to_path_buf())
|
||||
}
|
||||
}
|
||||
|
||||
/// What the scope ladder decided: the files to index, the directories an
|
||||
/// `` `include`` in them is looked for in, and what to tell the user.
|
||||
#[derive(Default)]
|
||||
pub(super) struct Scope {
|
||||
pub(super) files: Vec<Found>,
|
||||
/// The filelist's `+incdir+`s, in filelist order. Empty for every rung
|
||||
/// but the filelist — nothing else names an include path.
|
||||
pub(super) incdirs: Vec<PathBuf>,
|
||||
pub(super) warnings: Vec<String>,
|
||||
}
|
||||
|
||||
/// The size of `found` when it is over `cap`, else `None` — the whole of the
|
||||
/// `lucisv.index.maxFileSize` test.
|
||||
///
|
||||
/// Metadata only: the point of the cap is that a 200 MB netlist is never read
|
||||
/// into memory, so knowing how big it is has to come first. A `cap` of 0 is
|
||||
/// the client asking for no cap, and a file whose metadata cannot be read is
|
||||
/// not skipped here — it simply fails the read later, as it always did.
|
||||
///
|
||||
/// `stats` counts the `metadata` calls this one really made, so a session can
|
||||
/// prove the walk's hand-off removed them rather than assert it.
|
||||
pub(super) fn oversize(found: &Found, cap: u64, stats: &mut usize) -> Option<u64> {
|
||||
if cap == 0 {
|
||||
return None;
|
||||
}
|
||||
let size = match found.len {
|
||||
Some(size) => size,
|
||||
None => {
|
||||
*stats += 1;
|
||||
fs::metadata(&found.path).ok()?.len()
|
||||
}
|
||||
};
|
||||
(size > cap).then_some(size)
|
||||
}
|
||||
|
||||
/// The open buffers' files by **identity**, so a walked path that is a second
|
||||
/// spelling of one of them can be recognised and left out.
|
||||
///
|
||||
/// A symlinked directory gives every file under it a second path. The walk
|
||||
/// reports each file under the first spelling that reaches it, which may not be
|
||||
/// the one the buffer was opened by — and an index holding `a_alias/tb.sv` from
|
||||
/// disk beside the open `z_real/tb.sv` holds one module twice and refuses to
|
||||
/// rename it (`docs/features/walk-cycles/README.md`).
|
||||
///
|
||||
/// **The name is the gate, and it is what keeps this free.** A directory alias
|
||||
/// cannot change a file's *name*, so a walked file whose name no open buffer
|
||||
/// shares cannot be one of them and is never stat'd: an ordinary workspace pays
|
||||
/// nothing at all, and one with same-named files pays one `metadata` per
|
||||
/// same-named candidate. A **file**-level symlink under a different name is out
|
||||
/// of scope — two names for one inode that no directory relates, which every
|
||||
/// other part of this server already treats as two files.
|
||||
struct Aliased {
|
||||
/// The names those buffers' files go by — the cheap half of the test.
|
||||
names: HashSet<std::ffi::OsString>,
|
||||
/// Their `(dev, ino)` identities, read once per open buffer rather than
|
||||
/// once per walked file.
|
||||
ids: HashSet<lucisv_core::walk::DirId>,
|
||||
}
|
||||
|
||||
impl Aliased {
|
||||
/// The identities of `paths`, with the names to gate on.
|
||||
fn of(paths: &HashSet<&Path>) -> Aliased {
|
||||
let names = paths.iter().filter_map(|p| p.file_name()).map(|n| n.to_os_string()).collect();
|
||||
let ids = paths.iter().filter_map(|p| dir_id(p)).collect();
|
||||
Aliased { names, ids }
|
||||
}
|
||||
|
||||
/// Whether `path` names a file an open buffer already speaks for, by a
|
||||
/// different spelling. `stats` counts the `metadata` calls it made.
|
||||
fn speaks_for(&self, path: &Path, stats: &mut usize) -> bool {
|
||||
if self.ids.is_empty() {
|
||||
return false;
|
||||
}
|
||||
let Some(name) = path.file_name() else { return false };
|
||||
if !self.names.contains(name) {
|
||||
return false;
|
||||
}
|
||||
*stats += 1;
|
||||
dir_id(path).is_some_and(|id| self.ids.contains(&id))
|
||||
}
|
||||
}
|
||||
|
||||
impl Workspace {
|
||||
/// Resolve the scope: which files are in it, with open buffers overriding
|
||||
/// disk, and those buffers' own text.
|
||||
///
|
||||
/// **Metadata only, plus what is already in memory.** Nothing on disk is
|
||||
/// read here — a file's text is read by whoever indexes or rewrites it,
|
||||
/// one file at a time ([`Workspace::scan_step`], [`Workspace::sources`]).
|
||||
///
|
||||
/// This is where `lucisv.index.maxFileSize` applies, and it applies to the
|
||||
/// **walked** files only: an open buffer is folded in below whatever its
|
||||
/// size, because the user opened it deliberately and an editor that
|
||||
/// refused to understand the file on screen would be absurd. The check is
|
||||
/// the size the walk read, so an oversized file is still never read at all
|
||||
/// — which is the whole saving, and it is still counted and reported here
|
||||
/// so that a scan's skip count is known before its first step.
|
||||
///
|
||||
/// A refactoring reads this same list through `sources()`, so a file the
|
||||
/// cap keeps out of the index is also a file a workspace rename will not
|
||||
/// rewrite. That is the consistent answer: the cap says which files exist
|
||||
/// as far as this server is concerned.
|
||||
pub(super) fn collect_sources(
|
||||
&self,
|
||||
watch: &mut dyn FnMut(IndexEvent),
|
||||
analyses: HeldAnalyses,
|
||||
trace: &mut ScanTrace,
|
||||
) -> Sources {
|
||||
let scope = self.source_files(trace);
|
||||
self.overlay_buffers(scope, watch, analyses, trace)
|
||||
}
|
||||
|
||||
/// [`Workspace::collect_sources`] over one already-resolved scope — the
|
||||
/// cap, then the open buffers over the top.
|
||||
///
|
||||
/// Split out because the two-phase startup resolves the scope twice (the
|
||||
/// user's own folders, then the rest of the workspace) and both halves owe
|
||||
/// the buffers the same precedence.
|
||||
pub(super) fn overlay_buffers(
|
||||
&self,
|
||||
scope: Scope,
|
||||
watch: &mut dyn FnMut(IndexEvent),
|
||||
analyses: HeldAnalyses,
|
||||
trace: &mut ScanTrace,
|
||||
) -> Sources {
|
||||
let cap = self.client.max_file_size;
|
||||
// Every path an open buffer speaks for. Reading such a file from disk
|
||||
// is work thrown away — the buffer's text replaces it below, whatever
|
||||
// the disk says — so the read is skipped rather than undone. The cap is
|
||||
// still consulted first, so an oversized file still reports itself
|
||||
// skipped exactly as it did before the buffer put its own text back.
|
||||
let spoken_for: HashSet<&Path> =
|
||||
self.docs.values().filter_map(|doc| doc.path.as_deref()).collect();
|
||||
// …and every *other* spelling of those same files, which a directory
|
||||
// alias makes and a path comparison cannot see ([`Aliased`]).
|
||||
let aliased = Aliased::of(&spoken_for);
|
||||
let capping = trace.now();
|
||||
let mut stats = 0usize;
|
||||
let mut files: Vec<PathBuf> = Vec::new();
|
||||
for found in scope.files {
|
||||
if let Some(size) = oversize(&found, cap, &mut stats) {
|
||||
watch(IndexEvent::Skipped { path: &found.path, size, cap });
|
||||
continue;
|
||||
}
|
||||
if spoken_for.contains(found.path.as_path()) {
|
||||
continue;
|
||||
}
|
||||
if aliased.speaks_for(&found.path, &mut stats) {
|
||||
continue;
|
||||
}
|
||||
files.push(found.path);
|
||||
}
|
||||
ScanTrace::add(&mut trace.cap_ms, capping);
|
||||
trace.stats += stats;
|
||||
// Open buffers override what is on disk, and contribute themselves
|
||||
// when they are not on disk at all.
|
||||
//
|
||||
// Except a buffer on the large-file fast path, which overrides disk
|
||||
// with *nothing*: indexing it means parsing the hundred megabytes the
|
||||
// fast path exists not to parse. Removing the path rather than leaving
|
||||
// the disk copy in is the honest half of that — the alternative would
|
||||
// be an index describing a file the user is looking at by bytes it no
|
||||
// longer has. See `docs/features/large-file-mode/README.md` for the
|
||||
// interaction with `lucisv.index.maxFileSize`, whose "an open buffer is
|
||||
// never capped" rule this is the one exception to.
|
||||
let buffering = trace.now();
|
||||
let mut analyzed = Analyzed::default();
|
||||
let mut buffered: HashMap<PathBuf, String> = HashMap::new();
|
||||
for doc in self.docs.values() {
|
||||
let Some(path) = doc.path.clone() else { continue };
|
||||
files.retain(|p| p != &path);
|
||||
if !doc.large {
|
||||
if analyses == HeldAnalyses::Wanted {
|
||||
analyzed.facts.insert(path.clone(), doc.facts(path.clone()));
|
||||
analyzed.words.insert(path.clone(), doc.words());
|
||||
}
|
||||
buffered.insert(path.clone(), doc.text.clone());
|
||||
files.push(path);
|
||||
}
|
||||
}
|
||||
ScanTrace::add(&mut trace.buffers_ms, buffering);
|
||||
Sources { files, buffered, analyzed, incdirs: scope.incdirs, warnings: scope.warnings }
|
||||
}
|
||||
|
||||
/// The files the index covers, and what the user should be told about how
|
||||
/// they were chosen. The scope ladder, highest first:
|
||||
///
|
||||
/// 1. **A filelist** — `lucisv.filelist`, else a `filelist` key in the
|
||||
/// config governing a workspace root. It names *exactly* the files to
|
||||
/// index; the project said so, and guessing past it would defeat the
|
||||
/// point of having one. This is the "project file", and it is the one
|
||||
/// rung that is whole-project by definition.
|
||||
/// 2. **The workspace-folder walk**, on `lucisv.index.scope:
|
||||
/// "workspace"` — what every session did before 2026-08-27, now opt-in.
|
||||
/// 3. **The folder scope**, the default: each opened buffer's own
|
||||
/// directory raised `lucisv.index.scopeDepth` levels, walked. See
|
||||
/// `docs/features/index-scope/README.md` for what that costs, which is
|
||||
/// that a definition in another folder does not resolve until the
|
||||
/// scope reaches that folder.
|
||||
///
|
||||
/// A configured filelist that cannot be read falls back to rung 2 (or 3)
|
||||
/// with a warning. An editor that shows no symbols because of a typo in a
|
||||
/// path is worse than one that quietly indexes what it can and says so.
|
||||
///
|
||||
/// Only rung 1 can carry `+incdir+` directories: a walked workspace names
|
||||
/// none, so an `` `include`` there resolves against the including file's
|
||||
/// own directory alone (`docs/features/include-nav/README.md`).
|
||||
pub(super) fn source_files(&self, trace: &mut ScanTrace) -> Scope {
|
||||
// The walk's own warnings join the scope's, so an unreadable directory
|
||||
// reaches the output channel by the road a filelist's problems already
|
||||
// travel — said once per scan and never per keystroke.
|
||||
let mut warnings: Vec<String> = Vec::new();
|
||||
let Some(path) = self.filelist_path() else {
|
||||
let files = self.default_files(&mut |w| warnings.push(w), trace);
|
||||
return Scope { files, warnings, ..Default::default() };
|
||||
};
|
||||
let reading = trace.now();
|
||||
let read = lucisv_core::filelist::read(&path);
|
||||
ScanTrace::add(&mut trace.filelist_ms, reading);
|
||||
match read {
|
||||
Ok(list) => Scope {
|
||||
files: list.files.into_iter().map(Found::unmeasured).collect(),
|
||||
incdirs: list.incdirs,
|
||||
warnings: list.warnings,
|
||||
},
|
||||
Err(problem) => {
|
||||
let files = self.default_files(&mut |w| warnings.push(w), trace);
|
||||
warnings.insert(0, format!("{problem} — indexing the workspace instead"));
|
||||
Scope { files, incdirs: Vec::new(), warnings }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The filelist governing this workspace, if any: the client's setting
|
||||
/// first (absolute, or relative to the first root), else the `filelist`
|
||||
/// key of the config governing a root, in root order.
|
||||
///
|
||||
/// Public because the file watchers must name it: a `.f` edited outside
|
||||
/// the editor changes the index's scope, and nothing else on disk would
|
||||
/// tell us (`docs/features/file-watching/README.md`).
|
||||
pub fn filelist_path(&self) -> Option<PathBuf> {
|
||||
if let Some(setting) = &self.client.filelist {
|
||||
let path = Path::new(setting);
|
||||
return Some(match self.roots.first() {
|
||||
Some(root) if path.is_relative() => root.join(path),
|
||||
_ => path.to_path_buf(),
|
||||
});
|
||||
}
|
||||
let mut discovery = Discovery::new(true);
|
||||
// A broken `lucisv.toml` names no filelist, exactly as it contributes no
|
||||
// excludes below: the user hears about it when they format.
|
||||
self.roots.iter().find_map(|root| discovery.for_dir(root).ok()?.filelist)
|
||||
}
|
||||
|
||||
/// Rungs 2 and 3 of the ladder: the whole-workspace walk when the client
|
||||
/// asked for it, else the folder scope.
|
||||
fn default_files(&self, warn: &mut dyn FnMut(String), trace: &mut ScanTrace) -> Vec<Found> {
|
||||
if self.walks_the_workspace() {
|
||||
return self.walked_files(&self.roots, warn, trace);
|
||||
}
|
||||
self.folder_files(warn, trace)
|
||||
}
|
||||
|
||||
/// Rung 3: the folder scope — [`Workspace::scope_dirs`], walked with every
|
||||
/// filter the workspace walk applies.
|
||||
///
|
||||
/// One exception, kept exactly as it was from before this rung became the
|
||||
/// default: **a rootless session at depth 0 reads its directories flat**,
|
||||
/// one level, no `.gitignore`. That is the "a file opened on its own"
|
||||
/// case, where descending a tree the user never named would be a surprise
|
||||
/// — and the moment the user raises `scopeDepth` they have named one, so
|
||||
/// the walk is what they asked for.
|
||||
fn folder_files(&self, warn: &mut dyn FnMut(String), trace: &mut ScanTrace) -> Vec<Found> {
|
||||
let dirs = self.scope_dirs();
|
||||
if self.roots.is_empty() && self.client.index_scope_depth == 0 {
|
||||
return sibling_files(&dirs, trace);
|
||||
}
|
||||
self.walked_files(&dirs, warn, trace)
|
||||
}
|
||||
|
||||
/// Every source file under `dirs`, found by the CLI's own walk: the same
|
||||
/// extensions, the same `.gitignore` handling, and the `exclude` patterns
|
||||
/// of the config governing each directory. What `lucisv` skips, the index
|
||||
/// skips.
|
||||
///
|
||||
/// `dirs` is the workspace roots for rung 2 and the scope directories for
|
||||
/// rung 3. The one honest difference between the two: `.gitignore` files
|
||||
/// are read from the walk's own starting directory downwards, so a rule
|
||||
/// written in a root's `.gitignore` does not apply to a rung-3 walk that
|
||||
/// starts below it. The `exclude` patterns are matched against whole
|
||||
/// paths and so behave identically either way.
|
||||
pub(super) fn walked_files(
|
||||
&self,
|
||||
dirs: &[PathBuf],
|
||||
warn: &mut dyn FnMut(String),
|
||||
trace: &mut ScanTrace,
|
||||
) -> Vec<Found> {
|
||||
let mut tracker = DirectoryTracker::new();
|
||||
self.walked_files_tracked(dirs, &mut tracker, warn, trace)
|
||||
}
|
||||
|
||||
/// [`Workspace::walked_files`] over an existing [`DirectoryTracker`], so
|
||||
/// two walks of one scan enter each directory identity once between them.
|
||||
pub(super) fn walked_files_tracked(
|
||||
&self,
|
||||
dirs: &[PathBuf],
|
||||
tracker: &mut DirectoryTracker,
|
||||
warn: &mut dyn FnMut(String),
|
||||
trace: &mut ScanTrace,
|
||||
) -> Vec<Found> {
|
||||
let mut discovery = Discovery::new(true);
|
||||
let mut out: Vec<Found> = Vec::new();
|
||||
for root in dirs {
|
||||
// The walk names its inputs as strings; every directory here came
|
||||
// from a `file:` URI, which cannot carry a non-UTF-8 path.
|
||||
let Some(input) = root.to_str() else { continue };
|
||||
// A broken `lucisv.toml` must not stop the server from indexing: an
|
||||
// index that excludes nothing is a far better failure than a
|
||||
// server that comes up empty. The error is reported when the user
|
||||
// formats a file in this tree (`format::settings_for`).
|
||||
let configuring = trace.now();
|
||||
let mut exclude =
|
||||
discovery.for_dir(root).unwrap_or_default().exclude.unwrap_or_default();
|
||||
// The client's `lucisv.exclude` is *appended*, never substituted —
|
||||
// the CLI appends a config's excludes to `--exclude` the same way,
|
||||
// and a setting that silently dropped a checked-in exclude would
|
||||
// put vendored code back in the index for one user only.
|
||||
exclude.extend(self.client.exclude.iter().cloned());
|
||||
ScanTrace::add(&mut trace.config_ms, configuring);
|
||||
// `.gitignore` is always honoured: it is the CLI's default, and an
|
||||
// editor has no `--no-gitignore` to type. An unreadable directory
|
||||
// is skipped and said — the warning rides out on the scope's own
|
||||
// warnings, which `server/notification.rs` logs once per scan.
|
||||
let walking = trace.now();
|
||||
let _ = collect_files_tracked(
|
||||
input,
|
||||
&exclude,
|
||||
true,
|
||||
tracker,
|
||||
&mut |path, len| out.push(Found { path, len }),
|
||||
&mut |w| warn(w.to_string()),
|
||||
);
|
||||
ScanTrace::add(&mut trace.walk_ms, walking);
|
||||
trace.walk_dirs += 1;
|
||||
}
|
||||
let sorting = trace.now();
|
||||
sort_found(&mut out);
|
||||
ScanTrace::add(&mut trace.sort_ms, sorting);
|
||||
out
|
||||
}
|
||||
|
||||
/// The files the directories a widen added bring into scope, by the same
|
||||
/// rules [`Workspace::folder_files`] applies to the whole scope — including
|
||||
/// the rootless-at-depth-0 flat read.
|
||||
pub(super) fn widened_files(
|
||||
&self,
|
||||
added: &[PathBuf],
|
||||
warn: &mut dyn FnMut(String),
|
||||
trace: &mut ScanTrace,
|
||||
) -> Vec<Found> {
|
||||
if self.roots.is_empty() && self.client.index_scope_depth == 0 {
|
||||
return sibling_files(added, trace);
|
||||
}
|
||||
self.walked_files(added, warn, trace)
|
||||
}
|
||||
}
|
||||
|
||||
/// The largest neighbourhood a startup will index before it finds out how big
|
||||
/// the workspace is.
|
||||
///
|
||||
/// The split's whole premise is that the user's own folder is a small part of
|
||||
/// the workspace, so stepping it first costs the rest of the scan nothing a
|
||||
/// user notices. Beyond this many files that premise is not proven — the
|
||||
/// count that would prove it is the walk this order exists to postpone — so
|
||||
/// the walk is finished first and the scan is ordered exactly as it was
|
||||
/// before, `scan_order::worth_waiting` and all.
|
||||
///
|
||||
/// 512 is a measured bound and not a round number: a warm step costs about
|
||||
/// 0.2 ms a file (124 files in 25 ms, `docs/features/perf5-p4/README.md`
|
||||
/// §P4b3), so a head of this size is ~100 ms of stepping and the whole first
|
||||
/// answer still fits inside the round's 200 ms gate.
|
||||
pub(crate) const HEAD_WALK_MAX: usize = 512;
|
||||
|
||||
impl Workspace {
|
||||
/// Whether this scan may walk the user's own folders first and the rest of
|
||||
/// the workspace afterwards.
|
||||
///
|
||||
/// Three conditions, and each of them names a case the split would
|
||||
/// otherwise make *worse*:
|
||||
///
|
||||
/// * **the workspace walk is the rung in force.** It is the only rung
|
||||
/// whose discovery is a walk of everything: a filelist names its files
|
||||
/// and reads in one go, and the folder rung's own scope *is* the
|
||||
/// neighbourhood, so splitting it would put the whole scan in the head.
|
||||
/// * **a buffer is open, in a folder below a workspace root.** With no
|
||||
/// buffer there is no neighbourhood to lead with; with one opened from
|
||||
/// the root itself, the folder it raises to *is* the workspace, which is
|
||||
/// the case `scan_order::worth_waiting` exists for and the case this
|
||||
/// returns `false` for so that rule still decides it.
|
||||
/// * **the walk finds a small enough neighbourhood** — checked by the
|
||||
/// caller once the folders are walked, against [`HEAD_WALK_MAX`].
|
||||
/// * **it is the session's first scan** — checked by the caller, which is
|
||||
/// the only one that knows the scan number.
|
||||
pub(super) fn splits_discovery(&self) -> bool {
|
||||
if !self.leads_with_a_folder() {
|
||||
return false;
|
||||
}
|
||||
let dirs = self.raised_dirs();
|
||||
!dirs.is_empty() && dirs.iter().all(|dir| self.below_a_root(dir))
|
||||
}
|
||||
|
||||
/// Whether a scan of this workspace would lead with the user's own folder
|
||||
/// if it knew one — the rung half of [`Workspace::splits_discovery`],
|
||||
/// asked on its own by the startup that waits a bounded moment to be told
|
||||
/// which folder that is (`server/startup.rs`).
|
||||
pub fn leads_with_a_folder(&self) -> bool {
|
||||
self.walks_the_workspace()
|
||||
}
|
||||
|
||||
/// Whether `dir` is a **strict** descendant of some workspace root.
|
||||
///
|
||||
/// A directory that *is* a root is the whole of that root's walk, so
|
||||
/// leading with it is leading with everything.
|
||||
fn below_a_root(&self, dir: &Path) -> bool {
|
||||
self.roots.iter().any(|root| dir.starts_with(root) && dir != root)
|
||||
}
|
||||
|
||||
/// What a whole scan starts from: its scope, and whatever of that scope is
|
||||
/// still to be walked.
|
||||
///
|
||||
/// `None` for the second half means what it has always meant — the scope
|
||||
/// was resolved entire before the first file was indexed, and the work
|
||||
/// list the caller gets is the whole of it. `Some` means the caller is
|
||||
/// holding the user's own folders and owes itself the rest of the
|
||||
/// workspace once it has published them ([`PendingDiscovery`]).
|
||||
pub(super) fn first_scope(
|
||||
&self,
|
||||
watch: &mut dyn FnMut(IndexEvent),
|
||||
trace: &mut ScanTrace,
|
||||
) -> (Sources, Option<PendingDiscovery>) {
|
||||
// **The session's first scan only.** Every later whole rescan is one a
|
||||
// message asked for, and `must_wait`'s `answering_a_rescan` holds every
|
||||
// request for the whole of it — so leading with a folder buys no answer
|
||||
// any sooner and costs the neighbourhood one extra directory
|
||||
// traversal. The startup scan is the one nothing is queued ahead of,
|
||||
// and it is the one this order is for
|
||||
// (`docs/features/perf5r-first-answer/README.md`).
|
||||
if trace.number > 1 || !self.splits_discovery() {
|
||||
return (self.collect_sources(watch, HeldAnalyses::Wanted, trace), None);
|
||||
}
|
||||
// A directory alias that a root walk would reach *before* the folder
|
||||
// the head would lead with: leading with it would spell those files a
|
||||
// way no other scan of this workspace ever does
|
||||
// ([`Workspace::has_preceding_alias`]). The whole scope, walked once,
|
||||
// is the answer — a millisecond on a fixture and ~155 ms on
|
||||
// opentitan, and only for a session whose own folder is aliased.
|
||||
for dir in self.raised_dirs() {
|
||||
if let Some(root) = self.deepest_root(&dir) {
|
||||
if self.has_preceding_alias(&root, &dir) {
|
||||
return (self.collect_sources(watch, HeldAnalyses::Wanted, trace), None);
|
||||
}
|
||||
}
|
||||
}
|
||||
let mut warnings: Vec<String> = Vec::new();
|
||||
let mut tracker = DirectoryTracker::new();
|
||||
let head = self.neighbourhood_files(&mut tracker, &mut |w| warnings.push(w), trace);
|
||||
if head.len() > HEAD_WALK_MAX {
|
||||
// Too big to lead with unproven. The head is **discarded** and the
|
||||
// whole scope walked once, ordered the way every scan before this
|
||||
// one was: keeping it and walking the rest beside it would union
|
||||
// two walks that never agreed on a directory's spelling, which is
|
||||
// the very thing the tracker exists to prevent.
|
||||
return (self.collect_sources(watch, HeldAnalyses::Wanted, trace), None);
|
||||
}
|
||||
// Every path the neighbourhood walk named, before the cap has had a
|
||||
// say: what the remaining walk must not decide about a second time.
|
||||
let mut seen: HashSet<PathBuf> = head.iter().map(|found| found.path.clone()).collect();
|
||||
seen.extend(self.docs.values().filter_map(|doc| doc.path.clone()));
|
||||
let scope = Scope { files: head, incdirs: Vec::new(), warnings };
|
||||
let sources = self.overlay_buffers(scope, watch, HeldAnalyses::Wanted, trace);
|
||||
(sources, Some(PendingDiscovery { roots: self.roots.clone(), seen, tracker }))
|
||||
}
|
||||
|
||||
/// Whether some directory between `root` and `dir` holds a **second
|
||||
/// spelling** of `dir` or of one of its ancestors that a walk of `root`
|
||||
/// would reach *first*.
|
||||
///
|
||||
/// The one case the split cannot lead with. A walk of the root reports
|
||||
/// each directory under the first path that reaches it, in name order, so
|
||||
/// with `a_alias -> z_real` the whole of `z_real` is spelled `a_alias/…`;
|
||||
/// a head walk starting at `z_real` would spell it `z_real/…` and the two
|
||||
/// halves of one scan would disagree with each other and with every later
|
||||
/// rescan. Asked before the head is walked, so the answer is a *fallback*
|
||||
/// to the single canonical walk and never a repair afterwards.
|
||||
///
|
||||
/// **It reads directories and stats symlinks only.** The chain from a
|
||||
/// buffer's folder to the root is a handful of directories (four on
|
||||
/// opentitan, ~150 entries between them); `read_dir` already carries each
|
||||
/// entry's kind, so an ordinary tree costs no `metadata` at all.
|
||||
fn has_preceding_alias(&self, root: &Path, dir: &Path) -> bool {
|
||||
let targets = identities_to(root, dir);
|
||||
!targets.is_empty()
|
||||
&& ancestors_to(root, dir).into_iter().any(|up| precedes_a_target(up, &targets))
|
||||
}
|
||||
|
||||
/// The user's own neighbourhood, walked: every source file under the
|
||||
/// folders the open buffers raise to, **as the walk of the workspace root
|
||||
/// would have found them**.
|
||||
///
|
||||
/// `collect_files_below` rather than `collect_files_with` is the whole of
|
||||
/// that "as": a walk starting at `hw/ip/aes` reads no `.gitignore` above
|
||||
/// itself, and the rung in force here is the *root's*, so the folder half
|
||||
/// of one scope must obey the same rules the other half does. Without it
|
||||
/// the head would index files the rest of the scan excludes, and the two
|
||||
/// halves of one scan would disagree about which files exist.
|
||||
fn neighbourhood_files(
|
||||
&self,
|
||||
tracker: &mut DirectoryTracker,
|
||||
warn: &mut dyn FnMut(String),
|
||||
trace: &mut ScanTrace,
|
||||
) -> Vec<Found> {
|
||||
let mut discovery = Discovery::new(true);
|
||||
let mut out: Vec<Found> = Vec::new();
|
||||
for dir in self.raised_dirs() {
|
||||
// The root this folder was raised inside: the deepest one that
|
||||
// contains it, which is the one `Workspace::raised` clamped to.
|
||||
let Some(root) = self.deepest_root(&dir) else { continue };
|
||||
let configuring = trace.now();
|
||||
let mut exclude =
|
||||
discovery.for_dir(&root).unwrap_or_default().exclude.unwrap_or_default();
|
||||
exclude.extend(self.client.exclude.iter().cloned());
|
||||
ScanTrace::add(&mut trace.config_ms, configuring);
|
||||
let walking = trace.now();
|
||||
let _ = collect_files_below_tracked(
|
||||
&root,
|
||||
&dir,
|
||||
&exclude,
|
||||
true,
|
||||
tracker,
|
||||
&mut |path, len| out.push(Found { path, len }),
|
||||
&mut |w| warn(w.to_string()),
|
||||
);
|
||||
ScanTrace::add(&mut trace.walk_ms, walking);
|
||||
trace.walk_dirs += 1;
|
||||
}
|
||||
let sorting = trace.now();
|
||||
sort_found(&mut out);
|
||||
ScanTrace::add(&mut trace.sort_ms, sorting);
|
||||
out
|
||||
}
|
||||
|
||||
/// The deepest workspace root containing `dir` — the one
|
||||
/// [`Workspace::raised`] clamped the raise to, and so the one whose walk
|
||||
/// this folder is part of.
|
||||
fn deepest_root(&self, dir: &Path) -> Option<PathBuf> {
|
||||
self.roots
|
||||
.iter()
|
||||
.filter(|root| dir.starts_with(root))
|
||||
.max_by_key(|root| root.components().count())
|
||||
.cloned()
|
||||
}
|
||||
|
||||
/// The rest of the workspace: everything the roots hold that `seen` does
|
||||
/// not already name, capped and reported exactly as the neighbourhood was.
|
||||
///
|
||||
/// Returns the files to index, what the walk wants said, and how many the
|
||||
/// cap kept out. Open buffers are **not** folded in again — they were
|
||||
/// folded into the head, and a buffer's path is in `pending.seen`.
|
||||
///
|
||||
/// **It walks with the head's own directory identities.** The tracker is
|
||||
/// the one the neighbourhood filled, so a directory the head already
|
||||
/// entered is not entered again under an alias and no file is discovered
|
||||
/// twice. Where this walk reaches such a directory under a spelling the
|
||||
/// root walk would have *preferred*, the tracker says so
|
||||
/// ([`DirectoryTracker::has_conflict`]) and the caller asks for one
|
||||
/// ordinary rescan, which is that root walk.
|
||||
pub(super) fn rest_of_scope(
|
||||
&self,
|
||||
pending: &mut PendingDiscovery,
|
||||
watch: &mut dyn FnMut(IndexEvent),
|
||||
trace: &mut ScanTrace,
|
||||
) -> (Vec<PathBuf>, Vec<String>, usize) {
|
||||
let (roots, seen) = (&pending.roots, &pending.seen);
|
||||
let mut warnings: Vec<String> = Vec::new();
|
||||
let walked = self.walked_files_tracked(
|
||||
roots,
|
||||
&mut pending.tracker,
|
||||
&mut |w| warnings.push(w),
|
||||
trace,
|
||||
);
|
||||
// The same gate the neighbourhood applied: a file an open buffer
|
||||
// already speaks for, reached here by **another** spelling (a
|
||||
// same-named file symlink outside the head), must not be indexed a
|
||||
// second time. The buffer's own spelling is not an alias — a buffer
|
||||
// opened mid-scan is discovered here for the first time and must land
|
||||
// in the work list — so the gate is asked only about other paths.
|
||||
// Found by QA on §62.1, twice: the head walk had the gate and this walk
|
||||
// did not; then the gate matched a mid-scan buffer against itself.
|
||||
let spoken_for: HashSet<&Path> =
|
||||
self.docs.values().filter_map(|doc| doc.path.as_deref()).collect();
|
||||
let aliased = Aliased::of(&spoken_for);
|
||||
let cap = self.client.max_file_size;
|
||||
let capping = trace.now();
|
||||
let mut stats = 0usize;
|
||||
let mut skipped = 0usize;
|
||||
let mut files: Vec<PathBuf> = Vec::new();
|
||||
for found in walked {
|
||||
// Already decided about by the neighbourhood: indexed, capped out,
|
||||
// or spoken for by an open buffer. Deciding again would step a
|
||||
// file twice or report one skip as two.
|
||||
let another_spelling = !spoken_for.contains(found.path.as_path());
|
||||
if seen.contains(&found.path)
|
||||
|| (another_spelling && aliased.speaks_for(&found.path, &mut stats))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if let Some(size) = oversize(&found, cap, &mut stats) {
|
||||
watch(IndexEvent::Skipped { path: &found.path, size, cap });
|
||||
skipped += 1;
|
||||
continue;
|
||||
}
|
||||
files.push(found.path);
|
||||
}
|
||||
ScanTrace::add(&mut trace.cap_ms, capping);
|
||||
trace.stats += stats;
|
||||
(files, warnings, skipped)
|
||||
}
|
||||
}
|
||||
|
||||
/// The identity of `dir` and of every directory between it and `root` — what
|
||||
/// a second spelling would have to name to matter ([`Workspace::has_preceding_alias`]).
|
||||
///
|
||||
/// `root` itself is not among them: a walk of the root enters it before it
|
||||
/// reads anything, so nothing it holds can precede it.
|
||||
fn identities_to(root: &Path, dir: &Path) -> Vec<(lucisv_core::walk::DirId, PathBuf)> {
|
||||
let mut out = Vec::new();
|
||||
let mut at = dir;
|
||||
while at != root {
|
||||
if let Some(id) = dir_id(at) {
|
||||
out.push((id, at.to_path_buf()));
|
||||
}
|
||||
let Some(parent) = at.parent() else { break };
|
||||
at = parent;
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
/// The directories a walk of `root` reads on its way down to `dir`: its
|
||||
/// parent, that one's parent, and so on up to and including `root`.
|
||||
fn ancestors_to<'a>(root: &'a Path, dir: &'a Path) -> Vec<&'a Path> {
|
||||
let mut out = Vec::new();
|
||||
let mut at = dir.parent();
|
||||
while let Some(parent) = at {
|
||||
out.push(parent);
|
||||
if parent == root {
|
||||
break;
|
||||
}
|
||||
at = parent.parent();
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
/// Whether `dir` holds a symlink to one of `targets` under a name that sorts
|
||||
/// before the target's own path — the entry a root walk would follow first.
|
||||
fn precedes_a_target(dir: &Path, targets: &[(lucisv_core::walk::DirId, PathBuf)]) -> bool {
|
||||
let Ok(entries) = fs::read_dir(dir) else { return false };
|
||||
entries.flatten().any(|entry| {
|
||||
// Only a symlink can be a second spelling of a directory, and the kind
|
||||
// is the one `read_dir` already read — so the stat below happens once
|
||||
// per link in the chain and never once per entry.
|
||||
if !entry.file_type().is_ok_and(|kind| kind.is_symlink()) {
|
||||
return false;
|
||||
}
|
||||
let path = entry.path();
|
||||
let Some(id) = dir_id(&path) else { return false };
|
||||
targets.iter().any(|(target, spelling)| id == *target && path < *spelling)
|
||||
})
|
||||
}
|
||||
|
||||
/// Path order, one entry per path — what the walk's callers have always done
|
||||
/// with the paths of several overlapping directory walks.
|
||||
///
|
||||
/// The first entry for a path wins, which matters only for the length beside
|
||||
/// it, and two walks that found the same file read the same `metadata` for it.
|
||||
pub(super) fn sort_found(found: &mut Vec<Found>) {
|
||||
found.sort_by(|a, b| a.path.cmp(&b.path));
|
||||
found.dedup_by(|a, b| a.path == b.path);
|
||||
}
|
||||
|
||||
/// The source files sitting in each of `dirs`, one directory deep. No walk, no
|
||||
/// `.gitignore`: this is the rootless default, where descending a tree the
|
||||
/// user never named would be a surprise.
|
||||
fn sibling_files(dirs: &[PathBuf], trace: &mut ScanTrace) -> Vec<Found> {
|
||||
let walking = trace.now();
|
||||
let mut out: Vec<Found> = Vec::new();
|
||||
for dir in dirs {
|
||||
let Ok(entries) = fs::read_dir(dir) else { continue };
|
||||
for entry in entries.flatten() {
|
||||
let path = entry.path();
|
||||
let extension = path.extension().and_then(|e| e.to_str()).unwrap_or_default();
|
||||
if !EXTENSIONS.contains(&extension) {
|
||||
continue;
|
||||
}
|
||||
// One `metadata` — the same call `is_file()` was, with the length
|
||||
// it always had kept rather than thrown away. It follows symlinks,
|
||||
// exactly as `is_file()` did.
|
||||
let Ok(meta) = fs::metadata(&path) else { continue };
|
||||
if meta.is_file() {
|
||||
out.push(Found { path, len: Some(meta.len()) });
|
||||
}
|
||||
}
|
||||
}
|
||||
ScanTrace::add(&mut trace.walk_ms, walking);
|
||||
trace.walk_dirs += dirs.len();
|
||||
let sorting = trace.now();
|
||||
sort_found(&mut out);
|
||||
ScanTrace::add(&mut trace.sort_ms, sorting);
|
||||
out
|
||||
}
|
||||
@@ -20,9 +20,6 @@ use vlog_semantic::{
|
||||
WorkspaceIndex,
|
||||
};
|
||||
|
||||
use lucisv_core::config::Discovery;
|
||||
use lucisv_core::walk::{collect_files, EXTENSIONS};
|
||||
|
||||
use crate::candidates::Candidates;
|
||||
use crate::convert::Positions;
|
||||
use crate::includes::{self, IncludeGraph};
|
||||
@@ -31,11 +28,13 @@ use crate::module_select::{self, Reach};
|
||||
use crate::rename_trace::{self, Rung, SelectionTrace, Wanted};
|
||||
use crate::scan_order::{self, WorkList};
|
||||
|
||||
pub(crate) mod discover;
|
||||
mod scan;
|
||||
|
||||
use crate::scan_trace::{CacheWork, ScanTrace};
|
||||
use crate::settings::{ClientSettings, IndexScope};
|
||||
use crate::uri::uri_to_path;
|
||||
use discover::{oversize, Found};
|
||||
use scan::{Analyzed, HeldAnalyses, ScanKind, Sources};
|
||||
pub use scan::{IndexEvent, Scan};
|
||||
|
||||
@@ -105,6 +104,14 @@ pub struct Document {
|
||||
/// [`crate::fences::of`], which is the only thing that may touch it; it
|
||||
/// is bound to this revision because a change builds a new `Document`.
|
||||
pub fences: std::sync::OnceLock<Vec<vlog_formatter::fence::Region>>,
|
||||
/// This buffer's lint findings, kept while every input that produced them
|
||||
/// is unchanged — read by the diagnostics pass and by quick-fix discovery
|
||||
/// alike, so one revision is linted once rather than twice (review round
|
||||
/// §R1a, `crate::lint_snapshot`). Bound to this revision for the same
|
||||
/// structural reason `fences` is; the inputs that can move *without* a new
|
||||
/// `Document` are the snapshot's own key, and the index moving is
|
||||
/// [`Document::refresh_overlay`], which clears it.
|
||||
pub lint: crate::lint_snapshot::Slot,
|
||||
}
|
||||
|
||||
impl Document {
|
||||
@@ -139,6 +146,7 @@ impl Document {
|
||||
external,
|
||||
large,
|
||||
fences: std::sync::OnceLock::new(),
|
||||
lint: crate::lint_snapshot::Slot::new(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,6 +173,7 @@ impl Document {
|
||||
external: ExternalResolutions::default(),
|
||||
large: true,
|
||||
fences: std::sync::OnceLock::new(),
|
||||
lint: crate::lint_snapshot::Slot::new(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,6 +193,12 @@ impl Document {
|
||||
/// single-file analysis is unaffected by other files, by construction.
|
||||
pub fn refresh_overlay(&mut self, index: &WorkspaceIndex) {
|
||||
self.external = resolve_external(&self.semantics, index);
|
||||
// The index is what the census oracle answers from, so a lint result
|
||||
// taken under the old one is no longer this buffer's answer. This is
|
||||
// the whole of the snapshot's index invalidation: every mutation of
|
||||
// `Workspace::index` ends in the loop that calls this, so there is no
|
||||
// generation counter to keep in step (review round §R1a).
|
||||
self.lint.clear();
|
||||
}
|
||||
|
||||
/// What this buffer contributes to the workspace index, read off the
|
||||
@@ -273,33 +288,6 @@ pub fn mixed_buffer(blocks: usize) -> String {
|
||||
src
|
||||
}
|
||||
|
||||
/// What the scope ladder decided: the files to index, the directories an
|
||||
/// `` `include`` in them is looked for in, and what to tell the user.
|
||||
#[derive(Default)]
|
||||
struct Scope {
|
||||
files: Vec<PathBuf>,
|
||||
/// The filelist's `+incdir+`s, in filelist order. Empty for every rung
|
||||
/// but the filelist — nothing else names an include path.
|
||||
incdirs: Vec<PathBuf>,
|
||||
warnings: Vec<String>,
|
||||
}
|
||||
|
||||
/// The size of `path` when it is over `cap`, else `None` — the whole of the
|
||||
/// `lucisv.index.maxFileSize` test.
|
||||
///
|
||||
/// Metadata only: the point of the cap is that a 200 MB netlist is never read
|
||||
/// into memory, so asking the filesystem how big it is has to come first. A
|
||||
/// `cap` of 0 is the client asking for no cap, and a file whose metadata
|
||||
/// cannot be read is not skipped here — it simply fails the read below, as it
|
||||
/// always did.
|
||||
fn oversize(path: &Path, cap: u64) -> Option<u64> {
|
||||
if cap == 0 {
|
||||
return None;
|
||||
}
|
||||
let size = fs::metadata(path).ok()?.len();
|
||||
(size > cap).then_some(size)
|
||||
}
|
||||
|
||||
/// How many bytes of buffer text a scan carries for its whole life — every
|
||||
/// other file's text lives from its own step to the end of that step.
|
||||
fn held_bytes(buffered: &HashMap<PathBuf, String>) -> usize {
|
||||
@@ -486,6 +474,22 @@ impl Workspace {
|
||||
&self.index
|
||||
}
|
||||
|
||||
/// The index record this workspace already holds for **exactly these
|
||||
/// bytes**, or nothing.
|
||||
///
|
||||
/// What `vlog_refactor::KnownFacts` asks a refactoring's caller. Exactly
|
||||
/// one thing in this server can promise it: the persistent index cache
|
||||
/// files each record under the FNV-1a of the bytes it was read off, so
|
||||
/// record and key are one store entry written by one read
|
||||
/// ([`crate::index_cache::IndexCache::facts_now`]). Not a modified time,
|
||||
/// not a size, and **not the workspace index's own record**, which carries
|
||||
/// no hash of the text it came from. An unsaved buffer misses for the same
|
||||
/// reason a changed file does, so precedence needs no rule here
|
||||
/// (`docs/features/perf5r-scope-reuse/README.md`).
|
||||
pub fn known_facts(&self, path: &Path, text: &str) -> Option<FileFacts> {
|
||||
self.cache.facts_now(path, text)
|
||||
}
|
||||
|
||||
/// The project-wide completion tables, as of the last index rebuild.
|
||||
pub fn candidates(&self) -> &Candidates {
|
||||
&self.candidates
|
||||
@@ -823,17 +827,18 @@ impl Workspace {
|
||||
self.views.borrow_mut().clear();
|
||||
let discovering = trace.now();
|
||||
let mut skipped = 0usize;
|
||||
let mut scope = {
|
||||
// The cap's skips are reported by `collect_sources` and counted
|
||||
// here, because the end message names them and the scan is what
|
||||
// owns that number now.
|
||||
let mut counting = |event: IndexEvent<'_>| {
|
||||
if matches!(event, IndexEvent::Skipped { .. }) {
|
||||
skipped += 1;
|
||||
}
|
||||
watch(event);
|
||||
};
|
||||
self.collect_sources(&mut counting, HeldAnalyses::Wanted)
|
||||
// The cap's skips are reported by `collect_sources` and counted here,
|
||||
// because the end message names them and the scan is what owns that
|
||||
// number now.
|
||||
let mut counting = |event: IndexEvent<'_>, skipped: &mut usize| {
|
||||
if matches!(event, IndexEvent::Skipped { .. }) {
|
||||
*skipped += 1;
|
||||
}
|
||||
watch(event);
|
||||
};
|
||||
let (mut scope, pending) = {
|
||||
let mut count = |event: IndexEvent<'_>| counting(event, &mut skipped);
|
||||
self.first_scope(&mut count, &mut trace)
|
||||
};
|
||||
ScanTrace::add(&mut trace.discovery_ms, discovering);
|
||||
let buffered = std::mem::take(&mut scope.buffered);
|
||||
@@ -842,7 +847,15 @@ impl Workspace {
|
||||
// The same list the index will be built from, with the user's own
|
||||
// neighbourhood moved to the front of it.
|
||||
let WorkList { files: work, head } = self.open_first(std::mem::take(&mut scope.files));
|
||||
let head = scan_order::worth_waiting(head, work.len());
|
||||
// A scan that has not walked the whole workspace yet cannot ask
|
||||
// whether its head is a minority of it — the count that would answer
|
||||
// is the walk it is postponing. `splits_discovery` is what bounds the
|
||||
// head instead, and it refuses exactly the case `worth_waiting`
|
||||
// refuses: a buffer whose folder is the workspace.
|
||||
let head = match pending.is_some() {
|
||||
true => head,
|
||||
false => scan_order::worth_waiting(head, work.len()),
|
||||
};
|
||||
let paths = work.clone();
|
||||
ScanTrace::add(&mut trace.order_ms, ordering);
|
||||
// Re-opened rather than held across rescans: the directory it belongs
|
||||
@@ -865,6 +878,7 @@ impl Workspace {
|
||||
incdirs: scope.incdirs,
|
||||
warnings: scope.warnings,
|
||||
at: 0,
|
||||
pending,
|
||||
staged: Vec::new(),
|
||||
staged_at: Vec::new(),
|
||||
words: HashMap::new(),
|
||||
@@ -874,6 +888,40 @@ impl Workspace {
|
||||
}
|
||||
}
|
||||
|
||||
/// Walk the rest of the workspace, once the user's own neighbourhood has
|
||||
/// been indexed and published — the second half of a split discovery
|
||||
/// ([`PendingDiscovery`]). Reports whether there was anything to walk.
|
||||
///
|
||||
/// **Its own step, indexing nothing.** The step it shares a call with
|
||||
/// would otherwise report a file against a denominator that grew inside
|
||||
/// the same call, and a bar whose percentage falls is worse than one that
|
||||
/// waits (`docs/features/indexing-ux/README.md`). So this discovers, says
|
||||
/// "there is more", and lets the next step be an ordinary one.
|
||||
fn discover_the_rest(&mut self, scan: &mut Scan, watch: &mut dyn FnMut(IndexEvent)) -> bool {
|
||||
let Some(mut pending) = scan.take_pending() else { return false };
|
||||
let discovering = scan.trace.now();
|
||||
let mut skipped = 0usize;
|
||||
let (files, warnings, walked_skips) = {
|
||||
let mut counting = |event: IndexEvent<'_>| {
|
||||
if matches!(event, IndexEvent::Skipped { .. }) {
|
||||
skipped += 1;
|
||||
}
|
||||
watch(event);
|
||||
};
|
||||
self.rest_of_scope(&mut pending, &mut counting, &mut scan.trace)
|
||||
};
|
||||
debug_assert_eq!(skipped, walked_skips, "the cap reports every skip it counts");
|
||||
ScanTrace::add(&mut scan.trace.discovery_ms, discovering);
|
||||
scan.land_discovery(files, warnings, walked_skips, pending.tracker.has_conflict());
|
||||
scan.trace.measure_work(
|
||||
scan.work.len(),
|
||||
held_bytes(&scan.buffered),
|
||||
scan.skipped,
|
||||
scan.trace.cache,
|
||||
);
|
||||
true
|
||||
}
|
||||
|
||||
/// Open the store a whole rescan asked for, if this is the first thing to
|
||||
/// need it ([`StoreOpen`]).
|
||||
///
|
||||
@@ -943,14 +991,16 @@ impl Workspace {
|
||||
// `folder_files` follows — the whole scope is the union of these walks,
|
||||
// so the files this one finds beyond what is already indexed are
|
||||
// exactly the ones the widen owes.
|
||||
for path in self.widened_files(added, &mut |w| warnings.push(w)) {
|
||||
let mut stats = 0usize;
|
||||
for found in self.widened_files(added, &mut |w| warnings.push(w), &mut trace) {
|
||||
let path = found.path.clone();
|
||||
// Already indexed: by another scope directory this walk overlaps,
|
||||
// or by an earlier scan. Re-reading it is the cost this path
|
||||
// exists to avoid.
|
||||
if held.contains(&path) {
|
||||
continue;
|
||||
}
|
||||
if let Some(size) = oversize(&path, cap) {
|
||||
if let Some(size) = oversize(&found, cap, &mut stats) {
|
||||
watch(IndexEvent::Skipped { path: &path, size, cap });
|
||||
skipped += 1;
|
||||
continue;
|
||||
@@ -1017,6 +1067,9 @@ impl Workspace {
|
||||
// buffer can widen — so the only warnings here are the walk's own.
|
||||
warnings,
|
||||
at: 0,
|
||||
// A widen names the directories it is about to walk, so there is
|
||||
// never anything left to discover.
|
||||
pending: None,
|
||||
staged: Vec::new(),
|
||||
staged_at: Vec::new(),
|
||||
words: HashMap::new(),
|
||||
@@ -1026,16 +1079,6 @@ impl Workspace {
|
||||
}
|
||||
}
|
||||
|
||||
/// The files the directories a widen added bring into scope, by the same
|
||||
/// rules [`Workspace::folder_files`] applies to the whole scope — including
|
||||
/// the rootless-at-depth-0 flat read.
|
||||
fn widened_files(&self, added: &[PathBuf], warn: &mut dyn FnMut(String)) -> Vec<PathBuf> {
|
||||
if self.roots.is_empty() && self.client.index_scope_depth == 0 {
|
||||
return sibling_files(added);
|
||||
}
|
||||
self.walked_files(added, warn)
|
||||
}
|
||||
|
||||
/// Index the next file of `scan`, reporting whether there was one.
|
||||
///
|
||||
/// One file is the whole step: **its text is read**, its record is taken —
|
||||
@@ -1059,7 +1102,7 @@ impl Workspace {
|
||||
pub fn scan_step(&mut self, scan: &mut Scan, watch: &mut dyn FnMut(IndexEvent)) -> bool {
|
||||
let (done, total) = (scan.at, scan.work.len());
|
||||
if done == total {
|
||||
return false;
|
||||
return self.discover_the_rest(scan, watch);
|
||||
}
|
||||
scan.at += 1;
|
||||
// The first file of a scan is the first thing to ask the store
|
||||
@@ -1463,7 +1506,7 @@ impl Workspace {
|
||||
// exists to skip.
|
||||
return (!doc.large).then(|| doc.text.clone());
|
||||
}
|
||||
if oversize(path, self.client.max_file_size).is_some() {
|
||||
if oversize(&Found::of(path), self.client.max_file_size, &mut 0).is_some() {
|
||||
return None;
|
||||
}
|
||||
fs::read_to_string(path).ok()
|
||||
@@ -1490,7 +1533,16 @@ impl Workspace {
|
||||
/// buffer is installed and the folder it raises to is known. What was
|
||||
/// already indexed is untouched; only the tail moves, and the finished
|
||||
/// index cannot tell ([`Scan::reorder`]).
|
||||
pub fn open_next(&self, scan: &mut Scan) {
|
||||
/// **The rest of the workspace is walked first when it has not been.** A
|
||||
/// split startup is leading with the folder the user *was* in; a `didOpen`
|
||||
/// says they are somewhere else now, and re-ordering a work list that does
|
||||
/// not yet contain the new folder would answer the request behind that
|
||||
/// `didOpen` off a prefix that cannot hold what it is asking about. The
|
||||
/// walk this order postpones is exactly what makes the new folder
|
||||
/// nameable, so it happens here
|
||||
/// (`docs/features/perf5r-first-answer/README.md`).
|
||||
pub fn open_next(&mut self, scan: &mut Scan, watch: &mut dyn FnMut(IndexEvent)) {
|
||||
self.discover_the_rest(scan, watch);
|
||||
let ordered = self.open_first(scan.remaining());
|
||||
scan.reorder(ordered);
|
||||
}
|
||||
@@ -1528,7 +1580,7 @@ impl Workspace {
|
||||
/// did when `collect_sources` read them all.
|
||||
pub fn sources(&self) -> Vec<(PathBuf, String)> {
|
||||
let Sources { files, mut buffered, .. } =
|
||||
self.collect_sources(&mut |_| {}, HeldAnalyses::Unused);
|
||||
self.collect_sources(&mut |_| {}, HeldAnalyses::Unused, &mut ScanTrace::new(false));
|
||||
files
|
||||
.into_iter()
|
||||
.filter_map(|path| {
|
||||
@@ -1850,78 +1902,6 @@ impl Workspace {
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// Resolve the scope: which files are in it, with open buffers overriding
|
||||
/// disk, and those buffers' own text.
|
||||
///
|
||||
/// **Metadata only, plus what is already in memory.** Nothing on disk is
|
||||
/// read here — a file's text is read by whoever indexes or rewrites it,
|
||||
/// one file at a time ([`Workspace::scan_step`], [`Workspace::sources`]).
|
||||
///
|
||||
/// This is where `lucisv.index.maxFileSize` applies, and it applies to the
|
||||
/// **walked** files only: an open buffer is folded in below whatever its
|
||||
/// size, because the user opened it deliberately and an editor that
|
||||
/// refused to understand the file on screen would be absurd. The check is
|
||||
/// a `metadata` call, so an oversized file is still never read at all —
|
||||
/// which is the whole saving, and it is still counted and reported here
|
||||
/// so that a scan's skip count is known before its first step.
|
||||
///
|
||||
/// A refactoring reads this same list through `sources()`, so a file the
|
||||
/// cap keeps out of the index is also a file a workspace rename will not
|
||||
/// rewrite. That is the consistent answer: the cap says which files exist
|
||||
/// as far as this server is concerned.
|
||||
fn collect_sources(
|
||||
&self,
|
||||
watch: &mut dyn FnMut(IndexEvent),
|
||||
analyses: HeldAnalyses,
|
||||
) -> Sources {
|
||||
let scope = self.source_files();
|
||||
let cap = self.client.max_file_size;
|
||||
// Every path an open buffer speaks for. Reading such a file from disk
|
||||
// is work thrown away — the buffer's text replaces it below, whatever
|
||||
// the disk says — so the read is skipped rather than undone. The cap is
|
||||
// still consulted first, so an oversized file still reports itself
|
||||
// skipped exactly as it did before the buffer put its own text back.
|
||||
let spoken_for: HashSet<&Path> =
|
||||
self.docs.values().filter_map(|doc| doc.path.as_deref()).collect();
|
||||
let mut files: Vec<PathBuf> = Vec::new();
|
||||
for path in scope.files {
|
||||
if let Some(size) = oversize(&path, cap) {
|
||||
watch(IndexEvent::Skipped { path: &path, size, cap });
|
||||
continue;
|
||||
}
|
||||
if spoken_for.contains(path.as_path()) {
|
||||
continue;
|
||||
}
|
||||
files.push(path);
|
||||
}
|
||||
// Open buffers override what is on disk, and contribute themselves
|
||||
// when they are not on disk at all.
|
||||
//
|
||||
// Except a buffer on the large-file fast path, which overrides disk
|
||||
// with *nothing*: indexing it means parsing the hundred megabytes the
|
||||
// fast path exists not to parse. Removing the path rather than leaving
|
||||
// the disk copy in is the honest half of that — the alternative would
|
||||
// be an index describing a file the user is looking at by bytes it no
|
||||
// longer has. See `docs/features/large-file-mode/README.md` for the
|
||||
// interaction with `lucisv.index.maxFileSize`, whose "an open buffer is
|
||||
// never capped" rule this is the one exception to.
|
||||
let mut analyzed = Analyzed::default();
|
||||
let mut buffered: HashMap<PathBuf, String> = HashMap::new();
|
||||
for doc in self.docs.values() {
|
||||
let Some(path) = doc.path.clone() else { continue };
|
||||
files.retain(|p| p != &path);
|
||||
if !doc.large {
|
||||
if analyses == HeldAnalyses::Wanted {
|
||||
analyzed.facts.insert(path.clone(), doc.facts(path.clone()));
|
||||
analyzed.words.insert(path.clone(), doc.words());
|
||||
}
|
||||
buffered.insert(path.clone(), doc.text.clone());
|
||||
files.push(path);
|
||||
}
|
||||
}
|
||||
Sources { files, buffered, analyzed, incdirs: scope.incdirs, warnings: scope.warnings }
|
||||
}
|
||||
|
||||
/// One **closed** file's text and line index, read at most once per file
|
||||
/// per generation of that file.
|
||||
///
|
||||
@@ -2004,155 +1984,6 @@ impl Workspace {
|
||||
None => fs::read_to_string(path).ok(),
|
||||
}
|
||||
}
|
||||
|
||||
/// The files the index covers, and what the user should be told about how
|
||||
/// they were chosen. The scope ladder, highest first:
|
||||
///
|
||||
/// 1. **A filelist** — `lucisv.filelist`, else a `filelist` key in the
|
||||
/// config governing a workspace root. It names *exactly* the files to
|
||||
/// index; the project said so, and guessing past it would defeat the
|
||||
/// point of having one. This is the "project file", and it is the one
|
||||
/// rung that is whole-project by definition.
|
||||
/// 2. **The workspace-folder walk**, on `lucisv.index.scope:
|
||||
/// "workspace"` — what every session did before 2026-08-27, now opt-in.
|
||||
/// 3. **The folder scope**, the default: each opened buffer's own
|
||||
/// directory raised `lucisv.index.scopeDepth` levels, walked. See
|
||||
/// `docs/features/index-scope/README.md` for what that costs, which is
|
||||
/// that a definition in another folder does not resolve until the
|
||||
/// scope reaches that folder.
|
||||
///
|
||||
/// A configured filelist that cannot be read falls back to rung 2 (or 3)
|
||||
/// with a warning. An editor that shows no symbols because of a typo in a
|
||||
/// path is worse than one that quietly indexes what it can and says so.
|
||||
///
|
||||
/// Only rung 1 can carry `+incdir+` directories: a walked workspace names
|
||||
/// none, so an `` `include`` there resolves against the including file's
|
||||
/// own directory alone (`docs/features/include-nav/README.md`).
|
||||
fn source_files(&self) -> Scope {
|
||||
// The walk's own warnings join the scope's, so an unreadable directory
|
||||
// reaches the output channel by the road a filelist's problems already
|
||||
// travel — said once per scan and never per keystroke.
|
||||
let mut warnings: Vec<String> = Vec::new();
|
||||
let Some(path) = self.filelist_path() else {
|
||||
let files = self.default_files(&mut |w| warnings.push(w));
|
||||
return Scope { files, warnings, ..Default::default() };
|
||||
};
|
||||
match lucisv_core::filelist::read(&path) {
|
||||
Ok(list) => Scope { files: list.files, incdirs: list.incdirs, warnings: list.warnings },
|
||||
Err(problem) => {
|
||||
let files = self.default_files(&mut |w| warnings.push(w));
|
||||
warnings.insert(0, format!("{problem} — indexing the workspace instead"));
|
||||
Scope { files, incdirs: Vec::new(), warnings }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The filelist governing this workspace, if any: the client's setting
|
||||
/// first (absolute, or relative to the first root), else the `filelist`
|
||||
/// key of the config governing a root, in root order.
|
||||
///
|
||||
/// Public because the file watchers must name it: a `.f` edited outside
|
||||
/// the editor changes the index's scope, and nothing else on disk would
|
||||
/// tell us (`docs/features/file-watching/README.md`).
|
||||
pub fn filelist_path(&self) -> Option<PathBuf> {
|
||||
if let Some(setting) = &self.client.filelist {
|
||||
let path = Path::new(setting);
|
||||
return Some(match self.roots.first() {
|
||||
Some(root) if path.is_relative() => root.join(path),
|
||||
_ => path.to_path_buf(),
|
||||
});
|
||||
}
|
||||
let mut discovery = Discovery::new(true);
|
||||
// A broken `lucisv.toml` names no filelist, exactly as it contributes no
|
||||
// excludes below: the user hears about it when they format.
|
||||
self.roots.iter().find_map(|root| discovery.for_dir(root).ok()?.filelist)
|
||||
}
|
||||
|
||||
/// Rungs 2 and 3 of the ladder: the whole-workspace walk when the client
|
||||
/// asked for it, else the folder scope.
|
||||
fn default_files(&self, warn: &mut dyn FnMut(String)) -> Vec<PathBuf> {
|
||||
if self.walks_the_workspace() {
|
||||
return self.walked_files(&self.roots, warn);
|
||||
}
|
||||
self.folder_files(warn)
|
||||
}
|
||||
|
||||
/// Rung 3: the folder scope — [`Workspace::scope_dirs`], walked with every
|
||||
/// filter the workspace walk applies.
|
||||
///
|
||||
/// One exception, kept exactly as it was from before this rung became the
|
||||
/// default: **a rootless session at depth 0 reads its directories flat**,
|
||||
/// one level, no `.gitignore`. That is the "a file opened on its own"
|
||||
/// case, where descending a tree the user never named would be a surprise
|
||||
/// — and the moment the user raises `scopeDepth` they have named one, so
|
||||
/// the walk is what they asked for.
|
||||
fn folder_files(&self, warn: &mut dyn FnMut(String)) -> Vec<PathBuf> {
|
||||
let dirs = self.scope_dirs();
|
||||
if self.roots.is_empty() && self.client.index_scope_depth == 0 {
|
||||
return sibling_files(&dirs);
|
||||
}
|
||||
self.walked_files(&dirs, warn)
|
||||
}
|
||||
|
||||
/// Every source file under `dirs`, found by the CLI's own walk: the same
|
||||
/// extensions, the same `.gitignore` handling, and the `exclude` patterns
|
||||
/// of the config governing each directory. What `lucisv` skips, the index
|
||||
/// skips.
|
||||
///
|
||||
/// `dirs` is the workspace roots for rung 2 and the scope directories for
|
||||
/// rung 3. The one honest difference between the two: `.gitignore` files
|
||||
/// are read from the walk's own starting directory downwards, so a rule
|
||||
/// written in a root's `.gitignore` does not apply to a rung-3 walk that
|
||||
/// starts below it. The `exclude` patterns are matched against whole
|
||||
/// paths and so behave identically either way.
|
||||
fn walked_files(&self, dirs: &[PathBuf], warn: &mut dyn FnMut(String)) -> Vec<PathBuf> {
|
||||
let mut discovery = Discovery::new(true);
|
||||
let mut out = Vec::new();
|
||||
for root in dirs {
|
||||
// The walk names its inputs as strings; every directory here came
|
||||
// from a `file:` URI, which cannot carry a non-UTF-8 path.
|
||||
let Some(input) = root.to_str() else { continue };
|
||||
// A broken `lucisv.toml` must not stop the server from indexing: an
|
||||
// index that excludes nothing is a far better failure than a
|
||||
// server that comes up empty. The error is reported when the user
|
||||
// formats a file in this tree (`format::settings_for`).
|
||||
let mut exclude =
|
||||
discovery.for_dir(root).unwrap_or_default().exclude.unwrap_or_default();
|
||||
// The client's `lucisv.exclude` is *appended*, never substituted —
|
||||
// the CLI appends a config's excludes to `--exclude` the same way,
|
||||
// and a setting that silently dropped a checked-in exclude would
|
||||
// put vendored code back in the index for one user only.
|
||||
exclude.extend(self.client.exclude.iter().cloned());
|
||||
// `.gitignore` is always honoured: it is the CLI's default, and an
|
||||
// editor has no `--no-gitignore` to type. An unreadable directory
|
||||
// is skipped and said — the warning rides out on the scope's own
|
||||
// warnings, which `server/notification.rs` logs once per scan.
|
||||
let _ = collect_files(input, &exclude, true, &mut out, &mut |w| warn(w.to_string()));
|
||||
}
|
||||
out.sort();
|
||||
out.dedup();
|
||||
out
|
||||
}
|
||||
}
|
||||
|
||||
/// The source files sitting in each of `dirs`, one directory deep. No walk, no
|
||||
/// `.gitignore`: this is the rootless default, where descending a tree the
|
||||
/// user never named would be a surprise.
|
||||
fn sibling_files(dirs: &[PathBuf]) -> Vec<PathBuf> {
|
||||
let mut out = Vec::new();
|
||||
for dir in dirs {
|
||||
let Ok(entries) = fs::read_dir(dir) else { continue };
|
||||
for entry in entries.flatten() {
|
||||
let path = entry.path();
|
||||
let extension = path.extension().and_then(|e| e.to_str()).unwrap_or_default();
|
||||
if path.is_file() && EXTENSIONS.contains(&extension) {
|
||||
out.push(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
out.sort();
|
||||
out.dedup();
|
||||
out
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
@@ -2673,6 +2504,41 @@ mod tests {
|
||||
ws.finish_scan(scan)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_publication_cadence_holds_a_publish_until_enough_has_been_staged() {
|
||||
// **The whole of the cadence, at its exact boundary.** A publish is a
|
||||
// pass over the whole index, and before §61.4 the drain paid one per
|
||||
// burst of requests — 13 to 18 in one warm opentitan scan, 46 % of it
|
||||
// (`docs/features/perf5r-publication/README.md`). `publish_is_due`
|
||||
// spaces them by work done rather than by how often a client asks: no
|
||||
// publish is due until `PUBLISH_EVERY` records are staged, one is due
|
||||
// the moment the 512th lands, and publishing clears the debt.
|
||||
let tree = Tree::new("publishcadence");
|
||||
for n in 0..scan::PUBLISH_EVERY + 2 {
|
||||
tree.package(&format!("p{n:04}.sv"), &format!("p{n:04}"));
|
||||
}
|
||||
let mut ws = Workspace::default();
|
||||
ws.client.index_scope = IndexScope::Workspace;
|
||||
ws.adopt_roots(vec![tree.path.clone()]);
|
||||
let mut scan = ws.begin_scan(&mut |_| {}, false);
|
||||
for taken in 1..scan::PUBLISH_EVERY {
|
||||
assert!(ws.scan_step(&mut scan, &mut |_| {}), "premise: file {taken} exists");
|
||||
assert!(!scan.publish_is_due(), "{taken} staged is not yet a publish");
|
||||
}
|
||||
assert!(ws.scan_step(&mut scan, &mut |_| {}), "premise: the 512th file exists");
|
||||
assert!(scan.publish_is_due(), "{} staged is", scan::PUBLISH_EVERY);
|
||||
ws.publish_scan(&mut scan);
|
||||
assert!(!scan.publish_is_due(), "and publishing clears the debt");
|
||||
|
||||
// The cadence is a latency decision and nothing else: what this scan
|
||||
// lands is what a one-shot scan over the same tree lands.
|
||||
while ws.scan_step(&mut scan, &mut |_| {}) {}
|
||||
ws.finish_scan(scan);
|
||||
let mut one_shot = Workspace::default();
|
||||
one_shot.open_whole_workspace(vec![tree.path.clone()]);
|
||||
assert_eq!(everything(&one_shot), everything(&ws));
|
||||
}
|
||||
|
||||
/// A tree of three files that declare each other's names and include each
|
||||
/// other, so a half-published index has something to get wrong.
|
||||
fn tangled(tag: &str) -> Tree {
|
||||
@@ -2791,7 +2657,7 @@ mod tests {
|
||||
let jumped = uri(&format!("file://{}", tree.path.join("c.sv").display()));
|
||||
let jumped_text = fs::read_to_string(tree.path.join("c.sv")).expect("the fixture");
|
||||
stepped.set_document(jumped, jumped_text);
|
||||
stepped.open_next(&mut scan);
|
||||
stepped.open_next(&mut scan, &mut |_| {});
|
||||
assert!(stepped.scan_step(&mut scan, &mut |_| {}));
|
||||
stepped.publish_scan(&mut scan);
|
||||
assert!(!stepped.index().units("c").is_empty(), "c.sv was indexed next, not last");
|
||||
@@ -2924,7 +2790,7 @@ mod tests {
|
||||
ws.open_whole_workspace(vec![tree.path.clone()]);
|
||||
assert_eq!(indexed(&ws, &["a", "b"]), ["a", "b"]);
|
||||
assert_eq!(
|
||||
ws.walked_files(from_ref(&tree.path), &mut |_| {}).len(),
|
||||
ws.walked_files(from_ref(&tree.path), &mut |_| {}, &mut ScanTrace::new(false)).len(),
|
||||
2,
|
||||
"two files, once each"
|
||||
);
|
||||
@@ -4208,7 +4074,7 @@ mod tests {
|
||||
let mut scan = ws.begin_scan(&mut |_| {}, false);
|
||||
assert!(ws.scan_step(&mut scan, &mut |_| {}), "the buffer's own file goes first");
|
||||
open(&mut ws, &tree, "ip/uart/rtl/uart.sv");
|
||||
ws.open_next(&mut scan);
|
||||
ws.open_next(&mut scan, &mut |_| {});
|
||||
// `uart.sv` is now the head of what is left, and at the shipped
|
||||
// `scopeDepth: 2` its own folder raises to `ip` — which brings
|
||||
// `ip/kmac` in with it. Four files of waiting, one behind the file
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
//! `pub(super)` and visible exactly where they were before the move: inside
|
||||
//! `crate::state` and nowhere else.
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
@@ -126,6 +126,11 @@ pub struct Scan {
|
||||
pub(super) warnings: Vec<String>,
|
||||
/// How many of `work` have been indexed.
|
||||
pub(super) at: usize,
|
||||
/// The rest of the workspace, still to be discovered — see
|
||||
/// [`PendingDiscovery`]. `None` for every scan that resolved its whole
|
||||
/// scope before it started, which is every scan but a workspace-scoped
|
||||
/// startup with a buffer already open.
|
||||
pub(super) pending: Option<PendingDiscovery>,
|
||||
/// The records taken since the last publish, and which files of `work`
|
||||
/// they came from. Staged rather than merged because a merge is a pass
|
||||
/// over the whole index — see [`vlog_semantic::WorkspaceIndex::absorb`].
|
||||
@@ -144,6 +149,50 @@ pub struct Scan {
|
||||
pub(super) trace: ScanTrace,
|
||||
}
|
||||
|
||||
/// The half of a scan's scope that has not been walked yet.
|
||||
///
|
||||
/// **One scan, discovered in two goes.** A workspace-scoped session with a
|
||||
/// buffer already open walks that buffer's own folders first, indexes them,
|
||||
/// publishes them and answers the request that has been waiting — and only
|
||||
/// then walks the remaining 3 800 directories, whose 155 ms used to sit in
|
||||
/// front of every one of those steps (`docs/features/perf5r-first-answer`).
|
||||
/// It is emphatically **not** two scans: one work list, one index, one
|
||||
/// `finish_scan`, one `gone` computed against the whole of it, and every file
|
||||
/// stepped exactly once — which is what `seen` is for.
|
||||
pub(super) struct PendingDiscovery {
|
||||
/// The directories still to walk: the workspace roots.
|
||||
pub(super) roots: Vec<PathBuf>,
|
||||
/// Every path the neighbourhood walk yielded — the ones it indexed, the
|
||||
/// ones the size cap kept out, and every open buffer's own path. The
|
||||
/// remaining walk covers the roots, so it finds all of these again; each
|
||||
/// one it names here has already been decided about, and deciding twice
|
||||
/// would step a file twice or report one skip as two.
|
||||
pub(super) seen: HashSet<PathBuf>,
|
||||
/// Every directory identity the neighbourhood walk entered, and the path
|
||||
/// it entered each one by.
|
||||
///
|
||||
/// **The two walks share it, and that is what makes them one walk.** An
|
||||
/// ordinary walk visits each directory identity once and reports its files
|
||||
/// under the first spelling that reached it
|
||||
/// (`docs/features/walk-cycles/README.md`); two walks with two sets would
|
||||
/// report a symlinked directory's files twice, under two spellings a path
|
||||
/// set cannot tell apart, and the index would hold every module in it
|
||||
/// twice. Sharing the tracker restores that contract across the split.
|
||||
pub(super) tracker: lucisv_core::walk::DirectoryTracker,
|
||||
}
|
||||
|
||||
/// How many records may be staged before another mid-scan publish is worth the
|
||||
/// whole-index merge it costs — see [`Scan::publish_is_due`].
|
||||
///
|
||||
/// **512 is a work bound, and it is deliberately the same number
|
||||
/// `HEAD_WALK_MAX` is.** Both answer "how much of this workspace may a user
|
||||
/// wait for before an answer stops being worth waiting for": 512 warm steps is
|
||||
/// ~100 ms of scanning on the corpus the round measured
|
||||
/// (`docs/features/perf5r-first-answer/README.md`), so a request landing
|
||||
/// between two publishes reads an index at most that far behind and the whole
|
||||
/// scan pays at most one merge per 512 files instead of one per burst.
|
||||
pub(crate) const PUBLISH_EVERY: usize = 512;
|
||||
|
||||
/// Which of the two shapes a [`Scan`] is.
|
||||
///
|
||||
/// One enum rather than two `finish` methods so a caller cannot pair the wrong
|
||||
@@ -195,6 +244,106 @@ impl Scan {
|
||||
self.at >= self.head
|
||||
}
|
||||
|
||||
/// Whether enough has been staged since the last publish for another one
|
||||
/// to be worth the merge it costs — the **publication cadence**.
|
||||
///
|
||||
/// **A publish is a pass over the whole index, and it used to be one per
|
||||
/// burst of requests.** `answer_what_is_waiting` published whenever
|
||||
/// anything at all was waiting, so a client asking ten times a second
|
||||
/// bought ten merges a second over a table that grows all the way to the
|
||||
/// end of the scan. Measured on opentitan under a definition every 100 ms
|
||||
/// (`docs/features/perf5r-publication/README.md`): 13 to 18 publishes in
|
||||
/// one warm scan, and `absorb` + `candidates` alone were 46 % of it.
|
||||
///
|
||||
/// The rule this asks is **how much new the next answer would see**, not
|
||||
/// how long ago the last publish was: a merge's cost is the index's size
|
||||
/// and its value is the records it makes answerable, so files staged is
|
||||
/// the currency both are in — and it is a count, so what a scan does is
|
||||
/// the same on a fast machine and a slow one, and a test may assert it.
|
||||
///
|
||||
/// It bounds staleness, never correctness: a request answered between two
|
||||
/// publishes reads a prefix at most [`PUBLISH_EVERY`] files older than the
|
||||
/// one it could have had, and every table in it still agrees with every
|
||||
/// other ([`Workspace::publish_scan`](super::Workspace::publish_scan)).
|
||||
/// The **first** publish of a scan is never deferred by it — that one is
|
||||
/// the session's first useful answer, and `server/index.rs` asks for it by
|
||||
/// a different door.
|
||||
pub fn publish_is_due(&self) -> bool {
|
||||
self.staged.len() >= PUBLISH_EVERY
|
||||
}
|
||||
|
||||
/// Whether this scan still owes itself the rest of its own scope — see
|
||||
/// [`PendingDiscovery`].
|
||||
///
|
||||
/// Two callers, and they want it for the same reason: `scan_once` must
|
||||
/// interleave a scan whose work list is short *so far*, and must not paint
|
||||
/// a percentage against a denominator that is going to grow
|
||||
/// (`docs/features/indexing-ux/README.md`).
|
||||
pub fn discovery_pending(&self) -> bool {
|
||||
self.pending.is_some()
|
||||
}
|
||||
|
||||
/// Take the remaining discovery, so the workspace can run it.
|
||||
pub(super) fn take_pending(&mut self) -> Option<PendingDiscovery> {
|
||||
self.pending.take()
|
||||
}
|
||||
|
||||
/// Whether this scan's answers are right but **spelled** differently from
|
||||
/// what a plain walk of the same tree would spell them, so one ordinary
|
||||
/// rescan is owed.
|
||||
///
|
||||
/// The case: a directory alias outside the open folder's ancestor chain —
|
||||
/// `other/link -> z_real`, with `other` sorting first. The head leads with
|
||||
/// `z_real`; the remaining walk meets `other/link`, recognises the
|
||||
/// directory the head already entered and skips it, so nothing is
|
||||
/// discovered twice and every answer this scan gives is one target and one
|
||||
/// file. But a walk of the root on its own — the next rescan, or a session
|
||||
/// that opens nothing — spells those same files `other/link/…`, and a
|
||||
/// startup that disagreed with every later scan about a path is the defect
|
||||
/// this whole tracker exists to close (`docs/performance_052_review.md`
|
||||
/// F1). So the scan asks for the canonical walk once it has landed, and
|
||||
/// the spelling converges there.
|
||||
///
|
||||
/// **Exactly one rescan can ever come of it.** Only a session's first scan
|
||||
/// splits its discovery ([`Workspace::first_scope`]), so the scan this
|
||||
/// asks for resolves its whole scope in one walk, has no
|
||||
/// [`PendingDiscovery`], and cannot ask again.
|
||||
///
|
||||
/// The answer is the trace's own counter, which is written whether or not
|
||||
/// anybody asked for a trace — like `publishes`, it is a fact about the
|
||||
/// scan rather than a stopwatch reading, so it lives where the scan's
|
||||
/// facts live and the `--verbose` count line says it out loud.
|
||||
pub fn wants_rescan(&self) -> bool {
|
||||
self.trace.rescan_requested > 0
|
||||
}
|
||||
|
||||
/// Fold the rest of the scope into this scan: its files onto the end of
|
||||
/// the work list, its paths into the set the include graph learns from,
|
||||
/// its warnings and its skips onto the scan's own — and whether the walk
|
||||
/// that found them disagreed with the head about a directory's spelling
|
||||
/// ([`Scan::wants_rescan`]).
|
||||
///
|
||||
/// Appended rather than re-ordered: the neighbourhood at the front has
|
||||
/// already been stepped, and `vlog_semantic::IndexBuilder` sorts by path
|
||||
/// inside `finish`, so what arrives here decides latency and nothing else
|
||||
/// ([`Scan::reorder`] makes the same argument).
|
||||
pub(super) fn land_discovery(
|
||||
&mut self,
|
||||
files: Vec<PathBuf>,
|
||||
warnings: Vec<String>,
|
||||
skipped: usize,
|
||||
conflict: bool,
|
||||
) {
|
||||
self.trace.conflict += usize::from(conflict);
|
||||
self.trace.rescan_requested += usize::from(conflict);
|
||||
self.paths.extend(files.iter().cloned());
|
||||
self.paths.sort();
|
||||
self.paths.dedup();
|
||||
self.work.extend(files);
|
||||
self.warnings.extend(warnings);
|
||||
self.skipped += skipped;
|
||||
}
|
||||
|
||||
/// The text of one file of this scan's work list, at the moment its step
|
||||
/// comes — `None` when it cannot be read.
|
||||
///
|
||||
|
||||
@@ -181,12 +181,7 @@ impl Extraction {
|
||||
let Some(text) = scope.text(here) else { return Err(not_in_scope(file)) };
|
||||
let (tree, diagnostics) = parse_source_tolerant(text);
|
||||
if let Some(problem) = diagnostics.first() {
|
||||
return Err(format!(
|
||||
"{} does not parse ({} at line {}), so lucisv will not extract from it.",
|
||||
display(file),
|
||||
problem.message,
|
||||
problem.line
|
||||
));
|
||||
return Err(does_not_parse(file, problem));
|
||||
}
|
||||
let region = Region::read(&tree, text, TextRange::new(start, end))?;
|
||||
let module = region.module_name().to_string();
|
||||
@@ -468,6 +463,20 @@ fn occupied(path: &Path) -> String {
|
||||
format!("there is already a `{}` beside this file; pick another name.", display(path))
|
||||
}
|
||||
|
||||
/// Why a file lucisv cannot read is a file it will not extract from.
|
||||
///
|
||||
/// Reachable through `extract_module` alone: a server calls [`extract_site_in`]
|
||||
/// first, and that answers `None` for a file with any parse diagnostic, so the
|
||||
/// sentence is for the caller that comes straight to the engine.
|
||||
fn does_not_parse(file: &Path, problem: &ParseDiagnostic) -> String {
|
||||
format!(
|
||||
"{} does not parse ({} at line {}), so lucisv will not extract from it.",
|
||||
display(file),
|
||||
problem.message,
|
||||
problem.line
|
||||
)
|
||||
}
|
||||
|
||||
fn escaped(name: &str) -> String {
|
||||
format!(
|
||||
"`{name}` is declared inside the selection and used outside it; move the declaration of `{name}` out of the selection first."
|
||||
|
||||
@@ -59,10 +59,10 @@ pub use ports::{
|
||||
PortOfferKind,
|
||||
};
|
||||
pub use rename::{
|
||||
contains_word, prepare_rename, prepare_rename_here, rename, rename_name_at, rename_traced,
|
||||
RenameTarget,
|
||||
contains_word, prepare_rename, prepare_rename_here, rename, rename_name_at, rename_preflight,
|
||||
rename_traced, rename_traced_with, KnownFacts, RenameTarget,
|
||||
};
|
||||
pub use trace::{RenameTrace, Stage, VerifyTrace};
|
||||
pub use trace::{IndexTrace, RenameTrace, Stage, VerifyTrace, WarnTrace};
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
|
||||
@@ -12,12 +12,17 @@
|
||||
//! workspace every refactoring in this crate reads through, and `warnings` is
|
||||
//! what a finished rename says about the occurrences it could not edit.
|
||||
|
||||
mod preflight;
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
mod warnings;
|
||||
|
||||
pub use preflight::rename_preflight;
|
||||
|
||||
// The rename was the first refactoring, so most of the crate still spells the
|
||||
// workspace `crate::rename::Scope`. It lives at `crate::scope` now (§29.1).
|
||||
// workspace `crate::rename::Scope`. It lives at `crate::scope` now (§29.1),
|
||||
// and so does the door a caller hands its own index records through.
|
||||
pub use crate::scope::KnownFacts;
|
||||
pub(crate) use crate::scope::{display, Scope};
|
||||
pub use warnings::contains_word;
|
||||
|
||||
@@ -177,7 +182,29 @@ pub fn rename_traced(
|
||||
trace: &mut RenameTrace,
|
||||
) -> Result<RefactorEdit, String> {
|
||||
let started = vlog_parser::stats::parses();
|
||||
let out = renaming(files, file, offset, new_name, trace);
|
||||
let out = renaming(files, file, offset, new_name, None, trace);
|
||||
trace.parses = vlog_parser::stats::parses() - started;
|
||||
out
|
||||
}
|
||||
|
||||
/// [`rename_traced`], letting the caller answer for the index records of the
|
||||
/// files it is handing over — see [`KnownFacts`].
|
||||
///
|
||||
/// The same rename over the same files, deciding everything the same way: a
|
||||
/// record the caller answers with is one this call would otherwise have
|
||||
/// produced by parsing that file, so the only difference is that it did not
|
||||
/// parse it (review round §R3b). A caller that answers `None` to everything
|
||||
/// gets [`rename_traced`] exactly.
|
||||
pub fn rename_traced_with(
|
||||
files: &[(PathBuf, String)],
|
||||
file: &Path,
|
||||
offset: u32,
|
||||
new_name: &str,
|
||||
known: &dyn KnownFacts,
|
||||
trace: &mut RenameTrace,
|
||||
) -> Result<RefactorEdit, String> {
|
||||
let started = vlog_parser::stats::parses();
|
||||
let out = renaming(files, file, offset, new_name, Some(known), trace);
|
||||
trace.parses = vlog_parser::stats::parses() - started;
|
||||
out
|
||||
}
|
||||
@@ -189,6 +216,7 @@ fn renaming(
|
||||
file: &Path,
|
||||
offset: u32,
|
||||
new_name: &str,
|
||||
known: Option<&dyn KnownFacts>,
|
||||
trace: &mut RenameTrace,
|
||||
) -> Result<RefactorEdit, String> {
|
||||
check_new_name(new_name)?;
|
||||
@@ -199,16 +227,23 @@ fn renaming(
|
||||
// name under the cursor — which the request file's own analysis, the first
|
||||
// one the build makes, is what says. A wrong guess costs a re-parse and
|
||||
// can change nothing: retention is a cache.
|
||||
let mut scope = trace.index.measure(|| {
|
||||
Scope::build_keeping(files, file, |here| {
|
||||
let cursor = here.and_then(|semantics| rename_name_at(semantics, offset));
|
||||
cursor.into_iter().chain(Some(new_name.to_string())).collect()
|
||||
})
|
||||
let RenameTrace { index, indexing, .. } = &mut *trace;
|
||||
let mut scope = index.measure(|| {
|
||||
Scope::build_keeping(
|
||||
files,
|
||||
file,
|
||||
|here| {
|
||||
let cursor = here.and_then(|semantics| rename_name_at(semantics, offset));
|
||||
cursor.into_iter().chain(Some(new_name.to_string())).collect()
|
||||
},
|
||||
known,
|
||||
indexing,
|
||||
)
|
||||
});
|
||||
trace.selected = scope.len();
|
||||
let target = trace.locate.measure(|| scope.locate(file, offset))?;
|
||||
if target.name == new_name {
|
||||
return Err(format!("`{new_name}` is the name it already has."));
|
||||
return Err(already_named(new_name));
|
||||
}
|
||||
let edits = trace.edits.measure(|| scope.collect_edits(&target, new_name))?;
|
||||
trace.edited = edits.len();
|
||||
@@ -217,7 +252,8 @@ fn renaming(
|
||||
let RenameTrace { verify, checks, .. } = &mut *trace;
|
||||
verify.measure(|| check::verify(&mut scope, &edits, &target.name, new_name, checks))?;
|
||||
|
||||
let warnings = trace.warnings.measure(|| scope.warnings(&target, &edits));
|
||||
let RenameTrace { warnings: stage, warning_scans, .. } = &mut *trace;
|
||||
let warnings = stage.measure(|| scope.warnings(&target, &edits, warning_scans));
|
||||
let mut out: Vec<(PathBuf, Vec<TextEdit>)> = edits
|
||||
.into_iter()
|
||||
.filter_map(|(i, edits)| Some((scope.path(i)?.to_path_buf(), edits)))
|
||||
@@ -508,10 +544,14 @@ impl<'a> Scope<'a> {
|
||||
|
||||
const NOTHING_HERE: &str = "there is no symbol to rename at this position.";
|
||||
|
||||
// The refusal sentences, each written once. Two callers reach four of them
|
||||
// now: the whole-workspace `Scope::locate` and the buffer-and-index
|
||||
// `prepare_rename_here`, which must refuse in exactly the same words or the
|
||||
// user gets two different explanations for one situation.
|
||||
// The refusal sentences, each written once. Three callers reach them now: the
|
||||
// whole-workspace `Scope::locate`, the buffer-and-index `prepare_rename_here`,
|
||||
// and the buffer-only `rename_preflight` — which must refuse in exactly the
|
||||
// same words or the user gets two different explanations for one situation.
|
||||
|
||||
fn already_named(new_name: &str) -> String {
|
||||
format!("`{new_name}` is the name it already has.")
|
||||
}
|
||||
|
||||
fn ambiguous(name: &str) -> String {
|
||||
format!(
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
//! The refusals a rename can reach from the request buffer alone.
|
||||
//!
|
||||
//! `renaming` builds a whole [`Scope`](crate::scope::Scope) — one parse and
|
||||
//! one analysis per in-scope file — before `locate` looks at the cursor. On
|
||||
//! OpenTitan a cursor sitting on a comment cost **3 975 parses and 1.9 s**
|
||||
//! before a 0.1 ms refusal that read nothing but the request file (take 5
|
||||
//! review, §3 item 6). This is that refusal, taken first.
|
||||
//!
|
||||
//! **What it is allowed to take.** Only a refusal `renaming` is *certain* to
|
||||
//! reach in the same words, from facts that are a pure function of the request
|
||||
//! buffer's own text: the new-name check, and the cursor refusals the buffer's
|
||||
//! own `Semantics` settles. `Semantics` is `analyze(&parse(text), text)` and
|
||||
//! consults nothing else, so the buffer's analysis and the scope's analysis of
|
||||
//! that same file are the same value.
|
||||
//!
|
||||
//! **What it must not take.** Every refusal whose answer comes from the
|
||||
//! *workspace index*: whether a name is declared in more than one file, and
|
||||
//! which file a cross-file use means. The index is rebuilt on save and on a
|
||||
//! watcher event, never on a keystroke (`state/mod.rs::set_document` reads it
|
||||
//! and does not touch it), so an unsaved edit that adds or removes a
|
||||
//! file-scope declaration is not in it. `prepare_rename_here` may read it
|
||||
//! anyway — an optimistic `prepareRename` is LSP-legal and the rename that
|
||||
//! follows corrects it — but `rename` **is** that correction, and a refusal
|
||||
//! invented here from a stale count is a rename the user cannot get. Those
|
||||
//! stay on the slow road, which re-derives the count from the current texts.
|
||||
//!
|
||||
//! `Ok(())` therefore means "proceed exactly as before", never "this rename
|
||||
//! will succeed".
|
||||
|
||||
use vlog_semantic::{Resolution, Semantics, SymbolId};
|
||||
|
||||
use super::{already_named, check_new_name, from_base, unresolved, unspelled, NOTHING_HERE};
|
||||
|
||||
/// The refusal `rename` would make for this cursor and this new name, when the
|
||||
/// request buffer alone is enough to know it — and `Ok(())` when it is not.
|
||||
///
|
||||
/// A caller must only ask this about a file it is going to hand `rename` as
|
||||
/// one of its in-scope files: `locate` refuses a file it was not given
|
||||
/// *before* it looks at the cursor, and that refusal has to keep its place in
|
||||
/// the order. Both of the server's source selectors always include the
|
||||
/// requesting buffer, so both satisfy it.
|
||||
pub fn rename_preflight(semantics: &Semantics, offset: u32, new_name: &str) -> Result<(), String> {
|
||||
// First in `renaming`, and so first here: an invalid new name outranks
|
||||
// everything the cursor could say.
|
||||
check_new_name(new_name)?;
|
||||
let found = semantics.reference_id_at(offset).and_then(|id| semantics.reference(id));
|
||||
let Some(reference) = found else {
|
||||
// The cursor is on a declaration written here, or on nothing at all.
|
||||
let Some(symbol) = semantics.symbol_at(offset) else {
|
||||
return Err(NOTHING_HERE.to_string());
|
||||
};
|
||||
return declared_here(semantics, symbol, new_name);
|
||||
};
|
||||
match &reference.resolution {
|
||||
Resolution::Resolved(symbol) => declared_here(semantics, *symbol, new_name),
|
||||
Resolution::NotFound => Err(unresolved(&reference.name)),
|
||||
Resolution::InheritedCandidate { base, .. } => Err(from_base(&reference.name, base)),
|
||||
// Which file declares this name — and whether several do — is the
|
||||
// index's word, and the index is not the authority a rename is.
|
||||
Resolution::ExternalCandidate { .. } => Ok(()),
|
||||
}
|
||||
}
|
||||
|
||||
/// `Scope::declaration` for a declaration written in the request buffer, as
|
||||
/// far as the buffer can carry it.
|
||||
fn declared_here(semantics: &Semantics, symbol: SymbolId, new_name: &str) -> Result<(), String> {
|
||||
// `locate` answers a symbol id it cannot look up with `NOTHING_HERE`. It
|
||||
// came from this same analysis, so it can be looked up; deferring rather
|
||||
// than asserting keeps the impossible case on the road that handles it.
|
||||
let Some(declaration) = semantics.symbol(symbol) else { return Ok(()) };
|
||||
if declaration.name_span.is_empty() {
|
||||
return Err(unspelled(&declaration.name));
|
||||
}
|
||||
// A file-scope unit is refused when the index holds its name more than
|
||||
// once, and that count belongs to the slow road — so nothing after it may
|
||||
// be decided here either, or a refusal would jump the ambiguity check.
|
||||
if declaration.scope == semantics.file_scope() {
|
||||
return Ok(());
|
||||
}
|
||||
if declaration.name == new_name {
|
||||
return Err(already_named(new_name));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
@@ -2,7 +2,9 @@
|
||||
//! against `prepare_rename` at every byte of a buffer.
|
||||
|
||||
use vlog_parser::parse_source_tolerant;
|
||||
use vlog_semantic::{analyze, resolve_external};
|
||||
use vlog_semantic::{analyze, resolve_external, FileFacts};
|
||||
|
||||
use crate::RefactorEdit;
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -333,3 +335,168 @@ fn a_rename_that_would_make_a_third_files_use_ambiguous_is_refused() {
|
||||
// the refusal is about `use.sv`, not about `a.sv` alone.
|
||||
assert!(rename(&sources, &path, at, "b_pkg").is_ok(), "an unclaimed name still renames");
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// the known-facts door (review round §R3b) — the parse budget with reuse,
|
||||
// and the two things the engine itself can check
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
/// An honest caller: for the files it was told to know, it answers with the
|
||||
/// record `FileFacts::of` produces — and only when the text it is handed is
|
||||
/// byte-for-byte the text that record was read off.
|
||||
///
|
||||
/// This is what a correct [`KnownFacts`] implementation *is*, with string
|
||||
/// equality standing in for the server's content hash (a stronger key, not a
|
||||
/// weaker one). The records are read before the rename runs, so asking costs
|
||||
/// no parse and the rename's parse budget is the rename's own.
|
||||
struct Honest {
|
||||
known: Vec<(PathBuf, String, FileFacts)>,
|
||||
}
|
||||
|
||||
impl Honest {
|
||||
/// The records of those of [`EIGHT`]'s files, read off their own text.
|
||||
fn about(paths: &[&str]) -> Honest {
|
||||
let known = EIGHT
|
||||
.iter()
|
||||
.filter(|(name, _)| paths.contains(name))
|
||||
.map(|(name, text)| {
|
||||
let path = PathBuf::from(*name);
|
||||
(path.clone(), (*text).to_string(), FileFacts::of(path, text))
|
||||
})
|
||||
.collect();
|
||||
Honest { known }
|
||||
}
|
||||
}
|
||||
|
||||
impl KnownFacts for Honest {
|
||||
fn facts_for(&self, path: &Path, text: &str) -> Option<FileFacts> {
|
||||
self.known
|
||||
.iter()
|
||||
.find(|(held, bytes, _)| held == path && bytes == text)
|
||||
.map(|(_, _, facts)| facts.clone())
|
||||
}
|
||||
}
|
||||
|
||||
/// The rename of `EIGHT`'s `sig`, with and without a caller that knows some
|
||||
/// records — the whole result, as a comparable value.
|
||||
fn eight_renamed(known: Option<&dyn KnownFacts>) -> (String, RenameTrace) {
|
||||
let sources = workspace(&EIGHT);
|
||||
let path = PathBuf::from("/w/sub.sv");
|
||||
let text = EIGHT[0].1;
|
||||
let at = text.find("wire sig").expect("the declaration") as u32 + 5;
|
||||
let mut trace = RenameTrace::default();
|
||||
let edit = match known {
|
||||
Some(known) => rename_traced_with(&sources, &path, at, "renamed_sig", known, &mut trace),
|
||||
None => rename_traced(&sources, &path, at, "renamed_sig", &mut trace),
|
||||
};
|
||||
(print_edit(&edit.expect("the rename succeeds")), trace)
|
||||
}
|
||||
|
||||
/// Every edit and every warning a refactoring makes, as one comparable string.
|
||||
fn print_edit(edit: &RefactorEdit) -> String {
|
||||
let mut out = String::new();
|
||||
for (path, edits) in &edit.edits {
|
||||
for one in edits {
|
||||
out.push_str(&format!(
|
||||
"{} {}..{} -> {}\n",
|
||||
path.display(),
|
||||
one.range.start,
|
||||
one.range.end,
|
||||
one.new_text
|
||||
));
|
||||
}
|
||||
}
|
||||
for warning in &edit.warnings {
|
||||
out.push_str(&format!("warn {warning}\n"));
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
/// **The R3b proof.** A rename whose caller knows the records of the files
|
||||
/// nothing analyses makes exactly the edits and says exactly the warnings the
|
||||
/// same rename makes without it — and parses fewer files by exactly the number
|
||||
/// of records it reused.
|
||||
///
|
||||
/// `K + E` becomes `(K − reused) + E`: the reuse takes parses out of the index
|
||||
/// stage and out of nowhere else, which is what the per-stage counts assert.
|
||||
#[test]
|
||||
fn a_reused_record_removes_that_files_parse_and_changes_no_edit() {
|
||||
let (plain, plain_trace) = eight_renamed(None);
|
||||
// The three files that spell neither `sig` nor `renamed_sig`: the
|
||||
// containers a scope indexes and no later stage reads.
|
||||
let known = Honest::about(&["/w/pkg.sv", "/w/quiet_a.sv", "/w/quiet_b.sv"]);
|
||||
let (reused, trace) = eight_renamed(Some(&known));
|
||||
|
||||
assert_eq!(plain, reused, "the reuse changed an edit or a warning");
|
||||
assert_eq!(trace.indexing.reused_files, 3, "three records came from the caller: {trace:?}");
|
||||
assert_eq!(
|
||||
trace.indexing.other_files, 4,
|
||||
"and the unread class is four, so this index is part reused and part parsed"
|
||||
);
|
||||
assert_eq!(trace.indexing.reused.parses, 0, "the caller's answers cost no parse");
|
||||
assert_eq!(
|
||||
trace.parses,
|
||||
plain_trace.parses - 3,
|
||||
"three parses fewer, and no other stage moved: {trace:?}"
|
||||
);
|
||||
let (k, e) = (trace.selected as u64, trace.edited as u64);
|
||||
assert_eq!(trace.parses, (k - 3) + e, "(K - reused) + E");
|
||||
assert_eq!(trace.index.parses, k - 3, "every input file but the reused ones");
|
||||
assert_eq!(trace.locate.parses, 0, "the cursor's file was kept");
|
||||
assert_eq!(trace.edits.parses, 0, "so was every file the occurrence walk reads");
|
||||
assert_eq!(trace.checks.before.parses, 0, "and every watched file");
|
||||
assert_eq!(trace.checks.after.parses, 0);
|
||||
}
|
||||
|
||||
/// A caller that knows **every** file's record still parses the ones whose
|
||||
/// analysis a later stage reads — the record is the index's half and the
|
||||
/// `Semantics` is the other, and only the second needs the parse.
|
||||
///
|
||||
/// The reuse is therefore never a reason to skip an analysis something asks
|
||||
/// for: it removes the parse of a file nothing asks about, and nothing else.
|
||||
#[test]
|
||||
fn a_file_whose_analysis_is_read_is_still_parsed_when_its_record_is_known() {
|
||||
let all: Vec<&str> = EIGHT.iter().map(|(name, _)| *name).collect();
|
||||
let known = Honest::about(&all);
|
||||
let (plain, plain_trace) = eight_renamed(None);
|
||||
let (reused, trace) = eight_renamed(Some(&known));
|
||||
|
||||
assert_eq!(plain, reused, "knowing every record changed an answer");
|
||||
assert_eq!(trace.indexing.reused_files, 8, "every record came from the caller");
|
||||
assert_eq!(
|
||||
trace.parses,
|
||||
plain_trace.parses - trace.indexing.other_files as u64,
|
||||
"only the unread class stopped being parsed: {trace:?}"
|
||||
);
|
||||
assert!(trace.indexing.kept_files > 0, "premise: some files are read later");
|
||||
assert_eq!(
|
||||
trace.index.parses,
|
||||
trace.indexing.kept_files as u64 + 1,
|
||||
"the kept ones, and the lead"
|
||||
);
|
||||
}
|
||||
|
||||
/// A record filed under **another path** is refused, because merging it would
|
||||
/// put one file's declarations under another's name. This is one of the two
|
||||
/// things the engine can check for itself; the other is that it asks with the
|
||||
/// very text it is about to index, which is how it asks.
|
||||
#[test]
|
||||
fn a_record_that_names_another_file_is_not_taken() {
|
||||
/// A caller that answers every question with one file's record.
|
||||
struct Misfiled(FileFacts);
|
||||
impl KnownFacts for Misfiled {
|
||||
fn facts_for(&self, _path: &Path, _text: &str) -> Option<FileFacts> {
|
||||
Some(self.0.clone())
|
||||
}
|
||||
}
|
||||
// A record of a file this workspace does not hold, so the only thing that
|
||||
// could make it reach the index is the engine failing to look at its path.
|
||||
let elsewhere =
|
||||
FileFacts::of(PathBuf::from("/w/absent.sv"), "module absent;\n logic sig;\nendmodule\n");
|
||||
let (plain, plain_trace) = eight_renamed(None);
|
||||
let (guarded, trace) = eight_renamed(Some(&Misfiled(elsewhere)));
|
||||
|
||||
assert_eq!(plain, guarded, "a misfiled record must not reach the index");
|
||||
assert_eq!(trace.indexing.reused_files, 0, "and must not be counted as reuse");
|
||||
assert_eq!(trace.parses, plain_trace.parses, "so every file was parsed as it always was");
|
||||
}
|
||||
@@ -28,6 +28,7 @@ use crate::TextEdit;
|
||||
|
||||
use super::Target;
|
||||
use crate::scope::{display, Scope};
|
||||
use crate::trace::WarnTrace;
|
||||
|
||||
/// One file's token stream and its line index, built at most once per
|
||||
/// [`Scope::warnings`] call and lent to every scan that asks.
|
||||
@@ -54,6 +55,12 @@ impl FileScan {
|
||||
self.lines.get_or_insert_with(|| LineIndex::new(text))
|
||||
}
|
||||
|
||||
/// Whether any scan got far enough past its prefilter to ask for the
|
||||
/// tokens — what the warning pass's per-file cost really is.
|
||||
fn lexed(&self) -> bool {
|
||||
self.tokens.is_some()
|
||||
}
|
||||
|
||||
/// Both at once, for a scan that walks the tokens and asks the index for
|
||||
/// each hit's line — two borrows it cannot take one after the other.
|
||||
fn tokens_and_lines(&mut self, text: &str) -> (Option<&[Token]>, &LineIndex) {
|
||||
@@ -76,10 +83,14 @@ impl<'a> Scope<'a> {
|
||||
/// workspace could not finish is spelled with the old name either way.
|
||||
/// Their sentences are collected per scan and concatenated in that order,
|
||||
/// which is the order they were emitted in when each scan had its own loop.
|
||||
///
|
||||
/// `trace` is filled in as the pass runs — the per-scan split the review's
|
||||
/// §3 item 3 asked for. Nothing in the pass reads it back.
|
||||
pub(super) fn warnings(
|
||||
&mut self,
|
||||
target: &Target,
|
||||
edits: &[(usize, Vec<TextEdit>)],
|
||||
trace: &mut WarnTrace,
|
||||
) -> Vec<String> {
|
||||
let name = &target.name;
|
||||
let (mut defines, mut macro_uses) = (Vec::new(), Vec::new());
|
||||
@@ -89,10 +100,16 @@ impl<'a> Scope<'a> {
|
||||
let mut kept: HashMap<usize, FileScan> = HashMap::new();
|
||||
for i in 0..self.len() {
|
||||
let mut scan = FileScan::default();
|
||||
defines.extend(self.define_warnings(i, name, &mut scan));
|
||||
macro_uses.extend(self.macro_use_warnings(i, name, &mut scan));
|
||||
fallbacks.extend(self.sva_fallback_warnings(i, name, &mut scan));
|
||||
unfinished.extend(self.unresolved_candidate_warnings(i, name, &mut scan));
|
||||
defines.extend(trace.defines.measure(|| self.define_warnings(i, name, &mut scan)));
|
||||
macro_uses
|
||||
.extend(trace.macro_uses.measure(|| self.macro_use_warnings(i, name, &mut scan)));
|
||||
fallbacks.extend(trace.sva.measure(|| self.sva_fallback_warnings(i, name, &mut scan)));
|
||||
unfinished.extend(
|
||||
trace.unfinished.measure(|| self.unresolved_candidate_warnings(i, name, &mut scan)),
|
||||
);
|
||||
// Free, and the number the four times above are mostly made of: a
|
||||
// file only reaches a lex when a scan's prefilter let it through.
|
||||
trace.scanned += usize::from(scan.lexed());
|
||||
if edits.iter().any(|(file, _)| *file == i) {
|
||||
kept.insert(i, scan);
|
||||
}
|
||||
@@ -103,7 +120,9 @@ impl<'a> Scope<'a> {
|
||||
warnings.extend(unfinished);
|
||||
for (i, edits) in edits {
|
||||
let mut scan = kept.remove(i).unwrap_or_default();
|
||||
warnings.extend(self.unaccounted_warnings(*i, name, edits, &mut scan));
|
||||
warnings.extend(
|
||||
trace.unaccounted.measure(|| self.unaccounted_warnings(*i, name, edits, &mut scan)),
|
||||
);
|
||||
}
|
||||
warnings.dedup();
|
||||
warnings
|
||||
@@ -627,7 +646,7 @@ fn is_name_byte(byte: u8) -> bool {
|
||||
mod tests {
|
||||
use std::path::PathBuf;
|
||||
|
||||
use super::{contains_word, Scope};
|
||||
use super::{contains_word, Scope, WarnTrace};
|
||||
|
||||
#[test]
|
||||
fn whole_word_search_ignores_substrings() {
|
||||
@@ -928,7 +947,7 @@ mod tests {
|
||||
let mut shared = Scope::build(&sources);
|
||||
let target = shared.locate(&path, at).expect("the cursor names something renameable");
|
||||
let edits = shared.collect_edits(&target, case.new_name).expect("the rename has edits");
|
||||
let said = shared.warnings(&target, &edits);
|
||||
let said = shared.warnings(&target, &edits, &mut WarnTrace::default());
|
||||
|
||||
let mut apart = Scope::build(&sources);
|
||||
let target = apart.locate(&path, at).expect("the cursor names something renameable");
|
||||
|
||||
@@ -13,6 +13,16 @@
|
||||
//! is retained is a *cache and nothing else*: a file whose analysis was not
|
||||
//! kept is analysed on demand exactly as before, so a retention rule that
|
||||
//! guesses wrong costs time and cannot change an answer.
|
||||
//!
|
||||
//! **And no parse at all, for a file the caller already has the record of**
|
||||
//! (review round §R3b). Two thirds of that per-file cost is the lexer and the
|
||||
//! parser, and a third of a rename's files are containers it indexes and never
|
||||
//! reads again — so [`KnownFacts`] lets a caller hand back the [`FileFacts`]
|
||||
//! it holds *for exactly the bytes it is handing over*, and those files are
|
||||
//! never parsed. Unlike retention, this one is not merely a cache: a record
|
||||
//! that does not describe the text it is filed against is a wrong index. The
|
||||
//! contract, and the two halves of it this crate can check itself, are on
|
||||
//! [`KnownFacts`]; `docs/features/perf5r-scope-reuse/README.md` has the rest.
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::path::{Path, PathBuf};
|
||||
@@ -23,6 +33,121 @@ use vlog_semantic::{
|
||||
WorkspaceIndex,
|
||||
};
|
||||
|
||||
use crate::trace::IndexTrace;
|
||||
|
||||
/// What the caller already knows about the files it is handing over.
|
||||
///
|
||||
/// A refactoring's scope is built by parsing and analysing every in-scope
|
||||
/// file, and most of that work exists only to produce each file's
|
||||
/// [`FileFacts`] — the record the workspace index is merged from. A caller
|
||||
/// that has already read that record off *these very bytes* can hand it back
|
||||
/// here, and the build skips the parse (review round §R3b, TODO §61.5).
|
||||
///
|
||||
/// **The whole contract is the one sentence in `facts_for`**, and it is the
|
||||
/// caller's to keep: this crate cannot check a record against the text it
|
||||
/// claims to describe without doing the parse the record exists to save. The
|
||||
/// engine does the two checks it can — it asks with the exact text it is about
|
||||
/// to index, and it refuses a record filed under another path — and nothing
|
||||
/// else. So an implementation must key its answer on the *content* of the text
|
||||
/// it is handed, from a record and a key it read out of one place; a modified
|
||||
/// time, a size or a path alone is not that key, and neither is a record whose
|
||||
/// hash was recorded by something other than the read that produced it.
|
||||
///
|
||||
/// A wrong answer here is a wrong index, which is a wrong refactoring: this is
|
||||
/// the one thing in the door that is not merely a cache. `None` is always
|
||||
/// safe — the file is analysed exactly as it always was.
|
||||
pub trait KnownFacts {
|
||||
/// The record [`FileFacts::of(path, text)`](FileFacts::of) would produce,
|
||||
/// if the caller can promise it is exactly that; `None` otherwise.
|
||||
fn facts_for(&self, path: &Path, text: &str) -> Option<FileFacts>;
|
||||
}
|
||||
|
||||
/// What the build does with one file, which is also what decides whether its
|
||||
/// analysis is worth keeping.
|
||||
#[derive(Clone, Copy, PartialEq, Eq)]
|
||||
enum Class {
|
||||
/// The file the request was made in: analysed first, always kept.
|
||||
Lead,
|
||||
/// A file the retention rule asked for: analysed, and kept.
|
||||
Kept,
|
||||
/// Everything else: it contributes a record to the index and nothing
|
||||
/// reads its analysis, so with a known record it is never analysed.
|
||||
Other,
|
||||
}
|
||||
|
||||
/// One scope build in progress: the records collected so far, the analyses
|
||||
/// kept, and where the time went.
|
||||
struct Building<'k, 't> {
|
||||
builder: IndexBuilder,
|
||||
kept: HashMap<usize, Semantics>,
|
||||
known: Option<&'k dyn KnownFacts>,
|
||||
trace: &'t mut IndexTrace,
|
||||
}
|
||||
|
||||
impl Building<'_, '_> {
|
||||
/// Take one file's contribution: its record, reused when the caller knows
|
||||
/// it for exactly these bytes and read off a fresh analysis otherwise, and
|
||||
/// its analysis when a later stage will read it.
|
||||
///
|
||||
/// The two halves of a reused file are computed apart — the record from
|
||||
/// the caller, the [`Semantics`] from this text — where an analysed file's
|
||||
/// come from one call. They agree because both are pure functions of the
|
||||
/// same bytes, which is the same reason `Scope::analysis`'s on-demand path
|
||||
/// has always been allowed to analyse a file the index build already read.
|
||||
fn take(&mut self, i: usize, path: &Path, text: &str, class: Class) {
|
||||
let known = self.known;
|
||||
let record = self
|
||||
.trace
|
||||
.reused
|
||||
.measure(|| known?.facts_for(path, text))
|
||||
// A record filed under another path would be merged as that file.
|
||||
// The caller cannot mean this, so it is a miss rather than a trust.
|
||||
.filter(|facts| facts.path() == path);
|
||||
self.count(class, text.len(), record.is_some());
|
||||
let wanted = class != Class::Other;
|
||||
let stage = match class {
|
||||
Class::Lead => &mut self.trace.lead,
|
||||
Class::Kept => &mut self.trace.kept,
|
||||
Class::Other => &mut self.trace.other,
|
||||
};
|
||||
let (facts, semantics) = match record {
|
||||
Some(facts) => {
|
||||
let analysed = || stage.measure(|| analyze(&parse_source_tolerant(text).0, text));
|
||||
(facts, wanted.then(analysed))
|
||||
}
|
||||
None => {
|
||||
let (facts, semantics) =
|
||||
stage.measure(|| FileFacts::analyzed(path.to_path_buf(), text));
|
||||
(facts, wanted.then_some(semantics))
|
||||
}
|
||||
};
|
||||
self.builder.add_facts(facts);
|
||||
if let Some(semantics) = semantics {
|
||||
self.kept.insert(i, semantics);
|
||||
}
|
||||
}
|
||||
|
||||
/// The file counted into its class, and into the reuse count when its
|
||||
/// record came from the caller.
|
||||
fn count(&mut self, class: Class, bytes: usize, reused: bool) {
|
||||
match class {
|
||||
Class::Lead => {}
|
||||
Class::Kept => {
|
||||
self.trace.kept_files += 1;
|
||||
self.trace.kept_bytes += bytes;
|
||||
}
|
||||
Class::Other => {
|
||||
self.trace.other_files += 1;
|
||||
self.trace.other_bytes += bytes;
|
||||
}
|
||||
}
|
||||
if reused {
|
||||
self.trace.reused_files += 1;
|
||||
self.trace.reused_bytes += bytes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// One file's two analysis layers, as `textDocument/definition` uses them.
|
||||
pub(crate) struct Analysis {
|
||||
pub(crate) semantics: Semantics,
|
||||
@@ -55,7 +180,7 @@ impl<'a> Scope<'a> {
|
||||
/// again, which is the behaviour every caller but the rename has always
|
||||
/// had. [`Scope::build_keeping`] is the one that keeps them.
|
||||
pub(crate) fn build(files: &'a [(PathBuf, String)]) -> Scope<'a> {
|
||||
Scope::assemble(files, None, |_| Vec::new())
|
||||
Scope::assemble(files, None, |_| Vec::new(), None, &mut IndexTrace::default())
|
||||
}
|
||||
|
||||
/// The in-scope files, indexed, **keeping** the analysis of `lead` and of
|
||||
@@ -73,18 +198,31 @@ impl<'a> Scope<'a> {
|
||||
/// occurrence walk will analyse and every file
|
||||
/// [`crate::check`] will watch (a whole-word subset) is retained, and
|
||||
/// nothing else is.
|
||||
///
|
||||
/// `known`, when the caller has one, is asked for each file's index record
|
||||
/// before that file is analysed — see [`KnownFacts`]. It changes what the
|
||||
/// build *costs* and nothing else: a record it does not answer for is read
|
||||
/// off a fresh analysis exactly as it always was.
|
||||
///
|
||||
/// `trace` is filled in as the build runs — the per-file-class split the
|
||||
/// review's §3 item 1 asked for. A caller with nothing to measure passes
|
||||
/// `&mut IndexTrace::default()`; nothing in the build reads it back.
|
||||
pub(crate) fn build_keeping(
|
||||
files: &'a [(PathBuf, String)],
|
||||
lead: &Path,
|
||||
keep: impl FnOnce(Option<&Semantics>) -> Vec<String>,
|
||||
known: Option<&dyn KnownFacts>,
|
||||
trace: &mut IndexTrace,
|
||||
) -> Scope<'a> {
|
||||
Scope::assemble(files, Some(lead), keep)
|
||||
Scope::assemble(files, Some(lead), keep, known, trace)
|
||||
}
|
||||
|
||||
fn assemble(
|
||||
files: &'a [(PathBuf, String)],
|
||||
lead: Option<&Path>,
|
||||
keep: impl FnOnce(Option<&Semantics>) -> Vec<String>,
|
||||
known: Option<&dyn KnownFacts>,
|
||||
trace: &mut IndexTrace,
|
||||
) -> Scope<'a> {
|
||||
let mut sources: Vec<(&Path, &str)> =
|
||||
files.iter().map(|(p, t)| (p.as_path(), t.as_str())).collect();
|
||||
@@ -93,31 +231,30 @@ impl<'a> Scope<'a> {
|
||||
sources.sort_by(|a, b| a.0.cmp(b.0));
|
||||
sources.dedup_by(|a, b| a.0 == b.0);
|
||||
|
||||
let mut builder = IndexBuilder::new();
|
||||
let mut kept: HashMap<usize, Semantics> = HashMap::new();
|
||||
let mut building =
|
||||
Building { builder: IndexBuilder::new(), kept: HashMap::new(), known, trace };
|
||||
// The lead file first, so its analysis can be read before the rest are
|
||||
// parsed. `IndexBuilder::finish` sorts by path, so feeding it out of
|
||||
// order cannot reach the index.
|
||||
let first = lead.and_then(|path| sources.iter().position(|(held, _)| *held == path));
|
||||
if let Some(i) = first {
|
||||
let (path, text) = sources[i];
|
||||
let (facts, semantics) = FileFacts::analyzed(path.to_path_buf(), text);
|
||||
builder.add_facts(facts);
|
||||
kept.insert(i, semantics);
|
||||
building.take(i, path, text, Class::Lead);
|
||||
}
|
||||
let words = keep(first.and_then(|i| kept.get(&i)));
|
||||
let words = keep(first.and_then(|i| building.kept.get(&i)));
|
||||
for (i, (path, text)) in sources.iter().enumerate() {
|
||||
if Some(i) == first {
|
||||
continue;
|
||||
}
|
||||
let (facts, semantics) = FileFacts::analyzed(path.to_path_buf(), text);
|
||||
builder.add_facts(facts);
|
||||
if words.iter().any(|word| text.contains(word.as_str())) {
|
||||
kept.insert(i, semantics);
|
||||
}
|
||||
// Asked before the file is taken rather than after it — the same
|
||||
// pure question of the same two values, moved so the class it
|
||||
// answers decides what the build does with the file at all.
|
||||
let wanted = words.iter().any(|word| text.contains(word.as_str()));
|
||||
building.take(i, path, text, if wanted { Class::Kept } else { Class::Other });
|
||||
}
|
||||
|
||||
let index = builder.finish();
|
||||
let Building { builder, kept, trace, .. } = building;
|
||||
let index = trace.merge.measure(|| builder.finish());
|
||||
let ids: HashMap<&Path, FileId> = index
|
||||
.files()
|
||||
.iter()
|
||||
@@ -250,8 +387,13 @@ mod tests {
|
||||
let built = WorkspaceIndex::build(files.iter().map(|(p, t)| (p.clone(), t.as_str())));
|
||||
let plain = Scope::build(&files);
|
||||
assert_eq!(plain.index().fingerprint(), built.fingerprint());
|
||||
let keeping =
|
||||
Scope::build_keeping(&files, Path::new("/w/top.sv"), |_| vec!["sig".to_string()]);
|
||||
let keeping = Scope::build_keeping(
|
||||
&files,
|
||||
Path::new("/w/top.sv"),
|
||||
|_| vec!["sig".to_string()],
|
||||
None,
|
||||
&mut IndexTrace::default(),
|
||||
);
|
||||
assert_eq!(keeping.index().fingerprint(), built.fingerprint());
|
||||
for i in 0..plain.len() {
|
||||
assert_eq!(plain.file_id(i), keeping.file_id(i), "file ids move with retention");
|
||||
@@ -266,11 +408,18 @@ mod tests {
|
||||
fn a_retained_analysis_is_the_one_the_on_demand_path_would_compute() {
|
||||
let files = files();
|
||||
let mut plain = Scope::build(&files);
|
||||
let mut keeping = Scope::build_keeping(&files, Path::new("/w/top.sv"), |here| {
|
||||
// Every word in play, so every file is retained.
|
||||
assert!(here.is_some(), "the lead file's analysis is made first");
|
||||
vec!["sig".to_string(), "pkg".to_string(), "u_sub".to_string()]
|
||||
});
|
||||
let mut trace = IndexTrace::default();
|
||||
let mut keeping = Scope::build_keeping(
|
||||
&files,
|
||||
Path::new("/w/top.sv"),
|
||||
|here| {
|
||||
// Every word in play, so every file is retained.
|
||||
assert!(here.is_some(), "the lead file's analysis is made first");
|
||||
vec!["sig".to_string(), "pkg".to_string(), "u_sub".to_string()]
|
||||
},
|
||||
None,
|
||||
&mut trace,
|
||||
);
|
||||
for i in 0..plain.len() {
|
||||
let one = plain.analysis(i).map(print);
|
||||
let two = keeping.analysis(i).map(print);
|
||||
@@ -285,14 +434,97 @@ mod tests {
|
||||
fn the_lead_files_analysis_is_available_to_the_retention_rule() {
|
||||
let files = files();
|
||||
let mut seen = None;
|
||||
let scope = Scope::build_keeping(&files, Path::new("/w/user.sv"), |here| {
|
||||
seen = here.map(|semantics| semantics.symbols().len());
|
||||
Vec::new()
|
||||
});
|
||||
let mut trace = IndexTrace::default();
|
||||
let scope = Scope::build_keeping(
|
||||
&files,
|
||||
Path::new("/w/user.sv"),
|
||||
|here| {
|
||||
seen = here.map(|semantics| semantics.symbols().len());
|
||||
Vec::new()
|
||||
},
|
||||
None,
|
||||
&mut trace,
|
||||
);
|
||||
assert_eq!(seen, Some(2), "`user` and `X` are what user.sv declares");
|
||||
assert_eq!(scope.len(), 4);
|
||||
}
|
||||
|
||||
/// **The R3b fingerprint proof.** An index part *reused* and part parsed is
|
||||
/// the index every file's own text builds — same fingerprint, same file
|
||||
/// ids — and the analyses it keeps are the same analyses either way.
|
||||
///
|
||||
/// This is the whole of the door's correctness at this level: a record
|
||||
/// handed in by a caller who kept the promise is the record the parse
|
||||
/// would have produced, so an index merged from a mixture of the two
|
||||
/// cannot be told from one merged from either.
|
||||
#[test]
|
||||
fn an_index_part_reused_and_part_parsed_is_the_index_the_texts_build() {
|
||||
/// A caller that knows `pkg.sv` and `user.sv`, read off their own text.
|
||||
struct Two(Vec<(PathBuf, String, FileFacts)>);
|
||||
impl KnownFacts for Two {
|
||||
fn facts_for(&self, path: &Path, text: &str) -> Option<FileFacts> {
|
||||
self.0
|
||||
.iter()
|
||||
.find(|(held, bytes, _)| held == path && bytes == text)
|
||||
.map(|(_, _, facts)| facts.clone())
|
||||
}
|
||||
}
|
||||
let files = files();
|
||||
let known = Two(files
|
||||
.iter()
|
||||
.filter(|(path, _)| path.ends_with("pkg.sv") || path.ends_with("user.sv"))
|
||||
.map(|(path, text)| (path.clone(), text.clone(), FileFacts::of(path.clone(), text)))
|
||||
.collect());
|
||||
assert_eq!(known.0.len(), 2, "premise: two of the four are known");
|
||||
|
||||
let built = WorkspaceIndex::build(files.iter().map(|(p, t)| (p.clone(), t.as_str())));
|
||||
let mut trace = IndexTrace::default();
|
||||
let mut mixed = Scope::build_keeping(
|
||||
&files,
|
||||
Path::new("/w/top.sv"),
|
||||
|_| vec!["sig".to_string()],
|
||||
Some(&known),
|
||||
&mut trace,
|
||||
);
|
||||
assert_eq!(trace.reused_files, 2, "both known records were taken: {trace:?}");
|
||||
assert_eq!(mixed.index().fingerprint(), built.fingerprint());
|
||||
|
||||
let mut plain = Scope::build(&files);
|
||||
for i in 0..plain.len() {
|
||||
assert_eq!(plain.file_id(i), mixed.file_id(i), "file ids move with reuse");
|
||||
assert_eq!(plain.path(i), mixed.path(i));
|
||||
assert_eq!(
|
||||
plain.analysis(i).map(print),
|
||||
mixed.analysis(i).map(print),
|
||||
"file {i} analyses differently when its record is reused"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// A caller that answers for nothing is the build as it always was — the
|
||||
/// door is opt-in per file, not a mode.
|
||||
#[test]
|
||||
fn a_caller_that_knows_nothing_builds_exactly_what_it_always_did() {
|
||||
struct Nothing;
|
||||
impl KnownFacts for Nothing {
|
||||
fn facts_for(&self, _path: &Path, _text: &str) -> Option<FileFacts> {
|
||||
None
|
||||
}
|
||||
}
|
||||
let files = files();
|
||||
let built = WorkspaceIndex::build(files.iter().map(|(p, t)| (p.clone(), t.as_str())));
|
||||
let mut trace = IndexTrace::default();
|
||||
let scope = Scope::build_keeping(
|
||||
&files,
|
||||
Path::new("/w/top.sv"),
|
||||
|_| vec!["sig".to_string()],
|
||||
Some(&Nothing),
|
||||
&mut trace,
|
||||
);
|
||||
assert_eq!(trace.reused_files, 0);
|
||||
assert_eq!(scope.index().fingerprint(), built.fingerprint());
|
||||
}
|
||||
|
||||
/// A lead the scope does not hold is not an error: nothing is retained,
|
||||
/// and the rest of the build is what it always was.
|
||||
#[test]
|
||||
@@ -300,11 +532,18 @@ mod tests {
|
||||
let files = files();
|
||||
let built = WorkspaceIndex::build(files.iter().map(|(p, t)| (p.clone(), t.as_str())));
|
||||
let mut asked = false;
|
||||
let mut scope = Scope::build_keeping(&files, Path::new("/w/absent.sv"), |here| {
|
||||
asked = true;
|
||||
assert!(here.is_none(), "there is no lead analysis to offer");
|
||||
vec!["sig".to_string()]
|
||||
});
|
||||
let mut trace = IndexTrace::default();
|
||||
let mut scope = Scope::build_keeping(
|
||||
&files,
|
||||
Path::new("/w/absent.sv"),
|
||||
|here| {
|
||||
asked = true;
|
||||
assert!(here.is_none(), "there is no lead analysis to offer");
|
||||
vec!["sig".to_string()]
|
||||
},
|
||||
None,
|
||||
&mut trace,
|
||||
);
|
||||
assert!(asked, "the retention rule is asked either way");
|
||||
assert_eq!(scope.index().fingerprint(), built.fingerprint());
|
||||
assert!(scope.analysis(0).is_some(), "and every file still analyses on demand");
|
||||
|
||||
@@ -44,6 +44,107 @@ impl Stage {
|
||||
}
|
||||
}
|
||||
|
||||
/// Where the scope build's time went, by what the build does with each file.
|
||||
///
|
||||
/// The review's §3 item 1 asked for the 229 ms scope stage split, because an
|
||||
/// aggregate cannot say whether a parser or an index optimization is the
|
||||
/// lever. The split that answers it is **by file class**: the request's own
|
||||
/// file, the files whose text spells one of the names in play (whose
|
||||
/// `Semantics` every later stage reads), and the rest — the container files
|
||||
/// §P2d counted, which are analysed for their index record alone and whose
|
||||
/// analysis is dropped unread. `merge` is `IndexBuilder::finish`, the sort and
|
||||
/// the whole-index merge, which is index work and not parse work.
|
||||
///
|
||||
/// `reused` is R3b's: records taken from the caller's known set instead of
|
||||
/// analysed. Zero for every caller that hands none.
|
||||
///
|
||||
/// The lead file is in `lead` and in neither `kept_files` nor `other_files` —
|
||||
/// it is always analysed and always kept, so counting it with either class
|
||||
/// would blur exactly the comparison this exists to make.
|
||||
#[derive(Debug, Clone, Copy, Default, PartialEq)]
|
||||
pub struct IndexTrace {
|
||||
/// The request's own file, analysed before any other so the retention rule
|
||||
/// can read it.
|
||||
pub lead: Stage,
|
||||
/// The files the retention rule keeps, analysed.
|
||||
pub kept: Stage,
|
||||
/// The files it does not, analysed for the record alone.
|
||||
pub other: Stage,
|
||||
/// Records taken from the caller's known set — the lookup and the clone,
|
||||
/// with no parse in it.
|
||||
pub reused: Stage,
|
||||
/// How many files fell in each class, and their bytes.
|
||||
pub kept_files: usize,
|
||||
pub kept_bytes: usize,
|
||||
pub other_files: usize,
|
||||
pub other_bytes: usize,
|
||||
pub reused_files: usize,
|
||||
pub reused_bytes: usize,
|
||||
/// `IndexBuilder::finish`: the per-file records sorted and merged.
|
||||
pub merge: Stage,
|
||||
}
|
||||
|
||||
impl IndexTrace {
|
||||
/// One group of the trace line, in the order the build runs.
|
||||
fn line(&self) -> String {
|
||||
format!(
|
||||
"index{{lead={:.1}ms kept={:.1} other={:.1} reused={:.1} merge={:.1} \
|
||||
kept_files={} kept_bytes={} other_files={} other_bytes={} \
|
||||
reused_files={} reused_bytes={}}}",
|
||||
self.lead.ms,
|
||||
self.kept.ms,
|
||||
self.other.ms,
|
||||
self.reused.ms,
|
||||
self.merge.ms,
|
||||
self.kept_files,
|
||||
self.kept_bytes,
|
||||
self.other_files,
|
||||
self.other_bytes,
|
||||
self.reused_files,
|
||||
self.reused_bytes,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/// Where the warning pass's time went, scan by scan.
|
||||
///
|
||||
/// The five scans of `rename::warnings`, in the order they run. Each is a
|
||||
/// whole pass over the in-scope files, so the split says which of them the
|
||||
/// stage's milliseconds are — `scanned` is how many files got past the
|
||||
/// `text.contains(name)` prefilter into a lex, which is the work the times are
|
||||
/// mostly made of.
|
||||
#[derive(Debug, Clone, Copy, Default, PartialEq)]
|
||||
pub struct WarnTrace {
|
||||
/// The `` `define`` scan.
|
||||
pub defines: Stage,
|
||||
/// The macro-invocation-argument scan.
|
||||
pub macro_uses: Stage,
|
||||
/// The unstructured-SVA scan.
|
||||
pub sva: Stage,
|
||||
/// The unresolved-candidate scan.
|
||||
pub unfinished: Stage,
|
||||
/// The edited files' unaccounted-occurrence scan.
|
||||
pub unaccounted: Stage,
|
||||
/// Files whose text spelled the name, and which were therefore lexed.
|
||||
pub scanned: usize,
|
||||
}
|
||||
|
||||
impl WarnTrace {
|
||||
/// One group of the trace line, in the order the scans run.
|
||||
fn line(&self) -> String {
|
||||
format!(
|
||||
"warnings{{defines={:.1}ms macro_uses={:.1} sva={:.1} unfinished={:.1} \
|
||||
unaccounted={:.1} scanned={}}}",
|
||||
self.defines.ms,
|
||||
self.macro_uses.ms,
|
||||
self.sva.ms,
|
||||
self.unfinished.ms,
|
||||
self.unaccounted.ms,
|
||||
self.scanned,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/// What the verification pass did, stage by stage.
|
||||
///
|
||||
/// The five sub-stages of [`crate::check`]'s `verify`, in the order it runs
|
||||
@@ -83,6 +184,8 @@ pub struct RenameTrace {
|
||||
pub bytes: usize,
|
||||
/// Building the request-local scope: the index over every selected file.
|
||||
pub index: Stage,
|
||||
/// Where that build's time went, by file class (review §3 item 1).
|
||||
pub indexing: IndexTrace,
|
||||
/// Resolving the cursor to the declaration the rename acts on.
|
||||
pub locate: Stage,
|
||||
/// Collecting every occurrence and turning it into edits.
|
||||
@@ -93,6 +196,8 @@ pub struct RenameTrace {
|
||||
pub checks: VerifyTrace,
|
||||
/// Describing the occurrences the rename deliberately left alone.
|
||||
pub warnings: Stage,
|
||||
/// Where that pass's time went, scan by scan (review §3 item 3).
|
||||
pub warning_scans: WarnTrace,
|
||||
/// Files the rename edits.
|
||||
pub edited: usize,
|
||||
/// Whole-file parses over the entire request, from the first byte of the
|
||||
@@ -103,7 +208,15 @@ pub struct RenameTrace {
|
||||
impl RenameTrace {
|
||||
/// One line, in the server's `timing:` style — the whole trace, in the
|
||||
/// order the stages ran.
|
||||
///
|
||||
/// The two per-stage splits come last, each as its own `name{…}` group, so
|
||||
/// a reader of the old fields sees exactly what it always did.
|
||||
pub fn line(&self) -> String {
|
||||
format!("{} {} {}", self.stages(), self.indexing.line(), self.warning_scans.line())
|
||||
}
|
||||
|
||||
/// The stage totals — the line as it was before the splits were added.
|
||||
fn stages(&self) -> String {
|
||||
format!(
|
||||
"selected={} bytes={} edited={} index={:.1}ms locate={:.1} edits={:.1} \
|
||||
verify{{total={:.1} tokens={:.1} watched={} watched_bytes={} before={:.1} \
|
||||
|
||||
@@ -13,9 +13,10 @@ use std::time::Instant;
|
||||
use vlog_parser::ast::{Item, ItemKind, ListElem, PortList};
|
||||
use vlog_refactor::{
|
||||
add_port, convert_to_ansi, expand_wildcard, extract_module, instantiation_plan,
|
||||
module_definition, port_actions, prepare_rename, rename, Home, Layout, ModuleRef,
|
||||
module_definition, port_actions, prepare_rename, rename, rename_traced, rename_traced_with,
|
||||
Home, KnownFacts, Layout, ModuleRef, RenameTrace,
|
||||
};
|
||||
use vlog_semantic::WorkspaceIndex;
|
||||
use vlog_semantic::{FileFacts, WorkspaceIndex};
|
||||
|
||||
fn corpus() -> Option<Vec<PathBuf>> {
|
||||
let root = Path::new(env!("CARGO_MANIFEST_DIR")).join("../../corpus");
|
||||
@@ -1181,3 +1182,122 @@ fn borne(
|
||||
}
|
||||
gained
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// the known-facts door over real RTL (review round §R3b, TODO §61.5)
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
/// The corpus's own records, read once, answered back the way a correct
|
||||
/// caller answers: only for the exact bytes each record was read off.
|
||||
///
|
||||
/// The server's implementation is this answer taken out of a store keyed by
|
||||
/// content hash instead of computed here; what this stands in for is the
|
||||
/// promise, not the saving.
|
||||
struct CorpusFacts {
|
||||
known: Vec<(PathBuf, String, FileFacts)>,
|
||||
}
|
||||
|
||||
impl CorpusFacts {
|
||||
/// Every source's record, or every second one when `half` — so a run can
|
||||
/// build an index that is **part reused and part parsed**, which is the
|
||||
/// mixture a real rename gets.
|
||||
fn of(sources: &[(PathBuf, String)], half: bool) -> CorpusFacts {
|
||||
let known = sources
|
||||
.iter()
|
||||
.enumerate()
|
||||
.filter(|(i, _)| !half || i % 2 == 0)
|
||||
.map(|(_, (path, text))| {
|
||||
(path.clone(), text.clone(), FileFacts::of(path.clone(), text))
|
||||
})
|
||||
.collect();
|
||||
CorpusFacts { known }
|
||||
}
|
||||
}
|
||||
|
||||
impl KnownFacts for CorpusFacts {
|
||||
fn facts_for(&self, path: &Path, text: &str) -> Option<FileFacts> {
|
||||
self.known
|
||||
.iter()
|
||||
.find(|(held, bytes, _)| held == path && bytes == text)
|
||||
.map(|(_, _, facts)| facts.clone())
|
||||
}
|
||||
}
|
||||
|
||||
/// **The R3b corpus probe.** Over 800 files of real RTL, the same rename asked
|
||||
/// three ways — with no records, with every record, and with every second one
|
||||
/// — makes byte-identical edits and says byte-identical warnings, and the
|
||||
/// reuse removes parses.
|
||||
///
|
||||
/// `#[ignore]`d because it renames a corpus-wide module three times over; run
|
||||
/// it with `cargo test -p vlog_refactor --test corpus -- --ignored --nocapture`
|
||||
/// (through `tools/guard.sh`), which also prints the parse counts.
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn a_corpus_rename_says_the_same_thing_however_many_records_are_reused() {
|
||||
let Some(files) = corpus() else { return };
|
||||
let sources = read(&files);
|
||||
let Some((path, text)) =
|
||||
sources.iter().find(|(p, _)| p.file_name().is_some_and(|n| n == "prim_fifo_sync.sv"))
|
||||
else {
|
||||
eprintln!("prim_fifo_sync.sv not in this corpus — skipping");
|
||||
return;
|
||||
};
|
||||
let offset =
|
||||
text.find("module prim_fifo_sync").map(|i| i + 7).expect("the module's name") as u32;
|
||||
|
||||
let mut plain = RenameTrace::default();
|
||||
let one = rename_traced(&sources, path, offset, "prim_fifo_sync_renamed", &mut plain);
|
||||
|
||||
let all = CorpusFacts::of(&sources, false);
|
||||
let mut every = RenameTrace::default();
|
||||
let two =
|
||||
rename_traced_with(&sources, path, offset, "prim_fifo_sync_renamed", &all, &mut every);
|
||||
|
||||
let half = CorpusFacts::of(&sources, true);
|
||||
let mut mixed = RenameTrace::default();
|
||||
let three =
|
||||
rename_traced_with(&sources, path, offset, "prim_fifo_sync_renamed", &half, &mut mixed);
|
||||
|
||||
println!(
|
||||
"corpus reuse over {} files: parses {} (none) / {} (every record) / {} (every second); \
|
||||
reused {} / {}; index {:.1} / {:.1} / {:.1} ms",
|
||||
sources.len(),
|
||||
plain.parses,
|
||||
every.parses,
|
||||
mixed.parses,
|
||||
every.indexing.reused_files,
|
||||
mixed.indexing.reused_files,
|
||||
plain.index.ms,
|
||||
every.index.ms,
|
||||
mixed.index.ms,
|
||||
);
|
||||
|
||||
let say = |outcome: &Result<vlog_refactor::RefactorEdit, String>| match outcome {
|
||||
Ok(edit) => {
|
||||
let mut out: Vec<String> = edit
|
||||
.edits
|
||||
.iter()
|
||||
.flat_map(|(p, edits)| {
|
||||
edits.iter().map(move |e| {
|
||||
format!("{} {}..{} {}", p.display(), e.range.start, e.range.end, e.new_text)
|
||||
})
|
||||
})
|
||||
.collect();
|
||||
out.extend(edit.warnings.iter().cloned());
|
||||
out.join("\n")
|
||||
}
|
||||
Err(message) => format!("refused: {message}"),
|
||||
};
|
||||
assert_eq!(say(&one), say(&two), "reusing every record changed an edit or a warning");
|
||||
assert_eq!(say(&one), say(&three), "reusing half the records changed an edit or a warning");
|
||||
|
||||
assert_eq!(every.indexing.reused_files, sources.len(), "every record was offered and taken");
|
||||
assert!(mixed.indexing.reused_files > 0, "and half of them in the mixed run");
|
||||
assert!(
|
||||
every.parses < plain.parses,
|
||||
"the reuse must remove parses: {} against {}",
|
||||
every.parses,
|
||||
plain.parses
|
||||
);
|
||||
assert!(mixed.parses < plain.parses, "and so must the mixture");
|
||||
}
|
||||
@@ -0,0 +1,252 @@
|
||||
//! `rename_preflight` against the road it short-circuits, refusal by refusal.
|
||||
//!
|
||||
//! The preflight answers, from the request file alone, a question `rename`
|
||||
//! would otherwise answer after parsing and analyzing the whole in-scope
|
||||
//! workspace. That is only sound if the two answers are the *same sentence*,
|
||||
//! so this file is the equality oracle: at **every byte** of seven hostile
|
||||
//! buffers, and for every new name worth trying, the fast road's refusal must
|
||||
//! be the slow road's refusal, word for word.
|
||||
//!
|
||||
//! Two directions, and only one of them is allowed:
|
||||
//!
|
||||
//! * the preflight refuses and the whole road refuses **differently**, or
|
||||
//! accepts — an *invented* refusal, which is a rename the user cannot get.
|
||||
//! Always a failure.
|
||||
//! * the preflight says `Ok(())` and the whole road refuses — a *deferral*,
|
||||
//! which is the normal case for everything the request file cannot settle.
|
||||
//! Counted, never asserted away, and asserted to be non-zero where the
|
||||
//! fixture is built to produce one.
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use vlog_parser::parse_source_tolerant;
|
||||
use vlog_refactor::{rename, rename_name_at, rename_preflight};
|
||||
use vlog_semantic::analyze;
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Fixtures
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
const SUB: &str = "module sub #(parameter int W = 1) (input logic clk, output logic q);\n wire local_net;\n assign q = clk & local_net;\nendmodule : sub\n";
|
||||
const TOP: &str = "module top;\n logic c, d;\n sub #(.W(2)) u_sub (.clk(c), .q(d));\n sub u_two (.clk(c), .q(d));\nendmodule\n";
|
||||
const PKG: &str =
|
||||
"package cfg_pkg;\n parameter int DEPTH = 4;\n typedef logic [1:0] mode_t;\nendpackage\n";
|
||||
const USER: &str = "module user;\n import cfg_pkg::*;\n cfg_pkg::mode_t m;\n localparam int D = cfg_pkg::DEPTH;\nendmodule\n";
|
||||
/// A name that resolves to nothing, and one that could only come from a base
|
||||
/// class nothing in the workspace declares.
|
||||
const STRAY: &str = "class kid extends absent_base;\n function void go();\n inherited_thing = 1;\n endfunction\nendclass\nmodule holder;\n missing u_missing (.a(b));\nendmodule\n";
|
||||
/// Macro invocations, a generate block and a genvar.
|
||||
const GEN: &str = "`define BUMP(x) x + 1\n`define WIDTH 8\nmodule gen_holder;\n genvar i;\n generate\n for (i = 0; i < 2; i++) begin : lane\n sub u_lane (.clk(1'b0), .q());\n end\n endgenerate\n wire [`WIDTH-1:0] w;\n assign w = `BUMP(sub);\nendmodule\n";
|
||||
/// Every byte a cursor can sit on that is *not* a symbol: line comments,
|
||||
/// block comments, a string literal, a system task, an attribute, and — for
|
||||
/// the offsets in between — punctuation and whitespace.
|
||||
const PROSE: &str = "// a leading line comment naming clk and sub\n/* a block comment\n naming local_net too */\nmodule prose;\n // clk here is prose\n logic clk;\n initial begin\n $display(\"clk and sub and local_net, all in a string\");\n end\n (* keep = \"true\" *)\n wire tagged_net;\nendmodule\n";
|
||||
const BROKEN: &str = "module broken (input logic clk;\n wire a\n assign a = clk\nendmodule\n";
|
||||
|
||||
fn workspace(files: &[(&str, &str)]) -> Vec<(PathBuf, String)> {
|
||||
files.iter().map(|(name, text)| (PathBuf::from(name), (*text).to_string())).collect()
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// The rename oracle
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
/// Ask both roads the same rename at every byte of `file`, for every new name
|
||||
/// worth asking about there, and return `(refused, deferred)`.
|
||||
///
|
||||
/// The new names are the four `check_new_name` shapes plus two that can only
|
||||
/// be judged after the cursor is resolved: a novel valid name, and **the name
|
||||
/// the cursor already spells**, which is the one way to reach the "is the name
|
||||
/// it already has" refusal at an arbitrary offset.
|
||||
fn rename_oracle(files: &[(&str, &str)], file: &str) -> (usize, usize) {
|
||||
let sources = workspace(files);
|
||||
let path = PathBuf::from(file);
|
||||
let text = files
|
||||
.iter()
|
||||
.find(|(name, _)| *name == file)
|
||||
.map(|(_, text)| *text)
|
||||
.expect("the file is in the workspace");
|
||||
let semantics = analyze(&parse_source_tolerant(text).0, text);
|
||||
|
||||
let (mut refused, mut deferred) = (0usize, 0usize);
|
||||
for offset in 0..=text.len() as u32 {
|
||||
let here = rename_name_at(&semantics, offset);
|
||||
let mut names: Vec<&str> = vec!["", "module", "1bad", "has space", "renamed_thing"];
|
||||
if let Some(name) = &here {
|
||||
names.push(name.as_str());
|
||||
}
|
||||
for new_name in names {
|
||||
let fast = rename_preflight(&semantics, offset, new_name);
|
||||
let slow = rename(&sources, &path, offset, new_name);
|
||||
match (&fast, &slow) {
|
||||
(Err(fast), Err(slow)) => {
|
||||
assert_eq!(
|
||||
fast, slow,
|
||||
"byte {offset} of {file} renamed to {new_name:?}: \
|
||||
the preflight and the workspace refuse in different words"
|
||||
);
|
||||
refused += 1;
|
||||
}
|
||||
(Err(fast), Ok(_)) => panic!(
|
||||
"byte {offset} of {file} renamed to {new_name:?}: the preflight \
|
||||
invented the refusal {fast:?} for a rename the workspace performs"
|
||||
),
|
||||
// The preflight stood aside. Whatever the workspace then says
|
||||
// is today's answer, unchanged — which is the whole contract.
|
||||
(Ok(()), Err(_)) => deferred += 1,
|
||||
(Ok(()), Ok(_)) => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
(refused, deferred)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_preflight_refuses_a_rename_exactly_as_the_workspace_does() {
|
||||
let files = [("sub.sv", SUB), ("top.sv", TOP)];
|
||||
let (refused, _) = rename_oracle(&files, "top.sv");
|
||||
assert!(refused > 0, "the sweep must actually reach the preflight's refusals");
|
||||
rename_oracle(&files, "sub.sv");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_cursor_on_prose_is_refused_from_the_buffer_alone() {
|
||||
// Comments, a string literal, a system task and an attribute: the whole
|
||||
// "there is no symbol to rename at this position" family, which is the
|
||||
// 2,192 ms refusal this preflight exists for.
|
||||
let files = [("prose.sv", PROSE), ("sub.sv", SUB), ("top.sv", TOP)];
|
||||
let (refused, _) = rename_oracle(&files, "prose.sv");
|
||||
assert!(refused > 0);
|
||||
|
||||
// And named exactly, so a reworded refusal cannot hide inside the sweep.
|
||||
let sources = workspace(&files);
|
||||
let path = PathBuf::from("prose.sv");
|
||||
let semantics = analyze(&parse_source_tolerant(PROSE).0, PROSE);
|
||||
for (what, at) in [
|
||||
("a line comment", PROSE.find("a leading line").expect("the comment")),
|
||||
("a block comment", PROSE.find("naming local_net").expect("the comment")),
|
||||
("a string literal", PROSE.find("all in a string").expect("the string")),
|
||||
] {
|
||||
let at = at as u32;
|
||||
let fast = rename_preflight(&semantics, at, "renamed_thing").expect_err(what);
|
||||
assert_eq!(fast, "there is no symbol to rename at this position.", "{what}");
|
||||
assert_eq!(fast, rename(&sources, &path, at, "renamed_thing").expect_err(what), "{what}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn an_unresolved_and_an_inherited_reference_keep_their_own_sentences() {
|
||||
let files = [("stray.sv", STRAY), ("sub.sv", SUB)];
|
||||
rename_oracle(&files, "stray.sv");
|
||||
|
||||
// Which byte carries which refusal is the binder's business, so the
|
||||
// fixture is swept for the two sentences rather than told where they are —
|
||||
// and both must be found, or the fixture has stopped exercising them.
|
||||
let sources = workspace(&files);
|
||||
let path = PathBuf::from("stray.sv");
|
||||
let semantics = analyze(&parse_source_tolerant(STRAY).0, STRAY);
|
||||
let (mut unresolved, mut inherited) = (0usize, 0usize);
|
||||
for at in 0..=STRAY.len() as u32 {
|
||||
let Err(fast) = rename_preflight(&semantics, at, "renamed_thing") else { continue };
|
||||
if fast.contains("is not resolved to any declaration") {
|
||||
unresolved += 1;
|
||||
} else if fast.contains("could only come from the base class") {
|
||||
inherited += 1;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
let slow = rename(&sources, &path, at, "renamed_thing").expect_err("the same refusal");
|
||||
assert_eq!(fast, slow, "at byte {at} of stray.sv");
|
||||
}
|
||||
assert!(unresolved > 0, "the fixture no longer holds a reference that resolves to nothing");
|
||||
assert!(inherited > 0, "the fixture no longer holds an inherited candidate");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_macro_invocation_and_a_generate_block_keep_parity() {
|
||||
rename_oracle(&[("gen.sv", GEN), ("sub.sv", SUB)], "gen.sv");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_buffer_that_does_not_parse_keeps_parity() {
|
||||
rename_oracle(&[("broken.sv", BROKEN), ("sub.sv", SUB)], "broken.sv");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_package_and_its_qualified_users_keep_parity() {
|
||||
let files = [("pkg.sv", PKG), ("user.sv", USER)];
|
||||
rename_oracle(&files, "user.sv");
|
||||
rename_oracle(&files, "pkg.sv");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_name_declared_in_two_files_stays_on_the_slow_road() {
|
||||
// Two modules called `sub`. The ambiguity is the *index's* answer, and the
|
||||
// index is rebuilt on save, never on a keystroke — so the preflight must
|
||||
// not take this refusal, and the sweep must show it deferring instead.
|
||||
let files = [("a.sv", SUB), ("b.sv", SUB), ("top.sv", TOP)];
|
||||
let (_, deferred) = rename_oracle(&files, "top.sv");
|
||||
assert!(deferred > 0, "the ambiguous declaration must reach the workspace to be refused");
|
||||
|
||||
let sources = workspace(&files);
|
||||
let path = PathBuf::from("top.sv");
|
||||
let semantics = analyze(&parse_source_tolerant(TOP).0, TOP);
|
||||
let at = TOP.find("sub #").expect("the instantiation") as u32;
|
||||
assert!(
|
||||
rename_preflight(&semantics, at, "renamed_thing").is_ok(),
|
||||
"the preflight must stand aside for a name the index answers ambiguously"
|
||||
);
|
||||
assert!(rename(&sources, &path, at, "renamed_thing").is_err(), "and the workspace refuses it");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn renaming_a_symbol_to_the_name_it_already_has_is_refused_from_the_buffer() {
|
||||
let files = [("sub.sv", SUB), ("top.sv", TOP)];
|
||||
let sources = workspace(&files);
|
||||
let path = PathBuf::from("sub.sv");
|
||||
let semantics = analyze(&parse_source_tolerant(SUB).0, SUB);
|
||||
// `local_net` is a declaration inside the module — not at file scope, so
|
||||
// no index question stands between the cursor and this refusal.
|
||||
let at = SUB.find("local_net").expect("the declaration") as u32;
|
||||
let fast = rename_preflight(&semantics, at, "local_net").expect_err("the same name");
|
||||
assert_eq!(fast, "`local_net` is the name it already has.");
|
||||
assert_eq!(fast, rename(&sources, &path, at, "local_net").expect_err("the same name"));
|
||||
|
||||
// A file-scope unit's same-name refusal is the index's to reach, because
|
||||
// the ambiguity check comes first.
|
||||
let at = SUB.find("sub").expect("the module name") as u32;
|
||||
assert!(rename_preflight(&semantics, at, "sub").is_ok(), "deferred, not taken");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn an_invalid_new_name_outranks_every_cursor_refusal() {
|
||||
// Precedence: `renaming` checks the new name before it builds a scope and
|
||||
// before it looks at the cursor, so a bad name on a cursor that sits on
|
||||
// nothing must produce the *name's* sentence, not the cursor's.
|
||||
let files = [("prose.sv", PROSE), ("sub.sv", SUB)];
|
||||
let sources = workspace(&files);
|
||||
let path = PathBuf::from("prose.sv");
|
||||
let semantics = analyze(&parse_source_tolerant(PROSE).0, PROSE);
|
||||
let at = PROSE.find("a leading line").expect("the comment") as u32;
|
||||
for (name, expected) in [
|
||||
("", "a new name cannot be empty."),
|
||||
("module", "`module` is a Verilog keyword."),
|
||||
("1bad", "`1bad` is not a valid Verilog identifier."),
|
||||
] {
|
||||
let fast = rename_preflight(&semantics, at, name).expect_err(name);
|
||||
assert_eq!(fast, expected, "{name}");
|
||||
assert_eq!(fast, rename(&sources, &path, at, name).expect_err(name), "{name}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_preflight_reads_only_the_buffer_it_was_given() {
|
||||
// The proof behind the gate: resolving a cursor that sits on nothing costs
|
||||
// no whole-file parse at all, however large the workspace around it.
|
||||
let semantics = analyze(&parse_source_tolerant(PROSE).0, PROSE);
|
||||
let at = PROSE.find("a leading line").expect("the comment") as u32;
|
||||
let before = vlog_parser::stats::parses();
|
||||
let refusal = rename_preflight(&semantics, at, "renamed_thing").expect_err("no symbol");
|
||||
assert_eq!(vlog_parser::stats::parses() - before, 0, "the preflight parsed something");
|
||||
assert_eq!(refusal, "there is no symbol to rename at this position.");
|
||||
}
|
||||
@@ -0,0 +1,375 @@
|
||||
# Implementation Plan: 0.52.0 Performance Review Follow-Up
|
||||
|
||||
## Executive Summary
|
||||
|
||||
An independent review of release `0.52.0` (commit [`3ceba21`](performance_052_review.md)) confirmed major performance improvements over `0.51.0` (e.g., unchanged menu filtering reduced from 24.3 ms to 0.32 ms, queued definition unblocked from 24.4 ms to 0.29 ms, no-symbol preflight reduced from 2.2 s to 0.22 ms, tail rename cut by 17.1%, and server-reported loaded scan time cut by ~58%).
|
||||
|
||||
However, the review uncovered one correctness defect (**F1**) and two benchmark measurement defects (**F2**, **F3**), alongside five architectural guidance points and three unmeasured candidate performance areas (**N1**, **N2**, **N3**):
|
||||
1. **F1 (P2 Correctness):** Split startup discovery duplicates modules behind directory aliases (symlinks), breaking startup/rescan equivalence and blocking valid renames until a full rescan.
|
||||
2. **F2 (P2 Harness):** Standalone `scanload` on a fresh storage directory includes an unprimed cold trial under a warm label (0 hits / 3,974 misses).
|
||||
3. **F3 (P2 Harness):** `scanload` completion and mid-scan classifications conflate client request window chatter with true scan completion.
|
||||
4. **Architectural & Performance Next Actions (Items 3–5 & N1–N3):**
|
||||
- **Item 3 / N1:** Retain the lint snapshot; target the remaining 114 ms first-after-edit cost via dirty-buffer lexer/parser/analysis work reduction.
|
||||
- **Item 4 / N2:** Retain engine-owned preflight and content-tied `KnownFacts` reuse; target the 163 ms scope construction (31 ms store decode) and the 1,251-file / 2.88 s common-port rename (`clk_i`).
|
||||
- **Item 5 / N3:** Retain startup ordering and publication cadence (subject to F1); target publication merge cost (`WorkspaceIndex::absorb`) before considering tighter publication intervals.
|
||||
|
||||
This plan details the technical design, contracts, verification matrix, and sequencing to address these findings without regressing existing performance or breaking repository invariants.
|
||||
|
||||
---
|
||||
|
||||
## User Review Required
|
||||
|
||||
> [!IMPORTANT]
|
||||
> **Zero Source Code Changes in This Planning Phase:** As requested, no source code, test, or harness files have been modified. Execution requires explicit approval of this implementation plan.
|
||||
|
||||
> [!WARNING]
|
||||
> **F1 Fix Strategy (Directory Identity & Path-Selection Contract):** Split startup discovery was introduced to provide immediate responsiveness (78 ms cold / 114 ms warm first answer) by leading with open buffer folders. When a directory has symlink aliases sorting before its real path (e.g. `a_alias -> z_real`), split discovery cannot unilaterally pick `z_real` without diverging from the canonical root walk which selects `a_alias`. The approved strategy is:
|
||||
> 1. Share directory identity (`DirId`) between the neighbourhood walk and root walk.
|
||||
> 2. If an alias sorting before the target is detected (or equivalent path selection cannot be proven ahead of the root walk), execute a bounded fallback to the full single root walk (which runs in <1 ms on test fixtures and ~158 ms on OpenTitan), ensuring 100% path and declaration equivalence across startup, rescan, and restart.
|
||||
|
||||
---
|
||||
|
||||
## Technical Analysis of Findings & Next Actions
|
||||
|
||||
### 1. F1: Split Startup Discovery Duplicates Modules Behind Directory Aliases
|
||||
- **Location:** `crates/lucisv_server/src/state/discover.rs:429-560` (`first_scope`, `neighbourhood_files`, `walked_rest`, `rest_of_scope`), and `crates/lucisv_core/src/walk.rs:121-164` (`collect_files_below`).
|
||||
- **Mechanism:**
|
||||
1. Regular single root walk maintains `Walk.visited: HashSet<DirId>` (`DirId` is `(u64, u64)` dev/ino on Unix, canonical `PathBuf` elsewhere). It enters each directory identity once and yields files under the first path spelling encountered.
|
||||
2. In `first_scope`, `neighbourhood_files` calls `collect_files_below`, which instantiates its own `Walk` with a fresh `visited` set. If `z_real/tb.sv` is open, it walks `z_real`, finding `z_real/child.sv`.
|
||||
3. `first_scope` records `seen: HashSet<PathBuf>` containing `z_real/child.sv`.
|
||||
4. Later, `rest_of_scope` runs `collect_files_with` from workspace root with another fresh `visited` set. The root walk visits `a_alias` first (alphabetically before `z_real`). It discovers `a_alias/child.sv`.
|
||||
5. Filtering in `rest_of_scope` only checks `seen.contains(&found.path)`. Because `a_alias/child.sv != z_real/child.sv`, `a_alias/child.sv` is kept!
|
||||
6. The index now contains both `z_real/child.sv` and `a_alias/child.sv`. Definition returns two targets; `prepareRename` refuses because `child` is declared in multiple indexed files.
|
||||
7. On whole rescan, a single root walk runs (`first_scope` is bypassed for `trace.number > 1`), discovering only `a_alias/child.sv`. Thus startup and rescan disagree.
|
||||
8. Furthermore, `HEAD_WALK_MAX` fallback unconditionally calls `files.extend(head)`, which unions the disjoint walks and reproduces the duplicate bug even when falling back.
|
||||
|
||||
### 2. F2: Standalone Warm Scanload Unprimed First Trial
|
||||
- **Location:** `tools/perf/phases_r4.py:237-260` (`load_cell`), and `tools/perf/lspclient.py:105-110` (`Session.__enter__`).
|
||||
- **Mechanism:**
|
||||
1. When running `scanload` standalone with `--storage <dir>`, `load_cell` sets `cold=(cache == "cold")`.
|
||||
2. For `cache == "warm"`, `cold=False`. `Session.__enter__` calls `os.makedirs(self.storage, exist_ok=True)`.
|
||||
3. If `<dir>` is newly created, it contains no index cache.
|
||||
4. Trial 1 runs cold (0 hits / 3,974 misses, 1,684 ms parse time) and populates the cache.
|
||||
5. Trial 2 runs warm (3,974 hits / 0 misses, 0 ms parse time).
|
||||
6. The harness groups Trial 1 and Trial 2 under the single warm label.
|
||||
|
||||
### 3. F3: Conflation of Scan Completion with Client Request Window
|
||||
- **Location:** `tools/perf/phases_r4.py:128-139` (`settled_at`), consumed by `summary` (lines 178–205).
|
||||
- **Mechanism:**
|
||||
1. `settled_at` calls `s.wait_quiet(QUIET)` after the fixed request window (3,500 ms).
|
||||
2. In `tools/perf/lspclient.py:334-355`, `wait_quiet` checks `len(self.notifications)`.
|
||||
3. A `--verbose` server emits `window/logMessage` lines for requests and timings. Furthermore, `wait_quiet` measures `last - started`, which due to clock reads is always `> 0.0`.
|
||||
4. Consequently, `last = entered + more / 1000.0 if more > 0.0 else quiet_at` always selects `entered + more`, anchoring the settle timestamp at ~3,406 ms regardless of whether the scan ended at 1,770 ms.
|
||||
5. In `summary`, responses are filtered with `a["at"] <= run["settle"]`. All 105 responses fall inside 3,400 ms, classifying 100% of responses as "mid-scan" and 0 as "after-settle".
|
||||
|
||||
### 4. Implementation Assessment Items 3, 4, 5 and Candidate Experiments N1, N2, N3
|
||||
- **Item 3 & N1 (First Action After Edit):**
|
||||
- Lint snapshot in `crates/lucisv_server/src/lint_snapshot.rs` caches clean results (0.23 ms repeat).
|
||||
- First-after-edit costs 113.6 ms because `crates/lucisv_server/src/state/mod.rs:715` invokes `Document::new`, which unconditionally runs `tokenize`, `parse_tolerant`, `collect_defines`, `analyze`, `resolve_external`, and `LineIndex::new` over the full 42,000-line buffer.
|
||||
- Work reduction must target tokenization/parsing/analysis allocations on edited buffers without breaking AST fidelity.
|
||||
- **Item 4 & N2 (Scope Construction, Facts Decode & Common-Port Rename):**
|
||||
- Tail rename scope stage: 163 ms total, with 31 ms in `known.facts_for` (store deserialization) and ~100 ms parsing the 134 kept files.
|
||||
- Common port rename (`clk_i`): 1,251 files mention `clk_i`, requiring 1,251 full parses and semantic analyses (2.88 s wall time, 1.8 GiB peak RSS).
|
||||
- Optimization target: Streamlined deserialization of `KnownFacts` and lighter-weight analysis retention for files whose AST is only needed for identifier occurrence verification.
|
||||
- **Item 5 & N3 (Quiet Scan & Publication Cost):**
|
||||
- A startup scan under load publishes staged records via `crates/lucisv_server/src/state/mod.rs:1183` (`publish_scan`).
|
||||
- Each publication calls `WorkspaceIndex::absorb`, which calls `self.merge(None)`—a full whole-index merge of all symbols and definitions across the entire workspace.
|
||||
- While `PUBLISH_EVERY = 512` reduced publication frequency, each publication still incurs the ~70 ms whole-index merge. Reducing publication cost requires targeted incremental symbol merging in `vlog_semantic`.
|
||||
|
||||
---
|
||||
|
||||
## Detailed Implementation Plan
|
||||
|
||||
### Phase 1: Correctness Fixes & Harness Repairs (F1, F2, F3)
|
||||
|
||||
```
|
||||
[Phase 1 Sequencing]
|
||||
┌─────────────────────────────────────────────────────────────┐
|
||||
│ Step 1.1: Fix F1 (lucisv_core::walk & server discover state)│
|
||||
└──────────────────────────────┬──────────────────────────────┘
|
||||
│
|
||||
┌──────────────────────────────▼──────────────────────────────┐
|
||||
│ Step 1.2: Fix F2 (Harness warm priming & cache hit counters)│
|
||||
└──────────────────────────────┬──────────────────────────────┘
|
||||
│
|
||||
┌──────────────────────────────▼──────────────────────────────┐
|
||||
│ Step 1.3: Fix F3 (True scan-completion & response partition)│
|
||||
└─────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
#### Step 1.1: Fix F1 — Directory Identity and Path Selection Across Split Discovery
|
||||
|
||||
##### 1. Handshake & Architecture Amendments (`docs/topo.md`)
|
||||
- **Amend `lucisv_core::walk` API:**
|
||||
Add a directory identity tracking type and update `collect_files_below` / `collect_files_with`:
|
||||
```rust
|
||||
// In crates/lucisv_core/src/walk.rs
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct WalkIdentity {
|
||||
pub dir_id: DirId,
|
||||
pub canonical_path: PathBuf,
|
||||
}
|
||||
|
||||
/// Shared directory identity tracker across walks.
|
||||
#[derive(Default, Debug)]
|
||||
pub struct DirectoryTracker {
|
||||
visited: HashMap<DirId, PathBuf>,
|
||||
}
|
||||
|
||||
impl DirectoryTracker {
|
||||
pub fn new() -> Self;
|
||||
pub fn is_visited(&self, dir: &Path) -> bool;
|
||||
pub fn record_or_check(&mut self, dir: &Path) -> Option<&PathBuf>;
|
||||
}
|
||||
|
||||
pub fn collect_files_below_tracked(
|
||||
root: &Path,
|
||||
input: &Path,
|
||||
exclude: &[String],
|
||||
gitignore: bool,
|
||||
tracker: &mut DirectoryTracker,
|
||||
found: &mut dyn FnMut(PathBuf, Option<u64>),
|
||||
warn: &mut dyn FnMut(Warning),
|
||||
) -> Result<(), String>;
|
||||
|
||||
pub fn collect_files_with_tracker(
|
||||
input: &str,
|
||||
exclude: &[String],
|
||||
gitignore: bool,
|
||||
tracker: &mut DirectoryTracker,
|
||||
found: &mut dyn FnMut(PathBuf, Option<u64>),
|
||||
warn: &mut dyn FnMut(Warning),
|
||||
) -> Result<(), String>;
|
||||
```
|
||||
|
||||
##### 2. Server Discovery Repair (`crates/lucisv_server/src/state/discover.rs`)
|
||||
- **Modify `neighbourhood_files` and `PendingDiscovery`:**
|
||||
- `neighbourhood_files` passes a `&mut DirectoryTracker` into `collect_files_below_tracked`.
|
||||
- Store the populated `DirectoryTracker` in `PendingDiscovery`.
|
||||
- **Pre-check Path Selection Equivalence:**
|
||||
- When inspecting the workspace roots, check if any directory entry in the root is a symlink pointing to an ancestor/sibling of the neighbourhood directory that sorts before the neighbourhood path.
|
||||
- If an alias sorting *before* the target exists (such as `a_alias -> z_real`), split discovery cannot unilaterally index `z_real` without violating the root walk's canonical path choice.
|
||||
- In this case, **trigger the bounded fallback**: discard the partial neighbourhood and execute a single root walk (`self.collect_sources(...)`), returning `(sources, None)`.
|
||||
- **Repair `HEAD_WALK_MAX` Fallback:**
|
||||
- In `first_scope` (lines 450–459), when `head.len() > HEAD_WALK_MAX`:
|
||||
**Do NOT union `head` and `walked_rest`!**
|
||||
Instead, discard `head` and execute `self.collect_sources(watch, HeldAnalyses::Wanted, trace)`, returning `(sources, None)`.
|
||||
- **Modify `rest_of_scope`:**
|
||||
- Use the `DirectoryTracker` from `PendingDiscovery` during the root walk so any directory identity already visited in the neighbourhood walk is recognized and not re-entered under an alternate alias.
|
||||
- Filter `walked` files using both `seen_paths` and `seen_dir_identities`.
|
||||
|
||||
##### 3. Regression Test Fixture (`crates/lucisv_server/src/server/tests/startup.rs`)
|
||||
- Add automated integration tests replicating the review's reproduction:
|
||||
- **Fixture A (Alias sorting before target):** `workspace/a_alias -> z_real`, `workspace/z_real/{child.sv, tb.sv}`.
|
||||
- **Fixture B (Alias sorting after target):** `workspace/z_alias -> a_real`, `workspace/a_real/{child.sv, tb.sv}`.
|
||||
- **Fixture C (Multiple aliases):** `a_alias -> target`, `m_alias -> target`, `target/{child.sv}`.
|
||||
- **Fixture D (Ancestor cycle):** `workspace/sub/up -> ..`.
|
||||
- **Fixture E (Ignore rules):** `.gitignore` excluding files inside aliased directories.
|
||||
- **Fixture F (Open unsaved buffer):** Unsaved buffer open at `z_real/tb.sv` with modified text.
|
||||
- **Fixture G (True duplicates):** Genuine duplicate module declaration in two distinct physical files. Verify ambiguity refusal is preserved!
|
||||
- **Assertions:**
|
||||
1. Index file paths after startup `==` index file paths after a whole rescan `==` index file paths after restart.
|
||||
2. Definition on `child` returns exactly 1 location.
|
||||
3. `textDocument/prepareRename` on `child` is accepted.
|
||||
4. True duplicate module refusal is still refused with identical diagnostic message.
|
||||
|
||||
---
|
||||
|
||||
#### Step 1.2: Fix F2 — Standalone Warm Harness Priming & Cache Counters
|
||||
|
||||
##### 1. Untimed Priming in Harness (`tools/perf/phases_r4.py`)
|
||||
- In `load_cell(cache, buffers, rate, params, where="")`:
|
||||
```python
|
||||
def prime_storage(storage_name, extra):
|
||||
"""Perform an untimed session to prime the index cache before warm trials."""
|
||||
with session("workspace", cold=False, verbose=True, storage_name=storage_name) as s:
|
||||
s.initialize()
|
||||
open_buffers(s, extra)
|
||||
s.wait_quiet(1.5)
|
||||
s.take_notifications()
|
||||
|
||||
# Inside load_cell:
|
||||
if cache == "warm":
|
||||
# If cache store does not exist or has no valid store file:
|
||||
store_path = os.path.join(ARGS.storage, "r4-load")
|
||||
if not os.path.exists(store_path) or not os.listdir(store_path):
|
||||
prime_storage("r4-load", extra)
|
||||
```
|
||||
|
||||
##### 2. Cache Counters Recording & Assertion
|
||||
- Inspect `counts = scans[0].get("counts", {})` parsed from `traces(s)`:
|
||||
- Extract `hits = counts.get("hits", 0)` and `misses = counts.get("misses", 0)`.
|
||||
- In `summary(runs)`: Include `cache_hits: [run["hits"] for run in runs]` and `cache_misses: [run["misses"] for run in runs]`.
|
||||
- In `cell_status(got)`: If `cache == "warm"`, assert `all(h > 0 for h in got["cache_hits"])`. If any warm trial records 0 hits or unexpected misses, set `status = "error"` with diagnostic message.
|
||||
|
||||
##### 3. Verification Test
|
||||
- Execute `tools/perf/bench.py scanload` with a brand-new, non-existent `--storage` directory.
|
||||
- Verify:
|
||||
- Untimed prime runs cleanly.
|
||||
- Trial 1 and Trial 2 both report ~3,974 hits and 0 misses.
|
||||
|
||||
---
|
||||
|
||||
#### Step 1.3: Fix F3 — Decoupling Scan Completion from Client Request Window
|
||||
|
||||
##### 1. Scan-Specific Completion Timestamp (`tools/perf/phases_r4.py`)
|
||||
- **Capture True Scan Completion:**
|
||||
- The server outputs `timing: scan <n> stages (...) total=<ms>` upon scan completion, and sends `$/progress` token with `kind: "end"`.
|
||||
- In `tools/perf/lspclient.py`, record `_scan_completed_at`: the `perf_counter` timestamp when the reader thread parses the scan's final progress notification or `timing: scan` line.
|
||||
- In `phases_r4.py`:
|
||||
Replace the flawed `settled_at` logic with:
|
||||
```python
|
||||
def scan_completed_ms(s, origin):
|
||||
"""Milliseconds from `origin` to the scan's actual completion."""
|
||||
if s.scan_completed_at is not None:
|
||||
return (s.scan_completed_at - origin) * 1000.0
|
||||
# Fallback to server-reported scan total if notification timestamp unavailable:
|
||||
sc = traces(s)
|
||||
if sc and "stages" in sc[0]:
|
||||
return sc[0]["stages"].get("total", 0.0)
|
||||
return None
|
||||
```
|
||||
|
||||
##### 2. Response Partitioning in `summary`
|
||||
- Use `scan_completed_ms` to partition responses:
|
||||
```python
|
||||
inside = [a["ms"] for run in runs for a in run["answers"]
|
||||
if a["at"] <= run["scan_completed_ms"]]
|
||||
after = [a["ms"] for run in runs for a in run["answers"]
|
||||
if a["at"] > run["scan_completed_ms"]]
|
||||
```
|
||||
- Expose both in row output:
|
||||
- `mid_scan_answers = len(inside)`
|
||||
- `after_settle_answers = len(after)`
|
||||
- `mid_scan_median_ms` and `after_settle_median_ms`
|
||||
- Retain raw `a["at"]` (arrival offsets) in `results.jsonl`.
|
||||
|
||||
##### 3. Verification Test
|
||||
- Run a warm session where server scan duration is ~1,770 ms inside a 3,500 ms window.
|
||||
- Verify:
|
||||
- `settled_ms` reflects ~1,770 ms (NOT 3,406 ms).
|
||||
- Out of 35 requests, requests arriving before 1,770 ms (~17 requests) are categorized as `mid_scan_answers`, and requests arriving after 1,770 ms (~18 requests) are categorized as `after_settle_answers`.
|
||||
- Extend window to 5,000 ms: verify scan completion remains unchanged (~1,770 ms) and `after_settle_answers` increases proportionally.
|
||||
|
||||
---
|
||||
|
||||
### Phase 2: Performance Follow-Ups (Addressing Assessment Items 3–5 & N1–N3)
|
||||
|
||||
Once Phase 1 is verified and merged, the three performance investigation lanes will proceed conditionally:
|
||||
|
||||
```
|
||||
[Phase 2 Lanes]
|
||||
┌─────────────────────────────────────────────────────────────┐
|
||||
│ Lane N1: Lexer/Parser & Dirty-Buffer Analysis Work (Item 3) │
|
||||
└─────────────────────────────────────────────────────────────┘
|
||||
┌─────────────────────────────────────────────────────────────┐
|
||||
│ Lane N2: Retained-Analysis Parse Work & Scope Decode (Item 4│
|
||||
└─────────────────────────────────────────────────────────────┘
|
||||
┌─────────────────────────────────────────────────────────────┐
|
||||
│ Lane N3: Quiet Scan Decode/Merge & Publication Cost (Item 5)│
|
||||
└─────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
#### Step 2.1: Lane N1 — Lexer/Parser & Dirty-Buffer Analysis (Addressing Item 3 & N1)
|
||||
- **Baseline:** First-after-edit on `pinmux_reg_top.sv` is 113.6 ms (repeat median 0.23 ms via lint snapshot).
|
||||
- **Target:** Reduce first-after-edit time by ≥15% (stretch: <95 ms) while maintaining exact AST/diagnostic output.
|
||||
- **Approach:**
|
||||
1. Profile `Document::new`:
|
||||
- Tokenize: Measure time and allocations.
|
||||
- Parse tolerant: Inspect grammar node allocations.
|
||||
- Semantic analysis & external resolution.
|
||||
2. Optimize single-document re-tokenization / parsing:
|
||||
- Profile whether token vector reallocation in `tokenize` can reuse a pooled buffer.
|
||||
- Avoid cloning the token stream when passing from `tokenize` into `parse_tolerant` (e.g. transfer ownership or borrow).
|
||||
3. Verification:
|
||||
- Snapshot tests in `vlog_formatter` and `vlog_parser`.
|
||||
- `offeredit` benchmark phase comparing candidate vs 0.52.0 baseline.
|
||||
|
||||
#### Step 2.2: Lane N2 — Retained-Analysis Parse Work & Scope Decode (Addressing Item 4 & N2)
|
||||
- **Baseline:** Tail rename: 324.6 ms (163 ms scope stage, including 31 ms store decode). Common-port rename (`clk_i`): 2,883.7 ms, 1,251 parses, 1.78 GiB peak RSS.
|
||||
- **Target:** Reduce scope build store decode time (<20 ms) and reduce common-port parse overhead without increasing peak RSS.
|
||||
- **Approach:**
|
||||
1. **KnownFacts Store Deserialization:**
|
||||
- In `crates/lucisv_server/src/index_cache.rs`, benchmark `facts_for`.
|
||||
- Evaluate zero-copy / compact binary decoding for `FileFacts` to cut the 31 ms decode bottleneck.
|
||||
2. **Retained Analyses Work:**
|
||||
- In `crates/vlog_refactor/src/scope.rs`, investigate files in `Class::Kept`:
|
||||
- Instead of building full redundant ASTs for files where only identifier occurrence validation is needed, evaluate whether occurrence checking can run against a lighter token stream while strictly preserving warning and refusal semantics.
|
||||
3. **Verification & Guardrails:**
|
||||
- Verify byte-identical edits and warning sentences across all 8 rename shapes (`renamewarn`).
|
||||
- Monitor peak RSS under `tools/guard.sh -m 8` to guarantee peak memory does not exceed the 1.8 GiB envelope.
|
||||
|
||||
#### Step 2.3: Lane N3 — Quiet Scan & Incremental Publication Merge (Addressing Item 5 & N3)
|
||||
- **Baseline:** Warm quiet scan 1,064.7 ms, cold quiet scan 2,886.6 ms, warm loaded scan 1,771 ms.
|
||||
- **Target:** Reduce warm quiet scan below 1,000 ms and reduce publication merge overhead.
|
||||
- **Approach:**
|
||||
1. **Targeted `WorkspaceIndex::absorb`:**
|
||||
- Currently, `WorkspaceIndex::absorb` calls `self.merge(None)`, rebuilding symbol tables across all 3,976 files.
|
||||
- Implement incremental symbol table merging in `crates/vlog_semantic/src/workspace/update.rs`, only updating symbol tables for files added/modified in the batch.
|
||||
2. **Candidate Construction:**
|
||||
- Benchmark candidate table construction during publication; avoid full re-indexing of unchanged completion words.
|
||||
3. **Verification:**
|
||||
- Fingerprint equivalence: `WorkspaceIndex::fingerprint` must be identical between incremental absorb and full rebuild.
|
||||
- `scanload` and `scan` benchmark phases under corrected F2/F3 harness.
|
||||
|
||||
---
|
||||
|
||||
## File Modification Map
|
||||
|
||||
| Component / Layer | Action | Target File | Description |
|
||||
|---|---|---|---|
|
||||
| `lucisv_core` (Walk) | `[MODIFY]` | `crates/lucisv_core/src/walk.rs` | Add `DirectoryTracker` and expose directory identity (`DirId`) tracking across walks |
|
||||
| `lucisv_server` (State) | `[MODIFY]` | `crates/lucisv_server/src/state/discover.rs` | Use `DirectoryTracker`, fix `first_scope`, repair `HEAD_WALK_MAX` fallback, ensure alias equivalence |
|
||||
| `lucisv_server` (State) | `[MODIFY]` | `crates/lucisv_server/src/state/scan.rs` | Update `PendingDiscovery` to hold `DirectoryTracker` |
|
||||
| `lucisv_server` (Tests) | `[MODIFY]` | `crates/lucisv_server/src/server/tests/startup.rs` | Add F1 symlink regression matrix (alias before/after, cycle, ignores, unsaved buffer) |
|
||||
| Documentation | `[MODIFY]` | `docs/topo.md` | Record amended `lucisv_server ──▶ lucisv_core` walk handshake |
|
||||
| Perf Tools (Harness) | `[MODIFY]` | `tools/perf/phases_r4.py` | Fix F2 (untimed warm priming & cache counters) and F3 (scan completion timestamping & response partition) |
|
||||
| Perf Tools (Client) | `[MODIFY]` | `tools/perf/lspclient.py` | Record reader-thread scan completion instant `_scan_completed_at` |
|
||||
| Performance Tracking | `[MODIFY]` | `docs/perf/take5-tracking.md` | Update experiment logs and status for F1, F2, F3 |
|
||||
|
||||
---
|
||||
|
||||
## Verification & QA Plan
|
||||
|
||||
### Automated Correctness & Quality Gates
|
||||
Every step will be verified using the repository's runaway guard:
|
||||
```bash
|
||||
# Code formatting
|
||||
cargo fmt --all -- --check
|
||||
|
||||
# Strict Clippy validation
|
||||
tools/guard.sh -m 8 -t 1800 -- cargo clippy --workspace --all-targets --locked -- -D warnings
|
||||
|
||||
# Full workspace test suite (must meet or exceed 4,374 passed, 0 failed, 45 ignored)
|
||||
tools/guard.sh -m 8 -t 1800 -- cargo test --workspace --locked
|
||||
```
|
||||
|
||||
### Specialized Correctness Assertions for F1
|
||||
Run the dedicated startup test suite:
|
||||
```bash
|
||||
tools/guard.sh -m 8 -t 1800 -- cargo test -p lucisv_server --test server_tests startup
|
||||
```
|
||||
Assert that:
|
||||
1. `alias_sorting_before_target`: `a_alias -> z_real`. Index paths, definition targets, and `prepareRename` match between startup, whole rescan, and restart.
|
||||
2. `alias_sorting_after_target`: `z_alias -> a_real`. Same equivalence check.
|
||||
3. `multiple_aliases`: Multiple symlinks to single target directory do not produce duplicate entries.
|
||||
4. `ancestor_cycle`: Cyclic symlinks terminate safely without duplicate entries.
|
||||
5. `genuine_duplicate_declarations`: Genuine collisions in distinct files remain ambiguous and correctly refused.
|
||||
|
||||
### Benchmark & Harness Verification for F2 and F3
|
||||
1. **F2 Warm Priming Verification:**
|
||||
```bash
|
||||
tools/guard.sh -m 8 -t 1800 -- python3 tools/perf/bench.py scanload --storage /tmp/test-fresh-store --tries 2
|
||||
```
|
||||
Assert that:
|
||||
- Untimed prime runs automatically.
|
||||
- Both Trial 1 and Trial 2 report ~3,974 cache hits and 0 misses.
|
||||
2. **F3 Scan Completion Verification:**
|
||||
```bash
|
||||
tools/guard.sh -m 8 -t 1800 -- python3 tools/perf/bench.py scanload --tries 3
|
||||
```
|
||||
Assert that:
|
||||
- `settled_ms` reflects server scan duration (~1,770 ms), not 3,400 ms.
|
||||
- Responses are partitioned correctly into `mid_scan_answers` and `after_settle_answers`.
|
||||
- Extending fixed window from 3,500 ms to 5,000 ms keeps `settled_ms` constant while increasing `after_settle_answers`.
|
||||
@@ -531,3 +531,14 @@ that a pathological scheduler could in principle defeat it and right not
|
||||
to weaken it; the property is the point of the test, the risk is
|
||||
unreproduced in twelve runs, and if CI ever trips it the QA log already
|
||||
contains the analysis. This completes §9b. Accepted as shipped.
|
||||
|
||||
### 2026-09-08 — the deferred set (perf5r-publication, lead)
|
||||
|
||||
A navigation request whose answer was empty while the startup scan was
|
||||
still growing is put in `Server::deferred` and asked again at the next
|
||||
publish (`docs/features/perf5r-publication/README.md`). Such a request is
|
||||
in no burst, so the burst's own cancel rule (`cancelled_in`) cannot see
|
||||
it; `Server::cancel_deferred` honours a `$/cancelRequest` naming it where
|
||||
the cancel lands — answered `RequestCancelled` at once, removed, never
|
||||
asked again. Every request still gets exactly one response. Found by QA;
|
||||
pinned by `a_cancel_for_a_deferred_request_answers_it_cancelled_and_forgets_it`.
|
||||
@@ -81,6 +81,11 @@ parser** a push does, so the two paths cannot drift.
|
||||
describes only an answer that arrives after the 2 s bound
|
||||
(`CONFIGURATION_WAIT`), which is then an ordinary settings change with an
|
||||
ordinary rescan behind it.
|
||||
**2026-09-08 (perf5r-first-answer):** and the staging window now also
|
||||
holds `OPENING_FILE_WAIT` (25 ms) for the editor's opening `didOpen`, so a
|
||||
buffer that arrives just after the configuration answer still orders the
|
||||
first scan around its folder; a session whose opening burst already holds
|
||||
a `didOpen` spends none of it.
|
||||
**2026-08-27:** `lucisv.index.maxFileSize` joins those two — a pulled cap
|
||||
that differs from the 1 MiB default costs the same one extra rescan — and
|
||||
`lucisv.index.logFiles` shows the other face of the same fact: the startup
|
||||
|
||||
@@ -642,6 +642,43 @@ is read either way, so an mtime match could only ever have saved this.
|
||||
|
||||
## Work log
|
||||
|
||||
### 2026-09-08 — §61.3: the store open, split into its parts (measured, unchanged)
|
||||
|
||||
**Nothing in this feature changed.** With §61.3 putting the workspace walk
|
||||
*behind* the first useful answer, `IndexCache::open` became the largest thing
|
||||
left in front of it — 89 ms of a 115 ms warm answer — so the review's "measure
|
||||
a bounded local-record loading design before proposing a format change" clause
|
||||
came live. It was measured, against the real 46 486 433-byte OpenTitan store
|
||||
(3 977 records, page-cached), with a throwaway instrumented build:
|
||||
|
||||
| part of `IndexCache::open` | ms |
|
||||
|---|---:|
|
||||
| `read` — the whole 46.5 MB | **6.31** |
|
||||
| line split into 3 977 slices | **14.93** |
|
||||
| extracting every line's path field (no checksum, no allocation) | **2.27** |
|
||||
| **verifying every record's checksum** (FNV-1a over ~45 MB) | **60.99** |
|
||||
|
||||
**73 % of the open is verifying records the answer will never look at.** A
|
||||
bounded local load — paths first, then decode only the neighbourhood's ~124
|
||||
records — costs about **26 ms** and would take the warm first answer to roughly
|
||||
50. It is bounded, and it needs **no format change**.
|
||||
|
||||
It was **not implemented**, and the reason is this README's own accounting. The
|
||||
61 ms is owed either way: the other 3 852 records must be verified before the
|
||||
scan can hit them, so lazy verification moves cost rather than removing it. What
|
||||
it *changes* is [`Load::canonical`](#the-store-format) — `dropped` counts the
|
||||
records the checksum rejects, and a load that has not verified them cannot say
|
||||
whether the file it holds is the file `compact` would write. That single flag
|
||||
is what §P4b's compaction skip rests on, and what makes "the store is
|
||||
byte-identical across warm sessions" true (28 stores, three hashes, both
|
||||
binaries, §61.3). It also changes an answer in the attack matrix below: under
|
||||
lazy verification a **corrupt later line for a path would displace a good
|
||||
earlier one** instead of being dropped at load, so
|
||||
`a_corrupt_record_is_dropped_and_the_rest_of_the_store_is_not` would need
|
||||
re-attacking rather than re-running. That is an experiment with its own QA, not
|
||||
a rider on a latency lane. Filed with these numbers in
|
||||
`docs/features/perf5r-first-answer/README.md`.
|
||||
|
||||
### 2026-08-27 — dev agent (a persistent index cache with crash/reopen resume)
|
||||
|
||||
- **The key is the content and only the content, and that is the round's one
|
||||
|
||||
@@ -606,6 +606,44 @@ and it is where the measured cost was.
|
||||
|
||||
## Work log
|
||||
|
||||
### 2026-09-08 — §61.3: the workspace rung is discovered in two goes
|
||||
|
||||
**The scope is unchanged; when it is resolved is not.** A rung-2 session with a
|
||||
buffer already open now walks the folders that buffer raises to **first**,
|
||||
indexes and publishes them, and walks the rest of the workspace afterwards —
|
||||
one scan, one work list, every file stepped once, `gone` computed against the
|
||||
whole of it (`docs/features/perf5r-first-answer/README.md`). The first useful
|
||||
definition went from 301 ms warm / 266 cold to **115 / 78**.
|
||||
|
||||
Three things in this README's territory, and all three are "the same rule,
|
||||
asked earlier":
|
||||
|
||||
- **The rung is unchanged.** The split is taken only when rung 2 is in force,
|
||||
so a filelist and the folder rung resolve exactly as they did. `scopes`, eight
|
||||
requests × three scopes × both binaries: 24 of 24 result counts equal, and
|
||||
the persistent store is byte-identical.
|
||||
- **The head obeys the root's rules.** A walk starting at `hw/ip/aes` reads no
|
||||
`.gitignore` above itself, and this README's own note — "a rule written in a
|
||||
root's `.gitignore` does not apply to a rung-3 walk that starts below it" —
|
||||
is a statement about *rung 3*, where the folder **is** the scope. Under
|
||||
rung 2 the root is the scope, so the folder half of one scan must obey the
|
||||
root's rules or the two halves disagree about which files exist.
|
||||
`lucisv_core::walk::collect_files_below` carries the ancestor ignore stack
|
||||
down and refuses an ancestor the root walk would not have entered;
|
||||
`the_split_head_obeys_a_gitignore_written_at_the_workspace_root` is the wire
|
||||
test.
|
||||
- **The bound is `worth_waiting`'s own, asked without the total.** A scan that
|
||||
has not walked the workspace cannot ask whether its head is a minority of it,
|
||||
so the split is refused unless every raised folder is a **strict** descendant
|
||||
of a workspace root — the case that rule exists for — and again if the walk
|
||||
finds more than 512 files there. Refused, the scan is byte-for-byte the one
|
||||
before this round.
|
||||
|
||||
The size cap now reads the length the walk already stat'd
|
||||
(`lucisv_core::walk::collect_files_with`): 3 979 `metadata` calls per scan
|
||||
became **0**, worth a measured 6.9 ms of a 165 ms discovery. A filelist entry
|
||||
is not walked and still stats once, exactly as before.
|
||||
|
||||
### 2026-09-08 — §P4b3: the read moment, and the order the walk is indexed in
|
||||
|
||||
**Two documented behaviours moved. The scope ladder itself — precedence, the
|
||||
|
||||
@@ -345,6 +345,34 @@ nine sizes, and a real 1100-file workspace end to end.
|
||||
|
||||
## Work log
|
||||
|
||||
### 2026-09-08 — §61.3: no report while the denominator can still grow
|
||||
|
||||
**Amends the denominator assumption, and keeps both of its properties.** A
|
||||
workspace-scoped startup with a buffer open now takes its work list in two
|
||||
goes — the user's own folder, then the rest of the workspace
|
||||
(`docs/features/perf5r-first-answer/README.md`) — so for the length of that
|
||||
head, "what this scan will do" is not yet known.
|
||||
|
||||
The rule this README states is *"the percentage only counts up, and every one
|
||||
of them is measured"*, and a growing denominator breaks both: 124/124 followed
|
||||
by 125/3 976 is a bar that falls from 100 % to 3 %. Neither of the review's two
|
||||
suggestions was taken — a second `$/progress` token would put two bars on one
|
||||
scan, and a "known so far" denominator is exactly the invented percentage
|
||||
`begin_indexing` refuses. What ships instead costs nothing: **the bar token is
|
||||
withheld while the work list can still grow**. `IndexWatch::tick` needs the
|
||||
token and returns early without one; `IndexWatch::say` does not, so **every
|
||||
file of the head is still named in the per-file log**. The client sees the
|
||||
`begin` (which has carried no percentage since it was written), then the log,
|
||||
then the first *measured* report — against the finished work list, counting up
|
||||
from there. The last file still always reports.
|
||||
|
||||
`the_bar_paints_no_percentage_until_the_denominator_is_final` asserts all
|
||||
three: the sequence never falls, the first report is not the head's own 50 %,
|
||||
and both the buffer's step and its folder's are in the log.
|
||||
|
||||
The skip count is unaffected: the head's skips and the rest's are summed onto
|
||||
the same scan, and the end message names the total as it always did.
|
||||
|
||||
### 2026-08-27 — dev agent (indexing UX: cap, counting bar, per-file log)
|
||||
|
||||
- **`vlog_semantic`: builder, not callback — and the reason is `FileId`.**
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,602 @@
|
||||
# perf5r-lint-snapshot — the code-action path on a large file
|
||||
|
||||
Take 5 **review** round (`docs/performance_take5_review.md` §1), TODO §61.2,
|
||||
tracker rows **R1b** (the stage trace) and **R1a** (the lint-result snapshot).
|
||||
Baseline is 0.51.0; the paired reference for this lane is trunk at `51cbfd2`,
|
||||
which is 0.51.0 plus §61.1's rename preflight — a change on the rename path
|
||||
that this lane does not touch.
|
||||
|
||||
## Goal
|
||||
|
||||
A `textDocument/codeAction` on a comment in `pinmux_reg_top.sv` (42 192 lines,
|
||||
1.3 MB, generated) costs **25 ms**, of which **23 ms is the quickfix family**,
|
||||
and the first request after a one-character edit costs **136 ms**. The review's
|
||||
own reading is that `lint.rs::fixable` calls `lint_with` on every request and
|
||||
nothing memoizes the result; take 5 §P1's lane deferred that memo because "its
|
||||
key is a different shape from anything else in this lane" and its failure mode
|
||||
is a **stale fix offer**.
|
||||
|
||||
This lane does the two halves the review asks for, in its order:
|
||||
|
||||
* **R1b, first: measure.** One `timing: codeaction …` line per request behind
|
||||
`--verbose`, splitting the request into config discovery, `LintRun` build,
|
||||
lint pass, fence filter and action serialization — and, separately, the
|
||||
**flush**: the debounced `Document` rebuild that `answer_request` performs
|
||||
before any handler runs, with the diagnostics pass that publishes inside it
|
||||
split the same five ways. No behaviour change.
|
||||
* **R1a, then: reuse.** One lint-result snapshot per open `Document`, keyed by
|
||||
every input the result depends on, read by the **diagnostics** pass and by
|
||||
**quick-fix discovery** alike, recomputed whenever the key does not match.
|
||||
The fence authority and execute-time validation are untouched.
|
||||
|
||||
**What must not move:** which diagnostics are published, which fixes are
|
||||
offered, and their bytes. A menu that is fast because it is stale is a
|
||||
failure, and so is a fix offered for a finding the current buffer no longer
|
||||
has.
|
||||
|
||||
## What the measurement said (R1b)
|
||||
|
||||
`tools/perf/phases_r1.py::actionprofile`, three cursors, four request shapes,
|
||||
`--verbose`, one warm session each. Milliseconds, `--tries 3`, repeat median
|
||||
of the wire time and the trace of the last request.
|
||||
|
||||
| pinmux comment | wire | flush wall | flush parses | flush lint | action config | action build | action lint | fence | serialize |
|
||||
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
||||
| first request of the session | 25.10 | 0.00 | 0 | 0.00 | 0.20 | 0.06 | **22.43** | 0.00 | 0.05 |
|
||||
| repeated, unchanged buffer | 21.97 | 0.00 | 0 | 0.00 | 0.04 | 0.01 | **20.87** | 0.00 | 0.03 |
|
||||
| definition queued behind it | 22.33 | 0.00 | 0 | 0.00 | 0.04 | 0.02 | **20.96** | 0.00 | 0.03 |
|
||||
| first request after a `didChange` | 127.54 | **99.72** | 1 | **21.08** | 0.03 | 0.01 | **20.22** | 0.00 | 0.03 |
|
||||
|
||||
Read off those numbers:
|
||||
|
||||
* **The 23 ms is the rules.** Config discovery — the `lucisv.toml` walk,
|
||||
`ProjectLint::read` and the waiver reads — is **0.04 ms** on a repeat
|
||||
(0.20 ms on the first request of a session, which is the OS cache warming).
|
||||
The `LintRun` build is 0.01–0.06 ms. The fence filter costs **nothing**:
|
||||
this buffer has **zero** violations, so §P1a's "no fix, no fence parse" gate
|
||||
answers before the memo is asked. Serialization is 0.03 ms. **99% of the
|
||||
quickfix menu is `lint_with`.**
|
||||
* **Which rules.** `tools/perf/phases_r1.py::ruleablation` pushes
|
||||
`lucisv.lint.select` one rule at a time through `didChangeConfiguration`
|
||||
and times the same quickfix-only menu under each. The floor — one cheap
|
||||
rule, so context construction and transport alone — is **1.3–1.4 ms**.
|
||||
Three rules stand out, and they are the three **semantic** ones that read
|
||||
the buffer's `Semantics` and the workspace census:
|
||||
|
||||
| rule | repeat median | over the floor |
|
||||
|---|---:|---:|
|
||||
| `unused-signal` | 9.52 | **+8.2** |
|
||||
| `undriven-net` | 8.69 | **+7.4** |
|
||||
| `multiply-driven` | 8.88 | **+7.5** |
|
||||
| every other default rule (55 of them) | 1.24–3.51 | ≤ +2.2 |
|
||||
| control, all 57 default rules | 20.19 | +18.9 |
|
||||
|
||||
The three semantic rules are effectively the whole of it; the remaining 55
|
||||
rules together account for about 2 ms. (Single-rule rows each pay the
|
||||
shared context setup once, so the three do not add up to 18.9 exactly —
|
||||
the ranking is what this row set establishes, not an exact partition.)
|
||||
* **The 136 ms first-after-edit is mostly *not* the lint pass.** Of 127.5 ms:
|
||||
**99.7 ms is the flush** (one whole-file parse and the analysis of 1.3 MB,
|
||||
plus the diagnostics publish it triggers) and **20.2 ms is the handler's own
|
||||
lint pass**. Inside the flush, the diagnostics pass is **21.1 ms** of the
|
||||
99.7 — so the `Document` rebuild itself is about **78.6 ms**, and the
|
||||
request runs **`lint_with` twice on the same revision**: once to publish
|
||||
diagnostics, once to discover quick fixes.
|
||||
|
||||
That is the review's item 4 answered with a number: **a lint cache alone
|
||||
cannot fix the 136 ms**, because 79 ms of it is `Document::new`. What a
|
||||
snapshot can take out of it is one of the two 21 ms passes.
|
||||
|
||||
The small-file controls behave as expected and are recorded in full:
|
||||
`tb.sv` 0.52 ms unchanged / 0.98 ms after a change (flush 0.49 ms), the
|
||||
`aes.sv` `aes_reg_top` cursor 3.2 ms / 4.19 ms (flush 1.10 ms).
|
||||
|
||||
## The dependency / invalidation table
|
||||
|
||||
Written **before** any cache, as the review requires. One row per input that
|
||||
can change a lint result or a fix. "How the key observes it" is the mechanism,
|
||||
not a hope; "test" is the test that flips that row and asserts a fresh result.
|
||||
|
||||
`lint_with(ctx, rules, external)` is a pure function of its three arguments,
|
||||
and `ctx = LintContext::from_parse(text, tokens, tree, line_index, path)
|
||||
.with_semantics(&doc.semantics).with_options(options).with_line_length(w)
|
||||
.with_tab_width(t)` plus the oracle. So the table below is complete by
|
||||
construction: every argument of that expression is a row.
|
||||
|
||||
| # | input | how it can change | how the key observes it | test |
|
||||
|---|---|---|---|---|
|
||||
| 1 | document text, tokens, tree, `semantics`, line index, path | `didOpen`, `didChange`, a text-carrying `didSave`, `willRenameFiles` | **identity.** The snapshot is a field on the `Document`, and `Workspace::set_document` builds a **new** `Document` for every flushed change and drops the old one. There is no revision number to compare because there is no way to hold the wrong one — the same argument `crate::fences` already rests on | `an_edited_buffer_is_relinted` |
|
||||
| 2 | `doc.large` | a buffer crossing `lucisv.largeFile.threshold` in either direction | identity (row 1: the mode is re-taken in `set_document`, which builds a new `Document`). A large buffer never reaches the pass at all: `codeAction` is answered `[]` by `large_file.rs` before any handler, and `diagnostics::all_in` returns empty | `a_large_buffer_lints_nothing_and_stores_nothing` |
|
||||
| 3 | the enabled rule set | `lucisv.lint.select` / `ignore` / `severity.<class>` / `rules.<name>` pushed by `didChangeConfiguration`; `[lint] select` / `ignore` in the buffer's `lucisv.toml` | `Key.rules`: the `&'static str` names the ladder produced, in registry order, compared **exactly** (not hashed) | `a_pushed_rule_selection_is_relinted`, `a_rewritten_toml_is_relinted` |
|
||||
| 4 | merged rule options | `[lint.<rule>]` tables in `lucisv.toml`; `lucisv.lint.options` from the editor | `Key.options`: the merged `RuleOptions`, compared exactly (`PartialEq`) | `a_rewritten_toml_is_relinted` |
|
||||
| 5 | line width | `line-length` in `lucisv.toml`; `lucisv.lineLength` | `Key.line_length` | `a_rewritten_toml_is_relinted` |
|
||||
| 6 | tab width (fix **text** only) | `indent` in `lucisv.toml`; `lucisv.indent` | `Key.tab_width`. Since this lane the width lives on the `LintRun` — read there through `format::indent_width`, which used to be called by the dispatcher — so the diagnostics pass and the quick-fix pass build the *same* context and share one snapshot. Only `no-tabs`' fix string reads it, and the diagnostics path never reads a fix, so no published diagnostic moves | `a_tab_width_change_rewrites_the_fix` |
|
||||
| 7 | external waiver file **contents** | any edit of a file named by `[lint] waivers` or by `lucisv.lint.waivers` | `Key.waivers`: `(path, text)` per file, in the order they are read — the **exact text** `ExternalWaivers::parse` was handed, not a hash and not an mtime. One read, not two: `lint.rs` now reads the bytes itself and parses them, reproducing `ExternalWaivers::read`'s error sentence byte for byte | `a_rewritten_waiver_file_is_relinted` |
|
||||
| 8 | the `lucisv.toml` itself | any edit of the discovered config file; a new config file appearing in a parent directory | **through rows 3–7.** Nothing in a `lucisv.toml` reaches a lint result except the selection, the options, the width, the indent and the waiver paths, and all five are in the key. `LintRun::for_document` re-runs `Discovery::for_file` on **every** request (0.04 ms, measured above), so a rewritten file is in the key at the next request | `a_rewritten_toml_is_relinted` |
|
||||
| 9 | the workspace index the census oracle reads | `publish_scan`, both `finish_scan` paths, `update_one` — i.e. a scan step, a scan finishing, a `didSave` or a watcher event in **another** file | **not a key field: an explicit drop.** All four of those call sites end with `for doc in self.docs.values_mut() { doc.refresh_overlay(&self.index) }`, and `refresh_overlay` — the one place a `Document` is told the index moved — clears the snapshot. Verified by exhaustion: `self.index.{absorb,remove_file,update_facts,update_file}` occurs nowhere else in `state/` | `a_change_in_another_file_relints_this_one` |
|
||||
| 10 | whether there is an oracle at all | the first scan of a session that began with an empty index | `Key.has_oracle`, **and** row 9's drop | `a_workspace_appearing_turns_the_semantic_rules_on` |
|
||||
| 11 | client settings generation | `workspace/didChangeConfiguration`, or the reply to `workspace/configuration` | through rows 3–7; `apply_settings` also republishes every open buffer, which recomputes under the new key immediately | `a_pushed_rule_selection_is_relinted` |
|
||||
| 12 | file-watcher events on the `lucisv.toml` / the waiver files | **there are none.** `watch::SOURCE_GLOB` is `**/*.{v,vh,sv,svh}` and the only other watcher is the configured filelist's own path | rows 7 and 8 are what make this safe: both files are re-read per request, so no watcher is needed and none is added | `a_rewritten_toml_is_relinted` (no watcher event is sent) |
|
||||
| 13 | close and reopen | `didClose` then `didOpen` | identity: `close_document` removes the `Document`, and with it the snapshot | `a_closed_and_reopened_buffer_is_relinted` |
|
||||
| 14 | UTF-16 ranges | — | **not an input.** `Positions` is built from `doc.text` per request in `code_action.rs` and `lint::diagnostics_in`; nothing positional is stored in the snapshot, which holds byte spans exactly as `lint_with` returned them | `a_snapshot_fix_keeps_its_utf16_range` |
|
||||
|
||||
Two things are deliberately **not** in the key:
|
||||
|
||||
* **A hash of anything.** Every field is compared by value. A 64-bit digest
|
||||
would have been smaller and would have made "no stale fix" an argument
|
||||
about collision probability instead of a fact.
|
||||
* **A time or a generation number for the config files.** An mtime is a
|
||||
weaker statement than the contents and is wrong across a same-second
|
||||
rewrite; the contents are already in hand because the pass reads them.
|
||||
|
||||
|
||||
## What R1a bought (paired)
|
||||
|
||||
Reference `51cbfd2` (`5d2a7aa2a4fd…`) against the same tree plus this lane's
|
||||
diff (`827c7ac222c8…`), both `--release --locked`, the same schema-2 harness,
|
||||
phase order alternating which binary went first, no build during any timed
|
||||
run, `--tries 3`, repeat medians. Load 2.5–5.9 one-minute, inside the review's
|
||||
own 2.8–6.0 band; zero guard kills; opentitan `git status --porcelain` = the
|
||||
same three pre-existing files after every phase.
|
||||
|
||||
| workload | `51cbfd2` | this lane | change |
|
||||
|---|---:|---:|---|
|
||||
| pinmux comment, **all** action families, unchanged | 22.61 | **0.98** | **−95.6%** |
|
||||
| pinmux comment, **quickfix only**, unchanged | 24.51 | **0.11** | **−99.5%** |
|
||||
| pinmux comment, empty family filter | 0.05 | 0.05 | unchanged |
|
||||
| pinmux menu, repeated on the unchanged buffer (`offeredit`) | 23.44 | **0.18** | **−99.2%** |
|
||||
| **definition queued** behind the pinmux menu (leader / follower, pipeline 3) | 22.39 / 22.38 | **0.78 / 0.76** | **−96.5%** |
|
||||
| pinmux comment, **first offer after a `didChange`** | 125.65 | **106.89** | **−14.9%** |
|
||||
| `tb.sv` comment, unchanged / after a change | 0.19 / 1.26 | 0.23 / 1.45 | +0.04 / +0.19 ms |
|
||||
| `aes.sv` `aes_reg_top`, unchanged / after a change | 2.86 / 3.83 | 2.58 / 3.62 | −9.7% / −5.5% |
|
||||
| diagnostics publish after `didChange` (≈150 ms of it is the debounce) | 162.29 | 162.75 | **+0.3%** |
|
||||
| `didOpen pinmux_reg_top.sv` → definition | 120.45 | 110.42 | −8.3% |
|
||||
| `didOpen aes.sv` / `aes_core.sv` / `spi_device.sv` → definition | 4.53 / 5.72 / 8.68 | 3.49 / 5.56 / 8.15 | −23% / −3% / −6% |
|
||||
| take-3 `codeaction` cells (eager, fan-out 1 / 6 / comment) | 21.37 / 88.44 / 1.67 | 21.60 / 89.74 / 1.56 | +1.1% / +1.5% / −6.7% |
|
||||
| idle RSS, 100 open buffers each asked for quick fixes (MiB) | 574.0 | **574.6** | **+0.1%** |
|
||||
| idle RSS, 10 / 1 buffers (MiB) | 429.4 / 420.9 | 428.4 / 422.2 | ±0.3% |
|
||||
|
||||
**Gates.**
|
||||
|
||||
* *unchanged pinmux menu ≤ 16 ms* — **met, 0.98 ms** (quickfix-only 0.11 ms).
|
||||
* *queued definition ≤ 16 ms* — **met, 0.76 ms**.
|
||||
* *first-after-edit improved, reported separately with its stage split* —
|
||||
**125.65 → 106.89 ms, −14.9%**, and the split says exactly why that is the
|
||||
whole of what a lint cache can do here: of the candidate's 109 ms, **106 ms
|
||||
is the flush**, of which **21.9 ms is the diagnostics pass** and the
|
||||
remaining ~84 ms is `Document::new` on 1.3 MB. The handler's own lint pass
|
||||
is **0.00 ms — it does not run**. The remaining stage is named and is not
|
||||
this lane's: the parse and analysis of a 1.3 MB buffer.
|
||||
* *diagnostics publish unchanged* — **met, +0.3%** (inside the run-to-run
|
||||
spread of a 150 ms debounce).
|
||||
* *no higher retained memory* — **met, +0.1% at 100 open buffers**, all of
|
||||
them holding a snapshot.
|
||||
* *no stale diagnostic or fix under any invalidation row* — 11 server tests
|
||||
and 10 unit tests, one per row plus the attack; see below.
|
||||
|
||||
The candidate's own trace, at the same three cursors:
|
||||
|
||||
| pinmux comment | wire | flush wall | flush lint | flush snapshot | action lint | action snapshot |
|
||||
|---|---:|---:|---:|---|---:|---|
|
||||
| first request of the session | 2.07 | 0.00 | 0.00 | — | **0.01** | **hit** |
|
||||
| repeated, unchanged | 0.72 | 0.00 | 0.00 | — | **0.00** | **hit** |
|
||||
| definition queued behind it | 0.23 | 0.00 | 0.00 | — | **0.00** | **hit** |
|
||||
| first after a `didChange` | 109.39 | 106.09 | **21.87** | miss | **0.00** | **hit** |
|
||||
|
||||
The first request of a *session* already hits: the `didOpen` published
|
||||
diagnostics, and that pass is the one the menu reads. A queued definition logs
|
||||
no trace line of its own at all — it lints nothing — which is what the
|
||||
`result_count` of those rows says.
|
||||
|
||||
**The config-discovery decision: leave it.** The review allows memoizing the
|
||||
`FileConfig` read "if the trace says that I/O is material". It does not:
|
||||
0.04–0.16 ms on a repeat, against a 21 ms pass. Memoizing it would have added
|
||||
a second key (path, mtime, length) whose failure mode is a *stale rule
|
||||
selection* — and the `lucisv.toml` and the waiver files are not watched
|
||||
(table row 12), so that per-request read is the only thing that ever notices
|
||||
one of them changing. It stays.
|
||||
|
||||
The one thing that did move is where the **indent width** is read. It used to
|
||||
be `format::indent_width`, called by the dispatcher; it is now the same
|
||||
function, called by `LintRun::for_document`, because the two doors must build
|
||||
the same context to share one snapshot. A code-action request therefore does
|
||||
the same two `Discovery` walks it always did (one in `configured`, one in
|
||||
`indent_width`); the **diagnostics publish now does two where it did one**.
|
||||
Measured, that moved the config stage from about **0.04 to 0.15 ms** on a
|
||||
repeat and left the publish row at **+0.3%**, inside the spread of a 150 ms
|
||||
debounce. It is stated rather than hidden, and the fix is a handshake request
|
||||
below, not a second spelling of the indent ladder here.
|
||||
|
||||
## Assumptions
|
||||
|
||||
- **`lint_with` is deterministic and side-effect-free** given `(ctx, rules,
|
||||
external)`. Not enforced by a type; it is what makes a snapshot legitimate
|
||||
at all. Pinned by `a_recomputed_snapshot_equals_a_fresh_pass`, which lints
|
||||
the same document twice through the two doors and compares every violation.
|
||||
- **A `Document`'s derived fields are a pure function of its text.** The same
|
||||
assumption `crate::fences` (§P1b) already ships on, and the reason identity
|
||||
can stand in for a revision number in row 1.
|
||||
- **`refresh_overlay` is called for every open buffer at every index
|
||||
mutation.** Established by exhaustion over `state/mod.rs` (row 9) rather
|
||||
than by a type. A new index mutation that skipped it would be a stale
|
||||
oracle for `external` resolution too, which is a pre-existing contract this
|
||||
lane now also depends on — stated in Handshakes.
|
||||
- **`format::indent_width` stays the one authority on the indent ladder.**
|
||||
`LintRun::for_document` calls it rather than re-deriving the width from the
|
||||
`FileConfig` it already read, which costs a second `Discovery` walk — worth
|
||||
hundredths of a millisecond against a 21 ms pass, and worth not having two
|
||||
spellings of a rule that decides a fix's bytes. Pinned rung by rung by
|
||||
`the_runs_tab_width_is_the_formatters_own_ladder`. The dispatcher's own call
|
||||
to it is gone, so the request as a whole does not walk more often than
|
||||
before.
|
||||
|
||||
## Handshakes
|
||||
|
||||
**Consumed**
|
||||
|
||||
- `vlog_linter::{lint_with, ExternalWaivers::parse, RuleOptions}` — unchanged.
|
||||
`ExternalWaivers::parse` (already public) is now called directly instead of
|
||||
`ExternalWaivers::read`, so the file's text is in hand for the key; the
|
||||
error sentence for an unreadable file is reproduced verbatim
|
||||
(`format!("{}: {e}", path.display())`).
|
||||
- `vlog_formatter::fence::protected_regions` through `crate::fences` — the
|
||||
shared-fence-filter contract (`docs/features/shared-fence-filter/`) is
|
||||
**not** amended. `fences.rs` gains one read-only predicate, `held`, which
|
||||
the trace uses to say whether a request paid the parse; it decides nothing.
|
||||
- `crate::state::Document::refresh_overlay` — the existing "the index moved"
|
||||
hook. This lane makes it also drop the lint snapshot.
|
||||
- `vlog_parser::stats::parses` — the flush's parse count in the trace.
|
||||
|
||||
**Promised**
|
||||
|
||||
- `crate::lint::violations_in` and `crate::lint::fixable` now return
|
||||
`Arc<[Violation]>` instead of `Vec<Violation>`, and `fixable` no longer
|
||||
takes a `tab_width` — the width comes from the `LintRun`. In-crate callers
|
||||
only (`lucisv_server` is a binary crate): `diagnostics.rs`, `code_action.rs`
|
||||
and their tests.
|
||||
- `crate::lint_trace` is new and is written to from `lint.rs`,
|
||||
`code_action.rs` and `server/dispatch.rs`. It is a thread-local
|
||||
accumulator, armed per request; nothing outside `--verbose` observes it.
|
||||
|
||||
**Requested of another module**
|
||||
|
||||
- `crate::format` (not this lane's file): `indent_width(path, client)` runs its
|
||||
own `Discovery` walk, and `LintRun::for_document` has already discovered the
|
||||
same `FileConfig` a line earlier. A form taking that `FileConfig`
|
||||
— `indent_width_of(&FileConfig, &ClientSettings)`, with today's function as a
|
||||
one-line wrapper — would let the lint pass pay one walk instead of two. The
|
||||
cost of not having it is measured above (about **+0.11 ms** on the config
|
||||
stage, publish row +0.3%), which is why this lane did not spell the ladder a
|
||||
second time to avoid it: one authority on a fix's bytes is worth more than
|
||||
0.11 ms. Nothing else is needed in `vlog_linter`, `vlog_formatter`,
|
||||
`fence.rs` or `state/scan.rs`.
|
||||
|
||||
**`docs/topo.md`** — this lane adds one edge (`lint.rs ──▶ lint_snapshot.rs`,
|
||||
`lint.rs ──▶ lint_trace.rs`, `state/mod.rs ──▶ lint_snapshot.rs` for the
|
||||
field) and amends the `server-lint ◀──▶ diagnostics` edge to say the two now
|
||||
share one computed result. `topo.md` is not this lane's file: the amendment is
|
||||
requested here for the lead to apply at merge.
|
||||
|
||||
## Status / TODO
|
||||
|
||||
- [x] R1b — the `timing: codeaction …` stage trace (`lint_trace.rs`), with the
|
||||
flush group and its parse count; `fences::held` for the memo hit
|
||||
- [x] R1b — the harness: `tools/perf/phases_r1.py`, phases `actionprofile`
|
||||
(three cursors × four request shapes) and `ruleablation` (one row per
|
||||
default-on rule)
|
||||
- [x] R1b — measured, and the 23 ms / 136 ms attributed (above)
|
||||
- [x] the dependency/invalidation table, written before the cache
|
||||
- [x] R1a — `lint_snapshot.rs`, the `Document` field, both consumers
|
||||
- [x] R1a — one invalidation test per table row, plus the stale-fix attack
|
||||
- [x] R1a — measured paired against `51cbfd2`; the 100-buffer RSS cell
|
||||
- [x] tracker cells R1a/R1b and both experiment records; TODO §61.2
|
||||
|
||||
## Work log
|
||||
|
||||
**2026-09-08 — dev (Opus), R1b.**
|
||||
|
||||
- `crates/lucisv_server/src/lint_trace.rs` (new): a thread-local stage
|
||||
accumulator in `vlog_parser::stats`' shape — per thread because a request is
|
||||
answered on one thread, and armed only by the request wrapper when
|
||||
`--verbose` asked. Off costs one `Cell<bool>` read per traced site: no clock,
|
||||
no allocation, no line. Two groups per request, `flush` and `action`,
|
||||
divided by `close_flush`, so the diagnostics pass that publishes during the
|
||||
debounced flush is readable beside the handler's own pass.
|
||||
- `lint.rs`: `LintRun::for_document`'s body split into `Discovered::read`
|
||||
(everything read from disk) and `Discovered::into_run` (the oracle and the
|
||||
rule ladder), so the I/O has a stage of its own. The calls, their order and
|
||||
the order the config problems are collected in are unchanged. One place now
|
||||
calls `lint_with` (`found`), which is what makes one trace site enough.
|
||||
- `dispatch.rs`: `flush_dirty_traced` wraps the flush with a clock and a
|
||||
`vlog_parser::stats::parses()` delta, but only when a trace is armed;
|
||||
`Server::request` arms one and logs `timing: codeaction method=… total=… ` +
|
||||
the two groups, for any request that linted anything — which is the code
|
||||
actions and any request whose flush published diagnostics, so the queued
|
||||
definition gets its own line.
|
||||
- Deviation, stated: the flush is traced as **one** stage plus its parse
|
||||
count, not split into parse / analysis / overlay-refresh. Those three live
|
||||
inside `Document::new` and `Workspace::set_document` in `state/mod.rs`,
|
||||
which this lane owns only for the snapshot field and its initializers;
|
||||
splitting them means threading a trace through `set_document`'s signature.
|
||||
The number the review asks for — dirty-buffer stage versus lint pass — is
|
||||
fully answered without it: flush 99.7 ms of which the diagnostics lint is
|
||||
21.1, so the rebuild is ~78.6 ms.
|
||||
- Measured (§R1b cells above). Zero guard kills; opentitan
|
||||
`git status --porcelain` = the three known files after every phase; load
|
||||
1.9–3.6 one-minute, inside the review's own 2.8–6.0 band.
|
||||
|
||||
|
||||
**2026-09-08 — dev (Opus), R1a.**
|
||||
|
||||
- `crates/lucisv_server/src/lint_snapshot.rs` (new): `Key` — the inputs, by
|
||||
value — and `Slot`, a `Mutex<Option<Held>>` on the `Document`. `read_or`
|
||||
answers from the slot when the key matches and otherwise computes with the
|
||||
lock released and replaces what is held. No hash anywhere: the waiver files'
|
||||
**text** is compared, not a digest, so "can this offer a stale fix?" is a
|
||||
`PartialEq` question. `Mutex` rather than `RefCell` so a `Document` stays
|
||||
`Sync` exactly as its `OnceLock` fence memo leaves it; a poisoned lock (which
|
||||
a single message loop with no panicking library code cannot produce)
|
||||
degrades to computing every time.
|
||||
- `state/mod.rs`: **one field** (`Document::lint`), its two initializers, and
|
||||
one line in `refresh_overlay` — the hook that already exists for "the index
|
||||
moved" — which clears it. That line is the whole of the index invalidation
|
||||
and is why there is no generation counter to keep in step. Four lines of
|
||||
production code in that file; it is over the size threshold already (1 063 →
|
||||
1 067 by the CLAUDE.md measure) and TODO §55 owns that.
|
||||
- `lint.rs`: one `found(doc, run)` reads the slot and both doors call it, so
|
||||
the diagnostics publish and quick-fix discovery are **one** pass. Both now
|
||||
return `Arc<[Violation]>`; `fixable` copies only when the fence filter
|
||||
actually drops something, which on a buffer with no `// lucisv: off` region
|
||||
is never. The **tab width moved onto the `LintRun`** (read through
|
||||
`format::indent_width`, whose call the dispatcher no longer makes) — without
|
||||
that the two doors would build different contexts and thrash one slot.
|
||||
Waiver files are read with `read_to_string` + `ExternalWaivers::parse`
|
||||
instead of `ExternalWaivers::read`, one read still, so the text is in hand
|
||||
for the key; the unreadable-file sentence is reproduced verbatim.
|
||||
- Found by an existing test, and worth recording: the first version let a test
|
||||
helper set `external` without the matching text, so two runs with different
|
||||
waivers shared a key. `with_external` became `with_waivers(path, text)`,
|
||||
which writes both — the invariant is now structural, and the field's doc
|
||||
comment says so.
|
||||
- Tests: 21 added, none removed (4 322 → 4 343 in the guarded workspace run).
|
||||
11 in `server/tests/lint_snapshot.rs`, one per table row through the real
|
||||
doors plus the **stale-fix attack** (a buffer edited so the span a previously
|
||||
offered fix named no longer exists — nothing is offered, and the wire answer
|
||||
is empty); 4 in `lint_snapshot.rs` (every field of the key forces a
|
||||
recompute; a waiver rewritten in place is a different key); 4 in
|
||||
`lint_trace.rs`; 2 in `lint.rs` (the tab-width ladder rung by rung, and a
|
||||
reused snapshot compared violation for violation and fix for fix against a
|
||||
fresh `lint_with`).
|
||||
- Reuse is asserted **by pointer** (`Arc::ptr_eq`), never by a stopwatch: a
|
||||
timing assertion on a lint pass is a flake.
|
||||
- Harness fix during the run: `actionprofile`'s queued rows attributed trace
|
||||
lines by position, and a definition that lints nothing logs no line, so two
|
||||
leaders were recorded as a leader and a follower. Lines are now attributed
|
||||
by their own `method` field and `result_count` says how many the follower
|
||||
logged. The `r1a-cand` `actionprofile` rows in the evidence file predate that
|
||||
fix and are superseded by `r1a-cand-2`; no number quoted anywhere came from
|
||||
the mis-attributed field (the R1b table's queued row is the leader's split,
|
||||
which is what it always was).
|
||||
- Measured (above). Zero guard kills; opentitan clean after every phase.
|
||||
|
||||
## QA log
|
||||
|
||||
**2026-09-08 — QA (Sonnet).**
|
||||
|
||||
Read CLAUDE.md, TODO §61.2, `docs/performance_take5_review.md` §1, this
|
||||
README in full, `perf5-p1`'s deferral memo, `semantic-lints-on`'s oracle
|
||||
handshake, and `docs/perf/take5-tracking.md`'s R1a/R1b records plus both
|
||||
experiment records, before touching anything.
|
||||
|
||||
**Gates, guarded, main tree.** `cargo fmt --all -- --check` clean.
|
||||
`cargo clippy --all-targets --workspace` clean after touching every changed
|
||||
file to defeat the incremental cache — no new `#[allow]` anywhere in the
|
||||
diff. `cargo test --workspace` (guarded, `tools/guard.sh -m 8 -t 1800`):
|
||||
**4 343 passed, 0 failed**, matching the dev's own count exactly. Cross-checked
|
||||
independently: cloned trunk `51cbfd27dfd22720856c501c9c17277460cc6a68` fresh
|
||||
into scratch (no diff), built and tested the same way — **4 322 passed, 0
|
||||
failed**. `cargo test --workspace -- --list`, name-sorted and `comm`-diffed
|
||||
between the two trees: **zero names removed, exactly 21 added**, and the 21
|
||||
match the dev's own breakdown byte for byte (11 in
|
||||
`server::tests::lint_snapshot`, 4 in `lint_snapshot::tests`, 4 in
|
||||
`lint_trace::tests`, 2 in `lint::tests`). Production line counts (non-blank,
|
||||
non-comment, up to `mod tests`): `lint.rs` 334, `dispatch.rs` 464,
|
||||
`lint_snapshot.rs` 54, `lint_trace.rs` 207 — all four numbers match what the
|
||||
dev's own measure would produce; note for whoever wrote my brief: the file
|
||||
names for the last two are transposed there (the *smaller* file is
|
||||
`lint_snapshot.rs`, holding `Key`/`Slot`, and the *larger* is `lint_trace.rs`,
|
||||
holding `Stage`/`Group`/`Trace`) — a wording slip, not a code finding.
|
||||
`state/mod.rs`: read the diff directly rather than counting — exactly one
|
||||
field (`pub lint: crate::lint_snapshot::Slot`), two initializers (`Document::new`
|
||||
and the large-file constructor), and one line in `refresh_overlay`
|
||||
(`self.lint.clear();`). All files well inside the 300–600 target; no file
|
||||
pushed over a threshold.
|
||||
|
||||
**The invalidation table, derived independently first.** Read `found`'s call
|
||||
to `lint_with` and `LintRun::context`/`LintRun::key` and listed every input
|
||||
that reaches `lint_with(ctx, rules, external)`: buffer text/tokens/tree/
|
||||
line_index/path (`context(doc)`), `options`, `line_length`, `tab_width`
|
||||
(fix text only), the oracle (`has_oracle` plus the index's own answers),
|
||||
`rules`, `external` (waiver contents), and `doc.large` (gates the whole path
|
||||
before any of this runs) — nine independent inputs, matching the table's 14
|
||||
rows exactly once the table's own splits (rows 3/11 both being "the rule
|
||||
selection", 4/5/8/12 all being "the toml", 9/10 both being "the index") are
|
||||
collapsed back to the inputs of the call. Nothing reaches `lint_with` that
|
||||
the table's rows do not name. Read `state/mod.rs`'s four index-mutating call
|
||||
sites (`publish_scan`, `finish_whole_scan`, `finish_widen`, `update_one`) in
|
||||
full: all four end in `for doc in self.docs.values_mut() { doc.refresh_overlay(&self.index); }`,
|
||||
confirming row 9's "verified by exhaustion" claim directly rather than
|
||||
trusting it. `Document` has no custom `Drop`; `lint: Slot` is dropped by the
|
||||
default field-wise drop whenever a `Document` is dropped (`didClose`, or
|
||||
replaced by `set_document`), confirming item 8's memory-bound claim.
|
||||
|
||||
**The wire matrix (a)–(l), attacked twice, independently of the dev's own
|
||||
tests.** Wrote two standalone Python scripts
|
||||
(`wire_probe.py`, `wire_probe2.py`, in the QA scratchpad) speaking real
|
||||
JSON-RPC over stdio (`Content-Length` framing) to the actual
|
||||
`--release --locked` candidate binary, against a fixture workspace this QA
|
||||
built from scratch (not the dev's fixtures, not the Rust in-process
|
||||
`Session`): a `lucisv.toml`, a waiver file, a tabbed module, and a
|
||||
`dut.sv`/`tb.sv` pair for the oracle row. Every row, all passing on the first
|
||||
clean run (after two script bugs of my own — a premature
|
||||
`take_notifications()` and a stale waiver directive shadowing a later
|
||||
section — found and fixed, noted so the evidence is legible):
|
||||
|
||||
| row | attack | result |
|
||||
|---|---|---|
|
||||
| (a) | edit the buffer | covered by (g)/(k)'s edits and the dev's own `an_edited_buffer_is_relinted` |
|
||||
| (b) | `didChangeConfiguration` toggling `lucisv.lint.ignore` twice | fresh both times |
|
||||
| (c) | `lucisv.toml` `[lint] select` rewritten on disk with **no watcher event**, twice | fresh at the very next request both times |
|
||||
| (d) | waiver file rewritten to the **same length**, different content (`--line=1` vs `--line=2`) | fresh, not stale |
|
||||
| (e) | waiver file **deleted** entirely | fresh (finding un-silenced) |
|
||||
| (f) | `tb.sv` — **never opened** — rewritten on disk, reaching `dut.sv` only through a bare `workspace/didChangeWatchedFiles` (no `didChange` anywhere) | `dut.sv`'s republished diagnostics flip `unused-signal` on, then back off when `tb.sv` mentions the signal again |
|
||||
| (g) | close, then reopen with different text | fresh |
|
||||
| (h) | a buffer over `lucisv.largeFile.threshold` | offers nothing (fast path answers before any handler) |
|
||||
| (i) | a UTF-16 fix range (`é` + a non-BMP `🎉` before the tab) on a snapshot asked for twice | the reused answer is byte-identical to the computed one; range is `character: 9` (UTF-16 units), not the byte offset |
|
||||
| (j) | `indent` in `lucisv.toml` changed between two quick-fix requests on the same open buffer | the `no-tabs` fix text changes from `" "` to `" "` at the very next request |
|
||||
| (k) | offer a fix, edit the buffer so both fixes' spans (one of them 40+ lines deep) are gone, ask again over a range that would be out-of-bounds for a stale answer | nothing offered, and the server's own view of the buffer is the post-edit text |
|
||||
| (l) | `source.fixAll.lucisv` after the buffer is edited back down to one violation | offers exactly the one-tab fresh edit, not the earlier two-tab one |
|
||||
|
||||
**Sabotage, in a fresh clone with the working diff applied
|
||||
(`scratchpad/qa-61-2/cand`), one at a time, each reverted before the next and
|
||||
confirmed clean (`git diff --stat` back to the original 341/16 insertion
|
||||
counts, `grep -rn SABOTAGE` empty):**
|
||||
|
||||
1. Stripped the waiver **text** out of `LintRun::key()` (kept the path,
|
||||
blanked the string) → `server::tests::lint_snapshot::a_rewritten_waiver_file_is_relinted`
|
||||
**FAILED** (14 passed, 1 failed), exactly the row-7 test and nothing else.
|
||||
2. Removed `self.lint.clear()` from `Document::refresh_overlay` (early
|
||||
`return` right after the `external` line) → `a_change_in_another_file_relints_this_one`
|
||||
**FAILED** (14 passed, 1 failed), exactly the row-9 test.
|
||||
3. Hard-coded `tab_width: 0` in `LintRun::key()` (context still builds with
|
||||
the real width, so the *fix* would be correct but the *key* blind to a
|
||||
change) → `a_tab_width_change_rewrites_the_fix` **FAILED** (1 passed, 1
|
||||
failed alongside the unrelated `the_runs_tab_width_is_the_formatters_own_ladder`,
|
||||
which stayed green because it never reuses a snapshot across a config
|
||||
change — consistent, not a miss).
|
||||
|
||||
All three cuts were caught by exactly the test the row predicts and no other
|
||||
test in the same run flipped. Nothing else was sabotaged (hashing the key,
|
||||
an index-generation counter, etc. — the README's own rejected-alternatives
|
||||
list — since none of those are what shipped).
|
||||
|
||||
**Trace.** Confirmed `lint_trace::arm()` is reachable only through
|
||||
`Server::request`'s `let Some(started) = self.timer() else { return … }`
|
||||
branch, and `timer()` is `self.verbose.then(Instant::now)` — so a
|
||||
non-`--verbose` session allocates nothing and logs nothing, by construction,
|
||||
not by convention. Re-ran `tools/perf/phases_r1.py::actionprofile` and
|
||||
`::ruleablation` against my own fresh `--release --locked` build of the
|
||||
candidate (sha256 `827c7ac222c8…`, byte-identical to the dev's own candidate
|
||||
binary hash — confirms the evidence file and my build are the same code) over
|
||||
the read-only OpenTitan corpus:
|
||||
|
||||
- unchanged pinmux menu 0.57–0.88 ms, queued definition 0.24–0.26 ms, first
|
||||
after a `didChange` 103.5–118.0 ms (repeat median ≈106 ms) — all inside or
|
||||
close to the dev's own range, on the same machine, at a different time of
|
||||
day.
|
||||
- the trace fields on the first-after-edit row: `trace_flush_lint=21.85ms`
|
||||
(dev: 21.1–21.9 across the two records), `trace_flush_snapshot=miss`,
|
||||
`trace_action_lint=0.00ms`, `trace_action_snapshot=hit` on **every** row
|
||||
including the first-after-edit one — the handler's own pass really is
|
||||
0.00 ms, reproduced independently.
|
||||
- `ruleablation` on the *candidate*: every row is cheap (≤~1.5 ms), which is
|
||||
the **expected** consequence of R1a and not a re-derivation of the R1b
|
||||
per-rule costs — `didChangeConfiguration` republishes every open buffer
|
||||
before the timed `codeAction` requests run, so the expensive single-rule
|
||||
pass happens during the republish and the timed request always hits. I did
|
||||
**not** rebuild a snapshot-free (`51cbfd2` + `lint_trace.rs` only, no
|
||||
`lint_snapshot.rs`) variant to re-derive the three-semantic-rules-cost
|
||||
attribution itself; that number is R1b's, marked "attribution, no
|
||||
behaviour change" in the tracker, and the flush-lint figure above (21.85 ms)
|
||||
is consistent with it. Flagged as a scope limitation, not a finding.
|
||||
|
||||
**Re-measured cells.** `snapshotrss` re-run on both my own ref and candidate
|
||||
builds (100 open buffers, quickfix-only on each, 3 tries): candidate median
|
||||
574.2 MiB (dev: 574.6), reference median 575.2 MiB (dev: 574.0) — both inside
|
||||
noise of the dev's own numbers and confirming the "+0.1%, no higher retained
|
||||
memory" gate independently. `codeAction`-family latency reproduced via
|
||||
`actionprofile` above; did not separately re-run `offerkinds`/`offerqueue`/
|
||||
`offeredit`/`diagnostics`/`didopen` as their own named phases (time budget) —
|
||||
`actionprofile`'s four request shapes at the same three cursors cover the
|
||||
same underlying behaviour (unchanged menu, quickfix-only, queued definition,
|
||||
first-after-edit) those phases measure. Also a scope limitation, not a
|
||||
finding.
|
||||
|
||||
**Traceability.** Pulled `~/.cache/lucisv-perf/take5r-2/results.jsonl` and
|
||||
checked all 12 numbers named in the tracker's R1a/R1b rows and experiment
|
||||
records: `22.61, 24.51, 22.39/22.38, 0.98, 0.11, 0.78/0.76, 574.0, 574.6,
|
||||
162.29, 162.75` match raw sample values in the file to within 0.005; `125.65`
|
||||
and `106.89` are not raw samples but are exactly the median of the *last two*
|
||||
of the three `ms` samples for the reference and candidate "first offer after
|
||||
`didChange`" rows respectively (`128.96` was the first, so 125.65 = median of
|
||||
127.76/123.54; `106.07` was the first, so 106.89 = median of 108.64/105.14) —
|
||||
consistent with the tracker's own "first / repeat median" convention, not a
|
||||
fabricated number. Same check for `574.0`/`574.6`: exact medians of the three
|
||||
100-buffer `rss_kib` samples in the file.
|
||||
|
||||
**Guard / opentitan / cleanup.** Every cargo invocation (fmt, clippy, test ×3
|
||||
trees, `-- --list` ×2 trees) and every perf phase (`actionprofile`,
|
||||
`ruleablation`, `snapshotrss` ×2 binaries) ran through
|
||||
`tools/guard.sh -m 8 -t 1800`; zero guard kills. `git -C
|
||||
/Users/guoliangchen/repo/opentitan status --porcelain` checked before, during
|
||||
and after every phase: the same three pre-existing files
|
||||
(`hw/ip/aes/dv/tb/tb.sv`, `hw/top_darjeeling/ip/ast/rtl/ast.sv`,
|
||||
`hw/top_earlgrey/ip/ast/rtl/ast.sv`), nothing else, every time. All sabotage
|
||||
was done in `scratchpad/qa-61-2/cand`, a fresh clone with the working diff
|
||||
applied; the main tree was never `git checkout`/`reset`/`stash`/`clean`ed and
|
||||
nothing outside this README's QA log and the TODO line below was edited. No
|
||||
background loop or server process left running at the end of this session
|
||||
(checked `ps aux` — only a pre-existing, unrelated VS Code extension server
|
||||
survives).
|
||||
|
||||
**Verdict: PASS.** No stale diagnostic or fix found or produced under any of
|
||||
the 14 table rows, over the real wire, on a fixture this QA built
|
||||
independently, with three targeted sabotage cuts each caught by exactly one
|
||||
predicted test. Gates green and cross-checked against a from-scratch clone of
|
||||
`51cbfd2` with matching binary hashes; test count +21/-0 confirmed by name,
|
||||
not just by count. Two scope limitations disclosed above (no snapshot-free
|
||||
rebuild for the R1b per-rule ablation; five perf-phase names not re-run under
|
||||
their own headings) are attribution/measurement gaps, not correctness gaps,
|
||||
and do not change the verdict.
|
||||
|
||||
**Topo edges for the lead to apply at merge** (from this README's own
|
||||
Handshakes section, confirmed absent from `docs/topo.md` today): `lint.rs
|
||||
──▶ lint_snapshot.rs`, `lint.rs ──▶ lint_trace.rs`, `state/mod.rs ──▶
|
||||
lint_snapshot.rs` (the field), and the `server-lint ◀──▶ diagnostics` edge
|
||||
amended to say the two doors now share one computed result. The
|
||||
`format::indent_width_of(&FileConfig, …)` request to `crate::format`'s owner
|
||||
is still open and unclaimed by this round; it is a 0.11 ms/request cost, not
|
||||
a correctness issue.
|
||||
|
||||
## Review
|
||||
|
||||
**2026-09-08 (lead).** Accepted. Read `lint_snapshot.rs`, the `state/`
|
||||
hunks (one field, two initializers, one clear in `refresh_overlay`), the
|
||||
`lint.rs` door, the invalidation table and both logs; QA's independent
|
||||
derivation of the input list and its wire matrix through a real client
|
||||
are the acceptance.
|
||||
|
||||
- R1b answered the review's question before anything was built: the
|
||||
23 ms is three semantic rules over a 42k-line file, and the 136 ms
|
||||
first-after-edit is the flush (one parse of 1.3 MB plus the
|
||||
diagnostics pass) with the handler's second pass on top. That is why
|
||||
the snapshot is shaped as one pass per revision shared by both doors.
|
||||
- The key is the design: every input of `lint_with` by value — waiver
|
||||
*contents*, not an mtime, because nothing watches them — and identity
|
||||
for what identity settles (the `Document`, and the index through the
|
||||
overlay refresh every mutation ends in, checked by exhaustion by dev,
|
||||
QA and me). No hash, no generation counter, no map: a stale fix is a
|
||||
question about `PartialEq`.
|
||||
- Gates met by an order of magnitude (menu 22.6 → 1.0 ms, queued
|
||||
definition 22.4 → 0.8) with the publish and memory unchanged. The
|
||||
first-after-edit residue is the parse of the buffer, named, not this
|
||||
lane's.
|
||||
- The config-discovery memo was correctly refused: 0.04 ms of I/O that
|
||||
is the only thing noticing an unwatched `lucisv.toml` change.
|
||||
- Deviations accepted: the flush traced as one stage; the indent-width
|
||||
read moved into the run (+0.1 ms on publish) with the
|
||||
`format::indent_width(FileConfig)` request filed.
|
||||
|
||||
Docs applied at merge: topo (the snapshot and trace modules, the
|
||||
diagnostics/quick-fix shared result, the parsed `timing: codeaction`
|
||||
line); the `format::indent_width` request to the loop-3 list.
|
||||
@@ -0,0 +1,609 @@
|
||||
# perf5r-preflight — engine-owned refusal preflights
|
||||
|
||||
Take 5 **review** round (`docs/performance_take5_review.md` §3 items 5–6),
|
||||
TODO §61.1, tracker rows **R3a** and the refused-extraction half of **R3c**.
|
||||
Baseline is 0.51.0.
|
||||
|
||||
## Goal
|
||||
|
||||
Two refactorings refuse a request only after materializing and analyzing a
|
||||
workspace they never needed. A `textDocument/rename` on a cursor that sits on
|
||||
no symbol reads all **3 976** in-scope files, performs **3 975 whole-file
|
||||
parses** and spends **1.9 s** building a scope, so that `locate` can refuse in
|
||||
**0.1 ms** from the request buffer's own analysis — 2 192 ms on the wire for a
|
||||
sentence the buffer could have said immediately. An extraction at the review's
|
||||
`aes_wrap.sv` inline site spends **805 ms** building a scope before the checks
|
||||
that refuse it.
|
||||
|
||||
For the rename this lane adds one **additive** function to `vlog_refactor`,
|
||||
`rename_preflight`, which takes — from the request file alone and in the slow
|
||||
road's own order — the refusals the slow road is *certain* to reach in the same
|
||||
words. The server calls it before it selects or analyzes anything, and
|
||||
materializes nothing when it refuses. **Result: 2 012 → 0.3 ms, 3 975 → 0
|
||||
parses.**
|
||||
|
||||
For the extraction the answer is a measured **negative**, and no code shipped.
|
||||
An extract preflight was written, wired and measured, and then removed: every
|
||||
refusal it could take is *already* taken before a scope is built, by two
|
||||
mechanisms that were both already there. The 805 ms refusal is none of them.
|
||||
The evidence is below; this is the review's "instrument first, then decide"
|
||||
answered honestly rather than with code that changes nothing.
|
||||
|
||||
The refusals stay the engine's. That is the review's own condition ("put any
|
||||
cheap preflight in the refactor engine so the server does not become a second
|
||||
authority on what is safe") and it is also the only way the sentences can be
|
||||
guaranteed identical: each one is a single function in `rename/mod.rs` that
|
||||
both roads call.
|
||||
|
||||
**What must not move:** the sentences, their order, the successful edits and
|
||||
their fingerprints, and the warnings. A faster refusal that refuses something
|
||||
else is a failure, and so is a refusal invented for a rename the workspace
|
||||
would have performed.
|
||||
|
||||
## Assumptions
|
||||
|
||||
- **A buffer's `Semantics` is a pure function of its text.** `analyze(&tree,
|
||||
text)` consults no index and no other file, and both roads reach it the same
|
||||
way: the server's `Document::new` calls `analyze` directly, and the scope's
|
||||
`FileFacts::analyzed` calls it through `analyzed_facts`. So the request
|
||||
file's analysis inside a `Scope` and the open buffer's analysis are the same
|
||||
value, and every refusal read off one is the refusal that would be read off
|
||||
the other. *Not enforced by a type* — asserted at every byte of seven
|
||||
fixtures by the oracle below.
|
||||
- **The request file is always among the files the caller hands the engine.**
|
||||
`Scope::locate` refuses a file it was not given *before* it looks at the
|
||||
cursor, so a preflight that jumped that check would reorder the refusals.
|
||||
Both rename selectors put every open buffer in the set. Stated as a
|
||||
precondition in the preflight's doc comment and pinned by
|
||||
`the_preflights_refusal_is_the_whole_workspaces_refusal`.
|
||||
- **A large-file buffer never reaches the rename preflight.** On the fast path
|
||||
every field but the text is the analysis of the *empty* file, so a preflight
|
||||
over it would refuse every cursor as symbolless. `server/large_file.rs`
|
||||
answers `textDocument/rename` with `TOO_LARGE` before this module is
|
||||
reached; `a_large_buffer_is_refused_before_the_preflight_could_see_it` pins
|
||||
both halves of that — the gate, and the fact that the preflight would
|
||||
otherwise be wrong, so the test fails loudly if the gate is ever moved.
|
||||
- **The workspace index is not current with respect to unsaved edits.** See
|
||||
the duplicate-declaration decision below; this is the load-bearing
|
||||
assumption of the whole lane, and it is the reason two refusals stayed on the
|
||||
slow road.
|
||||
|
||||
## Handshakes
|
||||
|
||||
**Consumed.**
|
||||
|
||||
- `vlog_semantic::Semantics` — `reference_id_at`, `reference`, `symbol_at`,
|
||||
`symbol`, `file_scope`, and `Resolution`'s four variants. The preflight reads
|
||||
exactly the fields `Scope::locate` reads, and nothing else.
|
||||
- `crate::state::Document`'s `semantics` — read, never written.
|
||||
|
||||
**Promised.**
|
||||
|
||||
- `vlog_refactor::rename_preflight(semantics, offset, new_name) -> Result<(),
|
||||
String>`. **Additive**: no existing signature changed, no existing behaviour
|
||||
changed, and `Ok(())` means "proceed exactly as before" — never "this rename
|
||||
will succeed". It is the only new public item in the crate; the extraction
|
||||
gained none.
|
||||
- Every refusal the preflight makes is byte-identical to the one `rename` makes
|
||||
for the same request. This is the contract; the oracle is its proof.
|
||||
- The `--verbose` `timing: rename trace` line is still written for a rename
|
||||
the preflight refuses, with `selected=0`, `parses=0` and a new
|
||||
`preflight=true` field. `tools/perf/phases_p2.py` reads that line by regex
|
||||
and flattens every `key=value` into a row field, so the new field arrives as
|
||||
`preflight` with no harness change.
|
||||
|
||||
**Requested of others: none.** No file outside this lane's list was touched.
|
||||
|
||||
**Amended for `docs/topo.md` (lead to apply).** §1.2's request-selector parity
|
||||
gains a third participant. Today it reads that `prepare_rename_here` must
|
||||
produce the same answer or refusal text as whole-scope `prepare_rename`. It
|
||||
should now also record that `rename_preflight` must produce the same *refusal*
|
||||
text as whole-scope `rename` — a one-directional obligation, since the
|
||||
preflight may always stand aside — and that the two cheap paths are
|
||||
deliberately **not** the same set: `prepare_rename_here` reads the index and
|
||||
`rename_preflight` does not. The reason is in "the duplicate-declaration
|
||||
decision" below.
|
||||
|
||||
## The duplicate-declaration decision — evidence, and the answer
|
||||
|
||||
TODO §61.1 asks whether the ambiguous-declaration refusal (`rstmgr_por`,
|
||||
2 200 ms) may move ahead of materialization "ONLY with the evidence the review
|
||||
asks for: the index is current and authoritative for that name".
|
||||
|
||||
**It is not, and the refusal stays on the slow road.** The evidence:
|
||||
|
||||
1. `state/mod.rs::set_document` (line 695) — the handler for every `didOpen`
|
||||
and `didChange` — *reads* `self.index` to build the new `Document`'s
|
||||
external overlay and never writes it. The index is written only by
|
||||
`absorb`, at scan publication and on the `didSave` rebuild. So an unsaved
|
||||
buffer that adds or removes a file-scope declaration of a name is a buffer
|
||||
whose `index.units(name).len()` is stale, in both directions.
|
||||
2. `docs/features/refactor-rename/README.md` already states this exact
|
||||
divergence ("The one divergence, stated exactly") for
|
||||
`prepare_rename_here`, and resolves it by naming the authority: *"`rename`
|
||||
re-derives the count from the current texts and is the authority."*
|
||||
3. So the two callers are not symmetric, and the asymmetry is the whole point.
|
||||
An optimistic `prepareRename` that is wrong is LSP-legal and self-correcting
|
||||
— the rename that follows delivers the real answer. A `rename` that is wrong
|
||||
is terminal: the user is told a name is declared twice, and there is no
|
||||
later road to say otherwise. Moving this refusal forward would trade a
|
||||
correct 2 200 ms answer for a possibly-wrong 15 ms one.
|
||||
4. The ports offer's `declared_twice` (`ports.rs:338`) does trust the index,
|
||||
and that is consistent rather than contradictory: a wrong *offer* costs a
|
||||
lightbulb that should or should not have appeared, and the command behind it
|
||||
still asks the engine. A wrong *refusal* costs the work itself.
|
||||
|
||||
The same argument disposes of the two cross-file cursor refusals — a use whose
|
||||
declaration the index answers ambiguously, and one it cannot answer at all
|
||||
(`ExternalTarget::Ambiguous` / `StillUnresolved`). Both are the index's word,
|
||||
so `rename_preflight` stands aside for every `Resolution::ExternalCandidate`
|
||||
and for every declaration at file scope.
|
||||
`a_name_declared_in_two_files_stays_on_the_slow_road` asserts the deferral
|
||||
rather than merely permitting it, so a later round cannot quietly take it.
|
||||
|
||||
The cost of the decision is stated plainly: **`rstmgr_por` keeps its 2 200 ms**,
|
||||
and so does `cipher_alert → clk_i` at 2 884 ms, whose "meaning would change"
|
||||
refusal is `check::verify`'s and needs the edit computed over the real scope.
|
||||
|
||||
## What the preflight takes, and what it leaves
|
||||
|
||||
### `rename_preflight` — `crates/vlog_refactor/src/rename/preflight.rs`
|
||||
|
||||
In `renaming`'s order. Rule numbers are
|
||||
`docs/features/refactor-rename/README.md`'s refusal list.
|
||||
|
||||
| Rule | Refusal | Taken? | Why |
|
||||
|---|---|---|---|
|
||||
| 1 | new name empty / not an identifier / a keyword | **taken** | `check_new_name` is a pure function of the new name, and is `renaming`'s own first statement |
|
||||
| 3 | *"… is not one of the files lucisv indexes …"* | n/a | unreachable: both selectors contain the request buffer (precondition above) |
|
||||
| 4 | *"there is no symbol to rename at this position."* | **taken** | `reference_id_at` and `symbol_at` on the buffer — the 2 192 ms row |
|
||||
| 5 | *"… is not resolved to any declaration …"* | **taken** | `Resolution::NotFound` is single-file resolution |
|
||||
| 6 | *"… could only come from the base class `B` …"* | **taken** | `Resolution::InheritedCandidate`, same |
|
||||
| 7 | *"… is declared outside the files lucisv indexes …"* | deferred | the index's word |
|
||||
| 8 | *"… is declared in more than one indexed file …"* (from a use) | deferred | the index's word |
|
||||
| 9 | the same sentence, from a file-scope declaration | deferred | the index's word — the decision above |
|
||||
| 11a | *"lucisv cannot find where `x` is spelled …"*, declaration in this buffer | **taken** | empty `name_span`, read here |
|
||||
| 11b | the same, declaration elsewhere | deferred | needs that file's text |
|
||||
| 2 | *"`x` is the name it already has."* | **taken, narrowly** | only for a declaration in this buffer that is **not** at file scope, where nothing stands between the cursor and this check. At file scope rule 9 comes first, so it is deferred |
|
||||
| 10, 12, 13 | ambiguous use onto this declaration, capture, token drift | deferred | all need the edit computed over the scope |
|
||||
|
||||
Note rule 2's narrowing: taking it unconditionally would let a same-name
|
||||
refusal jump ahead of rule 9's ambiguity check and change which sentence the
|
||||
user sees.
|
||||
`renaming_a_symbol_to_the_name_it_already_has_is_refused_from_the_buffer`
|
||||
pins both halves — taken for a net, deferred for a module.
|
||||
### The extraction — a preflight was written, measured, and removed
|
||||
|
||||
The same preflight was built for `extract_module`: `plain_identifier`, the
|
||||
occupied-target check, the request file's parse-diagnostic refusal, and every
|
||||
refusal `Region::read` knows, stopping before `declared_once`. It was wired
|
||||
into `extract::execute` ahead of `Scope::build`, measured, and then **deleted**,
|
||||
because every one of those refusals is already reached before a scope exists:
|
||||
|
||||
1. **`site_at` is `extract_site_in`.** `execute` calls it as its own gate,
|
||||
before `module_sources` and before the engine. Its first two statements are
|
||||
`if !diagnostics.is_empty() { return None }` and
|
||||
`Region::read(tree, text, …).ok()?`. So a buffer that does not parse and
|
||||
every selection-shape refusal are answered by the server with `NOTHING`, and
|
||||
**cannot reach `Extraction::plan` at all** — the preflight's parse check and
|
||||
its `Region::read` were provably dead on the only caller.
|
||||
2. **`plain_identifier` and the occupied check are already `extract_module`'s
|
||||
first two statements**, ahead of `Extraction::plan` and therefore ahead of
|
||||
`Scope::build`. Moving them earlier moves nothing.
|
||||
|
||||
Measured, at the 805 ms site itself (`extractrefuse`, both cases below):
|
||||
|
||||
| Row | 0.51.0 | with preflight | Where it is refused |
|
||||
|---|---:|---:|---|
|
||||
| new name is not an identifier | 9.3 ms | 9.8 ms | `extract_module`'s first statement, in **both** |
|
||||
| selection covers no whole item | 0.22 ms | 0.13 ms | the server's `site_at` gate, in **both** |
|
||||
|
||||
Both sub-noise, both refused pre-scope in the reference already. The preflight
|
||||
bought nothing, so it is not in the tree: shipping it would have been ~130
|
||||
lines of engine code, a new public API and a second copy of two checks, in
|
||||
exchange for zero measured work. `crates/lucisv_server/src/extract.rs` carries
|
||||
a comment at the point where it would have gone, saying why there is nothing
|
||||
there — so the next round does not rediscover this.
|
||||
|
||||
What **did** stay from the exercise: `extract::does_not_parse`, the refusal
|
||||
sentence lifted out of `Extraction::plan` into the block where
|
||||
`extract/mod.rs` keeps its other refusal sentences (`occupied`,
|
||||
`not_in_scope`, `escaped`), and three server tests that pin where each cheap
|
||||
extract refusal is actually taken.
|
||||
|
||||
## What the `aes_wrap.sv` 805 ms refusal turned out to be
|
||||
|
||||
Identified from the review's own evidence without a run
|
||||
(`docs/perf/take5-review-20260908/results.jsonl`, the `inline-module: lucisv:
|
||||
extract selection into module…` row), then confirmed by the paired rerun. Its
|
||||
message is:
|
||||
|
||||
> the selection drives `h2d_intg`, and something outside it passes the same
|
||||
> name to a task or function, which may drive it too; lucisv will not make it
|
||||
> an output over that.
|
||||
|
||||
That sentence is `extract/boundary.rs:196`, inside `Crossing::read` — the
|
||||
**last** stage of `plan` before rendering. `Crossing::read` needs `flow`, and
|
||||
`flow::read(&scope, …)` walks the module's items *through the scope*, because
|
||||
giving an instance-port connection its direction means reading the instantiated
|
||||
module's own file. So the refusal is **scope-dependent at depth**, not
|
||||
region-local, and no bounded preflight reaches it.
|
||||
|
||||
Measured unchanged, as predicted: **761.1 → 767.8 ms** (+0.9%, within the
|
||||
session's noise), identical sentence.
|
||||
|
||||
What a future round could take is named instead, since the review asked for it:
|
||||
the directions `flow` wants are port facts the workspace index already holds,
|
||||
so the lever is not a preflight but the scope-reuse work already filed as
|
||||
§61.5 (R3b/R3c). Recorded as a finding and **not attempted here** — the
|
||||
review's instruction was to instrument first and "do not implement beyond the
|
||||
region-local checks without the evidence", and the evidence says the
|
||||
region-local checks were already free.
|
||||
## Status / TODO
|
||||
|
||||
- [x] `rename_preflight`, additive, engine-owned, in `renaming`'s order
|
||||
- [x] the server calls it before selecting sources; nothing materializes on a
|
||||
refusal; the sentence goes back unchanged
|
||||
- [x] the duplicate-declaration question answered **with evidence** — deferred,
|
||||
argument recorded above
|
||||
- [x] extract: the region-local checks confirmed to run before `Scope::build`
|
||||
**already**, by `site_at` and by `extract_module`'s own prefix; a
|
||||
preflight was written, measured and removed as redundant
|
||||
- [x] the equality oracle: every byte of seven fixtures × six new names
|
||||
- [x] the parse-count proof: a no-symbol rename performs **zero** whole-file
|
||||
parses, asserted in a test and read off the wire trace
|
||||
- [x] the `aes_wrap.sv` refusal identified, its stage named, measured unchanged
|
||||
- [x] measured against 0.51.0; R3a and R3c cells filled
|
||||
|
||||
## Measurements — 0.51.0 vs candidate
|
||||
|
||||
Paired, `~/.cache/lucisv-perf/take5r-1/`. Repeat medians (`ms[1:]`), three
|
||||
repeats after a first. Reference and candidate order alternated between
|
||||
phases; load 1.7–4.8 throughout, inside the review's own 2.82–6.00 band.
|
||||
|
||||
| Phase / row | 0.51.0 | candidate | Δ | parses | peak RSS |
|
||||
|---|---:|---:|---:|---|---|
|
||||
| renametrace **no symbol** | 2 012.3 ms | **0.3 ms** | **−100.0%** | **3 975 → 0** | 909 → 429 MiB |
|
||||
| renametrace duplicate module `rstmgr_por` | 2 012.6 | 2 032.0 | +1.0% | 3 975 → 3 975 | 910 → 914 MiB |
|
||||
| renametrace common port `clk_i` | 3 242.4 | 3 252.7 | +0.3% | 3 977 → 3 977 | 1 827 → 1 826 MiB |
|
||||
| renametrace `cipher_alert → clk_i` | 2 626.4 | 2 730.1 | +3.9% | unchanged | 1 609 → 1 610 MiB |
|
||||
| renametrace conflict `state_q → state_d` | 305.9 | 319.3 | +4.4% | unchanged | 530 → 539 MiB |
|
||||
| renametrace tail `state_q` | 367.3 | 365.0 | −0.6% | unchanged | 611 → 659 MiB |
|
||||
| renametrace ordinary `aes` | 84.9 | 85.2 | +0.4% | unchanged | 454 → 455 MiB |
|
||||
| renametrace unique internal `cipher_alert` | 15.5 | 17.2 | +11.0% | unchanged | 434 → 433 MiB |
|
||||
| tailrename | 376.3 | 377.4 | +0.3% | — | — |
|
||||
| rename `aes → aes_renamed` | 87.6 | 88.1 | +0.6% | — | — |
|
||||
| rename prepareRename | 0.11 | 0.17 | sub-ms, not read | — | — |
|
||||
| execute extract capture (`aes.sv`) | 143.5 | 143.3 | −0.1% | — | — |
|
||||
| execute **extract refusal** (`aes_wrap.sv`) | 761.1 | 767.8 | +0.9% | — | — |
|
||||
| execute inline refusal | 5.79 | 5.85 | +1.0% | — | — |
|
||||
| refactor extract offer | 0.81 | 0.80 | −1.2% | — | — |
|
||||
| extractrefuse bad name | 9.3 | 9.8 | already pre-scope | — | — |
|
||||
| extractrefuse partial selection | 0.22 | 0.13 | refused by `site_at` in both | — | — |
|
||||
|
||||
**Gates.** R3a's gate — *"≤16 ms; zero closed-workspace parses; exact
|
||||
refusal/precedence"* — is **met on all three counts**: 0.3 ms (53× inside the
|
||||
bound), `trace_parses` 0 and `trace_selected` 0 read off the wire, and the
|
||||
refusal string byte-identical. The duplicate-module refusal was **not** shipped
|
||||
and its row is unchanged, as the decision above requires. The extract refusal's
|
||||
before/after is reported with its stage named and is **unchanged**, which is
|
||||
the honest reading of R3c's extract half.
|
||||
|
||||
**Parity.** Every fingerprint identical: tail `b39defb21265…`, `aes`
|
||||
`fa7e31c78382…`, `clk_i` `31aadc134628…`, `cipher_alert` `5f53e977da59…`,
|
||||
extraction `090e92e7736e…`. Every refusal message identical (checked
|
||||
programmatically, not by eye). Corpus `git status --porcelain` = the same three
|
||||
pre-existing files after every one of the 12 phase invocations. **No guard
|
||||
kill.**
|
||||
|
||||
**Variability.** The +3.9% and +4.4% rows are single-session medians on a
|
||||
desktop machine and are within the band the review itself declines to read;
|
||||
+11.0% is on a 15.5 ms row (1.7 ms). None is a claimed movement, and none is
|
||||
adjusted.
|
||||
|
||||
## Work log
|
||||
|
||||
**2026-09-08 — dev (Opus).**
|
||||
|
||||
- Read the code before designing. Three findings changed the plan the brief
|
||||
proposed:
|
||||
1. **The brief's premise that `set_document` updates the index is wrong** —
|
||||
it reads the index and does not touch it (`state/mod.rs:695`). That
|
||||
inverted the duplicate-declaration answer from "probably yes" to a
|
||||
documented no, argued above.
|
||||
2. **`new_name == module` is not the last region-local check in `plan`** —
|
||||
`declared_once` and `undeclared` precede it. It could not go in a
|
||||
preflight without reordering two refusals.
|
||||
3. **The `aes_wrap.sv` refusal is `Crossing::read`'s**, four stages past
|
||||
anything a region-local preflight can reach. Identified from the review's
|
||||
preserved `results.jsonl` message rather than by a run, which cost nothing
|
||||
and settled the design before any code was written.
|
||||
- **Signature deviation, rename.** The brief proposed `rename_preflight(semantics,
|
||||
external, index, offset, new_name)`. Shipped without `external` and `index`:
|
||||
every refusal those two could answer is one the staleness argument forbids
|
||||
taking, so both parameters would have been unused — and carrying them would
|
||||
have implied the preflight consults the index, which is exactly the thing it
|
||||
must not do. `prepare_rename_here` keeps them, because an optimistic
|
||||
`prepareRename` is allowed to.
|
||||
- **The extract preflight was built, then removed.** It was written to the
|
||||
brief (taking `files` rather than a server-computed `occupied` bool, so the
|
||||
occupied question stayed the engine's), wired into `execute` ahead of
|
||||
`Scope::build`, and covered by eight oracle tests. Measuring it is what
|
||||
killed it: `tools/perf/phases_r3.py` was added to time the refusals it takes
|
||||
at the 805 ms site, and both came back unchanged — because `site_at` **is**
|
||||
`extract_site_in`, whose first two statements are the parse-diagnostic check
|
||||
and `Region::read`, and because `plain_identifier` and the occupied check
|
||||
were already `extract_module`'s own first statements. Removed rather than
|
||||
shipped: ~130 lines of engine code and a new public API for zero measured
|
||||
work is exactly the abstraction CLAUDE.md says to stop building. The reason
|
||||
is now a comment at the call site so it is not rediscovered.
|
||||
- **A refusal now traces too.** `rename_traced` writes its `timing:` line on
|
||||
the preflight path with `selected=0 parses=0 preflight=true`, so the
|
||||
measurement reads the parse count off the wire instead of trusting it. No
|
||||
change to `rename_trace.rs` was needed — `SelectionTrace` already derives
|
||||
`Default`, and `whole_scope` was the wrong shape (it sets `fallback=true`,
|
||||
which would have been a lie).
|
||||
- One incidental tidy kept: `extract::does_not_parse`, the parse refusal's
|
||||
sentence moved out of `Extraction::plan` into the block where
|
||||
`extract/mod.rs` already keeps `occupied`, `not_in_scope` and `escaped`.
|
||||
Behaviour identical; it is the only surviving trace of the removed preflight
|
||||
in that file.
|
||||
- Tests: `crates/vlog_refactor/tests/preflight_oracle.rs` (10), 4 added in
|
||||
`lucisv_server/src/rename.rs`, 3 in `lucisv_server/src/extract.rs` (kept
|
||||
after the removal — they pin *where* each cheap extract refusal is taken,
|
||||
which is the finding). The oracle counts deferrals rather than asserting them
|
||||
away, and a fixture that stops producing the shape it was written for fails
|
||||
loudly: `an_unresolved_and_an_inherited_reference_keep_their_own_sentences`
|
||||
sweeps for its two sentences instead of being told their offsets, because
|
||||
the first draft guessed an offset and was wrong.
|
||||
- Harness: `tools/perf/phases_r3.py` (new, phase `extractrefuse`) and one
|
||||
import line in `tools/perf/bench.py`. It is kept even though its answer was
|
||||
negative — the two rows are what make "the extract refusals are already
|
||||
pre-scope" a measurement rather than a claim.
|
||||
- File sizes after the change: `rename/mod.rs` 549, `rename/preflight.rs` 84,
|
||||
`extract/mod.rs` 535 — all under 600. The rename preflight went in a module
|
||||
of its own because `rename/mod.rs` was already within 60 lines of the mark.
|
||||
- Gates: `cargo fmt` clean; guarded `cargo clippy --all-targets` clean with no
|
||||
new `#[allow]`; guarded `cargo test --workspace` **4 322 passed, 0 failed**,
|
||||
exit 0, no guard kill. Zero tests removed (`git diff` shows no deleted
|
||||
`#[test]` in a tracked file), 17 added. (Corrected from "4 328" by QA —
|
||||
see QA log: a clean guarded run on this exact tree counts 4 322, matching
|
||||
a same-tree baseline of 4 305 plus the 17 added exactly.)
|
||||
|
||||
## QA log
|
||||
|
||||
**2026-09-08 — QA (Sonnet).** Verdict: **PASS.** Method: read `renaming` /
|
||||
`Scope::locate` / `Scope::declaration` / `Scope::declaration_across_files`
|
||||
(`rename/mod.rs`) side by side with `rename_preflight` / `declared_here`
|
||||
(`rename/preflight.rs`) and built the rule table below independently before
|
||||
reading the dev's own table, then attacked the oracle with sabotage in a
|
||||
throwaway clone, ran the gates guarded on the main tree, and re-ran the real
|
||||
`lucisv-server` over the wire (fresh sessions, my own storage dir, no reuse of
|
||||
the dev's cached results except for cross-referencing) against OpenTitan and
|
||||
read the wire traces.
|
||||
|
||||
**1. Gates, guarded, main tree.**
|
||||
`cargo fmt --all -- --check`: clean. `cargo clippy --all-targets`: clean, zero
|
||||
new `#[allow]` (`git diff HEAD | grep '#\[allow'` finds none in changed code).
|
||||
`cargo test --workspace` (guarded, `tools/guard.sh -m 8 -t 1800`): **4 322
|
||||
passed, 0 failed**, no guard kill. Cross-checked against a clone of `e13ae4c`
|
||||
with *no* diff applied, same guard, same machine window: **4 305 passed, 0
|
||||
failed**. 4 322 − 4 305 = **17**, matching the diff's added-test count exactly
|
||||
(`git diff HEAD | grep -c '^+.*#\[test\]'` → 7 in tracked files, plus the 10 in
|
||||
the new `preflight_oracle.rs` = 17; `git diff HEAD | grep -c '^-.*#\[test\]'` →
|
||||
0). **Nothing lost, nothing invented.** Found and fixed a documentation slip:
|
||||
the work log's "4 328 passed" does not reproduce on this tree in either of two
|
||||
independent guarded runs (main tree and a fresh clone); corrected above to
|
||||
4 322 with the arithmetic that supports it. Production line counts of
|
||||
changed/new files (non-blank, non-line-comment): `rename/mod.rs` 400 (551
|
||||
total), `rename/preflight.rs` 31 (84 total), `extract/mod.rs` 396 (539 total)
|
||||
— all comfortably under the 600-line mark by either counting convention; the
|
||||
dev's own 549/84/535 use the total-lines-minus-tests convention CLAUDE.md's
|
||||
own history entries use, and agree.
|
||||
|
||||
**2. The precedence contract — rule table, built independently.**
|
||||
|
||||
Read top to bottom: `renaming` calls `check_new_name` (rule 1) before
|
||||
`Scope::build_keeping` (the whole-workspace materialization this lane exists
|
||||
to skip), then `scope.locate` (rules 3–9, 11), then — *after* `locate`
|
||||
returns `Ok` — the same-name check (rule 2), then `collect_edits`/`verify`
|
||||
(rules 10, 12, 13). `Scope::declaration` (reached from both a same-file symbol
|
||||
and a cross-file `declaration_across_files`) checks `name_span.is_empty()`
|
||||
(rule 11) **before** `at_file_scope && index.units(name).len() > 1` (rule 9)
|
||||
— that specific order is the whole reason rule 2's preflight narrowing is
|
||||
sound only for non-file-scope declarations.
|
||||
|
||||
| Rule | Refusal | Preflight takes it? | Can preflight's answer differ from `renaming`'s for the same request? |
|
||||
|---|---|---|---|
|
||||
| 1 | invalid new name | yes (`check_new_name`, byte-identical shared fn) | no — same function, same first statement in both roads |
|
||||
| 3 | file not in scope | n/a, unreachable (precondition: request buffer always in both selectors' file sets) | no |
|
||||
| 4 | no symbol here | yes (`reference_id_at`/`symbol_at` on the buffer) | no — same `Semantics`, pure fn of buffer text |
|
||||
| 5 | unresolved reference | yes (`Resolution::NotFound`) | no — single-file resolution, same `Semantics` |
|
||||
| 6 | inherited-candidate reference | yes (`Resolution::InheritedCandidate`) | no — resolved entirely within the buffer's own analysis regardless of which file the base class lives in |
|
||||
| 7, 8 | external candidate: unresolved / ambiguous (from a use) | deferred (`Ok(())` for every `ExternalCandidate`) | n/a — never taken, so never differs |
|
||||
| 9 | file-scope declaration, ambiguous in index | deferred (`declared_here` returns `Ok(())` when `scope == file_scope`, **before** the same-name check) | n/a |
|
||||
| 11a | empty `name_span`, declaration in this buffer | yes, and correctly checked **before** the file-scope test, exactly matching `Scope::declaration`'s order — so it is taken even for a file-scope declaration | no |
|
||||
| 11b | empty `name_span`, declaration elsewhere | deferred (preflight never resolves cross-file) | n/a |
|
||||
| 2 | same name as new name | yes, **only** when `scope != file_scope` (checked after 11a, after the file-scope deferral) | no for the cases it takes; for a file-scope same-name it correctly stands aside so rule 9 keeps precedence on the slow road |
|
||||
| 10, 12, 13 | ambiguous-onto/capture/token drift | deferred (need computed edits) | n/a |
|
||||
|
||||
This matches `docs/features/perf5r-preflight/README.md`'s own table exactly,
|
||||
built before I read it. The one place a bug could hide — rule 11a's precedence
|
||||
over rule 9 for a file-scope declaration — is real and correctly ordered in
|
||||
both `declared_here` and `Scope::declaration`; confirmed by reading, not
|
||||
assumed.
|
||||
|
||||
**3. Wire matrix, a–j.** Both a hostile-fixture sweep (the oracle, byte-by-byte)
|
||||
and real OpenTitan sessions over the wire (fresh `lucisv-server` process, my
|
||||
own `--storage`, none of the dev's cached results reused for this half):
|
||||
|
||||
| Case | Verified how | Old vs new |
|
||||
|---|---|---|
|
||||
| (a) invalid name (`1abc`,`wire`,`a b`,empty) at no-symbol cursor | `an_invalid_new_name_outranks_every_cursor_refusal` (oracle) + `the_preflight_does_not_disturb_the_refusal_order` (server) | identical — name's sentence wins, rule 1 before rule 4 |
|
||||
| (b) comment/string/whitespace/macro-arg/`` `define``/keyword cursor | oracle's `PROSE`/`GEN` fixtures swept at every byte; `the_preflights_refusal_is_the_whole_workspaces_refusal` pins the `module` keyword explicitly | identical, `NOTHING_HERE` in both roads |
|
||||
| (c) unresolved reference | `an_unresolved_and_an_inherited_reference_keep_their_own_sentences`, swept for the sentence rather than told an offset | identical |
|
||||
| (d) inherited-candidate via `extends` (base in another file) | same test/fixture (`STRAY`); confirmed by reading that `Resolution::InheritedCandidate` is settled entirely inside the request buffer's own analysis regardless of which file the base lives in — the resolution *type* itself already encodes "unresolved candidate", not "resolved to a symbol in file X" | identical |
|
||||
| (e) same-name at non-file-scope (local net) vs file-scope (module) | `renaming_a_symbol_to_the_name_it_already_has_is_refused_from_the_buffer` — pins **both** halves directly | net: taken, identical sentence. module: **deferred**, confirmed `rename_preflight(...).is_ok()`, and the slow road's answer is the unchanged `already_named()` string (only the sentence's *construction* was refactored into a shared fn, not its text or its position after `locate`) |
|
||||
| (f) duplicate module (`rstmgr_por`) | `a_name_declared_in_two_files_stays_on_the_slow_road` + live re-run: real server, real OpenTitan — refused with *"`rstmgr_por` is declared in more than one indexed file; lucisv will not guess which declaration this rename means."*, `trace_parses_index=3975` (unchanged), no `preflight` field | identical, unchanged parse count |
|
||||
| (g) unsaved (`untitled:`) buffer | `the_preflight_does_not_disturb_the_refusal_order`; and by reading `rename_traced`'s own source — the `UNSAVED` checks (`ws.document`, then `doc.path`) run and can early-return **before** the preflight call is reached | identical, unchanged order |
|
||||
| (h) large-file buffer | read `server/dispatch.rs:83` (`large_file_answer` runs first, unconditionally, ahead of the method dispatch that would call `rename_traced`) and `server/large_file.rs:80` (`Rename::METHOD => Err(... TOO_LARGE ...)`) — the preflight is provably never reached; `a_large_buffer_is_refused_before_the_preflight_could_see_it` pins that the preflight *would* have been wrong if it were reached, which is exactly why the gate must stay in front of it | unaffected by this diff; still TOO_LARGE before either road runs |
|
||||
| (i) reference to a symbol declared in another file | `Resolution::ExternalCandidate => Ok(())` read directly; live re-run's `ordinary: aes -> aes_renamed` row (an `aes` instantiation reference) completed the whole-scope path normally, fingerprint `fa7e31c78382…` unchanged | `Ok` from preflight, whole-scope path runs, unchanged |
|
||||
| (j) empty `name_span` in this buffer (rule 11a) | read `declared_here`'s first check, ahead of the file-scope test; oracle sweeps `SUB`/`TOP`/`GEN` at every byte, which would surface an unspelled-declaration mismatch if one existed in the fixtures — none constructed with a literally empty span beyond what the parser already produces on malformed input, covered indirectly by `a_buffer_that_does_not_parse_keeps_parity` | code-path identical to `Scope::declaration`'s own check; no divergence found |
|
||||
|
||||
Every case in the wire re-run returned the **same sentence text** as the
|
||||
tracker's own evidence (`~/.cache/lucisv-perf/take5r-1/results.jsonl`), which
|
||||
I cross-checked field by field (see §5).
|
||||
|
||||
**4. Oracle sabotage.** In a throwaway clone
|
||||
(`.../scratchpad/qa-61-1/sabotage-clone`, cloned from `e13ae4c` with the
|
||||
working-tree diff applied via `git apply` + copying the four untracked new
|
||||
files — diffed byte-identical against the real tree before use):
|
||||
|
||||
- **Sabotage 1** — made the `Resolution::Resolved` arm of `rename_preflight`
|
||||
return `Err(NOTHING_HERE.to_string())` unconditionally instead of calling
|
||||
`declared_here` (an invented refusal for a resolved reference). Result:
|
||||
`cargo test -p vlog_refactor --test preflight_oracle` — **3 of 10 tests
|
||||
fail**, each panicking with *"the preflight invented the refusal ... for a
|
||||
rename the workspace performs"*, exactly the failure mode the oracle's own
|
||||
doc comment promises.
|
||||
- **Sabotage 2** — changed only the *wording* of the same-name refusal inside
|
||||
`declared_here` (`` `{new_name}` already is the name it has.`` instead of
|
||||
the shared `already_named()`'s `` `{new_name}` is the name it already
|
||||
has.``), leaving the slow road's sentence untouched. Result: **8 of 10
|
||||
tests fail** with *"the preflight and the workspace refuse in different
|
||||
words"* and the two strings printed side by side.
|
||||
|
||||
Both sabotages caught decisively, restored, and the clone diffed clean against
|
||||
the real preflight.rs afterward. This is real evidence the oracle does what
|
||||
its doc comment claims, not an assumption from reading it.
|
||||
|
||||
**5. Parse count and traceability.** `a_rename_on_a_cursor_with_no_symbol_
|
||||
parses_nothing` reads `vlog_parser::stats::parses()` before/after and asserts
|
||||
the **difference** is `0` — not a hard-coded literal — and separately asserts
|
||||
the `--verbose` trace line contains `selected=0`, `parses=0`, `preflight=true`
|
||||
by substring, so a regression that made the count right but the trace wrong
|
||||
would still fail. My own fresh wire re-run (guarded, real server, real
|
||||
OpenTitan, fresh session, `--tries 1`) reproduces this independent of the
|
||||
dev's logged run: no-symbol **0.248 ms**, `parses=0`, `selected=0`,
|
||||
`preflight=true`, sentence *"there is no symbol to rename at this
|
||||
position."*; `rstmgr_por` (duplicate module) **2 120–2 153 ms**,
|
||||
`parses_index=3975`, `selected=3976` — unchanged; `clk_i` (common port)
|
||||
**~3.4 s**, `parses_index=3975`, `fallback=true` — unchanged. All twelve
|
||||
numbers named in the tracker's R3a/R3c-x records (no-symbol 2 012.3→0.34,
|
||||
duplicate-module 2 012.6→2 032.0, common-port 3 242.4→3 252.7, tail
|
||||
367.3→365.0, plus the five fingerprints) were located verbatim in
|
||||
`~/.cache/lucisv-perf/take5r-1/results.jsonl`/`results2.jsonl` by field
|
||||
(`row`, `server`, `ms`, `fingerprint`, `trace_parses`, `trace_selected`) —
|
||||
traceability item 8 satisfied.
|
||||
|
||||
**6. The extract decision.** Read `lucisv_server/src/extract.rs::execute`:
|
||||
`site_at` is called and, for a non-large buffer, **is**
|
||||
`vlog_refactor::extract_site_in`, whose first two statements are the
|
||||
parse-diagnostic check (`if !diagnostics.is_empty() { return None }`) and
|
||||
`Region::read(...).ok()?` — confirmed at
|
||||
`crates/vlog_refactor/src/extract/mod.rs:99-103`, called *before*
|
||||
`ws.module_sources` (workspace materialization). Read `extract_module`
|
||||
(same file, line 131): `plain_identifier(new_name)?` is its first statement
|
||||
and the occupied-target check is its second, both ahead of
|
||||
`Extraction::plan` → `Scope::build`. Live re-run of the `extractrefuse` phase:
|
||||
bad-name refusal **12.7 ms**, partial-selection refusal **0.05 ms** — both
|
||||
already pre-scope in the reference too, consistent with "no work to remove."
|
||||
Live re-run of `execute`'s `aes_wrap.sv` inline-site row: refused at
|
||||
**757.6 ms** with the sentence *"the selection drives `h2d_intg`, and
|
||||
something outside it passes the same name to a task or function ... lucisv
|
||||
will not make it an output over that."* — matches `boundary.rs`'s `direction`
|
||||
function (the sentence text found at that exact location), which needs
|
||||
`sides: flow::Sides` from `flow::read(&scope, ...)`, confirming the refusal is
|
||||
genuinely scope-dependent and unreachable from a region-local preflight. `aes.sv`
|
||||
extract-capture fingerprint from the live re-run's `execute` output matched
|
||||
`090e92e7736e…` (the `090e92e7736e0a5a93557d75befa65a5bea0c2f44494d71dc67e3f8d70d05835`
|
||||
row in the JSONL). No sabotage was needed here since no production code
|
||||
shipped from this half — verified the claim by reading the removed-preflight's
|
||||
would-be call sites instead, which is what the task asked for.
|
||||
|
||||
**7. Trace-line / RequestFailed check.** Read `server/dispatch.rs`'s
|
||||
`Rename::METHOD` arm: `trace` is always populated by `rename_traced` (both
|
||||
roads), but `self.timing(...)` — the only place a `preflight=true` line
|
||||
reaches any output — fires only under `if let (true, Some(line)) =
|
||||
(self.verbose, trace)`. Every `Err` outcome, preflight or slow-road, becomes
|
||||
`Failure::Request(message)` → `lsp_server::ErrorCode::RequestFailed` with text
|
||||
`"lucisv: {message}"` (`dispatch.rs:598-599`) — never a result value. Matches
|
||||
the task's item 6 exactly.
|
||||
|
||||
**8. Re-measured cells.** Fresh, guarded, real-server sessions on this exact
|
||||
candidate binary (sha256 `5f815542ac16854acb77f545805378324e0025eaaf48662f28bcc8ae8b6ebdb9`,
|
||||
matching the tracker's own recorded candidate hash — **no rebuild needed**,
|
||||
confirmed identical before use) against OpenTitan, `--tries 1` (a lighter
|
||||
re-measurement than the dev's 3-repeat sessions, sufficient to confirm order
|
||||
of magnitude and correctness, not to re-derive medians): no-symbol 0.248 ms,
|
||||
duplicate-module 2 120–2 153 ms, common-port ~3.4 s, tail-adjacent rows in the
|
||||
same session all within normal single-session variance of the tracker's
|
||||
values (a few percent, same direction the tracker itself notes as
|
||||
session-to-session noise). `extractrefuse` bad-name 12.7 ms / partial-selection
|
||||
0.05 ms, `execute` inline-refusal 757.6 ms, `aes.sv` capture 138.2/167.9 ms —
|
||||
all within the same variance band and all sentences/fingerprints identical.
|
||||
No cell moved outside what the tracker itself already characterizes as
|
||||
session noise (±10%), and none of the safety-relevant numbers (parse counts,
|
||||
sentences, fingerprints) showed **any** deviation.
|
||||
|
||||
**9. OpenTitan / guard / lingering processes.** `git -C
|
||||
/Users/guoliangchen/repo/opentitan status --porcelain` showed exactly the
|
||||
three pre-existing modified files (`hw/ip/aes/dv/tb/tb.sv`,
|
||||
`hw/top_darjeeling/.../ast.sv`, `hw/top_earlgrey/.../ast.sv`) before and after
|
||||
every phase invocation in this QA pass. Every cargo/test/bench invocation ran
|
||||
through `tools/guard.sh -m 8 -t <bound>`; zero guard kills. No `sleep` over
|
||||
60 s was used; all waits were `Monitor`-backed PID polls that exited on their
|
||||
own; no lingering background processes or monitors remain at the end of this
|
||||
pass (`ps` checked clean after each phase).
|
||||
|
||||
**10. Fixed directly (small, unambiguous).** The feature README's own work
|
||||
log said `cargo test --workspace` **4 328 passed**; two independent guarded
|
||||
runs on this exact tree (main tree, and the untouched sha256-matched binary's
|
||||
own source) show **4 322**, which is also exactly what the QA brief itself
|
||||
expected ("dev says 4322"). Corrected in the Work log entry above with the
|
||||
supporting arithmetic; not a functional finding, a transcription slip.
|
||||
|
||||
**Topo handshake for the lead to apply** (repeating the README's own
|
||||
Handshakes request, verified sound): `docs/topo.md` §1.2's
|
||||
`lucisv_server ◀──▶ vlog_refactor` entry should gain a **one-directional**
|
||||
parity obligation — `rename_preflight` must produce the same *refusal* text as
|
||||
whole-scope `rename` for the same request, but may always stand aside — and a
|
||||
note that `rename_preflight` deliberately does **not** read the workspace
|
||||
index, unlike `prepare_rename_here`, which does. Confirmed by code: no `index`
|
||||
or `external` parameter reaches `rename_preflight` anywhere in this diff, and
|
||||
`declared_here`'s file-scope branch is the one place that would have needed
|
||||
it, and defers instead.
|
||||
|
||||
**Verdict: PASS.** Every refusal's sentence and precedence is unchanged
|
||||
between 0.51.0 and the candidate on every case checked, including two
|
||||
successful sabotage attacks on the oracle that would have caught a real
|
||||
regression. TODO §61.1's QA line is ticked below.
|
||||
|
||||
## Review
|
||||
|
||||
**2026-09-08 (lead).** Accepted. Read `preflight.rs`, the server call
|
||||
site, the oracle test, both logs; QA's independently rebuilt rule table
|
||||
and its sabotage of the oracle are the acceptance.
|
||||
|
||||
- The result is the review's gate met by two orders of magnitude (2.0 s
|
||||
and 3 975 parses → 0.34 ms and none) with the sentence and its
|
||||
precedence byte-identical, proven at every byte of the fixtures and on
|
||||
the wire.
|
||||
- The two things the dev refused to do are as good as the thing it did.
|
||||
The duplicate-declaration refusal stays on the slow road because the
|
||||
index is written on save and on a watcher event, never on a keystroke,
|
||||
and a wrong rename refusal is terminal where a wrong prepareRename is
|
||||
not — the right reading of "only with evidence the index is current".
|
||||
The extract preflight was built, measured at zero work, and removed:
|
||||
the offer gate already runs the region-local checks before the engine
|
||||
is reached, and the `aes_wrap.sv` refusal is `Crossing::read`, the last
|
||||
stage of the plan, which only §61.5's scope reuse can move.
|
||||
- The signature deviation (no `external`/`index` parameters) is the
|
||||
contract itself: a preflight that could read the index would invite
|
||||
exactly the refusal the argument forbids.
|
||||
- QA fixed one arithmetic slip in this README's test count; nothing else.
|
||||
|
||||
Docs applied at merge: topo §1.2 — `rename_preflight` owes whole-scope
|
||||
`rename` the same refusal text, one-directionally, and reads no index.
|
||||
|
||||
*(empty — for the lead)*
|
||||
@@ -0,0 +1,979 @@
|
||||
# perf5r-publication — what a startup scan costs while requests keep arriving
|
||||
|
||||
Review round §R4 (TODO §61.4). `docs/performance_take5_review.md` §4 and its
|
||||
"Startup throughput and responsiveness must be judged separately".
|
||||
|
||||
## Goal
|
||||
|
||||
A scan that answers messages between its files pays a **publication** for each
|
||||
burst: the staged records merged into the index, the completion tables
|
||||
re-derived, the include graph folded in, every open buffer's overlay refreshed
|
||||
(`Workspace::publish_scan`). The review could not say what that costs, because
|
||||
the only probe it had (`scanserve`) sends the next request 200 ms *after the
|
||||
previous response* — so a more responsive server is asked more often and its
|
||||
session-completion time is not comparable with anything. This lane builds the
|
||||
controlled probe the review asked for — a **fixed arrival rate**, the same
|
||||
offered load whatever the server does with it — reads the publication cost off
|
||||
the server's own trace beside the request latencies, and then reduces what the
|
||||
probe names without touching the coherent-prefix contract. It also carries two
|
||||
items the lead assigned here because they live on the same drain path: the
|
||||
empty-answer rule §61.3 filed, and the `HEAD_WALK_MAX` test §61.3's QA found
|
||||
missing.
|
||||
|
||||
## Assumptions
|
||||
|
||||
- **The three tables are published together or not at all.** Nothing here
|
||||
changes that; the cadence changes *how often* a publish happens, never what
|
||||
one contains (`docs/features/scan-interleave/README.md`).
|
||||
- **A prefix is allowed to be old, never inconsistent.** A request answered
|
||||
between two publishes reads an index that is at most `PUBLISH_EVERY` files
|
||||
behind the one it could have had. That was always true between two interleave
|
||||
points; the cadence widens the gap and does not change its nature.
|
||||
- **`[]` from a navigation request is not information while the index is
|
||||
growing.** The empty-answer rule rests on this: a definition, a
|
||||
typeDefinition and a references answer with a *list of places* and with an
|
||||
empty list when they find none, so `[]` cannot be told apart from "not
|
||||
scanned yet". A hover's `null`, a completion's empty list and an empty
|
||||
code-action menu mean what they say, and are untouched.
|
||||
- **`textDocument/implementation` is not answered by this server**, so it is
|
||||
not on the navigation list even though it would belong there.
|
||||
- The corpus is opentitan `0098135264` with its three known modifications, read
|
||||
only. Every number is from `tools/perf/bench.py` under
|
||||
`tools/guard.sh -m 8 -t 1800`.
|
||||
|
||||
## Handshakes
|
||||
|
||||
### `lucisv_server::state` — the publication cadence
|
||||
|
||||
```rust
|
||||
pub(crate) const PUBLISH_EVERY: usize = 512; // state/scan.rs
|
||||
|
||||
impl Scan {
|
||||
/// Whether enough has been staged since the last publish for another one
|
||||
/// to be worth the merge it costs.
|
||||
pub fn publish_is_due(&self) -> bool;
|
||||
}
|
||||
```
|
||||
|
||||
Additive. `publish_scan` is unchanged — same signature, same contract, same
|
||||
three tables — and so is every other entry on `Scan`. The only caller of
|
||||
`publish_is_due` is `server/index.rs::answer_what_is_waiting`, which is the one
|
||||
place a mid-scan publish is decided.
|
||||
|
||||
`state::discover` and `HEAD_WALK_MAX` went from `pub(super)` to `pub(crate)`, so
|
||||
`server/tests/startup.rs` can write a fixture *against the bound* rather than
|
||||
against the number 512 written out again. No line was added to `state/mod.rs`
|
||||
for it.
|
||||
|
||||
### `lucisv_server::server` — a request may be asked again
|
||||
|
||||
```rust
|
||||
struct Server {
|
||||
/// Navigation requests a scan answered empty while it was still growing
|
||||
/// the index, to be asked again at its next publish.
|
||||
deferred: Vec<Message>,
|
||||
}
|
||||
|
||||
impl Server {
|
||||
pub(super) fn ask_again_if_empty(&self, request: &Request) -> Option<Request>;
|
||||
pub(super) fn say_deferred(&self, request: &Request);
|
||||
}
|
||||
pub(super) fn names_nowhere(response: &Response) -> bool;
|
||||
```
|
||||
|
||||
**`deferred` is deliberately not part of `must_wait`.** `held` is the order
|
||||
contract — nothing newer may overtake what is waiting there. `deferred` is not
|
||||
a queue at all: the answer was computed, found to name nowhere, and set aside
|
||||
because the reason may be that the file has not been scanned. Nothing is owed
|
||||
anything by it, so a hover, a completion or a code action behind one is answered
|
||||
exactly as before. That is the difference the two names are for.
|
||||
|
||||
### `docs/features/scan-interleave/README.md`
|
||||
|
||||
A dated entry records both, with the rules they amend stated in that README's
|
||||
own terms. Neither is a contract change: the coherence contract, the order
|
||||
contract and `INTERLEAVE_ABOVE` are all untouched.
|
||||
|
||||
### `docs/features/perf5r-first-answer/README.md`
|
||||
|
||||
That lane's cross-folder `[]` — pinned openly and filed as request 5 — is
|
||||
answered here. Its test moved with it; the "honest limit" it pinned is now the
|
||||
rule's own regression test.
|
||||
|
||||
### Requests for the lead (`docs/topo.md` is not edited by this lane)
|
||||
|
||||
1. `lucisv_server ──▶ vlog_semantic`: nothing new. `WorkspaceIndex::absorb` is
|
||||
called with the same arguments, fewer times.
|
||||
2. A new edge inside `lucisv_server`: `server::index ──▶ state::scan`
|
||||
(`publish_is_due`) and `server::mod ──▶ server::dispatch` (`names_nowhere`,
|
||||
`ask_again_if_empty`).
|
||||
3. `state::discover` is now `pub(crate)` — a visibility widening for a test,
|
||||
not an interface.
|
||||
4. **A finding for a future lane, not a request:** `WorkspaceIndex::absorb`
|
||||
ends in `merge(None)`, a pass over every record the index holds, while
|
||||
`update_facts` has a targeted `merge(Some(&affected))` beside it. Under load
|
||||
that whole-index merge is the single largest publication cost. An additive
|
||||
`absorb` that takes an `Affected` would be a `vlog_semantic` change, which
|
||||
this lane's file list excludes; the cadence reduces how often it is paid
|
||||
rather than what it costs. Numbers below.
|
||||
|
||||
## How it works
|
||||
|
||||
### The probe: `scanload`
|
||||
|
||||
`tools/perf/phases_r4.py`, schema 2, registered in `bench.py` like every other
|
||||
phase.
|
||||
|
||||
- **The clock, not the answers.** A `textDocument/definition` goes out every
|
||||
`rate` ms of wall time counted from the session's own start, whether or not
|
||||
the previous one has been answered. Requests pipeline; a server that stalls
|
||||
accumulates them, which is the queue latency the probe exists to see.
|
||||
- **A fixed count, so the load is the same for both binaries.** The first draft
|
||||
stopped sending when the server stopped saying things, and that reintroduced
|
||||
`scanserve`'s confound in a new place: a mid-scan lull in the progress
|
||||
chatter stopped the probe at 14 requests where the session ran for 20 ticks.
|
||||
The window is now fixed per cache state (`WINDOW_MS`: cold 9 000 ms, warm
|
||||
3 500 ms — long enough to cover the reference's whole loaded session), so both
|
||||
binaries are asked exactly the same number of times and a binary that finishes
|
||||
sooner shows it as requests answered **after** settle, never as requests never
|
||||
sent.
|
||||
- **Every request's own wait.** `Session.poll_answers` (new, additive, in
|
||||
`lspclient.py`) takes every response that has arrived without blocking on the
|
||||
oldest, and the arrival instant is stamped in the reader thread, so a request
|
||||
answered while the probe is busy sending the next one is not charged for the
|
||||
probe's poll interval.
|
||||
- **The publication split beside the latencies.** The session runs `--verbose`,
|
||||
so `publishes`, `published` and the four `publish_*` stages come off the very
|
||||
session whose requests are in the row.
|
||||
- **A quiet control in the same series**: the same cells with no requests at
|
||||
all, so a settle time that moved can be told apart from one that moved
|
||||
*because requests arrived*.
|
||||
- **Cells:** rate ∈ {100, 250} ms × cache ∈ {cold, warm} × extra open buffers
|
||||
∈ {0, 1, 10, 100}, three fresh sessions each, plus the quiet control per
|
||||
(cache, buffers). Buffer counts are *extra*: the cursor's own file is always
|
||||
open, so "0" is one buffer and "100" is 101 — `scanprofile`'s convention.
|
||||
- **Recorded per cell:** every request's wall latency (median and max, and the
|
||||
same two over the mid-scan subset), how many were answered before settle,
|
||||
`mismatched_answers` and `unsettled_answers` against the settled answer,
|
||||
settle time, the publish counts and stage split, `tick_jitter_ms` (the largest
|
||||
slip between a tick's due instant and its write — how a reader checks the
|
||||
arrival discipline the row claims), and requests offered vs answered.
|
||||
|
||||
### The cadence
|
||||
|
||||
`answer_what_is_waiting` published whenever anything at all was waiting — one
|
||||
whole-index merge per burst of requests. It now publishes when
|
||||
|
||||
* something was **waiting** — the startup's held requests, drained the moment
|
||||
the neighbourhood is in. That publish is the session's first useful answer
|
||||
and is never deferred (`perf5r-first-answer`); or
|
||||
* `Scan::publish_is_due()` — `PUBLISH_EVERY` (512) records staged since the
|
||||
last publish.
|
||||
|
||||
A count rather than a clock, for three reasons: a merge's cost is the index's
|
||||
size and its value is the records it makes answerable, so files staged is the
|
||||
currency both are in; what a scan does is then the same on a fast machine and a
|
||||
slow one; and a test can assert it. 512 is deliberately `HEAD_WALK_MAX`'s
|
||||
number — both answer "how much of this workspace may a user wait for", and 512
|
||||
warm steps is ~100 ms of scanning on this corpus.
|
||||
|
||||
**A quiet scan still pays nothing at all.** The cadence is asked only when there
|
||||
is something for a publish to be *for*: the drain returns before it, as it
|
||||
always did, when nothing is held, nothing has arrived and nothing is deferred.
|
||||
|
||||
### The empty-answer rule
|
||||
|
||||
Inside `process_batch`, at the one place a request's response is sent:
|
||||
|
||||
1. `ask_again_if_empty` takes a copy of the request when a scan is running and
|
||||
the method is one of the three in `NAVIGATION`;
|
||||
2. the answer is computed through the **ordinary handler**, exactly as before;
|
||||
3. if it `names_nowhere` — an `Ok` result that is an empty array — the copy goes
|
||||
on `deferred` and nothing is sent;
|
||||
4. the next publish puts `deferred` at the front of that drain's batch, behind
|
||||
whatever was already `held` and ahead of everything newer, and they are asked
|
||||
again;
|
||||
5. `scan_until_settled` ends with `answer_what_was_deferred`, which runs
|
||||
whatever is left through `process_batch` with `scanning` already false — so
|
||||
the rule defers nothing that time round and an empty answer goes out.
|
||||
|
||||
The re-computation is bounded **by publishes, not by steps**: a deferred request
|
||||
is asked again once per publish, so at most a handful of times in a whole scan,
|
||||
and a request that keeps coming back empty costs one evaluation per publish and
|
||||
is answered when the scan ends.
|
||||
|
||||
## Measured
|
||||
|
||||
Machine and method are `docs/perf/README.md`'s: Apple M1 Max, macOS 27.0,
|
||||
release binaries built with `cargo build --release --locked`, opentitan
|
||||
`0098135264` with its three known modifications, everything under
|
||||
`tools/guard.sh -m 8 -t 1800`, three fresh sessions a cell, no cargo command
|
||||
during a timed run. Reference `REF` = trunk `eb54042`; candidate `CAND` = that
|
||||
tree plus this lane's diff. `~/.cache/lucisv-perf/take5r-4/`.
|
||||
|
||||
### What a publish costs, and how it scales — the R4 baseline
|
||||
|
||||
The reference under a definition every 100 ms of wall clock, warm, one open
|
||||
buffer: **34 publishes in one scan**, and
|
||||
|
||||
| stage | ms | share of publication |
|
||||
|---|---:|---:|
|
||||
| `publish_absorb` | 2 433 | **78 %** |
|
||||
| `publish_candidates` | 623 | 20 % |
|
||||
| `publish_includes` | 47 | 1.5 % |
|
||||
| `publish_overlay` | 2.4 | 0.08 % |
|
||||
| **total** | **3 105** | of a **4 206 ms** scan — **74 %** |
|
||||
|
||||
The same scan with no requests at all takes **1 005 ms**. So under this load the
|
||||
scan is four times longer, and essentially all of the difference is
|
||||
publication. Cold is the same shape and worse: 88 publishes, **7 973 ms** of
|
||||
publication in a **10 675 ms** scan, against a **2 766 ms** quiet cold scan.
|
||||
|
||||
Three things the split says, and only one of them is what the brief guessed:
|
||||
|
||||
1. **`index.absorb` is the cost.** It is 78 % of publication because it ends in
|
||||
`merge(None)`, a pass over every record the index holds — so a publish costs
|
||||
the size of the *index*, not the size of the batch, and the index grows all
|
||||
the way to the end of the scan. `vlog_semantic`'s own doc comment says a
|
||||
per-file merge would be quadratic; under load the drain was doing one per
|
||||
burst of requests, which is the same shape at a coarser grain.
|
||||
2. **The candidates rebuild is real but second.** `Candidates::absorb` ends in
|
||||
`take_index_tables`, which re-derives the unit, module and macro tables from
|
||||
the whole index every publish — 20 % of publication, ~18 ms a publish on
|
||||
this corpus.
|
||||
3. **The overlay refresh is not a lever.** It is **0.08 %** at one open buffer
|
||||
and **9.6 %** at 101 (291 ms of 3 037), i.e. about 0.09 ms per buffer per
|
||||
publish. At the buffer counts an editor actually has it is noise. This is
|
||||
the item the work order expected to matter; the measurement says it does
|
||||
not, and the reduction it asked for — deciding per buffer whether the
|
||||
absorbed records could have moved its external resolutions — would cost a
|
||||
name-set intersection per buffer per publish to save a tenth of a
|
||||
millisecond. **Not done, and the numbers are why.**
|
||||
|
||||
Scaling: publication is flat in the number of open buffers except for the
|
||||
overlay term (2.4 ms at 1 buffer → 291 ms at 101), and roughly linear in the
|
||||
number of publishes, which is set by how often requests arrive. That is the
|
||||
whole finding: *the client's request rate, not the workspace, decides what a
|
||||
scan spends on publication.*
|
||||
|
||||
### The cadence, under the same offered load
|
||||
|
||||
Warm, every cell three fresh sessions, the same fixed number of requests
|
||||
offered to both binaries (`requests answered` is equal in every row, so nothing
|
||||
here is a speedup bought by serving less).
|
||||
|
||||
| cell (warm) | | latency p50 | latency max | publishes | publication ms | scan ms |
|
||||
|---|---|---:|---:|---:|---:|---:|
|
||||
| 100 ms, 1 buffer | REF | 112.3 | 168.0 | 34.3 | 3 105 | 4 206 |
|
||||
| | **CAND** | **1.9** | 421.9 | **4.7** | **588** | **2 188** |
|
||||
| 250 ms, 1 buffer | REF | 243.4 | 256.5 | 14.0 | 2 824 | 3 852 |
|
||||
| | **CAND** | **1.9** | **203.5** | **3.0** | **378** | **1 417** |
|
||||
| 100 ms, 2 buffers | REF | 308.9 | 2 109.5 | 33.0 | 3 082 | 4 117 |
|
||||
| | **CAND** | **2.4** | **680.7** | **4.0** | **688** | **1 725** |
|
||||
| 100 ms, 11 buffers | REF | 175.6 | 1 912.6 | 33.3 | 3 101 | 4 142 |
|
||||
| | **CAND** | **2.3** | **708.6** | **3.7** | **580** | **1 654** |
|
||||
| 100 ms, 101 buffers | REF | 1 960.1 | 3 672.0 | 33.0 | 3 037 | 4 254 |
|
||||
| | **CAND** | **10.4** | **823.1** | **4.0** | **669** | **1 873** |
|
||||
|
||||
**Publication down 78–87 %, the scan down 48–63 %, the median request wait down
|
||||
98–99.5 %, and the same number of requests answered.**
|
||||
|
||||
The **tail** is the one place this is not a clean sweep, and the count across
|
||||
all sixteen loaded cells (warm and cold, both rates, four buffer counts) is:
|
||||
**improved in ten, level in two, higher in four.** Three of the four are
|
||||
single-open-buffer cells — the case where the reference is at its best, because
|
||||
publishing after every burst keeps the index so fresh that no request waits
|
||||
long for one, and the worst of them is warm 100 ms, **168 → 422 ms**. The
|
||||
fourth is warm 250 ms at 11 buffers, 760 → 777 ms, which is 2 %. Against that:
|
||||
3 672 → 823 ms at 101 buffers warm and 9 308 → 1 583 ms cold, and a median that
|
||||
went from 112 ms to 1.9. The trade is legible — four merges instead of
|
||||
thirty-four means a request that lands inside one waits for it — and it is
|
||||
one request in thirty-five.
|
||||
|
||||
Cold is the same shape and larger, because a cold scan is longer and every
|
||||
publish merges a bigger index by the time it happens:
|
||||
|
||||
| cell (cold) | | latency p50 | latency max | publishes | publication ms | scan ms |
|
||||
|---|---|---:|---:|---:|---:|---:|
|
||||
| 100 ms, 1 buffer | REF | 137.7 | 210.6 | 87.7 | 7 973 | 10 675 |
|
||||
| | **CAND** | **1.5** | 395.5 | **7.0** | **922** | **3 686** |
|
||||
| 250 ms, 1 buffer | REF | 225.3 | 255.0 | 36.7 | 6 816 | 9 569 |
|
||||
| | **CAND** | **1.3** | 313.1 | **5.0** | **552** | **3 301** |
|
||||
| 100 ms, 2 buffers | REF | 4 705.9 | 9 160.5 | 89.7 | 7 979 | 10 778 |
|
||||
| | **CAND** | **2.1** | **1 440.0** | **7.0** | **922** | **3 602** |
|
||||
| 100 ms, 11 buffers | REF | 4 724.7 | 9 194.9 | 89.7 | 7 980 | 10 801 |
|
||||
| | **CAND** | **1.9** | **1 412.2** | **6.0** | **880** | **3 626** |
|
||||
| 100 ms, 101 buffers | REF | 4 832.2 | 9 308.4 | 89.3 | 7 959 | 10 947 |
|
||||
| | **CAND** | **2.2** | **1 583.3** | **6.0** | **932** | **3 829** |
|
||||
|
||||
**Publication −88 %, the traced scan −65 %, and at two or more open buffers the
|
||||
tail improves by six times.** The overlay term at 101 buffers goes 812 → 56 ms
|
||||
with it. Note the reference's cold median at two or more open buffers: **4.7
|
||||
seconds**. That is not publication — it is `must_wait`'s `held` clause, and it
|
||||
is the finding the probe made before a line of this lane's code existed: the
|
||||
first held request holds every request behind it, so a whole session's stream
|
||||
drains in one burst when the neighbourhood lands. The candidate's median is
|
||||
2 ms because its session is over less than halfway through the offered window,
|
||||
so most of the same requests meet a settled server.
|
||||
|
||||
**Two numbers in these tables mean different things and should not be added
|
||||
up.** `scan ms` is the server's own traced scan wall time and is the honest
|
||||
"completion under load". The probe's own `settled_ms` is **floored by the
|
||||
request window** whenever the session finishes inside it — the last chatter the
|
||||
probe sees tracks its own last request — so it understates the improvement
|
||||
(warm 1 buffer: settle 4 215 → 3 417, −19 %, against the scan's −48 %). For the
|
||||
same reason `mid_scan_*` misclassifies post-settle answers as mid-scan in the
|
||||
candidate's rows and is not quoted here. The comparison the tables rest on is
|
||||
sound without either: **both binaries are offered the identical number of
|
||||
requests over the identical window and answer all of them.**
|
||||
|
||||
### The empty-answer rule, at a cursor the head cannot answer
|
||||
|
||||
`scanload`'s cursor names a module in `hw/ip/aes/rtl`, which the head walks
|
||||
first, so it is non-empty from the first publish and the rule never fires on
|
||||
it. `scanloadcross` asks the same fixed load at `tl_if` in the same buffer —
|
||||
an interface declared in `hw/dv/sv/tl_agent`, which the open buffer's folder
|
||||
does not hold. `unsettled_answers` counts every answer that was not the settled
|
||||
one, empty ones included: it is the review §2 gate, and it is what the rule is
|
||||
for.
|
||||
|
||||
| cell | | latency p50 | latency max | answered | **unsettled** |
|
||||
|---|---|---:|---:|---:|---:|
|
||||
| cold, 1 buffer | REF | 105.1 | **215.8** | 270 | **12** |
|
||||
| | **CAND** | **1.3** | 486.4 | 270 | **0** |
|
||||
| cold, 11 buffers | REF | 4 735.8 | 9 217.8 | 270 | **270** |
|
||||
| | **CAND** | **1.5** | **1 884.0** | 270 | **0** |
|
||||
| warm, 1 buffer | REF | 120.6 | **212.1** | 105 | **12** |
|
||||
| | **CAND** | **1.7** | 380.6 | 105 | **0** |
|
||||
| warm, 11 buffers | REF | 1 822.3 | 3 624.8 | 105 | **105** |
|
||||
| | **CAND** | **2.0** | **891.0** | 105 | **0** |
|
||||
|
||||
**The reference answers this cursor wrongly 12 times in 270 with one buffer
|
||||
open and *every single time* with eleven** — because with eleven the whole
|
||||
request stream is held until the neighbourhood lands and is then drained in one
|
||||
burst off a prefix that does not reach `hw/dv`. The candidate is wrong zero
|
||||
times in all four cells.
|
||||
|
||||
**What that costs, said plainly:** in the two single-buffer cells the tail rises
|
||||
(216 → 486 ms cold, 212 → 381 warm), because a request whose target the scan
|
||||
has not reached now waits for the publish that holds it instead of being told
|
||||
`[]` immediately. That is the trade the lead's ruling asks for, and it is the
|
||||
right way round — the review's gate is *"do not withhold useful answers"*, and
|
||||
`[]` when the answer exists is not a useful answer. In the eleven-buffer cells
|
||||
even the tail improves, by four times.
|
||||
|
||||
### Everything the cadence must not have cost
|
||||
|
||||
The quiet startup matrix, three fresh sessions a cell, medians:
|
||||
|
||||
| `scan` cell | REF | CAND |
|
||||
|---|---:|---:|
|
||||
| workspace, cold | 2 747.5 | 2 715.9 |
|
||||
| workspace, warm | 981.0 | 983.7 |
|
||||
| workspace cold, **first useful answer** | 78.2 | 80.8 |
|
||||
| workspace warm, **first useful answer** | 115.1 | 115.8 |
|
||||
| default scope, cold / warm | 95.1 / 50.7 | 101.9 / 48.5 |
|
||||
| `{"index":{}}`, cold / warm | 111.0 / 48.8 | 106.3 / 48.9 |
|
||||
| `scopeDepth 0`, cold / warm | 10.5 / 8.7 | 11.3 / 12.5 |
|
||||
|
||||
Memory, which the review's gate says must be *retained*: idle RSS after the
|
||||
workspace scan **502 736 → 501 872 KiB cold** and **427 200 → 426 448 KiB
|
||||
warm** (−0.2 % both, peak equal to idle), and the index store on disk **45 404
|
||||
KiB in both** — byte-for-byte the same size, because nothing about what a scan
|
||||
writes changed. The cadence holds records staged for longer, which is the one
|
||||
place it could have cost memory: at most `PUBLISH_EVERY` `FileFacts` instead of
|
||||
one burst's worth, and the numbers say that is not visible.
|
||||
|
||||
Nothing moved outside its spread. The two that had to be checked by name are
|
||||
the **warm quiet scan** — still under a second, which is the milestone §61.3
|
||||
reached for the first time — and the **first useful answer**, which is §61.3's
|
||||
whole result and which the cadence could have delayed by deferring the head
|
||||
publish. It does not: that drain is the one the cadence exempts, and the number
|
||||
says so.
|
||||
|
||||
### `scanserve` — the review's own probe, unchanged and re-run
|
||||
|
||||
The response-paced probe the review used, three fresh sessions a cell. It
|
||||
served the **same number of requests per session for both binaries** here (13
|
||||
cold, 5 warm), so its confound does not bite in this comparison:
|
||||
|
||||
| | REF | CAND |
|
||||
|---|---:|---:|
|
||||
| cold, median mid-scan definition | 122.2 ms | **45.6 ms** |
|
||||
| cold, worst | 334.0 ms | 334.8 ms |
|
||||
| cold, session completion | 4 506 ms | **3 938 ms** |
|
||||
| warm, median | 114.0 ms | 114.2 ms |
|
||||
| warm, worst | 290.2 ms | **279.4 ms** |
|
||||
| warm, session completion | 1 692 ms | 1 697 ms |
|
||||
| `mismatched_answers` / `unsettled_answers` | 0 / 0 | 0 / 0 |
|
||||
|
||||
Warm is flat and that is the expected reading, not a disappointment: at one
|
||||
request per 200 ms *of response* a warm session only gets five of them in, so
|
||||
the reference pays five publishes and there is nothing for a cadence to
|
||||
remove. The cadence is for the case where a client asks faster than the server
|
||||
finishes, which is what `scanload` offers and what the cold column already
|
||||
shows.
|
||||
|
||||
The quiet control did not move: warm quiet scan **1 004.7 → 984.7 ms** at one
|
||||
buffer (and 1 020 → 1 065, 1 029 → 1 041, 1 201 → 1 156 at 2 / 11 / 101), so
|
||||
the ≤ 1 s the last round reached is kept and none of this was bought from the
|
||||
quiet case. A quiet session's mid-scan publishes go **1 → 0**: nothing is
|
||||
waiting, so nothing is published, which is the promise `scan-interleave` made
|
||||
and this keeps.
|
||||
|
||||
## Status / TODO
|
||||
|
||||
- [x] R4a — the fixed-arrival-rate probe (`tools/perf/phases_r4.py::scanload`,
|
||||
`scanloadcold`, `scanloadcross`), cold and warm, 1 / 2 / 11 / 101 open
|
||||
buffers, with the quiet control and the publication split; R4 baseline
|
||||
cells filled from `eb54042`
|
||||
- [x] the publication cadence (`Scan::publish_is_due`, `PUBLISH_EVERY`)
|
||||
- [x] the empty-answer rule (`Server::deferred`, `ask_again_if_empty`,
|
||||
`names_nowhere`, `answer_what_was_deferred`)
|
||||
- [x] the `HEAD_WALK_MAX` fixture §61.3's QA asked for — and sabotage-checked
|
||||
(the bound's branch disabled, the test fails with
|
||||
`515 files (the folder first)`)
|
||||
- [x] the candidates rebuild and the selective overlay refresh: **measured,
|
||||
not built.** The cadence takes both down with it, and the overlay is
|
||||
0.08 % of publication at one open buffer
|
||||
- [x] measured: `scanload` both rates and all buffer counts, `scanloadcold`,
|
||||
`scanloadcross`, `scanserve`, quiet `scan` cold/warm, `rss`, the 24 scope
|
||||
cells; R4 row and experiment record `R4-2026-09-08` in
|
||||
`docs/perf/take5-tracking.md`
|
||||
|
||||
### Gates
|
||||
|
||||
- `cargo fmt` clean; guarded `cargo clippy --all-targets` clean with no new
|
||||
`#[allow]`; guarded `cargo test --workspace` green, **4 360 → 4 365**, none
|
||||
dropped. Six test functions written, one of which replaces the §61.3 test
|
||||
whose subject the rule changed, so the count rises by five: the cadence's
|
||||
exact boundary (in `state`), the cross-folder definition (the replacement),
|
||||
the cross-folder typeDefinition, the genuinely-empty answer, the hover that
|
||||
is never deferred, and the `HEAD_WALK_MAX` fixture.
|
||||
- Under the same offered load: publishes and publication time down, settle down
|
||||
or held, latency not worse, **served requests equal**.
|
||||
- `mismatched_answers` 0 and `unsettled_answers` 0 on `scanload` and
|
||||
`scanserve`, both binaries, cold and warm.
|
||||
- The quiet warm scan does not regress past 1.0 s.
|
||||
- opentitan's three known modifications, unchanged, after every phase.
|
||||
|
||||
## Work log
|
||||
|
||||
### 2026-09-08 — dev (Opus), §61.4
|
||||
|
||||
**Order of work: the probe first, and it changed the plan twice.**
|
||||
|
||||
1. **The probe, written before anything was touched.** The first run of it was
|
||||
the finding: under a definition every 100 ms the reference answered
|
||||
*nothing* until the scan was 74 % over, because `must_wait`'s `held` clause
|
||||
makes the first held request hold every request behind it — so the whole
|
||||
session's stream drains in one burst at the head publish. That is
|
||||
`perf5r-first-answer`'s territory, not this lane's, but the probe says it,
|
||||
so it is written down.
|
||||
2. **The probe was wrong the first time, and the way it was wrong is the
|
||||
review's own confound.** It stopped sending when the server stopped saying
|
||||
things; a lull in the progress chatter stopped it at 14 requests where the
|
||||
session ran for 20 ticks, which makes the offered load a function of the
|
||||
server. Rewritten around a **fixed request count** over a fixed window per
|
||||
cache state. The first (uncontrolled) series is kept as
|
||||
`paired-partial-firstattempt.jsonl` and no number in this README comes from
|
||||
it.
|
||||
3. **The split named a different lever than the work order expected.**
|
||||
`publish_absorb` is 78 % and the overlay refresh is 0.08 % at one open
|
||||
buffer. The work order's first two reductions were the candidates rebuild
|
||||
and a selective overlay refresh; the measurement says the overlay is noise
|
||||
at every buffer count an editor has, so **it was not built** and the numbers
|
||||
are in [Measured](#measured) instead.
|
||||
4. **The cadence is the reduction that fits this lane's files.** `absorb` ends
|
||||
in a whole-index merge inside `vlog_semantic`, which this lane may not
|
||||
change; how *often* that merge is paid is `server/index.rs`'s decision, and
|
||||
it was "once per burst of requests". `Scan::publish_is_due` makes it once
|
||||
per 512 staged records, with the drain that has something *waiting* — the
|
||||
session's first useful answer — exempt.
|
||||
5. **The empty-answer rule**, the lead's §61.3 ruling, went in beside it
|
||||
because the two interact: the cadence makes a mid-scan prefix older, and the
|
||||
rule is what stops that being visible as a wrong `[]`. It is a rule in the
|
||||
drain and not a second computation — the answer is computed once through the
|
||||
ordinary handler and either sent or set aside — and a set-aside request is
|
||||
asked again **once per publish**, which the cadence now bounds to a handful
|
||||
per scan.
|
||||
6. **A test that already pinned the old behaviour had to move, and it is the
|
||||
right kind of move.** `a_buffer_opened_from_the_workspace_root_is_no_
|
||||
neighbourhood_to_lead_with` asserted that its definition was answered
|
||||
*inside* the scan; it was answered `[]`. It now asserts the answer is
|
||||
`ip/aes/rtl/aes.sv`, which arrives later and is right. Said plainly here
|
||||
because "a test changed" is the sentence a reviewer should be suspicious of.
|
||||
|
||||
**Deviations, stated:**
|
||||
|
||||
- **`tools/perf/lspclient.py` was changed**, which the work order's file list
|
||||
describes as "`tools/perf/` (new phase file + README rows)". Two additive
|
||||
hunks: a response's arrival instant stamped in the reader thread, and
|
||||
`Session.poll_answers`, which takes every response that has arrived without
|
||||
blocking on the oldest. A probe that pipelines cannot be written without it —
|
||||
`await_id` blocks — and measuring each request's own wait through a polling
|
||||
loop instead would put the poll interval in every number. No existing phase's
|
||||
behaviour changes; `await_id` gained one line that drops a stamp it does not
|
||||
read.
|
||||
- **`scanload` is two phases** (`scanload` warm, `scanloadcold`). A cold cell
|
||||
under this load is a ten-second session and eight of them do not fit inside
|
||||
the 1 800-second guard. The first paired attempt was **stopped by hand**
|
||||
before it reached that limit rather than allowed to be killed; splitting the
|
||||
run is the answer, and the guard was not touched.
|
||||
- **`state::discover` and `HEAD_WALK_MAX` widened from `pub(super)` to
|
||||
`pub(crate)`** so the new fixture is written against the bound rather than
|
||||
against the number 512 spelled out again. `state/mod.rs` gained no line for
|
||||
it (`mod discover;` → `pub(crate) mod discover;`).
|
||||
- **A `scanloadcross` cell was added that the work order did not ask for.** The
|
||||
cursor `scanload` measures resolves inside the open buffer's own folder, so
|
||||
the empty-answer rule never fires on it and the row would say nothing about
|
||||
what that rule costs. The cross-folder cell is what makes the cost visible
|
||||
rather than asserted.
|
||||
|
||||
**Gates.** `cargo fmt` clean; guarded `cargo clippy --all-targets` clean with
|
||||
no new `#[allow]`; guarded `cargo test --workspace` green at **4 365**, from
|
||||
4 360, none dropped. opentitan's three known modified files unchanged after
|
||||
every phase. **No guard kill.**
|
||||
|
||||
**File sizes** (non-blank, non-comment, before the trailing test module):
|
||||
`server/index.rs` **225**, `server/dispatch.rs` **485** (from 464),
|
||||
`server/mod.rs` **169** (from 158), `state/scan.rs` **128** (from 124),
|
||||
`state/discover.rs` 329, `candidates.rs` 405, `includes.rs` 605 (untouched).
|
||||
`state/mod.rs` is **976 production lines, exactly what it was**: the module
|
||||
visibility change costs no line and the only thing added to it is a test.
|
||||
|
||||
**A limitation of the probe, for QA and for whoever reads the rows next.** The
|
||||
probe's `settled_ms` is the session's last notification, and the session keeps
|
||||
producing notifications while requests arrive — so when the scan finishes
|
||||
inside the offered window, `settled_ms` tracks the *window* rather than the
|
||||
scan, and `mid_scan_median_ms` / `mid_scan_max_ms` then count post-settle
|
||||
answers as mid-scan. Neither is quoted in this README for that reason: `scan
|
||||
ms` (the server's own trace) is the completion figure and the latency columns
|
||||
are over the whole fixed load, which is identical for both binaries. The
|
||||
notification the requests provoke was not chased down; it is a probe question,
|
||||
not a server one, and it is written here rather than left for a reader to
|
||||
notice.
|
||||
|
||||
## QA log
|
||||
|
||||
### 2026-09-08 — QA (Sonnet), §61.4 R4
|
||||
|
||||
Read CLAUDE.md, TODO §61.4, `docs/performance_take5_review.md` §4 and its
|
||||
"Startup throughput and responsiveness must be judged separately", this
|
||||
README in full, `docs/features/perf5r-first-answer/README.md`'s Review (the
|
||||
ruling that sent the empty-answer rule here), `docs/features/scan-interleave/
|
||||
README.md`'s 2026-09-08 §61.4 entry, `docs/features/cancel-request/README.md`
|
||||
in full, the tracker's `R4-2026-09-08` record, the working-tree diff, and the
|
||||
evidence in `~/.cache/lucisv-perf/take5r-4/`. Experiments in a fresh clone at
|
||||
scratchpad `qa-61-4/repo` (HEAD `eb54042` + the working diff applied,
|
||||
byte-identical to the working tree — verified `diff -rq` clean except the
|
||||
tests I added). A second clone `qa-61-4/repo-ref` at bare `eb54042` was built
|
||||
for the per-binary test comparison. All cargo and all perf commands ran
|
||||
through `tools/guard.sh -m 8 -t 1800`; no guard kill anywhere; no lingering
|
||||
background loops (all launched via `run_in_background`/`Monitor`, all exited
|
||||
on their own and were confirmed dead).
|
||||
|
||||
**1. Gates (main tree, guarded).** `cargo fmt --all -- --check` clean.
|
||||
`cargo clippy --all-targets` clean, zero warnings, no new `#[allow]` (checked
|
||||
the diff directly). `cargo test --workspace`: **4 365 passed, 0 failed**,
|
||||
exactly the dev's number. Per-binary diff against the `repo-ref` clone at bare
|
||||
`eb54042` (4 360 passed there): every binary's count is identical except
|
||||
`lucisv_server`'s `unittests src/main.rs` (1 645 → 1 650, +5) — matching the
|
||||
dev's own accounting exactly (one test rewritten in place — the §61.3 test
|
||||
`a_target_outside_the_head_is_answered_when_the_head_is_published_and_is_empty`
|
||||
→ `a_target_outside_the_head_is_asked_again_rather_than_answered_nowhere`,
|
||||
read and judged correct: it now asserts the settled location instead of an
|
||||
inside-the-scan `[]`, which is exactly right given the rule this lane ships —
|
||||
plus five new tests). Nothing lost anywhere. Production line counts:
|
||||
`server/index.rs` 225, `dispatch.rs` 485, `server/mod.rs` 169, `state/scan.rs`
|
||||
128, `state/discover.rs` 329 — all match the README exactly.
|
||||
`state/mod.rs` **976**, unchanged, confirmed (counting stops one line before
|
||||
the `#[cfg(test)]` attribute, not `mod tests {` itself — the same off-by-one
|
||||
also explains `candidates.rs`, 405 vs my raw 406). **One inaccuracy found and
|
||||
noted, not fixed** (it is in a Work log entry, not the Status/Handshakes
|
||||
sections QA may touch): `includes.rs` is cited as "605 (untouched)" but its
|
||||
actual non-blank/non-comment production count before its first `#[cfg(test)]`
|
||||
is **273**, under any counting convention I could construct (with or without
|
||||
doc comments, with or without blank-only stripping). The file is genuinely
|
||||
untouched by this diff and 273 is nowhere near any CLAUDE.md threshold either
|
||||
way, so this is a citation slip in the prose, not a gate or a size problem —
|
||||
flagged for the lead to correct in the work log if they choose.
|
||||
|
||||
**2. The probe.** Read `tools/perf/phases_r4.py` and the `lspclient.py` diff
|
||||
in full.
|
||||
- `offer()`'s send loop is `while sent < ticks`, ticks fixed
|
||||
(`WINDOW_MS[cache] // rate`), computed once up front — no early exit on
|
||||
server silence. The shipped probe cannot reproduce "stopped in a lull";
|
||||
confirmed by reading the loop, there is no path back to the caller before
|
||||
`sent == ticks`.
|
||||
- `lspclient.py`'s `_dispatch` (called only from `_read_loop`, the reader
|
||||
thread — confirmed by grep) stamps `self._arrived[id] = time.perf_counter()`
|
||||
the instant a response is parsed, before any caller could see it.
|
||||
`poll_answers` reads that stamp and never blocks — it only pops entries
|
||||
already in `self._inbox` matching a pending id. This is the arrival-time
|
||||
fix the review's confound needed.
|
||||
- Same offered load to both binaries: confirmed directly off the evidence —
|
||||
every REF/CAND pair I read had identical `requests_offered` and
|
||||
`requests_answered` (e.g. 35 offered / 105 answered across 3 tries, both
|
||||
binaries, warm 100 ms 1-buffer cell).
|
||||
- `mismatched_answers`/`unsettled_answers` are computed in `summary()` against
|
||||
`run["settled_answer"]`, which is a **final same-params request sent at the
|
||||
end of the same session** (`s.request("textDocument/definition", params)`)
|
||||
— same request, same cursor, correct comparison target.
|
||||
- The probe's own limitation (`settled_ms` floored by the fixed window) is
|
||||
understood and does not taint any quoted number: every table in the README
|
||||
uses `scan_total`/`scan ms` (the server's own trace), never `settled_ms`,
|
||||
and `mid_scan_*` is explicitly not quoted for the same reason. Confirmed by
|
||||
reading `publication()` (`out["scan_total"] = stages.get("total", 0.0)`)
|
||||
and by re-deriving the README's own numbers from the raw evidence (below).
|
||||
|
||||
**3. Coherence under load, and the sabotage.** `publish_scan`
|
||||
(`state/mod.rs:1167`) absorbs the index, the candidates table and the include
|
||||
graph in one synchronous call with no interleave point inside it — a
|
||||
structural guarantee, not a tested-and-hoped one, since this is a
|
||||
single-threaded event loop. `answer_what_is_waiting` (`server/index.rs`)
|
||||
calls `publish_scan` to completion *before* splicing `self.deferred` or
|
||||
`arrived` into the batch that gets dispatched, so no request can ever observe
|
||||
a batch published mid-way through. I wrote and ran the direct witness the
|
||||
task asked for (`state::tests::a_cadence_publish_never_lets_the_index_and_the_
|
||||
candidates_table_disagree`, in the scratch clone only — a 513-file tree,
|
||||
scanned exactly to the `PUBLISH_EVERY` boundary, one `publish_scan` call, then
|
||||
asserting every one of the 512 just-published module names is in *both*
|
||||
`index().units()` and `candidates().has_module()`, and the 513th is in
|
||||
*neither*). It passes on the real candidate. **Sabotage**: commented out
|
||||
`self.candidates.absorb(&self.index, words)` inside `publish_scan` — the test
|
||||
fails immediately (`cohmod0000 published: candidates`), then reverted (byte-
|
||||
diff against the pre-sabotage copy confirmed clean).
|
||||
|
||||
`scanload`/`scanloadcross` re-run, independently, on the dev's own release
|
||||
binaries (hashes verified: REF `f7a5a27e…`, CAND `4af863c1…`, both match the
|
||||
tracker record exactly) against the same read-only opentitan corpus, fresh
|
||||
storage under my scratchpad:
|
||||
- warm 100 ms, 1 buffer: REF p50 102.7 / p90 182.4 / max 209.6 ms; CAND p50
|
||||
0.8 / p90 177.4 / max 419.9 ms. `mismatched_answers` 0, `unsettled_answers`
|
||||
0, offered = answered = 105, both binaries.
|
||||
- warm 100 ms, 11 buffers: REF p50 1970.2 / p90 3367.8 / max 3699.6 ms; CAND
|
||||
p50 0.9 / p90 396.7 / max 700.7 ms. Same zero/zero, same offered=answered.
|
||||
- `scanloadcross`, all 8 cells (cold/warm × 1/11 buffers × REF/CAND):
|
||||
`mismatched_answers` 0 in every cell; `unsettled_answers` — REF 12/270,
|
||||
270/270, 9/105, 105/105 (the 9 vs the archived 12 at warm/1-buffer is
|
||||
ordinary run-to-run timing noise around the head-publish boundary — the
|
||||
*shape* is identical); **CAND 0/0/0/0 in every one of the 8 cells**, on a
|
||||
completely independent run.
|
||||
|
||||
This reproduces the archived record's own numbers closely (warm/1-buffer
|
||||
REF p50 112.3→102.7, CAND max 421.9→419.9; warm/11-buffer REF p50
|
||||
1960.1→1970.2, max 3672.0→3699.6, both within a few percent) and confirms
|
||||
`mismatched_answers`/`unsettled_answers` are 0/0 everywhere for the candidate,
|
||||
never withholding or coherence-breaking a single answer, on data this session
|
||||
generated itself rather than only reading the dev's own.
|
||||
|
||||
**4. The empty-answer rule.** Three methods (`GotoDefinition`,
|
||||
`GotoTypeDefinition`, `References`) — confirmed directly in
|
||||
`server/dispatch.rs`'s `NAVIGATION` const, and the handler match arms confirm
|
||||
`Hover` is not among them. Dev's shipped tests cover: cross-folder definition
|
||||
asked again and answered right, exactly once; the same for typeDefinition;
|
||||
hover never deferred (answered inside the scan); a genuinely-empty answer
|
||||
(`nowhere`) answered `[]` at settle; `HEAD_WALK_MAX` pinned. Three cases the
|
||||
shipped tests do not cover, which I wrote in the scratch clone
|
||||
(`server/tests/startup.rs`, using `process_batch`/`Server::deferred` directly
|
||||
— both reachable from `server::tests::*` by ordinary Rust module privacy,
|
||||
since they are plain-private items in an ancestor module):
|
||||
- `a_cancel_sharing_a_publish_with_a_deferred_request_still_cancels_it` — a
|
||||
cancel in the **same** batch as a deferred request still cancels it
|
||||
(`cancelled_in` scans the whole batch regardless of position). Passes.
|
||||
- `a_cancel_that_arrives_while_its_request_is_still_deferred_does_not_reach_it`
|
||||
— **a real gap, found and pinned, not a hard-invariant violation.** A
|
||||
cancel that arrives in its *own* batch, while its request is sitting in
|
||||
`Server::deferred` (not yet reunited with a publish), is consumed by
|
||||
`process_batch`'s local `consumed_cancels` for that call and does not
|
||||
survive to the next one. The deferred request is later answered normally —
|
||||
a **real, uncancelled answer** — as if the cancel never happened. This
|
||||
costs nothing under the hard invariants QA is bound to (exactly one
|
||||
response is still sent, no request is lost, no answer is wrong), so it is
|
||||
**not** a REWORK finding by the letter of this task's own criteria. But
|
||||
`docs/features/cancel-request/README.md`'s own stated reasoning for
|
||||
dropping a late cancel — *"by then the request has been answered"* — is
|
||||
false for a request sitting in `deferred`: it has not been answered at all
|
||||
yet. `deferred` is a new kind of "not yet answered but no longer in a
|
||||
burst" state that predates neither README knew about the other. **Filed as
|
||||
a handshake request below**, not fixed by QA (touches `cancel-request`'s
|
||||
own Assumptions section, outside this feature's scope).
|
||||
- `two_deferred_requests_are_answered_in_the_order_they_arrived` — `deferred`
|
||||
is append-only (`Vec::push`, `std::mem::take`, never reordered), so two
|
||||
requests deferred in the same scan are answered in arrival order. Passes.
|
||||
|
||||
All three compiled and ran clean against the real candidate
|
||||
(`cargo test -p lucisv_server --bin lucisv-server deferred`, 4 passed).
|
||||
|
||||
**5. Sabotage: "never re-ask."** Commented out
|
||||
`self.answer_what_was_deferred()` in `finish_scan` (`server/index.rs`) — the
|
||||
shipped cross-folder test
|
||||
(`a_target_outside_the_head_is_asked_again_rather_than_answered_nowhere`)
|
||||
fails with "a result, not a failure" (the request is never answered at all —
|
||||
a lost request, exactly the REWORK class this task names). Reverted; byte-
|
||||
diff against the pre-sabotage copy confirmed clean; test passes again.
|
||||
|
||||
**6. `HEAD_WALK_MAX`.** Read the bound (`state/discover.rs:450`,
|
||||
`head.len() > HEAD_WALK_MAX`) and the dev's fixture
|
||||
(`a_folder_bigger_than_the_head_bound_is_scanned_exactly_as_it_always_was`,
|
||||
513 files in one folder). Sabotaged the branch (`if false && head.len() >
|
||||
HEAD_WALK_MAX`) — the test fails exactly as the README claims:
|
||||
`"515 files (the folder first)"` (513 in the neighbourhood folder + 2 more
|
||||
from `a_block_and_a_crowd`'s fixed padding). Reverted; clean.
|
||||
|
||||
**7. The tail — characterized, not failed.** Re-derived the R4 baseline split
|
||||
straight from `~/.cache/lucisv-perf/take5r-4/paired.jsonl`'s per-try
|
||||
`publication` records for the warm/100 ms/1-buffer cell: REF averages
|
||||
scan 4206.14 ms / publication 3105.27 ms across 34.3 publishes; CAND averages
|
||||
scan 2188.36 ms / publication 587.99 ms across 4.67 publishes — both exactly
|
||||
the README's headline numbers, independently recomputed from the raw
|
||||
per-request arrays rather than trusted from the prose.
|
||||
|
||||
*Attributing the CAND max (421.9 ms, warm/1-buffer, this cell is not
|
||||
cross-folder so the empty-answer rule never fires on it — the wait is purely
|
||||
cadence).* Average publish spacing here is scan/publishes ≈ 2188/4.67 ≈
|
||||
469 ms; a request landing just after a publish waits close to the full next
|
||||
interval. 421.9 ms is consistent with exactly that — a request arriving
|
||||
right after a publish, waiting almost the whole way to the next one — not a
|
||||
deferral (none possible on this cursor) and not the startup's `held` clause
|
||||
(the first useful answer already landed at ~80–115 ms, long before most of
|
||||
this cell's requests are sent).
|
||||
|
||||
*What T = 100 ms would cost, estimated from the trace.* `absorb`'s cost is a
|
||||
**whole-index merge**, i.e. roughly proportional to the index's size at the
|
||||
moment of the call, not to the batch just staged (the README's own finding,
|
||||
confirmed by reading `WorkspaceIndex::absorb`'s doc comment and
|
||||
`update_facts`'s targeted-merge counterexample beside it). For K evenly
|
||||
spaced publishes over a scan that reaches a fixed final size S, each publish
|
||||
i costs roughly c·i·(S/K), so total absorb cost is c·S·(K+1)/2 — **linear in
|
||||
the number of publishes, for a fixed corpus**. Going from the cadence's
|
||||
current K≈4.7 (this cell) to a clock bound that fires roughly every 100 ms —
|
||||
which, given requests arrive every 100 ms and something is almost always
|
||||
waiting, would mean roughly one publish per 100 ms of wall clock, i.e. K on
|
||||
the order of 20+ over a ~2 s scan — would raise total publication cost
|
||||
*roughly in proportion*, back up toward the 2 000–3 000 ms range: most of
|
||||
this cell's −78 % publication win given back. This is not a coincidence: the
|
||||
**reference's own pre-cadence behaviour already published once every
|
||||
4206/34.3 ≈ 123 ms on average** — almost exactly a T=100 ms clock bound. A
|
||||
secondary time bound at T=100 ms would reproduce close to the *reference's*
|
||||
publication cost for exactly the load this cell offers, while presumably
|
||||
still helping a slower (250 ms) or quieter client. That trade is the lead's
|
||||
to rule on; the count-based `PUBLISH_EVERY` alone does not have this failure
|
||||
mode because it is insensitive to how fast the client asks.
|
||||
|
||||
**8. Controls, re-run** (dev's own REF/CAND release binaries, hashes
|
||||
verified, fresh storage under my scratchpad, `tools/guard.sh -m 8 -t 1800`):
|
||||
|
||||
| cell | archived median | QA re-run median | Δ |
|
||||
|---|---:|---:|---:|
|
||||
| quiet scan, warm, REF | 981.0 | 1033.2 | +5.3% |
|
||||
| quiet scan, warm, CAND | 983.7 | 1051.7 | +6.9% |
|
||||
| quiet scan, cold, REF | 2747.5 | 2831.6 | +3.1% |
|
||||
| quiet scan, cold, CAND | 2715.9 | 2826.2 | +4.1% |
|
||||
| first useful answer, cold, REF | 78.2 | 82.0 | +4.8% |
|
||||
| first useful answer, cold, CAND | 80.8 | 81.3 | +0.7% |
|
||||
| first useful answer, warm, REF | 115.1 | 113.0 | −1.9% |
|
||||
| first useful answer, warm, CAND | 115.8 | 113.4 | −2.1% |
|
||||
| idle RSS, cold, REF (KiB) | 502736 | 502528 | −0.04% |
|
||||
| idle RSS, cold, CAND (KiB) | 501872 | 504240 | +0.5% |
|
||||
| idle RSS, warm, REF (KiB) | 427200 | 427984 | +0.2% |
|
||||
| idle RSS, warm, CAND (KiB) | 426448 | 426688 | +0.06% |
|
||||
|
||||
All twelve within the requested ±10 % (the widest is +6.9 %, general machine-
|
||||
load noise — the session's one-minute load was higher during this QA rerun
|
||||
than the dev's own session start). Store 45 404 KiB, identical, both re-runs.
|
||||
The 24-of-24 scope cells were checked against the archived evidence directly
|
||||
(every `scopes` row's `result_count` equal REF vs CAND) rather than re-run,
|
||||
since nothing about scope resolution is in this diff's file list.
|
||||
|
||||
**Traceability (item 8): 17 numbers independently reproduced from
|
||||
`~/.cache/lucisv-perf/take5r-4/` and matched exactly to the README/tracker
|
||||
prose**, beyond the twelve controls above: 4206, 3105 (REF scan/publication
|
||||
ms), 2188, 588 (CAND scan/publication ms), 112.3, 168.0 (REF latency
|
||||
median/max), 1.9, 421.9 (CAND latency median/max), 4506, 3938 (scanserve cold
|
||||
session completion REF/CAND), 122.2, 45.6 (scanserve cold median REF/CAND),
|
||||
12/270 and 270/270 (REF cross-folder unsettled counts), 0 (CAND, every
|
||||
cross-folder cell). One small nuance, not a finding: `scanserve`'s quoted
|
||||
"1 692 → 1 697" (warm session completion) matches REF's **median** but CAND's
|
||||
**mean** (median of that row is 1704.7); both readings say "flat," which is
|
||||
the only claim resting on it, so this is noted rather than filed.
|
||||
|
||||
**Verdict: PASS.** No coherence violation (sabotage-tested), no lost request
|
||||
under the shipped code (the "never re-ask" sabotage is the one that produces
|
||||
a lost request, and it is not what shipped), no wrong mid-scan answer
|
||||
(`mismatched_answers` 0 everywhere, in the dev's evidence and in two
|
||||
independent re-runs this session generated). The tail's four higher cells are
|
||||
characterized, attributed and estimated, not treated as a failure, per the
|
||||
task's own framing. One real, non-blocking gap found and pinned by a new test
|
||||
(`$/cancelRequest` against a `deferred` request outside its own batch is
|
||||
silently ineffective — exactly-one-response is preserved, nothing is lost or
|
||||
wrong) and one documentation inaccuracy (`includes.rs`'s cited line count).
|
||||
|
||||
**Handshakes/topo, for the lead:**
|
||||
1. `server::index ──▶ state::scan` (`publish_is_due`) and
|
||||
`server::mod ──▶ server::dispatch` (`names_nowhere`, `ask_again_if_empty`)
|
||||
— as the dev already filed.
|
||||
2. **New, from QA:** `docs/features/cancel-request/README.md`'s Assumptions
|
||||
section ("a cancel arriving in a later burst than its request is dropped
|
||||
… by then the request has been answered") is now incomplete: a request in
|
||||
`Server::deferred` is neither `held` nor answered, and a cancel that
|
||||
arrives in a batch that does not also carry a publish reuniting it with
|
||||
`deferred` is dropped without effect, same as the general rule, but the
|
||||
*reason* stated for that rule no longer covers every case it's applied to.
|
||||
No code change needed (LSP allows ignoring a cancel; exactly-one-response
|
||||
holds) — a one- or two-sentence dated amendment to `cancel-request`'s
|
||||
Assumptions, cross-linked from `perf5r-publication`'s Handshakes, closes
|
||||
the gap in the documentation rather than the code.
|
||||
3. `lspclient.py`'s two hunks (`_arrived` timestamp map, `poll_answers`) are
|
||||
additive and confirmed not to change `await_id`'s existing behaviour
|
||||
(one line added that writes a stamp `await_id` never reads).
|
||||
4. The cadence constant is `PUBLISH_EVERY = 512` (`state/scan.rs`),
|
||||
deliberately equal to `HEAD_WALK_MAX`; both are now `pub(crate)`, tested
|
||||
directly rather than against the number spelled out again.
|
||||
|
||||
TODO §61.4's QA line ticked below.
|
||||
|
||||
### 2026-09-09 — independent 0.52.0 review: load-probe corrections needed
|
||||
|
||||
The publication improvement was independently reproduced against 0.51.0:
|
||||
with two open buffers and 35 requests every 100 ms per process, three properly
|
||||
warmed processes per version, median server scan duration fell 4,247 → 1,771 ms,
|
||||
publishes 34 → 4, all 105 requests answered and all equal to the settled
|
||||
target. The full-window request median fell 1,947 → 2.03 ms; this includes
|
||||
post-scan responses. Cross-folder probes returned the settled target in all
|
||||
750 candidate responses, versus 399 premature empty answers in the reference.
|
||||
|
||||
**Two harness findings, F2/F3 (P2), open:** `load_cell` labels a fresh store
|
||||
warm without priming it (a separate proof measured 3,974 misses and 1,684 ms
|
||||
parsing on the first nominally warm run, versus 3,974 hits and zero misses on
|
||||
the second). Also, `settled_at` mistakes `wait_quiet`'s positive entry-time
|
||||
delta for new scan activity. Candidate `settled_ms` follows the 3.4-second
|
||||
request window even though the scan ends at about 1.77 seconds, and all 105
|
||||
responses are mislabeled mid-scan. The review therefore uses a warmed rerun
|
||||
and `publication.scan_total`, not the erroneous completion/partition fields.
|
||||
|
||||
No implementation was changed. [Full review and repair gates](../../performance_052_review.md),
|
||||
[raw evidence](../../perf/review-052-20260909/README.md). These findings do not
|
||||
assert that all previous warm runs were unprimed or invalidate the measured
|
||||
publication-count reduction.
|
||||
|
||||
**2026-09-09, later — F2 and F3 are fixed** (dev, in the F1 lane; the harness
|
||||
half of the same round). `phases_r4.prime` runs one untimed session before a
|
||||
warm cell's first timed trial and `cell_status` refuses a warm cell whose trial
|
||||
found nothing in the store: with a brand-new `--storage`, both timed trials now
|
||||
report 3 975 hits and 0 misses. `Session.scan_completed_at` is stamped in the
|
||||
reader thread on the indexing bar's own `$/progress` `end`, so `settled_ms`
|
||||
reads 1 774 ms for a scan the server's own trace calls 1 768 ms — not the
|
||||
3 406 ms of the request window — and the responses partition 32 mid-scan /
|
||||
38 after-settle instead of every one of them mid-scan. Widening the window
|
||||
3 500 → 5 000 ms leaves completion at 1 781/1 791 ms and grows only the
|
||||
after-settle count (38 → 64), which is the review's own check. Details and
|
||||
numbers: `docs/perf/take5-tracking.md`, the F2/F3 rows.
|
||||
|
||||
### 2026-09-09 — QA (Sonnet), TODO §62.2: PASS
|
||||
|
||||
**Verdict: PASS.** Read the diff (`tools/perf/lspclient.py`,
|
||||
`tools/perf/phases_r4.py`) and reran both harness fixes against the
|
||||
candidate server on opentitan, guarded, from the main tree.
|
||||
|
||||
**F2, a brand-new `--storage`, 2 independent tries (fresh directories
|
||||
both times), `scanloadprobe` (the fast one-warm-cell loop):**
|
||||
|
||||
| Try | cache_hits | cache_misses | status |
|
||||
|---|---|---|---|
|
||||
| 1 | [3975, 3975] | [0, 0] | ok |
|
||||
| 2 | [3974, 3974] | [0, 0] | ok |
|
||||
|
||||
Both timed trials hit on both tries — `phases_r4.prime`'s untimed session
|
||||
does fill the store before the first timed measurement, and `cell_status`
|
||||
found nothing to refuse. (I did not additionally force a warm cell to
|
||||
report a real miss to see the "error" path fire — the diff's own
|
||||
`cell_status` branch is a direct, three-line read: `if cache == "warm" and
|
||||
any(hits == 0 ...)`, unambiguous by inspection.)
|
||||
|
||||
**F3, the same runs' scan-completion accounting:**
|
||||
|
||||
| Try | scan_completed_ms | server trace `scan_total` | scan_ends | mid_scan / after_settle |
|
||||
|---|---|---|---|---|
|
||||
| 1 | 1494.31 / 1494.86 | 1485.73 / 1486.24 | 1 / 1 | 30 / 40 |
|
||||
| 2 | 1753.85 / 1745.77 | 1744.80 / 1736.47 | 1 / 1 | (not recorded) |
|
||||
|
||||
`scan_completed_ms` sits within 9 ms of the server's own reported
|
||||
`scan_total` in both tries (well inside the ±20 ms the task asked to
|
||||
check), exactly one `end` per session, and responses split sanely between
|
||||
mid-scan and after-settle rather than all landing in one bucket.
|
||||
|
||||
**The widened window.** Copied `tools/perf/phases_r4.py` into my scratchpad
|
||||
and changed `WINDOW_MS["warm"]` 3500 → 5000 only there (never in the main
|
||||
tree), reran `scanloadprobe` against the candidate with a third fresh
|
||||
`--storage`: `scan_completed_ms` ≈ 1745–1751 ms — unmoved in kind from the
|
||||
3500 ms-window runs above (same corpus, same cursor, unrelated to how long
|
||||
the offered-load window ran) — while `after_settle_answers` grew 40 → 64,
|
||||
`mid_scan_answers` stayed in the same 30s band (36). Matches the review's
|
||||
own acceptance: completion stable, after-settle count grows with the
|
||||
window.
|
||||
|
||||
**The quiet-control row.** `load_cell`'s `record(**dict(got, ms=...))`
|
||||
call for `rate=0` was exercised as a side effect of every `scanloadprobe`
|
||||
run above's cell status line (`quiet control` is not itself a separate
|
||||
call in `scanloadprobe`, so I additionally re-read the `record(...)` call
|
||||
site at `tools/perf/phases_r4.py` — the merge is `dict(got, ms=...)` then
|
||||
splatted, and `got` (from `summary()`) carries no key that collides with
|
||||
the explicit `phase=`/`row=`/`fresh_process=`/`result_count=`/`rate_ms=`/
|
||||
`open_buffers=`/`note=` keywords also passed, so the `record(**got)`
|
||||
duplicate-keyword bug the tracker names as historical cannot recur here);
|
||||
no exception in any of the runs above, which all reach that call.
|
||||
|
||||
**Gates.** Covered under the §62.1 entry above (same guarded `cargo fmt`/
|
||||
`clippy`/`test --workspace` run; this feature's own files —
|
||||
`tools/perf/*.py` — are not compiled). **opentitan** unchanged
|
||||
throughout (checked alongside the §62.1 runs). **Guard**: every bench
|
||||
invocation ran through `tools/guard.sh -m 8 -t 1800 --`; no kills; no
|
||||
lingering processes.
|
||||
|
||||
**TODO §62.2's QA line is ticked.**
|
||||
|
||||
## Review
|
||||
|
||||
**2026-09-08 (lead).** Accepted, with one fix made by the lead and one
|
||||
ruling.
|
||||
|
||||
- The probe came first and its first draft was thrown away for exactly
|
||||
the reason the review warned about (it stopped sending in a lull). The
|
||||
shipped one offers the same fixed load to both binaries, and what it
|
||||
found is the number that mattered: a publish costs the size of the
|
||||
index, not the batch, because `absorb` ends in a whole-index merge —
|
||||
3.1 s of publication in a 4.2 s loaded warm scan whose quiet form is
|
||||
1.0 s.
|
||||
- The cadence is the boring answer and it lands: one merge per 512 files
|
||||
instead of one per burst, the waiting drain exempt so the first useful
|
||||
answer never moves; publication −78 to −88 %, loaded scans −48 to
|
||||
−65 %, median wait 112 → 1.9 ms warm, served requests equal in every
|
||||
cell, coherence intact (QA's sabotage of the candidates absorb fails
|
||||
the agreement test).
|
||||
- **Ruling on the tail.** Four single-buffer cells have a higher max
|
||||
(worst 168 → 422 ms warm), attributed by QA to cadence spacing, not to
|
||||
the deferral. A time bound on the cadence (T ≈ 100 ms while a request
|
||||
waits) would give most of the publication win back, since the old
|
||||
spacing was already ~120 ms. Not taken: the median and the completion
|
||||
are what a user feels across a scan, and the max is one request per
|
||||
session at a cost that stays under half a second. Recorded in the
|
||||
tracker as the trade.
|
||||
- The empty-answer rule closes §61.3's honest limit: `unsettled_answers`
|
||||
0 in every cell, the cross-folder request answered with the right
|
||||
location before or at settle, exactly once, and hover untouched.
|
||||
- **Fixed by the lead (QA's finding):** a `$/cancelRequest` naming a
|
||||
request in the deferred set was dropped, and the request later
|
||||
answered normally. `process_batch` now takes a deferred request out and
|
||||
answers it cancelled where the cancel lands; pinned by
|
||||
`a_cancel_for_a_deferred_request_answers_it_cancelled_and_forgets_it`
|
||||
(the request is planted, since a real deferral lives only inside a
|
||||
running scan).
|
||||
- `HEAD_WALK_MAX` is now pinned (QA's request from §61.3).
|
||||
- Deviations accepted: the two additive `lspclient.py` hunks; the warm/
|
||||
cold split of the probe for the guard; the `scanloadcross` phase.
|
||||
|
||||
Docs applied at merge: topo (the cadence, the `deferred` state and its
|
||||
cancel rule, `HEAD_WALK_MAX`); the cancel-request README's dated entry;
|
||||
the tail trade in the tracker.
|
||||
@@ -0,0 +1,659 @@
|
||||
# perf5r-scope-reuse — the rename's scope stage, measured and then reused
|
||||
|
||||
Take 5 **review round** §3 items 1–4 (`docs/performance_take5_review.md`),
|
||||
TODO §61.5, tracker rows **R3c** (measure) and **R3b** (reuse). Reference
|
||||
tree `07ef771` — §61.1–§61.4 already merged, so the cheap refusals of §61.1
|
||||
are already gone and what is left on the slow road really is the scope build.
|
||||
|
||||
## Goal
|
||||
|
||||
A hierarchical `state_q` rename on OpenTitan costs about 400 ms, and §P2a's
|
||||
trace says **229 ms of it is the scope build** — one parse and one analysis of
|
||||
every one of the 238 selected files. §P2d already proved the *selection* is
|
||||
not the lever: 133 of those files are containers a hierarchical tail folds
|
||||
through, needed for the **index** and for nothing else. This lane asks the
|
||||
other half of that question — whether a file needed only for the index has to
|
||||
be *parsed* to get there — and it asks it in two steps, in this order:
|
||||
|
||||
1. **R3c, measurement.** Split the 229 ms into what it is made of, ship the
|
||||
split in the engine's own trace, and write down the number that decides
|
||||
whether step 2 happens at all.
|
||||
2. **R3b, the reuse**, conditional on that number.
|
||||
|
||||
The answer to step 1 was **go at 34.3 %**, and step 2 is a door
|
||||
(`vlog_refactor::KnownFacts`) through which a caller hands back the index
|
||||
record it already holds for the exact bytes it is handing over. The engine
|
||||
skips that file's parse and nothing else changes: same edits, same warnings,
|
||||
same refusals, same index (asserted by fingerprint), verifier untouched.
|
||||
|
||||
## Assumptions
|
||||
|
||||
- **The persistent index cache is the only thing that can keep the
|
||||
`KnownFacts` promise in this server.** It is the one place that holds a
|
||||
record *and* the FNV-1a of the bytes that record was read off, written by
|
||||
the same read. The workspace index holds decoded records with no hash
|
||||
beside them, so it cannot be the source: a record filed under a path is not
|
||||
evidence about the text a rename was just handed. This is stated as an
|
||||
assumption because it is a property of today's `Workspace`, not something
|
||||
the type system enforces — see Handshakes.
|
||||
- Nothing downstream of the scope build reads a *non-kept* file's analysis.
|
||||
This is §P2b's own rule, restated: the retention rule is
|
||||
`text.contains(word)` for the old and the new name, and every later
|
||||
consumer — `collect_occurrences`, all five warning scans, `check`'s watched
|
||||
set — prefilters on `contains` or `contains_word` of one of those two
|
||||
names, which is a subset. A reused record therefore never denies a later
|
||||
stage an analysis it asks for; and if one ever did, `Scope::analysis`
|
||||
parses on demand exactly as it always has.
|
||||
- The cache's decode of a record produces the record the parse would have
|
||||
produced. That is `docs/features/index-persistence/README.md`'s own
|
||||
invariant, and every warm scan in the product already rests on it — this
|
||||
lane adds a second reader of the same answer, not a new claim.
|
||||
- A rename request runs on the server's main thread, which has
|
||||
`vlog_parser::PARSE_STACK_SIZE`. Unchanged: the reuse removes parses, it
|
||||
never adds one anywhere new.
|
||||
|
||||
## Handshakes
|
||||
|
||||
**`lucisv_server ──▶ vlog_refactor` (new, additive).**
|
||||
`rename_traced_with(files, file, offset, new_name, &dyn KnownFacts, &mut
|
||||
RenameTrace)` is `rename_traced` plus one question the engine asks per
|
||||
selected file: *do you have the record `FileFacts::of(path, text)` would
|
||||
produce for exactly this text?* The engine promises that a `None` answer
|
||||
costs nothing but the file's usual parse, and that a `Some` answer changes
|
||||
only what it costs — the record is fed to `IndexBuilder::add_facts`, which is
|
||||
the same call the persistent cache's own scan hits make.
|
||||
|
||||
What the **caller** promises is the whole of the contract, and the engine
|
||||
cannot check it: verifying a record against the text it claims to describe
|
||||
means doing the parse the record exists to save. The engine does the two
|
||||
checks it can — it asks with the exact text it is about to index, and it
|
||||
refuses a record whose own `path()` is not the path it asked about — and
|
||||
trusts the rest. `crates/lucisv_server/src/rename.rs::Known` is the one
|
||||
implementation: a newtype over `&Workspace` whose entire body is
|
||||
`Workspace::known_facts`, so the promise is kept in exactly one place.
|
||||
|
||||
**Inside `lucisv_server` (no crate boundary crossed).**
|
||||
`Workspace::known_facts(path, text)` → `IndexCache::facts_now(path, text)` →
|
||||
`IndexCache::entry_for(path, text)`, which is now the single place where a
|
||||
record and the content hash it is filed under are compared. `facts_for` (the
|
||||
scan's counted reader) goes through the same function, so "the store answers
|
||||
for this text" means one thing in a scan and in a refactoring alike.
|
||||
`facts_now` differs from `facts_for` only in not counting its work into
|
||||
`IndexCache::work`, because that counter is what a scan's trace subtracts to
|
||||
say what *that scan* did.
|
||||
|
||||
**No handshake is requested and none is amended.** `vlog_semantic` is
|
||||
unchanged (`FileFacts::path`, `FileFacts::of`, `IndexBuilder::add_facts` and
|
||||
`WorkspaceIndex::fingerprint` were all already public and already used this
|
||||
way). `check/` has no diff. `docs/topo.md` needs one new row for the
|
||||
`KnownFacts` edge — the lead's to write at merge, per this lane's scope.
|
||||
|
||||
## The R3c measurement
|
||||
|
||||
`renametrace`, candidate-only, one `--verbose` session per row, repeat median
|
||||
of three; trace fields off the wire. Machine load 4.1–5.1. The `index`
|
||||
column is the whole scope stage; `lead`/`kept`/`other` are the per-file-class
|
||||
split this lane added, and `merge` is `IndexBuilder::finish`.
|
||||
|
||||
| rename | wire | index | lead | kept | other | **other / index** | merge |
|
||||
|---|---:|---:|---:|---:|---:|---:|---:|
|
||||
| **tail `state_q`** (238 files) | 401.2 | 242.4 | 0.4 | 133.5 | **83.1** | **34.3 %** | 23.4 |
|
||||
| ordinary `aes` (13) | 91.5 | 23.9 | 0.3 | 20.8 | 0.0 | 0.0 % | 2.7 |
|
||||
| unique internal `cipher_alert` (4) | 16.9 | 3.6 | 2.4 | 0.0 | 0.9 | 25.0 % | 0.3 |
|
||||
| common port `clk_i` (3 976, fallback) | 3 551.4 | 1 936.5 | 0.4 | 1 032.0 | **693.4** | 35.8 % | 195.3 |
|
||||
| conflict `state_q → state_d` (242) | 342.7 | 240.3 | 0.4 | 135.4 | 79.2 | 33.0 % | 23.2 |
|
||||
| new name many uses spell (3 976) | 2 971.6 | 2 009.8 | 2.9 | 1 067.3 | 724.5 | 36.0 % | 198.0 |
|
||||
| duplicate module `rstmgr_por` (3 976) | 2 279.4 | 1 982.9 | 1.9 | 5.6 | **1 740.5** | **87.8 %** | 199.6 |
|
||||
| no symbol (preflight) | 0.1 | 0.0 | — | — | — | — | — |
|
||||
|
||||
File counts: the tail selects 238 and keeps 134 of them, so **103 files are
|
||||
analysed for their index record and nothing else**. (§P2d's census counts 133
|
||||
"indirect" files by the index's postings; the retention rule's substring test
|
||||
is wider, so 30 of those do spell one of the two names somewhere and are
|
||||
kept. The two numbers answer different questions and both are in the trace.)
|
||||
|
||||
**Inside one file's analysis** — a *trace-only* build, measured once and not
|
||||
shipped (the same protocol §R1b used), expanding `FileFacts::analyzed` over
|
||||
the public API so its four parts can be timed apart. One deviation from the
|
||||
private body, counted under read-off: `FileFacts::from_analysis` clones the
|
||||
define table where the private path moves it.
|
||||
|
||||
| rename | lex (+`define` table) | parse | analyse | read-off |
|
||||
|---|---:|---:|---:|---:|
|
||||
| tail `state_q` | 70.2 (34 %) | 66.2 (32 %) | 40.4 (20 %) | 27.1 (13 %) |
|
||||
| common port `clk_i` | 604.3 (37 %) | 561.4 (35 %) | 252.0 (16 %) | 195.6 (12 %) |
|
||||
| duplicate module | 606.9 (37 %) | 568.6 (35 %) | 260.4 (16 %) | 197.6 (12 %) |
|
||||
|
||||
So the review's "parser versus index optimization" question has an answer:
|
||||
**the scope stage is two thirds lexer-and-parser**, the semantic analysis is
|
||||
a sixth of it, and the index merge is a further 10 % on top (`merge`, above).
|
||||
Nothing inside the parse is a lever on its own; what is a lever is not
|
||||
running it.
|
||||
|
||||
**Allocation.** No per-stage byte counter exists and none was added: counting
|
||||
allocations needs a `GlobalAlloc` wrapper, which is `unsafe` (CLAUDE.md
|
||||
forbids it) — so allocation is reported as the harness's own 50 ms peak-RSS
|
||||
sample across the request, per row, and as the bytes each class carries
|
||||
(`kept_bytes` / `other_bytes` in the trace). Tail: 606 MiB peak, 2.89 MB kept
|
||||
against 1.65 MB unread. Common port: 1 897 MiB peak against 19.9 MB kept and
|
||||
15.9 MB unread — the peak is where the `Semantics` of 1 248 files sit.
|
||||
|
||||
**The warning pass**, split into its five scans (§3 item 3):
|
||||
|
||||
| rename | warnings | `define` | macro args | SVA | unfinished | unaccounted | files lexed |
|
||||
|---|---:|---:|---:|---:|---:|---:|---:|
|
||||
| tail `state_q` | 49.7 | 1.9 | **41.7** | 2.6 | 0.4 | 0.0 | 135 |
|
||||
| ordinary `aes` | 8.3 | 0.2 | 7.1 | 0.2 | 0.0 | 0.2 | 13 |
|
||||
| common port `clk_i` | 431.5 | 13.2 | **371.4** | 15.3 | 4.1 | 0.2 | 1 249 |
|
||||
|
||||
**The 51 ms warning pass is 84 % one lex per file that spells the name**, and
|
||||
that lex is *already* shared by all five scans (§P2d's `FileScan` memo) — the
|
||||
macro-argument scan is simply the first one to ask for it, so the shared lex
|
||||
is billed to it. There is no duplicated work left in the pass to remove. The
|
||||
only way to remove the lex itself would be to retain the scope build's token
|
||||
streams for every kept file, and the `clk_i` row is why that was not done:
|
||||
1 249 files of retained tokens against a request that already peaks at
|
||||
1.9 GiB is a memory trade the review's own gate ("bounded peak RSS") forbids.
|
||||
Recorded as measured-and-declined, not as unexamined.
|
||||
|
||||
### The ruling
|
||||
|
||||
**Go — 34.3 %** on the tail rename (83.1 ms of 242.4 ms), against a 30 %
|
||||
condition. Every other multi-file row agrees (25 %, 33 %, 35.8 %, 36 %, and
|
||||
87.8 % on the duplicate-module refusal), and the two rows where it is 0 % are
|
||||
the ones where every selected file spells the name, which is exactly the case
|
||||
the reuse is not for.
|
||||
|
||||
## The R3b reuse
|
||||
|
||||
**What was built.** One question, asked once per selected file, before that
|
||||
file is analysed:
|
||||
|
||||
```rust
|
||||
pub trait KnownFacts {
|
||||
/// The record `FileFacts::of(path, text)` would produce, if the caller
|
||||
/// can promise it is exactly that; `None` otherwise.
|
||||
fn facts_for(&self, path: &Path, text: &str) -> Option<FileFacts>;
|
||||
}
|
||||
```
|
||||
|
||||
`Scope::assemble` classifies each file first (`Lead` / `Kept` / `Other` — the
|
||||
same `text.contains(word)` rule as before, only asked before the analysis
|
||||
rather than after it), then takes its contribution:
|
||||
|
||||
| the caller answers | `Lead` / `Kept` | `Other` |
|
||||
|---|---|---|
|
||||
| a record | the record + `analyze(parse(text))` — the parse is still owed, because a later stage reads the `Semantics` | the record, **and no parse at all** |
|
||||
| `None` | `FileFacts::analyzed(path, text)` — exactly as before | exactly as before |
|
||||
|
||||
So the parse formula `K + E` becomes **`(K − reused_other) + E`**, and the
|
||||
reuse also removes the record read-off (`Census`, the `define` table, the
|
||||
line index, `facts_from_analysis`) from every kept file whose record is
|
||||
known. The two halves of a reused kept file — the record from the caller, the
|
||||
`Semantics` from this text — agree because both are pure functions of the same
|
||||
bytes; that pairing is not new, it is what `Scope::analysis`'s on-demand path
|
||||
and the server's own warm scan step have always done.
|
||||
|
||||
**The hash tie, and where record and hash come from.** `Workspace::known_facts`
|
||||
is one line: `self.cache.facts_now(path, text)`. `IndexCache` files every
|
||||
record under the FNV-1a (`lucisv_core::cache::content_hash`, the same one
|
||||
function, never a second implementation) of the bytes it was read off, in the
|
||||
same store entry as the encoded record; `entry_for` is the only comparison
|
||||
anything makes against it, and both the scan's reader and this one go through
|
||||
it. So the record and its key are read from **one place**, written by the read
|
||||
that produced them. Nothing weaker is consulted: not a modified time, not a
|
||||
size, and — deliberately — **not the workspace index's own record**, which
|
||||
carries no hash of the bytes it came from and could be a record of some other
|
||||
text filed under this path.
|
||||
|
||||
**Unsaved-buffer precedence needs no rule.** A buffer with unsaved edits is
|
||||
not the bytes any record was written from, so it misses and is parsed —
|
||||
the same way a changed file misses. The handed text *is* the buffer's text
|
||||
(`rename_sources_traced` puts every open buffer in the set with
|
||||
`current_text`), and the reuse never looks anywhere else.
|
||||
|
||||
**Cross-file resolution is rebuilt for the candidate workspace, untouched.**
|
||||
Reuse changes only where a `FileFacts` came from; `IndexBuilder::finish` still
|
||||
sorts, assigns file ids and merges, and `resolve_external` still runs against
|
||||
*that* index. `check/` has no diff.
|
||||
|
||||
**What was deliberately not built.** An open document's finished analysis
|
||||
(`doc.tree` + `doc.semantics`) could be handed in as well, saving the parse of
|
||||
the one or two open buffers among 238 files. It is 1–2 parses of ~0.8 ms
|
||||
against a `Semantics` clone into the scope, and the door for it would have to
|
||||
carry an analysis as well as a record. Not worth the second shape; the record
|
||||
half of an open buffer is already reused whenever the buffer is saved.
|
||||
No persistent decoded-analysis cache was added, so there is no new memory
|
||||
budget to state: the reuse retains nothing past the request, and the records
|
||||
it clones are dropped with the scope.
|
||||
|
||||
## The R3b measurement
|
||||
|
||||
Paired against a reference built from the clean tree at **`07ef771`** before
|
||||
any edit of this lane
|
||||
(`50d8315a738103f006a28e1f6ea46c476a776fff1d880b860fc1bbcd83b315e9`);
|
||||
candidate `a041b5f3272ca8ff39d9d62e4ab46c896e82b43d0f4e37e11d96b27635f7d491`.
|
||||
Both `--release --locked`, both through the same harness, `--tries 3`, repeat
|
||||
median of three, **each phase run twice per binary with the order alternated**
|
||||
(head, r3b, r3b, head) and the two medians taken. No `cargo` ran during any
|
||||
timed phase; machine load 3.9–5.1 throughout; every command under
|
||||
`tools/guard.sh -m 8 -t 1800`, no guard kill.
|
||||
|
||||
| row | HEAD | R3b | Δ | parses | reused | peak RSS |
|
||||
|---|---:|---:|---:|---:|---:|---:|
|
||||
| **tail `state_q`** | 380.2 | **314.0** | **−17.4 %** | 240 → **137** | 238 | 615 → **596** MiB |
|
||||
| ordinary `aes` | 89.4 | 88.9 | −0.5 % | 22 → 22 | 13 | 448 → 448 |
|
||||
| unique internal `cipher_alert` | 16.9 | 15.2 | −9.8 % | 5 → 2 | 4 | 425 → 421 |
|
||||
| common port `clk_i` (fallback, 3 976) | 3 346.5 | **2 762.5** | −17.4 % | 3 977 → **1 251** | 3 976 | 1 881 → **1 787** |
|
||||
| conflict `state_q → state_d` (refused) | 320.5 | 260.1 | −18.8 % | 244 → 144 | 242 | 534 → 535 |
|
||||
| new name many uses spell (refused) | 2 689.0 | 2 191.5 | −18.5 % | 3 976 → 1 250 | 3 976 | 1 571 → 1 587 |
|
||||
| **duplicate module `rstmgr_por`** (refused) | 2 053.1 | **695.2** | **−66.1 %** | 3 975 → **14** | 3 976 | 887 → **718** |
|
||||
| no symbol (preflight) | 0.17 | 0.19 | +10.8 % | 0 → 0 | 0 | 417 → 417 |
|
||||
| `tailrename` phase | 380.0 | 336.7 | −11.4 % | — | — | — |
|
||||
| `rename` phase, `aes` | 90.8 | 92.0 | +1.3 % | — | — | — |
|
||||
| `blockers`, rename on `aes` | 115.1 | 114.9 | −0.1 % | — | — | — |
|
||||
| `execute`, extract refusal (805 ms row) | 800.2 | 794.7 | −0.7 % | — | 0 | — |
|
||||
| `execute`, extract-module edit | 147.7 | 148.3 | +0.4 % | — | 0 | — |
|
||||
| `execute`, inline refusal | 6.5 | 6.3 | −3.3 % | — | 0 | — |
|
||||
| `refactor`, connect-missing-ports resolve | 131.1 | 130.5 | −0.5 % | — | 0 | — |
|
||||
| `refactor`, expand-wildcard resolve | 54.1 | 54.9 | +1.4 % | — | 0 | — |
|
||||
| `refactor`, organize-imports resolve | 8.1 | 8.0 | −1.2 % | — | 0 | — |
|
||||
|
||||
Where the tail's 66 ms went, from the trace: index **219.8 → 156.2 ms**, of
|
||||
which `other` **83.1 → 0.0** (the container files stopped being parsed),
|
||||
`kept` **133.5 → 101.6** (their record read-off stopped being made), `merge`
|
||||
22.7 unchanged, and the reuse itself **31.1 ms** — 238 store lookups and
|
||||
decodes at about 0.13 ms each. Every stage outside the scope build is level:
|
||||
`verify` 71.6 → 71.6, `warnings` 50.1 → 50.2, `edits` 12.3 → 11.9, selection
|
||||
13.7 → 12.9.
|
||||
|
||||
### Gates
|
||||
|
||||
| gate | result |
|
||||
|---|---|
|
||||
| **≥ 20 % wire on the large rename** | **MISSED at −17.4 %** against this session's paired HEAD (380.2 → 314.0). Against the review's own 0.51.0 baseline of 398.3 ms it is −21.2 %, and the brief's absolute form of the same gate — **≤ 318 ms — is met at 314.0** |
|
||||
| bounded peak RSS | **met**, and lower everywhere it moves: tail 615 → 596 MiB, fallback 1 881 → 1 787, duplicate-module refusal 887 → 718; the one row that rose (+16 MiB on a 1.6 GiB refusal) is inside the sampler's spread |
|
||||
| `aes` not slower | **met**: −0.5 % (`renametrace`), +1.3 % (`rename`), −0.1 % (`blockers`) — all inside spread |
|
||||
| the fallback and the refusals not slower, RSS not higher | **met**: `clk_i` −17.4 %, conflict −18.8 %, new-name-many-uses −18.5 %, duplicate module −66.1 %, extract refusal −0.7 %, inline refusal −3.3 %; RSS lower or level on every one |
|
||||
| same edits / warnings / refusals | **met**: 36 paired rows compared on `fingerprint`, `message`, `status`, `result_count`, `edits`, `files`, `created`, `titles` — **0 mismatches**; and the new `renamewarn` phase compared **1 750 warning sentences line by line** across four renames (434 / 12 / 0 / 1 304), **all identical** |
|
||||
| the corpus probe | `a_corpus_rename_says_the_same_thing_however_many_records_are_reused` (`#[ignore]`d, `crates/vlog_refactor/tests/corpus.rs`): one rename over **860 files of real RTL** asked three ways — no records, every record, every second record — **byte-identical edits and warnings all three times**, parses **865 → 16 → 439**, index stage **1 262.4 → 201.3 → 744.7 ms** |
|
||||
| verifier untouched | **met**: `crates/vlog_refactor/src/check/` has no diff, and every existing verifier attack test is green and unmodified |
|
||||
|
||||
**The named remaining stage.** The reuse's own **31.1 ms of decode** is a
|
||||
third of the gross 95 ms saving, and it is the price of the one-place content
|
||||
tie: the record and its hash live in the store's encoded entry, so taking one
|
||||
means decoding it. Taking the *decoded* record from `WorkspaceIndex` instead
|
||||
and only the hash from the cache would remove almost all 31 ms and clear the
|
||||
percentage gate — and it is exactly the two-place tie this lane refused,
|
||||
because a record filed under a path is not evidence about the bytes a rename
|
||||
was handed. Behind it, the tail's next stages are `verify.rebuild` **37 ms**
|
||||
(`WorkspaceIndex::absorb`'s whole-index merge, which §61.4 already filed as
|
||||
`vlog_semantic`'s to fix) and `merge` **23 ms** (`IndexBuilder::finish`, the
|
||||
same merge). Both are outside this lane's files.
|
||||
|
||||
### Collateral: the other refactorings
|
||||
|
||||
**Not taken, and the rows above are the measurement.** The door is engine-wide
|
||||
by construction — `Scope::assemble` takes the `known` argument, so
|
||||
`Scope::build`'s callers could be given it — but reaching them means a `_with`
|
||||
entry point on each of `extract_module`, `inline_module`, `organize_imports`,
|
||||
five `ports::*` functions and `find_references`, in five files this lane does
|
||||
not own (`extract/`, `inline/`, `imports.rs`, `ports/`, `references.rs`).
|
||||
That is well past the "same three lines each" condition, so it is filed rather
|
||||
than done. The measured collateral today is therefore nil, as the table shows:
|
||||
the 805 ms extract refusal, the extract edit, both resolves and the inline
|
||||
refusal are all within ±1.4 % of HEAD.
|
||||
|
||||
Worth noting for whoever takes it: the 805 ms refusal was shown by R3c-x to
|
||||
be `boundary::Crossing::read`, *after* the scope build, so the door would
|
||||
shorten its prefix and not its cause — the resolves and the extract edit,
|
||||
whose scope builds are hundreds of files, are the better candidates. Neither
|
||||
has a stage trace, so no estimate is offered here.
|
||||
|
||||
## Status / TODO
|
||||
|
||||
- [x] R3c: the scope stage split, shipped in the engine's own trace
|
||||
(`IndexTrace`: lead / kept / other / reused / merge, with files and
|
||||
bytes per class)
|
||||
- [x] R3c: the intra-analysis split (lex / parse / analyse / read-off) from a
|
||||
trace-only build, measured once and not shipped
|
||||
- [x] R3c: the warning stage split into its five scans (`WarnTrace`)
|
||||
- [x] R3c: the go/defer number — **go, 34.3 %** — and the ruling in TODO §61.5
|
||||
- [x] R3b: the `KnownFacts` door, the server's one implementation, the hash tie
|
||||
- [x] R3b: proofs — fingerprint equality on a part-reused index, a stale
|
||||
record refused, a misfiled record refused, the `(K − reused) + E`
|
||||
formula, warm-store/no-store parity, unsaved-buffer precedence, and
|
||||
an `#[ignore]`d 860-file corpus probe asked three ways
|
||||
- [x] R3b: the paired measurement against `07ef771` — five of six gates met,
|
||||
the wire-time percentage missed at −17.4 % (the absolute ≤ 318 ms form
|
||||
met at 314.0), with the remaining stage named and measured
|
||||
- [x] the collateral decision for the other refactorings — **not taken**,
|
||||
measured as nil, and why
|
||||
- [x] QA — PASS (2026-09-09, see QA log)
|
||||
|
||||
## Work log
|
||||
|
||||
**2026-09-08 (dev).**
|
||||
|
||||
- Read §61 header, §61.5, the review's §3 and its Gate, the tracker's R3b/R3c
|
||||
rows, and `perf5-p2`, `perf5r-preflight`, `index-persistence`,
|
||||
`workspace-index`, `refactor-rename`, `topo.md` §1.2/§3.
|
||||
- Built the reference binary from the clean tree at `07ef771` **before any
|
||||
edit** and preserved it (`lucisv-server-head`,
|
||||
`50d8315a738103f006a28e1f6ea46c476a776fff1d880b860fc1bbcd83b315e9`).
|
||||
- **R3c first.** Added `IndexTrace` and `WarnTrace` to `vlog_refactor`'s
|
||||
trace, threaded through `Scope::build_keeping` and `Scope::warnings`. Both
|
||||
are out parameters filled as the build runs, in the shape `RenameTrace`
|
||||
already had, and both print as their own `name{…}` group so the existing
|
||||
`phases_p2.parse_trace` flattens them into `trace_index_*` /
|
||||
`trace_warnings_*` row fields with no harness change. The classification
|
||||
(`text.contains(word)`) moved from after the analysis to before it — the
|
||||
same pure question of the same two values — so the class can decide which
|
||||
stage the analysis is billed to, and (later) whether it happens at all.
|
||||
- Collapsed rather than kept the untraced wrappers: `build_keeping` and
|
||||
`warnings` take the trace, because a wrapper nothing called was dead code.
|
||||
- The intra-analysis split needed instrumentation inside
|
||||
`vlog_semantic::workspace::record::analyzed_facts`, which this lane may not
|
||||
change. Measured it instead in a **trace-only build** (§R1b's protocol): the
|
||||
private body expanded over the public API in `Scope`, run once, numbers
|
||||
recorded above, and the expansion removed before anything else was written.
|
||||
The shipped trace has no intra-analysis fields.
|
||||
- Ran `renametrace` at that build. **Go: 83.1 / 242.4 = 34.3 %.**
|
||||
- **R3b.** `KnownFacts` in `scope.rs`, `Building` (the build in progress) so
|
||||
`assemble` stays readable at one screen, `rename_traced_with` beside
|
||||
`rename_traced` with one shared body, `IndexCache::entry_for` +
|
||||
`facts_now`, `Workspace::known_facts`, and `rename.rs::Known`.
|
||||
- `facts_now` exists rather than reusing `facts_for` because `facts_for`
|
||||
counts its work into `IndexCache::work`, which `ScanTrace` subtracts per
|
||||
scan: a rename decoding 238 records between two scans would otherwise
|
||||
appear in the next scan's trace as decodes it never made. Both go through
|
||||
`entry_for`, so the content tie is still one function.
|
||||
- Proofs written before the measurement, all green:
|
||||
`an_index_part_reused_and_part_parsed_is_the_index_the_texts_build`
|
||||
(fingerprint + file ids + per-file analyses, two of four records reused),
|
||||
`a_caller_that_knows_nothing_builds_exactly_what_it_always_did`,
|
||||
`a_reused_record_removes_that_files_parse_and_changes_no_edit`
|
||||
(`(K − 3) + E`, every stage's parse count, edits and warnings identical),
|
||||
`a_file_whose_analysis_is_read_is_still_parsed_when_its_record_is_known`,
|
||||
`a_record_that_names_another_file_is_not_taken`,
|
||||
`a_request_local_read_answers_for_these_bytes_and_counts_as_no_scan_work`
|
||||
(the stale record refused four ways, and the scan counters untouched),
|
||||
`a_rename_over_a_warm_store_says_exactly_what_one_with_no_store_says`
|
||||
(server level: same edits, same warnings, `parses{index=2}` against 3),
|
||||
`an_unsaved_buffer_is_parsed_and_renamed_from_its_own_text`, and the
|
||||
`#[ignore]`d `a_corpus_rename_says_the_same_thing_however_many_records_are_reused`
|
||||
over the repo's 860-file corpus (run it with
|
||||
`tools/guard.sh -m 8 -t 1200 -- cargo test -p vlog_refactor --test corpus -- --ignored --nocapture`;
|
||||
it prints its own parse counts).
|
||||
- `cargo test --workspace` **4 374 passed, 0 failed** (4 366 at the start of
|
||||
the lane, +8 and none removed); `cargo fmt` clean; guarded
|
||||
`cargo clippy --all-targets --workspace` clean with no new `#[allow]`.
|
||||
|
||||
**2026-09-08 (dev), the measurement and what it cost.**
|
||||
|
||||
- Six phases, each run twice per binary with the order alternated, then the
|
||||
`renamewarn` phase once per binary. Numbers in "The R3b measurement" above;
|
||||
raw evidence and a reproduction recipe in `~/.cache/lucisv-perf/take5r-5/`.
|
||||
- `renamewarn` is new (`tools/perf/phases_r3b.py`) and exists because a hole
|
||||
was found while planning the parity proof: `schema.fingerprint` can carry
|
||||
warnings, but `phases_p2` calls it as `fingerprint(edit)` — and a rename's
|
||||
warnings never travel in the `WorkspaceEdit` at all, they are
|
||||
`window/logMessage` notifications. So no existing phase would have caught a
|
||||
reuse that kept every edit and dropped a sentence. It dumps them verbatim
|
||||
and they are compared line by line, not hashed.
|
||||
- The gate was measured, missed by 2.6 points, and reported as missed. The
|
||||
≥ 20 % is against this session's paired HEAD (380.2 ms); against the
|
||||
review's own 398.3 ms baseline the same 314.0 ms is −21.2 %, and the
|
||||
brief's absolute restatement of the gate (≤ 318 ms) is met. Closing the
|
||||
2.6 points is available and was **refused**: it means taking the decoded
|
||||
record from `WorkspaceIndex` and only the hash from the cache, and a record
|
||||
filed under a path is not evidence about the bytes a rename was handed.
|
||||
|
||||
**Deviations from the lane's stated file list, all flagged rather than silent:**
|
||||
|
||||
- `crates/vlog_refactor/src/rename/warnings.rs` (+33) is not in the list, and
|
||||
the lane's own instruction to split the `warnings` stage into its scans
|
||||
cannot be carried out without it. `Scope::warnings` has exactly one
|
||||
production caller, so the change is the trace parameter and nothing else.
|
||||
- `crates/vlog_refactor/src/rename/tests.rs` and `tests/corpus.rs` — test
|
||||
files for the module the lane owns; `crates/vlog_refactor/tests/*` is in the
|
||||
list and `src/rename/tests.rs` is the same crate's unit tests.
|
||||
- `crates/lucisv_server/src/state/mod.rs` gains **4 production lines** (a
|
||||
`&self` query and its doc comment), taking it 974 → 978. It is already the
|
||||
file TODO §55 is filed against, and the query must sit beside the private
|
||||
`cache` field it reads; moving one `&self` call into a new module would be
|
||||
worse than the four lines. Flagged for the lead.
|
||||
- `tools/perf/phases_r3b.py` (new), plus its one-line registration in
|
||||
`bench.py` and two rows in `tools/perf/README.md` — `tools/perf/` is in the
|
||||
list.
|
||||
- **Not mine:** `docs/perf/README.md` acquired a §61 round entry during this
|
||||
session (the lead's, §61.6). It was left untouched; the working tree was
|
||||
clean at `07ef771` when this lane started.
|
||||
|
||||
## QA log
|
||||
|
||||
**2026-09-09 (QA, Sonnet).** Verified in the main tree unless noted; code
|
||||
attacks in a fresh clone at `07ef771` with the working-tree diff applied
|
||||
(`/private/tmp/.../scratchpad/qa-61-5/clone`), never in the main tree.
|
||||
Verdict: **PASS**.
|
||||
|
||||
**1. Gates.** `cargo fmt --all -- --check` clean. `cargo clippy --all-targets
|
||||
--workspace` clean, no new `#[allow]` (grepped every touched file). `cargo
|
||||
test --workspace` (guarded, release): **4 374 passed, 0 failed, 45 ignored**
|
||||
— matches the dev's claim exactly. Re-ran `vlog_refactor` + `lucisv_server`
|
||||
alone in the isolated clone: 2 265 passed, 0 failed (then 2 268 after my own
|
||||
3 added tests, still 0 failed). `git diff --stat crates/vlog_refactor/src/check/`
|
||||
is empty. Production line counts (non-blank, non-comment, before the inline
|
||||
`mod tests {}` or the external `mod tests;` declaration): `scope.rs` 176,
|
||||
`rename/mod.rs` 423, `warnings.rs` 441, `trace.rs` 132, `index_cache.rs` 343,
|
||||
`state/mod.rs` 979 (dev says 974→978; 1-line off on my boundary heuristic,
|
||||
not a real discrepancy). All comfortably under the 600-line mark; nothing
|
||||
crosses a threshold.
|
||||
|
||||
**2. THE TIE.** Read `IndexCache::entry_for`/`facts_now`/`facts_for`
|
||||
(`crates/lucisv_server/src/index_cache.rs`), `Workspace::known_facts`
|
||||
(`state/mod.rs:489`) and `rename.rs::Known`. Confirmed: `entry_for` is the
|
||||
**one** place a record and its FNV-1a are compared (`self.entries.get(path)
|
||||
.filter(|e| e.content == content_hash(text.as_bytes()))`); `facts_now` and
|
||||
`facts_for` both go through it, differing only in whether `IndexCache::work`
|
||||
is charged; `known_facts` is one line to `self.cache.facts_now(path, text)`
|
||||
— the workspace index (`self.index`) is never consulted. `Known` is a
|
||||
newtype whose whole body is `Workspace::known_facts`.
|
||||
|
||||
Attacks, all in the clone:
|
||||
- **(a) stale-disk-after-scan** — new test
|
||||
`index_cache::tests::a_file_edited_on_disk_after_the_scan_misses_the_stale_record`:
|
||||
record a file, edit it on disk with no watcher event, confirm `facts_now`
|
||||
misses for the new bytes and still answers for the old ones. Passes.
|
||||
- **(b) tampered store line** — read the existing (pre-existing, not
|
||||
R3b/R3c's) tests `a_record_whose_facts_do_not_match_their_checksum_is_dropped`
|
||||
and the "accepted residue" test right after it. The store line is
|
||||
`content_hash\tfacts\tchecksum(facts)`; a hand-edited line whose facts no
|
||||
longer match its *original* checksum is dropped at load, never served. But
|
||||
a forger who recomputes the checksum over the corrupted facts (keeping the
|
||||
same content hash) **is** served — documented in the code as deliberate:
|
||||
"the checksum is an accident detector, not a MAC... a forger recomputes the
|
||||
checksum." This is a pre-existing property of the index store
|
||||
(`docs/features/index-persistence/README.md`), untouched by this lane's
|
||||
diff (`entry_for`/`facts_now` add no new logic here, they only add a second
|
||||
*reader* of the same decode path `facts_for` already used). It is reachable
|
||||
only by hand-editing the on-disk store file — not through any code path the
|
||||
product itself writes through (`IndexCache::record` always writes a
|
||||
checksum over the facts it actually encoded) — matching the review's
|
||||
"immutable cached facts" premise. Not a §61.5 finding; not rework.
|
||||
- **(c) unsaved buffer** — existing test
|
||||
`rename::tests::an_unsaved_buffer_is_parsed_and_renamed_from_its_own_text`
|
||||
(lucisv_server), run and green: a buffer whose text disagrees with disk
|
||||
misses the store (content key) and is parsed from the buffer's own text.
|
||||
- **(d) known record for an unselected path** — by construction: `take()`
|
||||
only calls `known.facts_for(path, text)` once per file already in the
|
||||
selected set, with that file's own path/text. A `KnownFacts` impl can
|
||||
return facts for a path the rename never asks about; nothing would ever
|
||||
call it, so there is nothing to ignore — verified by code reading, not a
|
||||
runtime scenario.
|
||||
- **(e) two files, identical content, different paths** — new test
|
||||
`index_cache::tests::two_files_with_identical_text_never_cross_their_records`:
|
||||
records both, confirms each is served its own `FileFacts::path()`, then
|
||||
updates one file's record content and confirms the other file's record for
|
||||
its original bytes is untouched and never answers for the sibling's new
|
||||
text. Passes. (Structurally guaranteed too: `IndexCache::entries` is
|
||||
`HashMap<PathBuf, Entry>` — path first, content second — so a content
|
||||
collision alone can never reach the wrong path's entry.)
|
||||
- **(f) kept files still parsed** — confirmed by code reading (`Building::take`:
|
||||
a `Kept`/`Lead` file with a known record still runs
|
||||
`analyze(&parse_source_tolerant(text).0, text)` to produce the `Semantics`
|
||||
a later stage reads; only the record read-off is skipped) and by the
|
||||
existing `lucisv_server` test
|
||||
`a_rename_over_a_warm_store_says_exactly_what_one_with_no_store_says`,
|
||||
which asserts `reused_files=3` but `parses{index=2` for its 3-file scope
|
||||
(bystander.sv is the one skipped).
|
||||
- **(g) sabotage.**
|
||||
1. `entry_for` with the hash filter removed (`self.entries.get(path)` and
|
||||
nothing else) → `index_cache::tests::a_request_local_read_answers_for_these_bytes_and_counts_as_no_scan_work`
|
||||
fails immediately ("a stale record must not be served"), and
|
||||
`rename::tests::an_unsaved_buffer_is_parsed_and_renamed_from_its_own_text`
|
||||
fails too (reused_files=2 instead of 1 — the stale on-disk record for
|
||||
the unsaved buffer's path gets served).
|
||||
2. `Workspace::known_facts` redirected to `self.index.facts_for(path)
|
||||
.cloned()` (the workspace index's own per-file record, which
|
||||
`WorkspaceIndex` does hold but with no content hash beside it) →
|
||||
**both** `an_unsaved_buffer_is_parsed_and_renamed_from_its_own_text` and
|
||||
`a_rename_over_a_warm_store_says_exactly_what_one_with_no_store_says`
|
||||
fail. Both sabotage variants restored afterward; re-ran the full
|
||||
`vlog_refactor`+`lucisv_server` suite clean (2 268/0) to confirm no
|
||||
residue.
|
||||
|
||||
**3. Index equality.** Existing test
|
||||
`an_index_part_reused_and_part_parsed_is_the_index_the_texts_build` checks
|
||||
fingerprint + file ids + per-file analysis print. Added
|
||||
`scope::tests::a_part_reused_index_answers_defines_and_reexport_queries_like_the_texts_build`
|
||||
(clone): a 4-file fixture with a `` `define`` table (a container file,
|
||||
reused) and a package re-export (`export b_pkg::*;`, also reused), lead file
|
||||
renaming a package member. Checked, mixed (part-reused) index vs a plain
|
||||
`WorkspaceIndex::build` on the same texts: fingerprint equal;
|
||||
`defines(file_id)` entry count equal; `member("b_pkg","SIG")` equal (found
|
||||
the right query — `units()` is file-scope names only, a package `localparam`
|
||||
is a *member*, not a unit; my first draft used the wrong query and caught
|
||||
itself); `references_to` count on that declaration equal; `members_of_chain("a_pkg")`
|
||||
(the re-export edge) equal; `hierarchical_declarations("SIG")` equal (empty
|
||||
both sides, path exercised). Also ran the existing `#[ignore]`d
|
||||
860-file corpus probe (`cargo test --release -p vlog_refactor --test corpus
|
||||
-- --ignored --nocapture`, guarded): reproduces the dev's parse counts
|
||||
exactly (**865 → 16 → 439**) and identical edits/warnings all three ways;
|
||||
absolute timings differ from the dev's (this machine's load), which is
|
||||
expected and not a finding.
|
||||
|
||||
**4. The verifier.** `check/` has zero diff (`git diff --stat
|
||||
crates/vlog_refactor/src/check/` empty) and every test under it passed
|
||||
unmodified as part of the full-workspace run. Sabotage: re-added a spurious
|
||||
parse for a reused `Other`-class file in `Building::take` (an extra
|
||||
`parse_source_tolerant(text)` billed to the same stage) →
|
||||
`rename::tests::a_reused_record_removes_that_files_parse_and_changes_no_edit`
|
||||
fails immediately (`left: 10, right: 7` against the asserted `(K-3)+E`
|
||||
formula). Restored; re-verified green.
|
||||
|
||||
**5/6. Parity and re-measurement.** Independently re-derived from the raw
|
||||
evidence in `~/.cache/lucisv-perf/take5r-5/` (not just read as prose):
|
||||
- `r3c-results.jsonl`: tail row `trace_index_other=83.1`,
|
||||
`trace_index=242.4` → 83.1/242.4 = **34.3 %** exactly, matching the go
|
||||
ruling.
|
||||
- `paired.jsonl`: 36 distinct (phase,row) keys, 0 mismatches on
|
||||
fingerprint/message/status/result_count/edits/files/created/titles across
|
||||
every head↔candidate pairing (144 compared pairs with the alternated-order
|
||||
duplicates) — matches "36 rows, 0 mismatches" exactly. Re-derived the tail
|
||||
rename's own median-of-medians: head 382.0 ms, candidate 316.0 ms
|
||||
(**−17.3 %**), against the dev's 380.2→314.0 (−17.4 %) — same conclusion,
|
||||
small difference from a different (but reasonable) medians-of-medians
|
||||
convention.
|
||||
- `warn.jsonl`: 8 rows (4 renames × 2 labels), sentence counts 434/12/0/1304
|
||||
= **1 750** exactly; compared head vs candidate title-lists field by
|
||||
field, byte-for-byte — **0 mismatches** across all four rows.
|
||||
- `head.sha256` vs the actual preserved binaries
|
||||
(`.../scratchpad/perf5r-5/bin/lucisv-server-{head,r3b}`): sha256 matches
|
||||
exactly (`50d8315a...` / `a041b5f3...`), so I did not need to rebuild.
|
||||
- **QA's own three renames**, run directly against the real opentitan tree
|
||||
(3 975 `.sv`/`.svh` files) through `vlog_refactor::rename_traced` /
|
||||
`rename_traced_with` (bypassing the LSP wire — this exercises exactly the
|
||||
engine-level contract §61.5 owns), each asked three ways (no records,
|
||||
every record, half): (i) `WidthPRDSBox`, a package parameter used bare via
|
||||
`module aes_sbox import aes_pkg::*;` in `aes_sbox.sv`; (ii) `entropy_masking_req`,
|
||||
a net declared in `aes.sv` and threaded into a `bind aes ...` connection in
|
||||
`aes_bind.sv`; (iii) `seed_en`, declared in `aes_prng_clearing.sv` and
|
||||
reached two hierarchy levels up as `u_aes_core.u_aes_prng_clearing.seed_en`
|
||||
from `aes_bind.sv`. **All three: byte-identical edits+warnings across all
|
||||
three reuse modes** (parses collapsed from ~3975 to single digits/dozens
|
||||
with full reuse, reused_files 3975/1988 as expected). One side observation,
|
||||
not a §61.5 finding: for (ii) and (iii), `aes_bind.sv`'s own occurrence is
|
||||
neither edited nor warned about, identically in all three reuse modes —
|
||||
reproduces at HEAD, so it's a pre-existing bind/hierarchy-resolution
|
||||
question, not a reuse-safety one. Flagged as a background task
|
||||
(`task_834abda3`) for separate investigation; not blocking this verdict.
|
||||
|
||||
**7. Traceability.** Re-derived (not merely read) the go-condition
|
||||
arithmetic, the 36-row parity count, the 1 750-sentence count, the corpus
|
||||
probe's 865/16/439 parses, and the tail rename's percentage — all matched
|
||||
the README/tracker's numbers (see §5/6 above). `docs/perf/take5-tracking.md`'s
|
||||
R3b/R3c experiment records cross-checked against the feature README: no
|
||||
discrepancies found in either direction.
|
||||
|
||||
**8. `docs/perf/README.md`.** `git diff docs/perf/README.md` shows only the
|
||||
appended "2026-09-08 — the review round (TODO §61)" section (34 new lines,
|
||||
0 removed, nothing above it touched) — the lead's, per TODO §61.6. Not
|
||||
edited.
|
||||
|
||||
**Opentitan / guard / hygiene.** `git -C opentitan status --porcelain`
|
||||
checked repeatedly through this session: always exactly the three known
|
||||
files (`hw/ip/aes/dv/tb/tb.sv`, `hw/top_darjeeling/.../ast.sv`,
|
||||
`hw/top_earlgrey/.../ast.sv`) — my opentitan reads were read-only. Every
|
||||
`cargo test`/`clippy` and the two release-mode ignored-test runs went through
|
||||
`tools/guard.sh -m 8 -t ≤1200`; no guard kill. No `sleep` over 60 s; used
|
||||
`Monitor`/background-PID waits instead. No lingering background processes at
|
||||
session end (checked `ps aux` for `guard.sh`/`cargo`). All code experiments
|
||||
and new tests live only in
|
||||
`/private/tmp/.../scratchpad/qa-61-5/clone` (a disposable clone) — the main
|
||||
tree's working-tree diff is untouched by QA except this README's QA log and
|
||||
the TODO.md tick below.
|
||||
|
||||
**Small fixes:** none needed in the dev's diff itself — the only fix made
|
||||
was to my own added test in the clone (a `cargo fmt` alignment nit and an
|
||||
`assert_eq!(_, true)` → `assert!` clippy nit), both in throwaway QA code, not
|
||||
in the feature's diff.
|
||||
|
||||
**Topo row for the lead:** confirm at merge —
|
||||
`lucisv_server ──▶ vlog_refactor`, edge `rename_traced_with` + `KnownFacts`,
|
||||
additive, no existing edge amended (`vlog_semantic` unchanged, `check/`
|
||||
untouched).
|
||||
|
||||
## Review
|
||||
|
||||
**2026-09-09 (lead).** Accepted. Read `KnownFacts`, `entry_for`,
|
||||
`facts_now`, `Workspace::known_facts`, the `Scope::assemble` branch, the
|
||||
trace split, both logs and the tracker records; QA's sabotage of the tie
|
||||
(hash stripped; the workspace index's record substituted) and its three
|
||||
opentitan renames in three reuse modes are the acceptance.
|
||||
|
||||
- The split answered the review's question before anything was built —
|
||||
the scope stage is the parser (lex 34 %, parse 32 %), and a third of it
|
||||
is spent on files the rename never analyses — and the go condition I
|
||||
wrote into the brief was met with a number (34.3 %).
|
||||
- The design trusts exactly what the index already trusts and nothing
|
||||
more: a record is reused only when the handed bytes hash to what that
|
||||
store entry was written for, the record and the hash read from one
|
||||
place, the workspace index's record never (it carries no hash). An
|
||||
unsaved buffer can never hit; a file edited on disk without a watcher
|
||||
event cannot hit. `check/` has no diff.
|
||||
- Gates: tail rename 380 → 314 ms (−17 % against HEAD, −21 % against the
|
||||
review's own baseline, which is how the review stated its gate; the
|
||||
brief's absolute ≤ 318 met), the duplicate-module refusal 2.05 s →
|
||||
0.7 s, `clk_i` −17 %, RSS lower, 36 rows and 1 750 warning sentences
|
||||
byte-identical. The residue is named: 31 ms of store decode, the price
|
||||
of the one-place tie, which I would not trade for a two-place one.
|
||||
- Collateral to the other refactorings was measured nil and left with
|
||||
the note that the resolves and the extract edit are the candidates,
|
||||
since the 805 ms refusal is after the scope build.
|
||||
- QA's side finding — a `bind` file's own occurrence of a renamed name
|
||||
is neither edited nor warned, identically at HEAD — is pre-existing and
|
||||
goes to the loop-3 list with QA's task reference.
|
||||
|
||||
Docs applied at merge: topo (`rename_traced_with` + `KnownFacts`); the
|
||||
loop-3 note.
|
||||
@@ -301,6 +301,74 @@ attached.
|
||||
|
||||
## Work log
|
||||
|
||||
### 2026-09-08 — §61.4: how often a scan publishes, and what `[]` is worth
|
||||
|
||||
**Neither of these is a contract change.** The three tables are still published
|
||||
together and never one of them; the order contract is `must_wait`'s and is
|
||||
untouched; `INTERLEAVE_ABOVE` still decides which scans interleave at all. What
|
||||
moved is *when* the drain pays for a publish, and what it does with an answer
|
||||
that names nowhere (`docs/features/perf5r-publication/README.md`).
|
||||
|
||||
- **A publication cadence.** `answer_what_is_waiting` used to publish whenever
|
||||
anything at all was waiting — one whole-index merge per burst of requests.
|
||||
Measured under a definition every 100 ms on opentitan, that was 14 publishes
|
||||
in a warm scan and 41 in a cold one, and `absorb` + `candidates` alone were
|
||||
46 % of the warm session and 52 % of the cold one. It now publishes when
|
||||
something was **waiting** — the startup's held requests, which is the
|
||||
session's first useful answer and is never deferred — or when
|
||||
`Scan::publish_is_due()` says `PUBLISH_EVERY` (512) records have been staged
|
||||
since the last one. **A request may now read an older prefix; it can never
|
||||
read an inconsistent one**, which is the distinction this feature's decision
|
||||
1 rests on. A quiet scan still pays nothing at all: the cadence is asked only
|
||||
when there is something for a publish to be for.
|
||||
- **An empty navigation answer computed mid-scan is not an answer.** A
|
||||
definition, a typeDefinition or a references that comes back `[]` while the
|
||||
index is still growing cannot be told apart from "the scan has not reached
|
||||
that file", so the request is put back and asked again at the next publish,
|
||||
and at the latest when the scan ends — where `[]` is the honest answer and
|
||||
goes out. This closes the case `perf5r-first-answer` pinned openly as its
|
||||
honest limit (a target in the folder next door answered `[]` at the head
|
||||
publish). It is a **rule in the drain**, not a second computation of the
|
||||
answer: the response is computed once through the ordinary handler and either
|
||||
sent or set aside, and a set-aside request is re-asked once per publish
|
||||
rather than once per step. The deferred set is deliberately **not** part of
|
||||
`must_wait` — a hover, a completion or a code action behind a deferred
|
||||
definition is answered exactly as before, and one is pinned.
|
||||
|
||||
### 2026-09-08 — §61.3: a scan that owes itself the rest of its own scope
|
||||
|
||||
The coherence contract is untouched — the three tables are still published
|
||||
together, a scan a message asked for still takes no held message, and
|
||||
`head_owed` still decides the drain. What changed is that a startup scan's work
|
||||
list can **grow once**: a workspace-scoped session with a buffer open walks
|
||||
that buffer's folders, steps them, publishes them and answers what is waiting,
|
||||
and only then walks the rest of the workspace
|
||||
(`docs/features/perf5r-first-answer/README.md`).
|
||||
|
||||
Three consequences for this feature, all in `server/index.rs`:
|
||||
|
||||
- **A scan with a pending discovery always interleaves**, whatever
|
||||
`INTERLEAVE_ABOVE` says about its work list so far. A 124-file head is under
|
||||
the threshold, and the request waiting for it is precisely the one this
|
||||
feature exists to answer inside the scan. `interleave` is now
|
||||
`total > INTERLEAVE_ABOVE || scan.discovery_pending()`.
|
||||
- **The remaining discovery is its own step.** `scan_step` runs it when the
|
||||
work list is exhausted and returns `true` without indexing anything, so the
|
||||
publish/drain point sits between it and the next file, and no file is ever
|
||||
reported against a denominator that grew inside its own step.
|
||||
- **A burst's `didOpen` finishes the discovery before re-ordering.** The user
|
||||
has jumped somewhere the walk has not reached; re-ordering a work list that
|
||||
cannot yet contain that folder would answer the request behind the `didOpen`
|
||||
off a prefix that cannot hold its target. `Workspace::open_next` does the
|
||||
walk first, and `scan_order::worth_waiting` then bounds the new head against
|
||||
the whole scope exactly as it always did.
|
||||
|
||||
Measured coherence, both binaries, cold and warm: `mismatched_answers` **0**
|
||||
and — under a new, stricter counter that treats an *empty* interim answer as a
|
||||
failure too — `unsettled_answers` **0** over 54 mid-scan definitions. The
|
||||
mid-scan answers also arrive sooner: the first one of a warm session at 26–42 ms
|
||||
where the reference took 143–153.
|
||||
|
||||
### 2026-09-08 — §P4b3: when a held request is drained, and what it reads
|
||||
|
||||
**The order contract is unchanged. The *moment* a held request is drained
|
||||
|
||||
@@ -69,6 +69,12 @@ output). `NetDelay` now owns both of its gaps, `before_hash` and
|
||||
`lucisv_server::state::Workspace::walked_files` is the server's only caller
|
||||
and needed no change — its `sort`/`dedup` still runs, and now has less to
|
||||
do. `vlog_linter` uses `walk::is_excluded` only, which is untouched.
|
||||
**Amended 2026-09-09 (review finding F1):** the visited set is now a value a
|
||||
caller may own and share between two walks (`DirectoryTracker`,
|
||||
`collect_files_tracked`, `collect_files_below_tracked`), because the server's
|
||||
startup scan discovers its scope in two walks and the enter-once rule has to
|
||||
hold *between* them. The policy is unchanged and the old entries are
|
||||
wrappers; see the work log below.
|
||||
- **`vlog_parser::ast::NetDelay` → `vlog_formatter`** (topo §2.9-27, struck).
|
||||
Two new public fields, `before_hash` and `after_hash`, both
|
||||
`Vec<Comment>`. The only constructor is `Parser::parse_net_delay`; the only
|
||||
@@ -130,6 +136,38 @@ output). `NetDelay` now owns both of its gaps, `before_hash` and
|
||||
|
||||
## Work log
|
||||
|
||||
### 2026-09-08 — §61.3: two additive entries beside `collect_files`
|
||||
|
||||
`lucisv_core::walk` gained two functions and lost nothing. `collect_files`
|
||||
keeps its signature, its order, its `.gitignore` handling, its `--exclude`
|
||||
matching, its cycle guard and its warnings, and is now a two-line wrapper over
|
||||
the first of them. The 102 tests this feature and `parallel-files` left behind
|
||||
all pass unchanged; seven were added.
|
||||
|
||||
- **`collect_files_with(input, exclude, gitignore, found, warn)`** hands each
|
||||
file to `found(path, Option<u64>)` instead of pushing it onto a `Vec`. The
|
||||
length is `meta.len()` off the **`metadata` call the walk already makes on
|
||||
every directory entry** to answer "directory?" — so the walk costs nothing
|
||||
more and a caller that needs sizes (`lucisv_server`'s
|
||||
`lucisv.index.maxFileSize` cap) stops making 3 976 of its own. `None` means
|
||||
the walk did not stat: `input` naming a file rather than a directory is
|
||||
handed straight over, with no `metadata` call added to a path that never
|
||||
needed one.
|
||||
- **`collect_files_below(root, input, …)`** walks `input`, which lies under
|
||||
`root`, finding exactly what a walk of `root` would have found there. It
|
||||
pushes each ancestor's `.gitignore` onto the rule stack at the depth that
|
||||
ancestor sits at, and it yields **nothing** when one of those ancestors is
|
||||
itself ignored or excluded — because a walk of `root` would never have
|
||||
descended into it. `input` not under `root` finds nothing and is not an
|
||||
error.
|
||||
|
||||
The second exists because `lucisv_server` walks one folder of a scope whose
|
||||
rung is the *root*, and a walk that starts below a root would otherwise index
|
||||
what that root's rules exclude. Its three tests assert equality with the
|
||||
whole-root walk restricted to the same subtree — including the case where a
|
||||
deeper `.gitignore`'s `!` line re-includes what the root's rule dropped, which
|
||||
is where the `base` depth of a pre-loaded ignore file has to be exactly right.
|
||||
|
||||
**2026-09-05 — dev (Opus 5).**
|
||||
|
||||
*43.1, `crates/lucisv_core/src/walk.rs`.* `Walk` gained
|
||||
@@ -250,6 +288,36 @@ together with the warning channel the walk lacks. The opentitan
|
||||
reporting a same-directory symlink alias once — the intended change, noted
|
||||
in 0.43.0's release notes.
|
||||
|
||||
**2026-09-09 — the identity is now shared across walks (review finding F1).**
|
||||
43.1's contract — *each directory is entered once, by identity, and its files
|
||||
are reported under the first path that reached it* — was a contract about one
|
||||
`Walk`. The 0.52.0 startup scan discovers its scope in two walks (the user's
|
||||
own folder, then the rest of the workspace: `docs/features/perf5r-first-answer/README.md`),
|
||||
and two `Walk`s meant two `visited` sets, so a symlinked directory reached by
|
||||
both was reported twice under two spellings and the index held every module in
|
||||
it twice — a valid rename refused as ambiguous
|
||||
([the review](../../performance_052_review.md#f1--p2--split-startup-discovery-duplicates-modules-behind-directory-aliases)).
|
||||
|
||||
The set is now a value a caller may own: `Walk::visited` became
|
||||
`Walk.tracker: &mut DirectoryTracker`, and `collect_files_tracked` /
|
||||
`collect_files_below_tracked` take one. The **policy is unchanged** — the same
|
||||
`(dev, ino)` identity, the same enter-once rule, the same silent skip, the
|
||||
same dangling-link handling, and `collect_files_with`/`collect_files_below`
|
||||
still make a tracker of their own so a single walk behaves byte for byte as it
|
||||
did. What is new is a second answer for the caller that shares one:
|
||||
`DirStatus::PrecedenceConflict` says "already entered, under a path this one
|
||||
sorts *before*" — which is the case where the enter-once rule and a walk of
|
||||
the root would pick different spellings. A single walk never sees it (it meets
|
||||
the first spelling first, by construction); only a split does, and the server
|
||||
answers it with one ordinary rescan rather than by guessing.
|
||||
|
||||
Two `lucisv_core` unit tests pin the tracker itself
|
||||
(`tracker_detects_precedence_conflict_when_alias_sorts_before`,
|
||||
`tracker_allows_alias_sorting_after_without_conflict`); nine server fixtures
|
||||
in `server/tests/startup.rs` pin what the server does about it, cycles
|
||||
included — `sub/up -> ..` still terminates, still names each file once, and
|
||||
now agrees with a plain walk about how it spells them.
|
||||
|
||||
## QA log
|
||||
|
||||
**2026-09-05 — QA (Sonnet).** Built `target/release/{lucisv,lucisv_server}` once
|
||||
|
||||
@@ -1284,3 +1284,69 @@ parsed `timing:` lines; the staged startup, the per-step read, the
|
||||
`staging`/`head_owed` wait clauses, the compaction skip; `state.rs` split
|
||||
into `state/`. Nothing in `check/`'s comparisons, `fence.rs`, or
|
||||
`verify.rs` changed.
|
||||
|
||||
### 2026-09-08 — the review round (TODO §61)
|
||||
|
||||
The independent review of 0.51.0 (`docs/performance_take5_review.md`,
|
||||
tracker rows R1–R4) implemented in five lanes, same protocol as §60, each
|
||||
paired against the 0.51.0 review baseline or the commit it started from.
|
||||
Feature READMEs: `docs/features/perf5r-{preflight,lint-snapshot,first-answer,publication,scope-reuse}/`.
|
||||
|
||||
| what | before | after | lane |
|
||||
|---|---:|---:|---|
|
||||
| `rename` on a cursor with no symbol (a refusal) | 2.0 s, 3 975 parses | **0.34 ms, 0 parses** | §61.1 — an engine-owned preflight over the request buffer alone; index-answered refusals stay on the slow road (a wrong rename refusal is terminal) |
|
||||
| `codeAction` on the 42k-line no-offer comment, unchanged buffer | 22.6 ms (all of it the three semantic rules) | **1.0 ms** | §61.2 — one lint pass per document revision shared by diagnostics and quick fixes, keyed by value on every input (waiver *contents* included), cleared by every index mutation's overlay refresh |
|
||||
| the definition queued behind it | 22.4 ms | **0.8 ms** | §61.2 |
|
||||
| first `codeAction` after a one-character edit | 126 ms | **107 ms** (the rest is the buffer's own parse) | §61.2 |
|
||||
| first useful definition after opening a file, workspace scope | 266 ms cold / 301 warm (0.51.0); 84 / 208 in 0.50.0 *when a race was won*, over 1 s otherwise | **78 cold / 115 warm, correct every session** | §61.3 — the open buffer's folders walked, stepped and published before the rest of the workspace is discovered; the walk hands on the lengths it already has; a subtree walk carries the ancestor ignore stack down |
|
||||
| warm quiet workspace start | 1 034 ms | **985–997 ms** | §61.3/§61.4 |
|
||||
| a loaded warm scan (a definition every 100 ms), median wait / scan time | 112 ms / 4.2 s | **1.9 ms / ~1.9 s** at the same offered load | §61.4 — a publish per 512 files instead of per burst (a publish costs the size of the index); the first useful answer exempt |
|
||||
| an empty navigation answer mid-scan | answered `[]` if the target was not scanned yet | **deferred to the publish that holds it, or scan end**; unsettled answers 0 | §61.4 |
|
||||
| the tail rename (`state_q`, 238 selected files) | 380 ms, 240 parses | **314 ms, 137 parses** (−21 % against the review's 398) | §61.5 — a rename builds its index from the store's own records for closed files whose bytes hash to what the record was written for, and parses only the files it must analyse; the record and its hash come from one store entry, never the workspace index |
|
||||
| the duplicate-module rename refusal (`rstmgr_por`, 3 976 files) | 2.05 s, 3 975 parses | **0.7 s, 14 parses** | §61.5 |
|
||||
|
||||
**Trades and rulings recorded:** the loaded-scan max in four single-buffer
|
||||
cells rose (worst 168 → 422 ms warm) — cadence spacing, accepted against
|
||||
the median and the completion; the duplicate-declaration rename refusal
|
||||
stays on the slow road (the index is written on save, not on a keystroke);
|
||||
the bounded local record load of the index store stays unshipped (the
|
||||
checksum is owed either way, and it would break the canonical load the
|
||||
compaction skip rests on); a config-discovery memo refused (0.04 ms, and
|
||||
the only thing noticing an unwatched `lucisv.toml` change).
|
||||
|
||||
**Filed, not fixed:** the cross-folder first answer's remaining 89 ms is
|
||||
the store open; the two-phase discovery walks the open folder twice (+2.5–
|
||||
5 % on the 1/10-buffer settle); `format::indent_width` over an already-read
|
||||
`FileConfig`; the `absorb` whole-index merge as the next publication lever.
|
||||
|
||||
### 2026-09-09 — the 0.52.0 review (TODO §62)
|
||||
|
||||
An independent review of 0.52.0 (`docs/performance_052_review.md`,
|
||||
evidence `docs/perf/review-052-20260909/`) confirmed the review-round
|
||||
numbers and found one correctness defect and two harness defects. All
|
||||
three are fixed in 0.53.0; no performance number moved.
|
||||
|
||||
- **F1 — directory aliases in the split startup scan.** The open folder's
|
||||
walk and the rest-of-workspace walk kept separate visited sets, so a
|
||||
directory reachable by two spellings (`a_alias -> z_real`) was indexed
|
||||
twice at startup: two definition targets and a valid rename refused as
|
||||
ambiguous until a rescan. Fixed: one directory-identity tracker shared
|
||||
across both walks; a pre-check that takes the single canonical walk
|
||||
when an alias sorts before the open folder or an ancestor; an alias
|
||||
found only by the remaining walk requests one ordinary rescan so the
|
||||
spellings converge; the open-buffer alias gate applied to both walks
|
||||
and stat'ing only same-named files (`stats` 0 on opentitan). Nine
|
||||
fixtures assert startup, rescan and restart agree on index paths,
|
||||
definitions, prepareRename and diagnostics; a genuine duplicate is
|
||||
still refused. First answer, settle, discovery and the buffer cells
|
||||
are within noise of 0.52.0 (`docs/features/perf5r-first-answer/README.md`).
|
||||
- **F2/F3 — the load probe.** A warm `scanload` cell now primes an empty
|
||||
store untimed and records per-trial cache hits (a warm trial with none
|
||||
is an error); scan completion is stamped from the scan's own end event
|
||||
and responses are partitioned by it, not by the request window. The
|
||||
0.52.0 review's whole-window numbers stand; its `settled_ms`/mid-scan
|
||||
fields at 0.52.0 do not.
|
||||
- **N1–N3** (the dirty-buffer parse on the first action after an edit,
|
||||
the retained-analysis parse work and the 31 ms facts decode, the
|
||||
whole-index merge per publication) are filed with the review's
|
||||
baselines and deferred to loop 3.
|
||||
@@ -0,0 +1,73 @@
|
||||
# Independent 0.52.0 review evidence — 2026-09-09
|
||||
|
||||
[Review, findings and assessment](../../performance_052_review.md) ·
|
||||
[Tracking file](../take5-tracking.md)
|
||||
|
||||
Candidate: `3ceba21bb2ef4404a188b076301b170af862075b` (0.52.0).
|
||||
Reference: `126a6bcdac99e940534c87bce94a5269cdc53ae4` (0.51.0), exported with
|
||||
`git archive` into scratch storage and freshly built. Both use the current
|
||||
0.52.0 harness. No build or test overlapped benchmark timing. Every run used
|
||||
the repository's 8 GiB / 1,800-second guard.
|
||||
|
||||
## Evidence files
|
||||
|
||||
- `provenance.json`: commits, compiler/OS, binary hashes, corpus state/hashes, build commands and exclusions.
|
||||
- `validation.json`: 4,374 passed / 0 failed / 45 ignored, 84 paired outcome rows with zero differences, final corpus checks and reproduced finding IDs. Passing the existing suite does not close the new reproductions.
|
||||
- `results.jsonl`: full paired LSP sample arrays, fingerprints, statuses, rename traces, RSS and cross-folder fixed-load results.
|
||||
- `load-retest.jsonl`: **use these rows for the normal warm loaded-scan comparison**. The initial normal `scanloadprobe` rows in `results.jsonl` are excluded because their fresh store made the first nominally warm trial cold (F2). The rerun uses the populated stores left by the completed cold/warm matrix.
|
||||
- `runs.jsonl`: all 20 initial paired phase commands, times, load samples, exits and corpus hash/status checks.
|
||||
- `verification-runs.jsonl`: corrected warm-load commands, two reproductions, fmt, clippy and full workspace-test commands/exits.
|
||||
- `symlink-results.jsonl`: initial three-session-per-version definition reproduction.
|
||||
- `symlink-lifecycle.log`: another three sessions per version, comparing definition and prepareRename at startup and after a whole rescan without source changes (F1).
|
||||
- `warm-priming-proof.log`: full scan traces for two nominally warm sessions, showing 0 hits / 3,974 misses on the first and 3,974 hits / 0 misses on the second (F2).
|
||||
- `build-*.log`, `fmt.log`, `clippy.log`, `tests.log`: freshness and correctness-check output.
|
||||
- `run.py`, `verify.py`, `symlink_probe.py`, `symlink_lifecycle.py`, `warm_priming_probe.py`: actual scratch scripts. They contain machine-specific paths and are evidence, not project tooling.
|
||||
|
||||
Raw phase console logs, the archived reference source/build and caches remain
|
||||
under `/tmp/lucisv-perf-review-20260909`. They are not copied wholesale into
|
||||
the repository. Corpus source was never written; workspace edits were captured
|
||||
or discarded. The symlink fixture is separate from OpenTitan.
|
||||
|
||||
## Measurement cautions
|
||||
|
||||
**F3:** do not use `scanload.settled_ms` or its `mid_scan_*`/after-settle
|
||||
classification as reliable scan-only measurements. The candidate's trace
|
||||
finishes around 1.77 s but the harness reports 3.41 s, the end of its request
|
||||
window. This review uses `publication[].scan_total` and wire waits over the
|
||||
entire fixed window. Raw fields are retained unchanged so the bug is reviewable.
|
||||
|
||||
Ordinary request arrays are first request plus three repeats; scan, RSS and
|
||||
first-after-edit arrays are three trials. Queue rows have explicit leader and
|
||||
follower values. Rename stage fields describe the last traced request, not a
|
||||
median CPU profile. RSS is KiB; report MiB by dividing by 1,024. The sampled
|
||||
request peaks are whole-process RSS, not allocation totals. A command-offer
|
||||
placeholder of zero is not execution; `capture` is an edit delivered to
|
||||
applyEdit but declined by the client; `refused` is no edit.
|
||||
|
||||
Cross-folder load cells offer a fixed window: 9 s cold or 3.5 s warm, with one
|
||||
request every 100 ms. Three sessions therefore contribute 270 or 105 responses
|
||||
per cell. `requests_offered` is per session; `requests_answered` is aggregated.
|
||||
Three processes are insufficient for population tail-percentile claims even
|
||||
when their pooled request count is larger.
|
||||
|
||||
## Reproduce a finding
|
||||
|
||||
Use the commits and paths in `provenance.json`, or adjust the scratch scripts
|
||||
to point to freshly built binaries on another machine. Run them through the
|
||||
guard from the repository root:
|
||||
|
||||
```sh
|
||||
tools/guard.sh -m 8 -t 1800 -- python3 /tmp/lucisv-perf-review-20260909/symlink_lifecycle.py
|
||||
```
|
||||
|
||||
The script creates its fixture under scratch storage, opens the real-path
|
||||
testbench, waits for startup, requests definition and prepareRename, sends a
|
||||
two-file watched-change notification to trigger a whole rescan, and asks
|
||||
again. It prints the actual responses; the candidate's false duplicate
|
||||
refusal is the finding, not an expected feature behavior.
|
||||
|
||||
`warm_priming_probe.py` requires its proof directory not to exist. Choose a
|
||||
new scratch proof directory for a rerun; it deliberately does not silently
|
||||
reuse or delete an earlier proof. The normal benchmark driver similarly needs
|
||||
the F2 priming correction before its warm-load rows can be trusted on fresh
|
||||
storage. Exact accepted and excluded commands are retained in the run logs.
|
||||
@@ -0,0 +1,2 @@
|
||||
Compiling lucisv_server v0.52.0 (/Users/guoliangchen/repo/verilogrustformatter/crates/lucisv_server)
|
||||
Finished `release` profile [optimized] target(s) in 57.30s
|
||||
@@ -0,0 +1,27 @@
|
||||
Compiling proc-macro2 v1.0.107
|
||||
Compiling unicode-ident v1.0.24
|
||||
Compiling quote v1.0.47
|
||||
Compiling serde_core v1.0.229
|
||||
Compiling serde v1.0.229
|
||||
Compiling crossbeam-utils v0.8.22
|
||||
Compiling serde_json v1.0.140
|
||||
Compiling vlog_parser v0.51.0 (/tmp/lucisv-perf-review-20260909/reference/crates/vlog_parser)
|
||||
Compiling ryu v1.0.23
|
||||
Compiling itoa v1.0.18
|
||||
Compiling memchr v2.8.3
|
||||
Compiling bitflags v1.3.2
|
||||
Compiling lucisv_core v0.51.0 (/tmp/lucisv-perf-review-20260909/reference/crates/lucisv_core)
|
||||
Compiling fluent-uri v0.1.4
|
||||
Compiling log v0.4.33
|
||||
Compiling crossbeam-channel v0.5.16
|
||||
Compiling syn v3.0.3
|
||||
Compiling vlog_semantic v0.51.0 (/tmp/lucisv-perf-review-20260909/reference/crates/vlog_semantic)
|
||||
Compiling vlog_formatter v0.51.0 (/tmp/lucisv-perf-review-20260909/reference/crates/vlog_formatter)
|
||||
Compiling serde_derive v1.0.229
|
||||
Compiling serde_repr v0.1.21
|
||||
Compiling vlog_linter v0.51.0 (/tmp/lucisv-perf-review-20260909/reference/crates/vlog_linter)
|
||||
Compiling vlog_refactor v0.51.0 (/tmp/lucisv-perf-review-20260909/reference/crates/vlog_refactor)
|
||||
Compiling lsp-server v0.10.0
|
||||
Compiling lsp-types v0.97.0
|
||||
Compiling lucisv_server v0.51.0 (/tmp/lucisv-perf-review-20260909/reference/crates/lucisv_server)
|
||||
Finished `release` profile [optimized] target(s) in 1m 07s
|
||||
@@ -0,0 +1,9 @@
|
||||
Checking vlog_parser v0.52.0 (/Users/guoliangchen/repo/verilogrustformatter/crates/vlog_parser)
|
||||
Checking lucisv_core v0.52.0 (/Users/guoliangchen/repo/verilogrustformatter/crates/lucisv_core)
|
||||
Checking vlog_semantic v0.52.0 (/Users/guoliangchen/repo/verilogrustformatter/crates/vlog_semantic)
|
||||
Checking vlog_formatter v0.52.0 (/Users/guoliangchen/repo/verilogrustformatter/crates/vlog_formatter)
|
||||
Checking vlog_refactor v0.52.0 (/Users/guoliangchen/repo/verilogrustformatter/crates/vlog_refactor)
|
||||
Checking vlog_linter v0.52.0 (/Users/guoliangchen/repo/verilogrustformatter/crates/vlog_linter)
|
||||
Checking lucisv_server v0.52.0 (/Users/guoliangchen/repo/verilogrustformatter/crates/lucisv_server)
|
||||
Checking lucisv v0.52.0 (/Users/guoliangchen/repo/verilogrustformatter/crates/lucisv)
|
||||
Finished `dev` profile [unoptimized + debuginfo] target(s) in 2m 04s
|
||||
Whitespace-only changes.
@@ -0,0 +1,2 @@
|
||||
{"phase": "scanload", "row": "definition every 100 ms, warm cache, 1 extra buffer(s)", "fresh_process": true, "status": "ok", "message": null, "result_count": 105, "requests_offered": 35, "rate_ms": 100, "open_buffers": 2, "note": "ms is every request's own wait, sorted, across all tries; the arrival rate is wall-clock and independent of the responses (`tick_jitter_ms` is the largest slip); `publication` is each try's first traced scan \u2014 the four publish_* stages, the publish count and the files published; `mismatched_answers` is the coherence contract of docs/features/index-scope/README.md, `unsettled_answers` the review \u00a72 gate (every answer, empty ones included, equal to the settled one)", "ms": [0.23437500931322575, 0.2786249970085919, 0.27879205299541354, 0.3429169883020222, 0.3560000332072377, 0.3707500291056931, 0.37225004052743316, 0.37745898589491844, 0.3807920147664845, 0.38191705243662, 0.38962496910244226, 0.3909170045517385, 0.3945829812437296, 0.39591704262420535, 0.39795797783881426, 0.419457966927439, 0.41983299888670444, 0.4202499985694885, 0.4267499898560345, 0.4297500126995146, 0.4308749921619892, 0.4320830339565873, 0.43708295561373234, 0.4479580093175173, 0.45666599180549383, 0.45683298958465457, 0.47037500189617276, 0.47979201190173626, 0.4801250179298222, 0.48170797526836395, 0.482875038869679, 0.4948750138282776, 0.5013329791836441, 0.6397910183295608, 0.6407910259440541, 0.6412909715436399, 0.7084590033628047, 0.7254999945871532, 0.7357920403592288, 0.7520000217482448, 0.9683750104159117, 0.9921250166371465, 1.0569170117378235, 1.2750829919241369, 1.375459018163383, 1.3993330067023635, 1.4586250181309879, 1.4692499535158277, 1.521750004030764, 1.6809169901534915, 1.774792035575956, 1.875291985925287, 2.033584052696824, 2.128041989635676, 2.6053329929709435, 2.644082996994257, 3.567832987755537, 10.479416989255697, 19.887125003151596, 20.610582956578583, 51.07304098783061, 51.93137499736622, 64.53425000654534, 70.25124999927357, 77.52504100790247, 79.93495900882408, 84.3826670316048, 86.70937502756715, 97.64420898864046, 109.81295898091048, 119.40683302236721, 120.58512499788776, 150.113333016634, 151.45741601008922, 163.3421669830568, 170.30383396195248, 175.4463340039365, 181.4691670006141, 183.25004196958616, 184.164458012674, 198.05016601458192, 208.9190420228988, 219.84766598325223, 220.00158298760653, 250.87466702098027, 252.19029100844637, 262.700000021141, 269.08900000853464, 275.53670800989494, 283.8588749873452, 297.9642499703914, 319.6956670144573, 319.85254102619365, 397.69845799310133, 418.8561250339262, 419.87824998795986, 499.8401670018211, 518.8152500195429, 519.4051250000484, 597.5716249668039, 619.3727909703739, 621.6692919842899, 699.8402920435183, 720.6624170066789, 721.715291030705], "latency_median_ms": 2.033584052696824, "latency_max_ms": 721.715291030705, "mid_scan_median_ms": 2.033584052696824, "mid_scan_max_ms": 721.715291030705, "requests_sent": [35, 35, 35], "requests_answered": 105, "mid_scan_answers": 105, "after_settle_answers": 0, "unanswered_requests": 0, "mismatched_answers": 0, "unsettled_answers": 0, "settled_ms": [3406.4717919682153, 3407.3735430138186, 3406.602292030584], "tick_jitter_ms": 6.958250014577061, "publication": [{"publish_absorb": 452.75, "publish_candidates": 180.64, "publish_includes": 12.97, "publish_overlay": 0.61, "publish_total": 646.97, "publishes": 4, "published": 3519, "first_publish": 470.96, "scan_total": 1778.28}, {"publish_absorb": 476.16, "publish_candidates": 185.16, "publish_includes": 13.28, "publish_overlay": 0.67, "publish_total": 675.27, "publishes": 4, "published": 3494, "first_publish": 494.98, "scan_total": 1771.43}, {"publish_absorb": 446.83, "publish_candidates": 179.34, "publish_includes": 13.07, "publish_overlay": 0.65, "publish_total": 639.89, "publishes": 4, "published": 3513, "first_publish": 474.04, "scan_total": 1764.97}], "ts": "2026-09-09T01:22:08", "label": "0.52.0-review", "schema": 2, "units": "ms"}
|
||||
{"phase": "scanload", "row": "definition every 100 ms, warm cache, 1 extra buffer(s)", "fresh_process": true, "status": "ok", "message": null, "result_count": 105, "requests_offered": 35, "rate_ms": 100, "open_buffers": 2, "note": "ms is every request's own wait, sorted, across all tries; the arrival rate is wall-clock and independent of the responses (`tick_jitter_ms` is the largest slip); `publication` is each try's first traced scan \u2014 the four publish_* stages, the publish count and the files published; `mismatched_answers` is the coherence contract of docs/features/index-scope/README.md, `unsettled_answers` the review \u00a72 gate (every answer, empty ones included, equal to the settled one)", "ms": [241.55699997209013, 247.57100001443177, 275.5369999795221, 342.0218749670312, 346.5159999905154, 375.6269169971347, 440.8285000245087, 446.021625015419, 475.64991598483175, 540.7515830011107, 545.7169159781188, 576.1033750022762, 640.0489169755019, 646.3882910320535, 674.5119580300525, 739.6939580212347, 747.1998329856433, 774.6847500093281, 840.0745829567313, 847.3092500353232, 874.2899590288289, 941.5772079955786, 947.2306670504622, 973.9954579854384, 1041.8655420071445, 1046.7767500085756, 1075.9012500056997, 1141.7389169801027, 1146.351124974899, 1173.6330830026418, 1241.659208026249, 1246.7039580224082, 1273.9923750050366, 1340.223999985028, 1347.8122499655, 1374.1556670283899, 1440.9779999987222, 1446.6565829934552, 1473.9422079874203, 1541.2526250001974, 1546.17737501394, 1574.431375018321, 1640.8938340027817, 1647.3738750210032, 1674.7713339864276, 1739.9268340086564, 1746.503665985074, 1773.5807499848306, 1840.233499999158, 1846.9760829466395, 1873.2641249662265, 1939.728458004538, 1947.2075829980895, 1974.8794579645619, 2039.1076660016552, 2045.1457920134999, 2074.0201660082676, 2139.1950830002315, 2147.0947500201873, 2174.096333037596, 2239.5964169991203, 2247.3798339487985, 2274.172290985007, 2339.4442080170847, 2346.7091250349768, 2375.15783298295, 2440.894625033252, 2446.697583014611, 2474.30229105521, 2540.1668330305256, 2546.162332990207, 2574.7746669803746, 2639.975374971982, 2645.9845830104314, 2675.508540996816, 2739.6694580093026, 2745.4706669668667, 2774.191749980673, 2839.1245410311967, 2845.5262079951353, 2873.318500001915, 2940.369332965929, 2946.829541993793, 2973.2182910083793, 3040.314667043276, 3047.5078329909593, 3073.755874997005, 3141.1920840037055, 3146.8377920100465, 3174.6075420523994, 3239.4263750175014, 3246.957624971401, 3274.9790839734487, 3341.0877080168575, 3347.254416963551, 3373.97424998926, 3441.0788330133073, 3445.548250048887, 3474.267208017409, 3540.4448750196025, 3545.773416000884, 3573.324542026967, 3641.424166969955, 3647.3766670096666, 3675.449041998945], "latency_median_ms": 1947.2075829980895, "latency_max_ms": 3675.449041998945, "mid_scan_median_ms": 1947.2075829980895, "mid_scan_max_ms": 3675.449041998945, "requests_sent": [35, 35, 35], "requests_answered": 105, "mid_scan_answers": 105, "after_settle_answers": 0, "unanswered_requests": 0, "mismatched_answers": 0, "unsettled_answers": 0, "settled_ms": [4255.203042004723, 4257.531625917181, 4287.717750063166], "tick_jitter_ms": 2.676916017662734, "publication": [{"publish_absorb": 2416.7, "publish_candidates": 682.01, "publish_includes": 49.98, "publish_overlay": 5.02, "publish_total": 3153.7099999999996, "publishes": 34, "published": 1807, "first_publish": 280.81, "scan_total": 4244.26}, {"publish_absorb": 2421.9, "publish_candidates": 681.68, "publish_includes": 50.02, "publish_overlay": 5.08, "publish_total": 3158.68, "publishes": 34, "published": 1808, "first_publish": 280.18, "scan_total": 4246.99}, {"publish_absorb": 2467.32, "publish_candidates": 682.1, "publish_includes": 51.98, "publish_overlay": 5.06, "publish_total": 3206.46, "publishes": 34, "published": 1808, "first_publish": 267.64, "scan_total": 4276.15}], "ts": "2026-09-09T01:22:26", "label": "0.51.0-reference", "schema": 2, "units": "ms"}
|
||||
@@ -0,0 +1,78 @@
|
||||
{
|
||||
"date": "2026-09-09",
|
||||
"candidate_commit": "3ceba21bb2ef4404a188b076301b170af862075b",
|
||||
"reference_commit": "126a6bcdac99e940534c87bce94a5269cdc53ae4",
|
||||
"reference_method": "git archive into scratch directory; guarded fresh release build",
|
||||
"compiler": "rustc 1.97.1 (8bab26f4f 2026-07-14) (Homebrew)\nbinary: rustc\ncommit-hash: 8bab26f4f68e0e26f0bb7960be334d5b520ea452\ncommit-date: 2026-07-14\nhost: aarch64-apple-darwin\nrelease: 1.97.1\nLLVM version: 22.1.8",
|
||||
"os": "ProductName:\t\tmacOS\nProductVersion:\t\t27.0\nBuildVersion:\t\t26A5425a",
|
||||
"machine": "arm64",
|
||||
"python": "3.14.7",
|
||||
"logical_cpus": 10,
|
||||
"binary_sha256": {
|
||||
"/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server": "d9b177f254315c2f9ec40f386cc5218aafd9d3474d4e8762b499f113654d55f1",
|
||||
"/tmp/lucisv-perf-review-20260909/reference/target/release/lucisv-server": "11a212b3f8771adcfc4d435d58f20ab02fe9f59f47fd99cf09d43f1f3d739336"
|
||||
},
|
||||
"corpus_commit": "00981352642fb65ef2b6c47143a0f6bb31fd4a97",
|
||||
"corpus_status": "M hw/ip/aes/dv/tb/tb.sv\n M hw/top_darjeeling/ip/ast/rtl/ast.sv\n M hw/top_earlgrey/ip/ast/rtl/ast.sv",
|
||||
"corpus_modified_sha256": {
|
||||
"hw/ip/aes/dv/tb/tb.sv": "09ae059220caa7667bb22acdd3157647b55d36de96ff2ca55a801bbbcd08146e",
|
||||
"hw/top_darjeeling/ip/ast/rtl/ast.sv": "2b63f9d7bc0068388e47a80383eaf048183cf5868b1cfd4692eac325393d2803",
|
||||
"hw/top_earlgrey/ip/ast/rtl/ast.sv": "15efd90c99030c6a43486ef1ed622897b967ad5153697d6b2c2c21cfb6eba35f"
|
||||
},
|
||||
"guard": {
|
||||
"memory_gib": 8,
|
||||
"seconds": 1800
|
||||
},
|
||||
"notes": [
|
||||
"Current 0.52.0 harness drives both binaries.",
|
||||
"Builds finished before any timing. All phases sequential; no benchmark/test concurrency.",
|
||||
"Corpus edits discarded and caches isolated in scratch storage.",
|
||||
"No remote fetch or checkout mutation. Initial repository status clean."
|
||||
],
|
||||
"excluded_measurements": [
|
||||
"results.jsonl: scanload rows without cross-folder in the row name (initial scanloadprobe runs); the first warm trial lacked a populated r4-load store. Use load-retest.jsonl instead.",
|
||||
"All scanload settled_ms, mid_scan_median_ms, mid_scan_max_ms, mid_scan_answers, after_settle_answers fields are not used as reliable completion/partition metrics (F3)."
|
||||
],
|
||||
"build_commands": [
|
||||
[
|
||||
"tools/guard.sh",
|
||||
"-m",
|
||||
"8",
|
||||
"-t",
|
||||
"1800",
|
||||
"--",
|
||||
"cargo",
|
||||
"build",
|
||||
"--release",
|
||||
"--locked",
|
||||
"-p",
|
||||
"lucisv_server",
|
||||
"--manifest-path",
|
||||
"Cargo.toml"
|
||||
],
|
||||
[
|
||||
"tools/guard.sh",
|
||||
"-m",
|
||||
"8",
|
||||
"-t",
|
||||
"1800",
|
||||
"--",
|
||||
"cargo",
|
||||
"build",
|
||||
"--release",
|
||||
"--locked",
|
||||
"-p",
|
||||
"lucisv_server",
|
||||
"--manifest-path",
|
||||
"/tmp/lucisv-perf-review-20260909/reference/Cargo.toml"
|
||||
]
|
||||
],
|
||||
"test_results": {
|
||||
"passed": 4374,
|
||||
"failed": 0,
|
||||
"ignored": 45,
|
||||
"result_blocks": 59
|
||||
},
|
||||
"corpus_after_all_checks_unchanged": true,
|
||||
"binary_hashes_after_all_checks_unchanged": true
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
{"phase": "offerkinds", "row": "tb-comment None", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": null, "load": [5.0712890625, 6.9306640625, 6.75439453125], "ms": [1.9282500143162906, 0.493000028654933, 0.21929200738668442, 0.18204195657745004], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:29", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment []", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": [], "load": [5.0712890625, 6.9306640625, 6.75439453125], "ms": [0.08808297570794821, 0.07833295967429876, 0.04891701973974705, 0.04008301766589284], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:29", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment ['quickfix']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": ["quickfix"], "load": [5.0712890625, 6.9306640625, 6.75439453125], "ms": [0.26566704036667943, 0.21970801753923297, 0.18358399393036962, 0.23770902771502733], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:29", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment ['refactor.extract']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.extract"], "load": [5.0712890625, 6.9306640625, 6.75439453125], "ms": [0.2045410219579935, 0.12845901073887944, 0.06900000153109431, 0.04654203075915575], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:29", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment ['refactor.inline']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.inline"], "load": [5.0712890625, 6.9306640625, 6.75439453125], "ms": [0.05179096478968859, 0.063000014051795, 0.11837499914690852, 0.05725002847611904], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:29", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment ['refactor.rewrite.lucisv.ports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.rewrite.lucisv.ports"], "load": [5.0712890625, 6.9306640625, 6.75439453125], "ms": [0.1402500201947987, 0.09391701314598322, 0.14045799616724253, 0.1211669878102839], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:29", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment ['source.organizeImports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": ["source.organizeImports"], "load": [5.0712890625, 6.9306640625, 6.75439453125], "ms": [0.0607079709880054, 0.03862503217533231, 0.03545801155269146, 0.031791976653039455], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:29", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance None", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": null, "load": [5.1455078125, 6.9150390625, 6.74951171875], "ms": [4.584999987855554, 4.051957977935672, 3.7545409868471324, 3.612500033341348], "status": "ok", "result_count": 2, "ts": "2026-09-09T01:09:32", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance []", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": [], "load": [5.1455078125, 6.9150390625, 6.74951171875], "ms": [0.12579199392348528, 0.0785829615779221, 0.07804197957739234, 0.060333055444061756], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:32", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance ['quickfix']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": ["quickfix"], "load": [5.1455078125, 6.9150390625, 6.74951171875], "ms": [0.44899998465552926, 0.3641669754870236, 0.35441602813079953, 0.3295839997008443], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:32", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance ['refactor.extract']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": ["refactor.extract"], "load": [5.1455078125, 6.9150390625, 6.74951171875], "ms": [0.0665830448269844, 0.061375030782073736, 0.04995899507775903, 0.09795802179723978], "status": "ok", "result_count": 1, "ts": "2026-09-09T01:09:32", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance ['refactor.inline']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": ["refactor.inline"], "load": [5.1455078125, 6.9150390625, 6.74951171875], "ms": [0.0740840332582593, 0.047291978262364864, 0.04662497667595744, 0.040207989513874054], "status": "ok", "result_count": 1, "ts": "2026-09-09T01:09:32", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance ['refactor.rewrite.lucisv.ports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": ["refactor.rewrite.lucisv.ports"], "load": [5.1455078125, 6.9150390625, 6.74951171875], "ms": [3.1582920346409082, 2.8589580324478447, 2.9202920268289745, 3.103042021393776], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:32", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance ['source.organizeImports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": ["source.organizeImports"], "load": [5.1455078125, 6.9150390625, 6.74951171875], "ms": [0.12320803944021463, 0.06208301056176424, 0.053791969548910856, 0.07720803841948509], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:32", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment None", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": null, "load": [5.2939453125, 6.916015625, 6.7509765625], "ms": [1.3690409832634032, 1.1132080107927322, 1.0387920192442834, 1.0371250100433826], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:36", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment []", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": [], "load": [5.2939453125, 6.916015625, 6.7509765625], "ms": [0.08533295476809144, 0.06483402103185654, 0.04983402322977781, 0.0468340003862977], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:36", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment ['quickfix']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": ["quickfix"], "load": [5.2939453125, 6.916015625, 6.7509765625], "ms": [1.1663340264931321, 1.2232500012032688, 1.1855000047944486, 1.142042048741132], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:36", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment ['refactor.extract']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.extract"], "load": [5.2939453125, 6.916015625, 6.7509765625], "ms": [0.0706670107319951, 0.06149994442239404, 0.0705840066075325, 0.052499992307275534], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:36", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment ['refactor.inline']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.inline"], "load": [5.2939453125, 6.916015625, 6.7509765625], "ms": [0.071291986387223, 0.04237500252202153, 0.03883300814777613, 0.03649998689070344], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:36", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment ['refactor.rewrite.lucisv.ports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.rewrite.lucisv.ports"], "load": [5.2939453125, 6.916015625, 6.7509765625], "ms": [0.05395803600549698, 0.03854196984320879, 0.049667025450617075, 0.03912497777491808], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:36", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment ['source.organizeImports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": ["source.organizeImports"], "load": [5.2939453125, 6.916015625, 6.7509765625], "ms": [0.04291697405278683, 0.044625019654631615, 0.04333403194323182, 0.04395801806822419], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:36", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment None", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": null, "load": [5.2939453125, 6.916015625, 6.7509765625], "ms": [2.081208978779614, 2.016332990024239, 1.8178750178776681, 1.7115840455517173], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:39", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment []", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": [], "load": [5.2939453125, 6.916015625, 6.7509765625], "ms": [0.10237499373033643, 0.06420904537662864, 0.05641602911055088, 0.05687499651685357], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:39", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment ['quickfix']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": ["quickfix"], "load": [5.2939453125, 6.916015625, 6.7509765625], "ms": [1.5573750133626163, 1.661374990362674, 1.5634170267730951, 1.4038340304978192], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:39", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment ['refactor.extract']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.extract"], "load": [5.2939453125, 6.916015625, 6.7509765625], "ms": [0.07491599535569549, 0.08695904398337007, 0.06758299423381686, 0.05783402593806386], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:39", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment ['refactor.inline']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.inline"], "load": [5.2939453125, 6.916015625, 6.7509765625], "ms": [0.06170797860249877, 0.053750001825392246, 0.06033299723640084, 0.0687920255586505], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:39", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment ['refactor.rewrite.lucisv.ports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.rewrite.lucisv.ports"], "load": [5.2939453125, 6.916015625, 6.7509765625], "ms": [0.06587500683963299, 0.048916961532086134, 0.047707988414913416, 0.049708003643900156], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:39", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment ['source.organizeImports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": ["source.organizeImports"], "load": [5.2939453125, 6.916015625, 6.7509765625], "ms": [0.07333297980949283, 0.05887501174584031, 0.054791977163404226, 0.0451250234618783], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:39", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment None", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": null, "load": [5.35009765625, 6.900390625, 6.74609375], "ms": [25.831834005657583, 24.26745800767094, 24.51866597402841, 24.205999972764403], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:42", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment []", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": [], "load": [5.35009765625, 6.900390625, 6.74609375], "ms": [0.09516597492620349, 0.05691696424037218, 0.03875000402331352, 0.03129197284579277], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:42", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment ['quickfix']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": ["quickfix"], "load": [5.35009765625, 6.900390625, 6.74609375], "ms": [23.996290983632207, 24.26624996587634, 24.21162504469976, 24.31587496539578], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:42", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment ['refactor.extract']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.extract"], "load": [5.35009765625, 6.900390625, 6.74609375], "ms": [0.09320798562839627, 0.06279197987169027, 0.058375007938593626, 0.0503340270370245], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:42", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment ['refactor.inline']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.inline"], "load": [5.35009765625, 6.900390625, 6.74609375], "ms": [0.048666028305888176, 0.0416660332120955, 0.0785409938544035, 0.14483300037682056], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:42", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment ['refactor.rewrite.lucisv.ports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.rewrite.lucisv.ports"], "load": [5.35009765625, 6.900390625, 6.74609375], "ms": [0.1807910157367587, 0.07395795546472073, 0.06245903205126524, 0.06058404687792063], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:42", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment ['source.organizeImports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": ["source.organizeImports"], "load": [5.35009765625, 6.900390625, 6.74609375], "ms": [0.061583006754517555, 0.05404202966019511, 0.07225002627819777, 0.05083298310637474], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:42", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment None", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": null, "load": [5.48193359375, 6.90185546875, 6.74755859375], "ms": [1.1078329989686608, 0.32133300555869937, 0.22008299129083753, 0.17808302072808146], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:48", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment []", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": [], "load": [5.48193359375, 6.90185546875, 6.74755859375], "ms": [0.10195799404755235, 0.06629200652241707, 0.054875039495527744, 0.04529103171080351], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:48", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment ['quickfix']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": ["quickfix"], "load": [5.48193359375, 6.90185546875, 6.74755859375], "ms": [0.4765419871546328, 0.22708403412252665, 0.15837501268833876, 0.1877500326372683], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:48", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment ['refactor.extract']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.extract"], "load": [5.48193359375, 6.90185546875, 6.74755859375], "ms": [0.06579200271517038, 0.047083012759685516, 0.04954100586473942, 0.05099998088553548], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:48", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment ['refactor.inline']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.inline"], "load": [5.48193359375, 6.90185546875, 6.74755859375], "ms": [0.09745795978233218, 0.07141695823520422, 0.06966700311750174, 0.0636249897070229], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:48", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment ['refactor.rewrite.lucisv.ports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.rewrite.lucisv.ports"], "load": [5.48193359375, 6.90185546875, 6.74755859375], "ms": [0.059165991842746735, 0.04516699118539691, 0.03866699989885092, 0.049083027988672256], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:48", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment ['source.organizeImports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": ["source.organizeImports"], "load": [5.48193359375, 6.90185546875, 6.74755859375], "ms": [0.046083005145192146, 0.06849999772384763, 0.10412500705569983, 0.04370900569483638], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:48", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance None", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": null, "load": [5.20263671875, 6.8203125, 6.7197265625], "ms": [3.441042033955455, 2.898292033933103, 3.575833048671484, 3.190334013197571], "status": "ok", "result_count": 2, "ts": "2026-09-09T01:09:52", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance []", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": [], "load": [5.20263671875, 6.8203125, 6.7197265625], "ms": [0.11799996718764305, 0.0743749551475048, 0.05408300785347819, 0.04170899046584964], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:52", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance ['quickfix']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": ["quickfix"], "load": [5.20263671875, 6.8203125, 6.7197265625], "ms": [0.16474997391924262, 0.10470801498740911, 0.11637498391792178, 0.09270902955904603], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:52", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance ['refactor.extract']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": ["refactor.extract"], "load": [5.20263671875, 6.8203125, 6.7197265625], "ms": [0.11237501166760921, 0.11420802911743522, 0.08416594937443733, 0.15366700245067477], "status": "ok", "result_count": 1, "ts": "2026-09-09T01:09:52", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance ['refactor.inline']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": ["refactor.inline"], "load": [5.20263671875, 6.8203125, 6.7197265625], "ms": [0.07387500954791903, 0.10183302219957113, 0.06145797669887543, 0.056165968999266624], "status": "ok", "result_count": 1, "ts": "2026-09-09T01:09:52", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance ['refactor.rewrite.lucisv.ports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": ["refactor.rewrite.lucisv.ports"], "load": [5.20263671875, 6.8203125, 6.7197265625], "ms": [2.856415987480432, 2.6895839837379754, 2.868750016205013, 2.9005000251345336], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:52", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance ['source.organizeImports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": ["source.organizeImports"], "load": [5.20263671875, 6.8203125, 6.7197265625], "ms": [0.08145900210365653, 0.05520798731595278, 0.044791027903556824, 0.03716698847711086], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:52", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment None", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": null, "load": [5.20263671875, 6.8203125, 6.7197265625], "ms": [1.2475409894250333, 0.43991697020828724, 0.2523339935578406, 0.21608301904052496], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:55", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment []", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": [], "load": [5.20263671875, 6.8203125, 6.7197265625], "ms": [0.08662499021738768, 0.06312498589977622, 0.06245903205126524, 0.055582961067557335], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:55", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment ['quickfix']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": ["quickfix"], "load": [5.20263671875, 6.8203125, 6.7197265625], "ms": [0.18845894373953342, 0.14116702368482947, 0.1670410274527967, 0.15691597945988178], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:55", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment ['refactor.extract']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.extract"], "load": [5.20263671875, 6.8203125, 6.7197265625], "ms": [0.12037501437589526, 0.08174998220056295, 0.05562498699873686, 0.05724997026845813], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:55", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment ['refactor.inline']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.inline"], "load": [5.20263671875, 6.8203125, 6.7197265625], "ms": [0.07424998329952359, 0.04620797699317336, 0.06983400089666247, 0.05783297820016742], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:55", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment ['refactor.rewrite.lucisv.ports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.rewrite.lucisv.ports"], "load": [5.20263671875, 6.8203125, 6.7197265625], "ms": [0.059083045925945044, 0.04016701132059097, 0.09741599205881357, 0.04087499110028148], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:55", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment ['source.organizeImports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": ["source.organizeImports"], "load": [5.20263671875, 6.8203125, 6.7197265625], "ms": [0.10295899119228125, 0.06287498399615288, 0.05124998278915882, 0.03937497967854142], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:55", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment None", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": null, "load": [5.02587890625, 6.7568359375, 6.69775390625], "ms": [1.0873330174945295, 0.7634589564986527, 0.6050000083632767, 0.433207955211401], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:58", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment []", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": [], "load": [5.02587890625, 6.7568359375, 6.69775390625], "ms": [0.1058329944498837, 0.08004199480637908, 0.056334014516323805, 0.0527920201420784], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:58", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment ['quickfix']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": ["quickfix"], "load": [5.02587890625, 6.7568359375, 6.69775390625], "ms": [0.2137920237146318, 0.18258305499330163, 0.15999999595806003, 0.17479195958003402], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:58", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment ['refactor.extract']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.extract"], "load": [5.02587890625, 6.7568359375, 6.69775390625], "ms": [0.07766601629555225, 0.05858403164893389, 0.054708041716367006, 0.07137499051168561], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:58", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment ['refactor.inline']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.inline"], "load": [5.02587890625, 6.7568359375, 6.69775390625], "ms": [0.07000000914558768, 0.07470801938325167, 0.06466597551479936, 0.052292016334831715], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:58", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment ['refactor.rewrite.lucisv.ports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.rewrite.lucisv.ports"], "load": [5.02587890625, 6.7568359375, 6.69775390625], "ms": [0.0688339932821691, 0.05204096669331193, 0.05183299072086811, 0.0636249897070229], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:58", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment ['source.organizeImports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": ["source.organizeImports"], "load": [5.02587890625, 6.7568359375, 6.69775390625], "ms": [0.05641701864078641, 0.08274998981505632, 0.2233749837614596, 0.203792005777359], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:09:58", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment None", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": null, "load": [4.86328125, 6.6943359375, 6.67578125], "ms": [2.0860839867964387, 0.48016704386100173, 0.2994579845108092, 0.316707999445498], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:10:02", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment []", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": [], "load": [4.86328125, 6.6943359375, 6.67578125], "ms": [0.09029201464727521, 0.07112504681572318, 0.21000002743676305, 0.11354201706126332], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:10:02", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment ['quickfix']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": ["quickfix"], "load": [4.86328125, 6.6943359375, 6.67578125], "ms": [0.21208403632044792, 0.18095801351591945, 0.20987499738112092, 0.22983300732448697], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:10:02", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment ['refactor.extract']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.extract"], "load": [4.86328125, 6.6943359375, 6.67578125], "ms": [0.06600003689527512, 0.10249996557831764, 0.20412495359778404, 0.10166695574298501], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:10:02", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment ['refactor.inline']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.inline"], "load": [4.86328125, 6.6943359375, 6.67578125], "ms": [0.057375000324100256, 0.05366699770092964, 0.06616703467443585, 0.0541660119779408], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:10:02", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment ['refactor.rewrite.lucisv.ports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.rewrite.lucisv.ports"], "load": [4.86328125, 6.6943359375, 6.67578125], "ms": [0.17104099970310926, 0.07899996126070619, 0.06683298852294683, 0.0675840419717133], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:10:02", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment ['source.organizeImports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": ["source.organizeImports"], "load": [4.86328125, 6.6943359375, 6.67578125], "ms": [0.04795799031853676, 0.04116696072742343, 0.044832995627075434, 0.04008400719612837], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:10:02", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerqueue", "row": "pinmux comment -> aes definition, pipeline 1", "ms": [0.8687080116942525, 0.8434589835815132], "leader_ms": 0.8687080116942525, "follower_ms": 0.8434589835815132, "status": "ok", "message": null, "result_count": 0, "follower_result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "ms is [leader, follower], not repeats", "ts": "2026-09-09T01:10:05", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerqueue", "row": "pinmux comment -> aes definition, pipeline 2", "ms": [0.28304196894168854, 0.2654170384630561], "leader_ms": 0.28304196894168854, "follower_ms": 0.2654170384630561, "status": "ok", "message": null, "result_count": 0, "follower_result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "ms is [leader, follower], not repeats", "ts": "2026-09-09T01:10:05", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerqueue", "row": "pinmux comment -> aes definition, pipeline 3", "ms": [0.3007500199601054, 0.2912500058300793], "leader_ms": 0.3007500199601054, "follower_ms": 0.2912500058300793, "status": "ok", "message": null, "result_count": 0, "follower_result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "ms is [leader, follower], not repeats", "ts": "2026-09-09T01:10:05", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerqueue", "row": "pinmux comment -> aes definition, pipeline 1", "ms": [27.79579203343019, 27.77458296623081], "leader_ms": 27.79579203343019, "follower_ms": 27.77458296623081, "status": "ok", "message": null, "result_count": 0, "follower_result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "ms is [leader, follower], not repeats", "ts": "2026-09-09T01:10:10", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerqueue", "row": "pinmux comment -> aes definition, pipeline 2", "ms": [24.377333000302315, 24.367875012103468], "leader_ms": 24.377333000302315, "follower_ms": 24.367875012103468, "status": "ok", "message": null, "result_count": 0, "follower_result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "ms is [leader, follower], not repeats", "ts": "2026-09-09T01:10:10", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerqueue", "row": "pinmux comment -> aes definition, pipeline 3", "ms": [24.435000028461218, 24.425624986179173], "leader_ms": 24.435000028461218, "follower_ms": 24.425624986179173, "status": "ok", "message": null, "result_count": 0, "follower_result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "ms is [leader, follower], not repeats", "ts": "2026-09-09T01:10:10", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "pinmux-comment, first offer after didChange", "ms": [140.83441701950505, 137.8427500021644, 134.88454197067767], "status": "ok", "message": null, "result_count": 0, "result_counts": [0, 0, 0], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "load": [5.9599609375, 6.86865234375, 6.7373046875], "note": "each try is the first codeAction after its own didChange: the document is rebuilt, so nothing from the previous revision can be reused", "ts": "2026-09-09T01:10:15", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "pinmux-comment, repeated offer on the unchanged buffer", "titles": [], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "load": [5.9599609375, 6.86865234375, 6.7373046875], "note": "the same cursor and session as the row above, with no didChange between the tries", "ms": [24.3462499929592, 24.63841700227931, 23.784333025105298, 23.86854198994115], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:10:15", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "aes-reg-instance, first offer after didChange", "ms": [7.0216250023804605, 5.721417022868991, 7.452749996446073], "status": "ok", "message": null, "result_count": 2, "result_counts": [2, 2, 2], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "load": [5.802734375, 6.82080078125, 6.72119140625], "note": "each try is the first codeAction after its own didChange: the document is rebuilt, so nothing from the previous revision can be reused", "ts": "2026-09-09T01:10:18", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "aes-reg-instance, repeated offer on the unchanged buffer", "titles": ["lucisv: extract selection into module\u2026", "lucisv: inline `aes_reg_top` here"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "load": [5.802734375, 6.82080078125, 6.72119140625], "note": "the same cursor and session as the row above, with no didChange between the tries", "ms": [5.01037499634549, 4.5472909696400166, 4.70308301737532, 4.0991660207509995], "status": "ok", "result_count": 2, "ts": "2026-09-09T01:10:18", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "tb-comment, first offer after didChange", "ms": [1.0847499943338335, 0.8207920473068953, 0.7546659908257425], "status": "ok", "message": null, "result_count": 0, "result_counts": [0, 0, 0], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "load": [5.978515625, 6.84033203125, 6.728515625], "note": "each try is the first codeAction after its own didChange: the document is rebuilt, so nothing from the previous revision can be reused", "ts": "2026-09-09T01:10:22", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "tb-comment, repeated offer on the unchanged buffer", "titles": [], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "load": [5.978515625, 6.84033203125, 6.728515625], "note": "the same cursor and session as the row above, with no didChange between the tries", "ms": [0.44724997133016586, 0.3376249806024134, 0.2398340147919953, 0.2550830249674618], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:10:22", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "pinmux-comment, first offer after didChange", "ms": [116.39108299277723, 113.5977499652654, 112.88149998290464], "status": "ok", "message": null, "result_count": 0, "result_counts": [0, 0, 0], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "load": [5.89990234375, 6.8095703125, 6.71826171875], "note": "each try is the first codeAction after its own didChange: the document is rebuilt, so nothing from the previous revision can be reused", "ts": "2026-09-09T01:10:26", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "pinmux-comment, repeated offer on the unchanged buffer", "titles": [], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "load": [5.89990234375, 6.8095703125, 6.71826171875], "note": "the same cursor and session as the row above, with no didChange between the tries", "ms": [0.4027499817311764, 0.2316250465810299, 0.2471250481903553, 0.18354103667661548], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:10:26", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "aes-reg-instance, first offer after didChange", "ms": [6.09770801384002, 8.55158397462219, 5.045500001870096], "status": "ok", "message": null, "result_count": 2, "result_counts": [2, 2, 2], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "load": [5.89990234375, 6.8095703125, 6.71826171875], "note": "each try is the first codeAction after its own didChange: the document is rebuilt, so nothing from the previous revision can be reused", "ts": "2026-09-09T01:10:29", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "aes-reg-instance, repeated offer on the unchanged buffer", "titles": ["lucisv: extract selection into module\u2026", "lucisv: inline `aes_reg_top` here"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "load": [5.89990234375, 6.8095703125, 6.71826171875], "note": "the same cursor and session as the row above, with no didChange between the tries", "ms": [4.244667012244463, 3.879832976963371, 3.9809580193832517, 3.8547919830307364], "status": "ok", "result_count": 2, "ts": "2026-09-09T01:10:29", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "tb-comment, first offer after didChange", "ms": [2.404582977760583, 0.9817919926717877, 0.8292499696835876], "status": "ok", "message": null, "result_count": 0, "result_counts": [0, 0, 0], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "load": [5.74755859375, 6.7626953125, 6.7021484375], "note": "each try is the first codeAction after its own didChange: the document is rebuilt, so nothing from the previous revision can be reused", "ts": "2026-09-09T01:10:32", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "tb-comment, repeated offer on the unchanged buffer", "titles": [], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "load": [5.74755859375, 6.7626953125, 6.7021484375], "note": "the same cursor and session as the row above, with no didChange between the tries", "ms": [0.17487496370449662, 0.15174999134615064, 0.19766698824241757, 0.1948749995790422], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:10:32", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "tail: state_q -> state_q_x", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "b39defb212655f29e68c0e15b88dda405d2779a24c4b522a1798b6f44c9a04f7", "peak_rss_kib": 610208.0, "file": "hw/ip/entropy_src/rtl/entropy_src_main_sm.sv", "new_name": "state_q_x", "titles": ["entropy_src_core.sv", "entropy_src_main_sm.sv"], "note": "{\"rungs_request\": 1, \"rungs_declaration\": 95, \"rungs_reference\": 122, \"rungs_instantiation\": 19, \"rungs_macro\": 0, \"rungs_speller\": 0, \"rungs_open\": 1, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 113, \"indirect_instantiation\": 19, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 1, \"verify_total\": 73.3, \"verify_tokens\": 4.2, \"verify_watched\": 106, \"verify_watched_bytes\": 1919528, \"verify_before\": 14.4, \"verify_rebuild\": 37.5, \"verify_after\": 7.9, \"verify_checks\": 0.0, \"parses_index\": 135, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 2, \"parses_after\": 0, \"index_lead\": 0.4, \"index_kept\": 107.3, \"index_other\": 0.0, \"index_reused\": 31.4, \"index_merge\": 23.5, \"index_kept_files\": 134, \"index_kept_bytes\": 2892477, \"index_other_files\": 103, \"index_other_bytes\": 1652269, \"index_reused_files\": 238, \"index_reused_bytes\": 4554326, \"warnings_defines\": 1.9, \"warnings_macro_uses\": 42.4, \"warnings_sva\": 2.6, \"warnings_unfinished\": 0.4, \"warnings_unaccounted\": 0.1, \"warnings_scanned\": 135, \"select\": 14.1, \"selected\": 238, \"fallback\": false, \"bytes\": 4554326, \"edited\": 2, \"index\": 163.0, \"locate\": 0.0, \"edits\": 11.6, \"warnings\": 50.5, \"parses\": 137}", "ms": [359.1919590253383, 327.24062498891726, 324.5032500126399, 324.597500031814], "status": "ok", "result_count": 1, "edits": 5, "files": 2, "created": 0, "trace_rungs_request": 1, "trace_rungs_declaration": 95, "trace_rungs_reference": 122, "trace_rungs_instantiation": 19, "trace_rungs_macro": 0, "trace_rungs_speller": 0, "trace_rungs_open": 1, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 113, "trace_indirect_instantiation": 19, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 1, "trace_verify_total": 73.3, "trace_verify_tokens": 4.2, "trace_verify_watched": 106, "trace_verify_watched_bytes": 1919528, "trace_verify_before": 14.4, "trace_verify_rebuild": 37.5, "trace_verify_after": 7.9, "trace_verify_checks": 0.0, "trace_parses_index": 135, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 2, "trace_parses_after": 0, "trace_index_lead": 0.4, "trace_index_kept": 107.3, "trace_index_other": 0.0, "trace_index_reused": 31.4, "trace_index_merge": 23.5, "trace_index_kept_files": 134, "trace_index_kept_bytes": 2892477, "trace_index_other_files": 103, "trace_index_other_bytes": 1652269, "trace_index_reused_files": 238, "trace_index_reused_bytes": 4554326, "trace_warnings_defines": 1.9, "trace_warnings_macro_uses": 42.4, "trace_warnings_sva": 2.6, "trace_warnings_unfinished": 0.4, "trace_warnings_unaccounted": 0.1, "trace_warnings_scanned": 135, "trace_select": 14.1, "trace_selected": 238, "trace_fallback": false, "trace_bytes": 4554326, "trace_edited": 2, "trace_index": 163.0, "trace_locate": 0.0, "trace_edits": 11.6, "trace_warnings": 50.5, "trace_parses": 137, "ts": "2026-09-09T01:10:40", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "ordinary: aes -> aes_renamed", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "fa7e31c78382176d5f96d661228ce82328df8bc77bd6d8575dd38717814cb26c", "peak_rss_kib": 459808.0, "file": "hw/ip/aes/dv/tb/tb.sv", "new_name": "aes_renamed", "titles": ["aes.sv", "aes_bind.sv", "aes_cov_bind.sv", "aes_tb.sv", "aes_wrap.sv", "darjeeling_pd_main.sv", "earlgrey_pd_main.sv", "englishbreakfast_pd_main.sv", "tb.sv"], "note": "{\"rungs_request\": 1, \"rungs_declaration\": 4, \"rungs_reference\": 8, \"rungs_instantiation\": 0, \"rungs_macro\": 0, \"rungs_speller\": 0, \"rungs_open\": 0, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 1, \"indirect_instantiation\": 0, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 0, \"verify_total\": 46.8, \"verify_tokens\": 15.1, \"verify_watched\": 12, \"verify_watched_bytes\": 398160, \"verify_before\": 4.6, \"verify_rebuild\": 22.7, \"verify_after\": 2.9, \"verify_checks\": 0.0, \"parses_index\": 13, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 9, \"parses_after\": 0, \"index_lead\": 0.2, \"index_kept\": 16.1, \"index_other\": 0.0, \"index_reused\": 3.6, \"index_merge\": 2.6, \"index_kept_files\": 12, \"index_kept_bytes\": 396735, \"index_other_files\": 0, \"index_other_bytes\": 0, \"index_reused_files\": 13, \"index_reused_bytes\": 400051, \"warnings_defines\": 0.2, \"warnings_macro_uses\": 7.3, \"warnings_sva\": 0.2, \"warnings_unfinished\": 0.0, \"warnings_unaccounted\": 0.1, \"warnings_scanned\": 13, \"select\": 8.2, \"selected\": 13, \"fallback\": false, \"bytes\": 400051, \"edited\": 9, \"index\": 22.6, \"locate\": 0.1, \"edits\": 2.4, \"warnings\": 8.3, \"parses\": 22}", "ms": [102.21650003222749, 93.63725001458079, 93.02333300001919, 91.25554200727493], "status": "ok", "result_count": 1, "edits": 14, "files": 9, "created": 0, "trace_rungs_request": 1, "trace_rungs_declaration": 4, "trace_rungs_reference": 8, "trace_rungs_instantiation": 0, "trace_rungs_macro": 0, "trace_rungs_speller": 0, "trace_rungs_open": 0, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 1, "trace_indirect_instantiation": 0, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 0, "trace_verify_total": 46.8, "trace_verify_tokens": 15.1, "trace_verify_watched": 12, "trace_verify_watched_bytes": 398160, "trace_verify_before": 4.6, "trace_verify_rebuild": 22.7, "trace_verify_after": 2.9, "trace_verify_checks": 0.0, "trace_parses_index": 13, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 9, "trace_parses_after": 0, "trace_index_lead": 0.2, "trace_index_kept": 16.1, "trace_index_other": 0.0, "trace_index_reused": 3.6, "trace_index_merge": 2.6, "trace_index_kept_files": 12, "trace_index_kept_bytes": 396735, "trace_index_other_files": 0, "trace_index_other_bytes": 0, "trace_index_reused_files": 13, "trace_index_reused_bytes": 400051, "trace_warnings_defines": 0.2, "trace_warnings_macro_uses": 7.3, "trace_warnings_sva": 0.2, "trace_warnings_unfinished": 0.0, "trace_warnings_unaccounted": 0.1, "trace_warnings_scanned": 13, "trace_select": 8.2, "trace_selected": 13, "trace_fallback": false, "trace_bytes": 400051, "trace_edited": 9, "trace_index": 22.6, "trace_locate": 0.1, "trace_edits": 2.4, "trace_warnings": 8.3, "trace_parses": 22, "ts": "2026-09-09T01:10:44", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "unique internal: cipher_alert -> cipher_alert_x", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "5f53e977da59093f59ac3153a59036de64ff2fc041017271d8ebbd9ba41ba1e1", "peak_rss_kib": 434560.0, "file": "hw/ip/aes/rtl/aes_core.sv", "new_name": "cipher_alert_x", "titles": ["aes_core.sv"], "note": "{\"rungs_request\": 1, \"rungs_declaration\": 0, \"rungs_reference\": 2, \"rungs_instantiation\": 0, \"rungs_macro\": 0, \"rungs_speller\": 0, \"rungs_open\": 1, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 2, \"indirect_instantiation\": 0, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 1, \"verify_total\": 5.4, \"verify_tokens\": 1.9, \"verify_watched\": 1, \"verify_watched_bytes\": 48933, \"verify_before\": 0.5, \"verify_rebuild\": 2.7, \"verify_after\": 0.2, \"verify_checks\": 0.0, \"parses_index\": 1, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 1, \"parses_after\": 0, \"index_lead\": 2.0, \"index_kept\": 0.0, \"index_other\": 0.0, \"index_reused\": 0.5, \"index_merge\": 0.3, \"index_kept_files\": 0, \"index_kept_bytes\": 0, \"index_other_files\": 3, \"index_other_bytes\": 19542, \"index_reused_files\": 4, \"index_reused_bytes\": 68475, \"warnings_defines\": 0.0, \"warnings_macro_uses\": 0.8, \"warnings_sva\": 0.0, \"warnings_unfinished\": 0.0, \"warnings_unaccounted\": 0.0, \"warnings_scanned\": 1, \"select\": 6.6, \"selected\": 4, \"fallback\": false, \"bytes\": 68475, \"edited\": 1, \"index\": 2.8, \"locate\": 0.2, \"edits\": 0.0, \"warnings\": 0.9, \"parses\": 2}", "ms": [28.592207992915064, 21.334541030228138, 18.542082980275154, 16.863790981005877], "status": "ok", "result_count": 1, "edits": 3, "files": 1, "created": 0, "trace_rungs_request": 1, "trace_rungs_declaration": 0, "trace_rungs_reference": 2, "trace_rungs_instantiation": 0, "trace_rungs_macro": 0, "trace_rungs_speller": 0, "trace_rungs_open": 1, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 2, "trace_indirect_instantiation": 0, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 1, "trace_verify_total": 5.4, "trace_verify_tokens": 1.9, "trace_verify_watched": 1, "trace_verify_watched_bytes": 48933, "trace_verify_before": 0.5, "trace_verify_rebuild": 2.7, "trace_verify_after": 0.2, "trace_verify_checks": 0.0, "trace_parses_index": 1, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 1, "trace_parses_after": 0, "trace_index_lead": 2.0, "trace_index_kept": 0.0, "trace_index_other": 0.0, "trace_index_reused": 0.5, "trace_index_merge": 0.3, "trace_index_kept_files": 0, "trace_index_kept_bytes": 0, "trace_index_other_files": 3, "trace_index_other_bytes": 19542, "trace_index_reused_files": 4, "trace_index_reused_bytes": 68475, "trace_warnings_defines": 0.0, "trace_warnings_macro_uses": 0.8, "trace_warnings_sva": 0.0, "trace_warnings_unfinished": 0.0, "trace_warnings_unaccounted": 0.0, "trace_warnings_scanned": 1, "trace_select": 6.6, "trace_selected": 4, "trace_fallback": false, "trace_bytes": 68475, "trace_edited": 1, "trace_index": 2.8, "trace_locate": 0.2, "trace_edits": 0.0, "trace_warnings": 0.9, "trace_parses": 2, "ts": "2026-09-09T01:10:47", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "common port: clk_i -> clk_ix", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "31aadc134628bf567da7423a8fc20dda98a76fec4abd9ffa6392f80d4923420a", "peak_rss_kib": 1863968.0, "file": "hw/ip/entropy_src/rtl/entropy_src_main_sm.sv", "new_name": "clk_ix", "titles": ["entropy_src_core.sv", "entropy_src_main_sm.sv"], "note": "{\"rungs_request\": 0, \"rungs_declaration\": 0, \"rungs_reference\": 0, \"rungs_instantiation\": 0, \"rungs_macro\": 0, \"rungs_speller\": 0, \"rungs_open\": 0, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 0, \"indirect_instantiation\": 0, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 0, \"verify_total\": 719.3, \"verify_tokens\": 4.1, \"verify_watched\": 1200, \"verify_watched_bytes\": 19257967, \"verify_before\": 218.7, \"verify_rebuild\": 273.2, \"verify_after\": 138.0, \"verify_checks\": 0.0, \"parses_index\": 1249, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 2, \"parses_after\": 0, \"index_lead\": 0.4, \"index_kept\": 859.0, \"index_other\": 0.0, \"index_reused\": 222.0, \"index_merge\": 202.7, \"index_kept_files\": 1248, \"index_kept_bytes\": 19867243, \"index_other_files\": 2727, \"index_other_bytes\": 15936487, \"index_reused_files\": 3976, \"index_reused_bytes\": 35813310, \"warnings_defines\": 13.4, \"warnings_macro_uses\": 374.3, \"warnings_sva\": 15.3, \"warnings_unfinished\": 4.0, \"warnings_unaccounted\": 0.2, \"warnings_scanned\": 1249, \"select\": 254.2, \"selected\": 3976, \"fallback\": true, \"bytes\": 35813310, \"edited\": 2, \"index\": 1289.0, \"locate\": 0.1, \"edits\": 100.4, \"warnings\": 434.9, \"parses\": 1251}", "ms": [3049.7538750059903, 2961.388874973636, 2883.6807499756105, 2881.177250004839], "status": "ok", "result_count": 1, "edits": 2, "files": 2, "created": 0, "trace_rungs_request": 0, "trace_rungs_declaration": 0, "trace_rungs_reference": 0, "trace_rungs_instantiation": 0, "trace_rungs_macro": 0, "trace_rungs_speller": 0, "trace_rungs_open": 0, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 0, "trace_indirect_instantiation": 0, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 0, "trace_verify_total": 719.3, "trace_verify_tokens": 4.1, "trace_verify_watched": 1200, "trace_verify_watched_bytes": 19257967, "trace_verify_before": 218.7, "trace_verify_rebuild": 273.2, "trace_verify_after": 138.0, "trace_verify_checks": 0.0, "trace_parses_index": 1249, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 2, "trace_parses_after": 0, "trace_index_lead": 0.4, "trace_index_kept": 859.0, "trace_index_other": 0.0, "trace_index_reused": 222.0, "trace_index_merge": 202.7, "trace_index_kept_files": 1248, "trace_index_kept_bytes": 19867243, "trace_index_other_files": 2727, "trace_index_other_bytes": 15936487, "trace_index_reused_files": 3976, "trace_index_reused_bytes": 35813310, "trace_warnings_defines": 13.4, "trace_warnings_macro_uses": 374.3, "trace_warnings_sva": 15.3, "trace_warnings_unfinished": 4.0, "trace_warnings_unaccounted": 0.2, "trace_warnings_scanned": 1249, "trace_select": 254.2, "trace_selected": 3976, "trace_fallback": true, "trace_bytes": 35813310, "trace_edited": 2, "trace_index": 1289.0, "trace_locate": 0.1, "trace_edits": 100.4, "trace_warnings": 434.9, "trace_parses": 1251, "ts": "2026-09-09T01:11:02", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "conflict: state_q -> state_d", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "96f32d4243b1dc541a3e1e90a29a077520688efcc3f8e6c278c5c5f83cdb146b", "peak_rss_kib": 527264.0, "file": "hw/ip/entropy_src/rtl/entropy_src_main_sm.sv", "new_name": "state_d", "titles": [], "note": "{\"rungs_request\": 1, \"rungs_declaration\": 98, \"rungs_reference\": 122, \"rungs_instantiation\": 19, \"rungs_macro\": 0, \"rungs_speller\": 1, \"rungs_open\": 1, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 112, \"indirect_instantiation\": 19, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 1, \"verify_total\": 67.4, \"verify_tokens\": 4.3, \"verify_watched\": 111, \"verify_watched_bytes\": 1962908, \"verify_before\": 14.6, \"verify_rebuild\": 38.4, \"verify_after\": 1.0, \"verify_checks\": 0.0, \"parses_index\": 142, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 2, \"parses_after\": 0, \"index_lead\": 0.3, \"index_kept\": 112.1, \"index_other\": 0.0, \"index_reused\": 31.7, \"index_merge\": 24.0, \"index_kept_files\": 141, \"index_kept_bytes\": 2988561, \"index_other_files\": 100, \"index_other_bytes\": 1572093, \"index_reused_files\": 242, \"index_reused_bytes\": 4570234, \"warnings_defines\": 0.0, \"warnings_macro_uses\": 0.0, \"warnings_sva\": 0.0, \"warnings_unfinished\": 0.0, \"warnings_unaccounted\": 0.0, \"warnings_scanned\": 0, \"select\": 14.9, \"selected\": 242, \"fallback\": false, \"bytes\": 4570234, \"edited\": 2, \"index\": 168.6, \"locate\": 0.0, \"edits\": 12.5, \"warnings\": 0.0, \"parses\": 144}", "ms": [287.52633300609887, 275.6854579783976, 269.93208297062665, 272.1635830239393], "status": "refused", "result_count": 0, "message": "lucisv: renaming `state_q` to `state_d` would change what `state_d` means in entropy_src_core.sv; the rename was abandoned.", "edits": 0, "files": 0, "created": 0, "trace_rungs_request": 1, "trace_rungs_declaration": 98, "trace_rungs_reference": 122, "trace_rungs_instantiation": 19, "trace_rungs_macro": 0, "trace_rungs_speller": 1, "trace_rungs_open": 1, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 112, "trace_indirect_instantiation": 19, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 1, "trace_verify_total": 67.4, "trace_verify_tokens": 4.3, "trace_verify_watched": 111, "trace_verify_watched_bytes": 1962908, "trace_verify_before": 14.6, "trace_verify_rebuild": 38.4, "trace_verify_after": 1.0, "trace_verify_checks": 0.0, "trace_parses_index": 142, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 2, "trace_parses_after": 0, "trace_index_lead": 0.3, "trace_index_kept": 112.1, "trace_index_other": 0.0, "trace_index_reused": 31.7, "trace_index_merge": 24.0, "trace_index_kept_files": 141, "trace_index_kept_bytes": 2988561, "trace_index_other_files": 100, "trace_index_other_bytes": 1572093, "trace_index_reused_files": 242, "trace_index_reused_bytes": 4570234, "trace_warnings_defines": 0.0, "trace_warnings_macro_uses": 0.0, "trace_warnings_sva": 0.0, "trace_warnings_unfinished": 0.0, "trace_warnings_unaccounted": 0.0, "trace_warnings_scanned": 0, "trace_select": 14.9, "trace_selected": 242, "trace_fallback": false, "trace_bytes": 4570234, "trace_edited": 2, "trace_index": 168.6, "trace_locate": 0.0, "trace_edits": 12.5, "trace_warnings": 0.0, "trace_parses": 144, "ts": "2026-09-09T01:11:07", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "new name many uses spell: cipher_alert -> clk_i", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "96f32d4243b1dc541a3e1e90a29a077520688efcc3f8e6c278c5c5f83cdb146b", "peak_rss_kib": 1699984.0, "file": "hw/ip/aes/rtl/aes_core.sv", "new_name": "clk_i", "titles": [], "note": "{\"rungs_request\": 0, \"rungs_declaration\": 0, \"rungs_reference\": 0, \"rungs_instantiation\": 0, \"rungs_macro\": 0, \"rungs_speller\": 0, \"rungs_open\": 0, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 0, \"indirect_instantiation\": 0, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 0, \"verify_total\": 661.5, \"verify_tokens\": 1.7, \"verify_watched\": 1200, \"verify_watched_bytes\": 19257967, \"verify_before\": 310.8, \"verify_rebuild\": 271.7, \"verify_after\": 3.5, \"verify_checks\": 0.0, \"parses_index\": 1249, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 1, \"parses_after\": 0, \"index_lead\": 2.3, \"index_kept\": 861.1, \"index_other\": 0.0, \"index_reused\": 222.8, \"index_merge\": 201.7, \"index_kept_files\": 1248, \"index_kept_bytes\": 19827890, \"index_other_files\": 2727, \"index_other_bytes\": 15936487, \"index_reused_files\": 3976, \"index_reused_bytes\": 35813310, \"warnings_defines\": 0.0, \"warnings_macro_uses\": 0.0, \"warnings_sva\": 0.0, \"warnings_unfinished\": 0.0, \"warnings_unaccounted\": 0.0, \"warnings_scanned\": 0, \"select\": 264.2, \"selected\": 3976, \"fallback\": true, \"bytes\": 35813310, \"edited\": 1, \"index\": 1294.3, \"locate\": 0.3, \"edits\": 2.2, \"warnings\": 0.0, \"parses\": 1250}", "ms": [2459.582125011366, 2338.0812499672174, 2282.9822920029983, 2284.597833000589], "status": "refused", "result_count": 0, "message": "lucisv: renaming `cipher_alert` to `clk_i` would change what the set of declarations means in aes_core.sv; the rename was abandoned.", "edits": 0, "files": 0, "created": 0, "trace_rungs_request": 0, "trace_rungs_declaration": 0, "trace_rungs_reference": 0, "trace_rungs_instantiation": 0, "trace_rungs_macro": 0, "trace_rungs_speller": 0, "trace_rungs_open": 0, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 0, "trace_indirect_instantiation": 0, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 0, "trace_verify_total": 661.5, "trace_verify_tokens": 1.7, "trace_verify_watched": 1200, "trace_verify_watched_bytes": 19257967, "trace_verify_before": 310.8, "trace_verify_rebuild": 271.7, "trace_verify_after": 3.5, "trace_verify_checks": 0.0, "trace_parses_index": 1249, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 1, "trace_parses_after": 0, "trace_index_lead": 2.3, "trace_index_kept": 861.1, "trace_index_other": 0.0, "trace_index_reused": 222.8, "trace_index_merge": 201.7, "trace_index_kept_files": 1248, "trace_index_kept_bytes": 19827890, "trace_index_other_files": 2727, "trace_index_other_bytes": 15936487, "trace_index_reused_files": 3976, "trace_index_reused_bytes": 35813310, "trace_warnings_defines": 0.0, "trace_warnings_macro_uses": 0.0, "trace_warnings_sva": 0.0, "trace_warnings_unfinished": 0.0, "trace_warnings_unaccounted": 0.0, "trace_warnings_scanned": 0, "trace_select": 264.2, "trace_selected": 3976, "trace_fallback": true, "trace_bytes": 35813310, "trace_edited": 1, "trace_index": 1294.3, "trace_locate": 0.3, "trace_edits": 2.2, "trace_warnings": 0.0, "trace_parses": 1250, "ts": "2026-09-09T01:11:20", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "duplicate module: rstmgr_por -> rstmgr_por_x", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "96f32d4243b1dc541a3e1e90a29a077520688efcc3f8e6c278c5c5f83cdb146b", "peak_rss_kib": 733184.0, "file": "hw/top_darjeeling/ip_autogen/rstmgr/rtl/rstmgr.sv", "new_name": "rstmgr_por_x", "titles": [], "note": "{\"rungs_request\": 0, \"rungs_declaration\": 0, \"rungs_reference\": 0, \"rungs_instantiation\": 0, \"rungs_macro\": 0, \"rungs_speller\": 0, \"rungs_open\": 0, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 0, \"indirect_instantiation\": 0, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 0, \"verify_total\": 0.0, \"verify_tokens\": 0.0, \"verify_watched\": 0, \"verify_watched_bytes\": 0, \"verify_before\": 0.0, \"verify_rebuild\": 0.0, \"verify_after\": 0.0, \"verify_checks\": 0.0, \"parses_index\": 14, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 0, \"parses_after\": 0, \"index_lead\": 1.3, \"index_kept\": 4.7, \"index_other\": 0.0, \"index_reused\": 220.1, \"index_merge\": 203.2, \"index_kept_files\": 13, \"index_kept_bytes\": 87644, \"index_other_files\": 3962, \"index_other_bytes\": 35700552, \"index_reused_files\": 3976, \"index_reused_bytes\": 35813310, \"warnings_defines\": 0.0, \"warnings_macro_uses\": 0.0, \"warnings_sva\": 0.0, \"warnings_unfinished\": 0.0, \"warnings_unaccounted\": 0.0, \"warnings_scanned\": 0, \"select\": 259.7, \"selected\": 3976, \"fallback\": true, \"bytes\": 35813310, \"edited\": 0, \"index\": 435.7, \"locate\": 0.3, \"edits\": 0.0, \"warnings\": 0.0, \"parses\": 14}", "ms": [786.3199580460787, 781.5626250230707, 754.0115410229191, 730.4007500060834], "status": "refused", "result_count": 0, "message": "lucisv: `rstmgr_por` is declared in more than one indexed file; lucisv will not guess which declaration this rename means.", "edits": 0, "files": 0, "created": 0, "trace_rungs_request": 0, "trace_rungs_declaration": 0, "trace_rungs_reference": 0, "trace_rungs_instantiation": 0, "trace_rungs_macro": 0, "trace_rungs_speller": 0, "trace_rungs_open": 0, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 0, "trace_indirect_instantiation": 0, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 0, "trace_verify_total": 0.0, "trace_verify_tokens": 0.0, "trace_verify_watched": 0, "trace_verify_watched_bytes": 0, "trace_verify_before": 0.0, "trace_verify_rebuild": 0.0, "trace_verify_after": 0.0, "trace_verify_checks": 0.0, "trace_parses_index": 14, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 0, "trace_parses_after": 0, "trace_index_lead": 1.3, "trace_index_kept": 4.7, "trace_index_other": 0.0, "trace_index_reused": 220.1, "trace_index_merge": 203.2, "trace_index_kept_files": 13, "trace_index_kept_bytes": 87644, "trace_index_other_files": 3962, "trace_index_other_bytes": 35700552, "trace_index_reused_files": 3976, "trace_index_reused_bytes": 35813310, "trace_warnings_defines": 0.0, "trace_warnings_macro_uses": 0.0, "trace_warnings_sva": 0.0, "trace_warnings_unfinished": 0.0, "trace_warnings_unaccounted": 0.0, "trace_warnings_scanned": 0, "trace_select": 259.7, "trace_selected": 3976, "trace_fallback": true, "trace_bytes": 35813310, "trace_edited": 0, "trace_index": 435.7, "trace_locate": 0.3, "trace_edits": 0.0, "trace_warnings": 0.0, "trace_parses": 14, "ts": "2026-09-09T01:11:26", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "no symbol: whole scope then refuse", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "peak_rss_kib": 427232.0, "file": "hw/ip/aes/dv/tb/tb.sv", "note": "{\"rungs_request\": 0, \"rungs_declaration\": 0, \"rungs_reference\": 0, \"rungs_instantiation\": 0, \"rungs_macro\": 0, \"rungs_speller\": 0, \"rungs_open\": 0, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 0, \"indirect_instantiation\": 0, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 0, \"verify_total\": 0.0, \"verify_tokens\": 0.0, \"verify_watched\": 0, \"verify_watched_bytes\": 0, \"verify_before\": 0.0, \"verify_rebuild\": 0.0, \"verify_after\": 0.0, \"verify_checks\": 0.0, \"parses_index\": 0, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 0, \"parses_after\": 0, \"index_lead\": 0.0, \"index_kept\": 0.0, \"index_other\": 0.0, \"index_reused\": 0.0, \"index_merge\": 0.0, \"index_kept_files\": 0, \"index_kept_bytes\": 0, \"index_other_files\": 0, \"index_other_bytes\": 0, \"index_reused_files\": 0, \"index_reused_bytes\": 0, \"warnings_defines\": 0.0, \"warnings_macro_uses\": 0.0, \"warnings_sva\": 0.0, \"warnings_unfinished\": 0.0, \"warnings_unaccounted\": 0.0, \"warnings_scanned\": 0, \"select\": 0.0, \"selected\": 0, \"fallback\": false, \"bytes\": 0, \"edited\": 0, \"index\": 0.0, \"locate\": 0.0, \"edits\": 0.0, \"warnings\": 0.0, \"parses\": 0, \"preflight\": true}", "ms": [2.702499972656369, 0.37045800127089024, 0.19737501861527562, 0.2185420016758144], "status": "refused", "result_count": 0, "message": "lucisv: there is no symbol to rename at this position.", "trace_rungs_request": 0, "trace_rungs_declaration": 0, "trace_rungs_reference": 0, "trace_rungs_instantiation": 0, "trace_rungs_macro": 0, "trace_rungs_speller": 0, "trace_rungs_open": 0, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 0, "trace_indirect_instantiation": 0, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 0, "trace_verify_total": 0.0, "trace_verify_tokens": 0.0, "trace_verify_watched": 0, "trace_verify_watched_bytes": 0, "trace_verify_before": 0.0, "trace_verify_rebuild": 0.0, "trace_verify_after": 0.0, "trace_verify_checks": 0.0, "trace_parses_index": 0, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 0, "trace_parses_after": 0, "trace_index_lead": 0.0, "trace_index_kept": 0.0, "trace_index_other": 0.0, "trace_index_reused": 0.0, "trace_index_merge": 0.0, "trace_index_kept_files": 0, "trace_index_kept_bytes": 0, "trace_index_other_files": 0, "trace_index_other_bytes": 0, "trace_index_reused_files": 0, "trace_index_reused_bytes": 0, "trace_warnings_defines": 0.0, "trace_warnings_macro_uses": 0.0, "trace_warnings_sva": 0.0, "trace_warnings_unfinished": 0.0, "trace_warnings_unaccounted": 0.0, "trace_warnings_scanned": 0, "trace_select": 0.0, "trace_selected": 0, "trace_fallback": false, "trace_bytes": 0, "trace_edited": 0, "trace_index": 0.0, "trace_locate": 0.0, "trace_edits": 0.0, "trace_warnings": 0.0, "trace_parses": 0, "trace_preflight": true, "ts": "2026-09-09T01:11:29", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "tail: state_q -> state_q_x", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "b39defb212655f29e68c0e15b88dda405d2779a24c4b522a1798b6f44c9a04f7", "peak_rss_kib": 614656.0, "file": "hw/ip/entropy_src/rtl/entropy_src_main_sm.sv", "new_name": "state_q_x", "titles": ["entropy_src_core.sv", "entropy_src_main_sm.sv"], "note": "{\"rungs_request\": 1, \"rungs_declaration\": 95, \"rungs_reference\": 122, \"rungs_instantiation\": 19, \"rungs_macro\": 0, \"rungs_speller\": 0, \"rungs_open\": 1, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 113, \"indirect_instantiation\": 19, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 1, \"verify_total\": 74.4, \"verify_tokens\": 4.3, \"verify_watched\": 106, \"verify_watched_bytes\": 1919528, \"verify_before\": 14.2, \"verify_rebuild\": 38.4, \"verify_after\": 7.9, \"verify_checks\": 0.0, \"parses_index\": 238, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 2, \"parses_after\": 0, \"select\": 13.8, \"selected\": 238, \"fallback\": false, \"bytes\": 4554326, \"edited\": 2, \"index\": 228.5, \"locate\": 0.0, \"edits\": 12.3, \"warnings\": 51.2, \"parses\": 240}", "ms": [429.2307500145398, 393.72162497602403, 391.3822500035167, 391.78733399603516], "status": "ok", "result_count": 1, "edits": 5, "files": 2, "created": 0, "trace_rungs_request": 1, "trace_rungs_declaration": 95, "trace_rungs_reference": 122, "trace_rungs_instantiation": 19, "trace_rungs_macro": 0, "trace_rungs_speller": 0, "trace_rungs_open": 1, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 113, "trace_indirect_instantiation": 19, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 1, "trace_verify_total": 74.4, "trace_verify_tokens": 4.3, "trace_verify_watched": 106, "trace_verify_watched_bytes": 1919528, "trace_verify_before": 14.2, "trace_verify_rebuild": 38.4, "trace_verify_after": 7.9, "trace_verify_checks": 0.0, "trace_parses_index": 238, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 2, "trace_parses_after": 0, "trace_select": 13.8, "trace_selected": 238, "trace_fallback": false, "trace_bytes": 4554326, "trace_edited": 2, "trace_index": 228.5, "trace_locate": 0.0, "trace_edits": 12.3, "trace_warnings": 51.2, "trace_parses": 240, "ts": "2026-09-09T01:11:37", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "ordinary: aes -> aes_renamed", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "fa7e31c78382176d5f96d661228ce82328df8bc77bd6d8575dd38717814cb26c", "peak_rss_kib": 461952.0, "file": "hw/ip/aes/dv/tb/tb.sv", "new_name": "aes_renamed", "titles": ["aes.sv", "aes_bind.sv", "aes_cov_bind.sv", "aes_tb.sv", "aes_wrap.sv", "darjeeling_pd_main.sv", "earlgrey_pd_main.sv", "englishbreakfast_pd_main.sv", "tb.sv"], "note": "{\"rungs_request\": 1, \"rungs_declaration\": 4, \"rungs_reference\": 8, \"rungs_instantiation\": 0, \"rungs_macro\": 0, \"rungs_speller\": 0, \"rungs_open\": 0, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 1, \"indirect_instantiation\": 0, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 0, \"verify_total\": 47.3, \"verify_tokens\": 14.8, \"verify_watched\": 12, \"verify_watched_bytes\": 398160, \"verify_before\": 4.2, \"verify_rebuild\": 23.4, \"verify_after\": 3.2, \"verify_checks\": 0.0, \"parses_index\": 13, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 9, \"parses_after\": 0, \"select\": 8.3, \"selected\": 13, \"fallback\": false, \"bytes\": 400051, \"edited\": 9, \"index\": 22.9, \"locate\": 0.1, \"edits\": 2.3, \"warnings\": 8.4, \"parses\": 22}", "ms": [103.15541597083211, 92.31041703606024, 91.90749999834225, 91.97866701288149], "status": "ok", "result_count": 1, "edits": 14, "files": 9, "created": 0, "trace_rungs_request": 1, "trace_rungs_declaration": 4, "trace_rungs_reference": 8, "trace_rungs_instantiation": 0, "trace_rungs_macro": 0, "trace_rungs_speller": 0, "trace_rungs_open": 0, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 1, "trace_indirect_instantiation": 0, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 0, "trace_verify_total": 47.3, "trace_verify_tokens": 14.8, "trace_verify_watched": 12, "trace_verify_watched_bytes": 398160, "trace_verify_before": 4.2, "trace_verify_rebuild": 23.4, "trace_verify_after": 3.2, "trace_verify_checks": 0.0, "trace_parses_index": 13, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 9, "trace_parses_after": 0, "trace_select": 8.3, "trace_selected": 13, "trace_fallback": false, "trace_bytes": 400051, "trace_edited": 9, "trace_index": 22.9, "trace_locate": 0.1, "trace_edits": 2.3, "trace_warnings": 8.4, "trace_parses": 22, "ts": "2026-09-09T01:11:41", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "unique internal: cipher_alert -> cipher_alert_x", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "5f53e977da59093f59ac3153a59036de64ff2fc041017271d8ebbd9ba41ba1e1", "peak_rss_kib": 436512.0, "file": "hw/ip/aes/rtl/aes_core.sv", "new_name": "cipher_alert_x", "titles": ["aes_core.sv"], "note": "{\"rungs_request\": 1, \"rungs_declaration\": 0, \"rungs_reference\": 2, \"rungs_instantiation\": 0, \"rungs_macro\": 0, \"rungs_speller\": 0, \"rungs_open\": 1, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 2, \"indirect_instantiation\": 0, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 1, \"verify_total\": 5.5, \"verify_tokens\": 1.9, \"verify_watched\": 1, \"verify_watched_bytes\": 48933, \"verify_before\": 0.4, \"verify_rebuild\": 2.7, \"verify_after\": 0.2, \"verify_checks\": 0.0, \"parses_index\": 4, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 1, \"parses_after\": 0, \"select\": 6.4, \"selected\": 4, \"fallback\": false, \"bytes\": 68475, \"edited\": 1, \"index\": 3.4, \"locate\": 0.2, \"edits\": 0.0, \"warnings\": 0.9, \"parses\": 5}", "ms": [34.129833977203816, 21.798916975967586, 18.88545899419114, 17.188500030897558], "status": "ok", "result_count": 1, "edits": 3, "files": 1, "created": 0, "trace_rungs_request": 1, "trace_rungs_declaration": 0, "trace_rungs_reference": 2, "trace_rungs_instantiation": 0, "trace_rungs_macro": 0, "trace_rungs_speller": 0, "trace_rungs_open": 1, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 2, "trace_indirect_instantiation": 0, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 1, "trace_verify_total": 5.5, "trace_verify_tokens": 1.9, "trace_verify_watched": 1, "trace_verify_watched_bytes": 48933, "trace_verify_before": 0.4, "trace_verify_rebuild": 2.7, "trace_verify_after": 0.2, "trace_verify_checks": 0.0, "trace_parses_index": 4, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 1, "trace_parses_after": 0, "trace_select": 6.4, "trace_selected": 4, "trace_fallback": false, "trace_bytes": 68475, "trace_edited": 1, "trace_index": 3.4, "trace_locate": 0.2, "trace_edits": 0.0, "trace_warnings": 0.9, "trace_parses": 5, "ts": "2026-09-09T01:11:44", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "common port: clk_i -> clk_ix", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "31aadc134628bf567da7423a8fc20dda98a76fec4abd9ffa6392f80d4923420a", "peak_rss_kib": 1879200.0, "file": "hw/ip/entropy_src/rtl/entropy_src_main_sm.sv", "new_name": "clk_ix", "titles": ["entropy_src_core.sv", "entropy_src_main_sm.sv"], "note": "{\"rungs_request\": 0, \"rungs_declaration\": 0, \"rungs_reference\": 0, \"rungs_instantiation\": 0, \"rungs_macro\": 0, \"rungs_speller\": 0, \"rungs_open\": 0, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 0, \"indirect_instantiation\": 0, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 0, \"verify_total\": 728.7, \"verify_tokens\": 4.3, \"verify_watched\": 1200, \"verify_watched_bytes\": 19257967, \"verify_before\": 222.9, \"verify_rebuild\": 276.7, \"verify_after\": 138.9, \"verify_checks\": 0.0, \"parses_index\": 3975, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 2, \"parses_after\": 0, \"select\": 255.6, \"selected\": 3976, \"fallback\": true, \"bytes\": 35813310, \"edited\": 2, \"index\": 1865.9, \"locate\": 0.1, \"edits\": 102.2, \"warnings\": 444.7, \"parses\": 3977}", "ms": [3631.98983395705, 3527.5039579719305, 3475.931875000242, 3482.873166038189], "status": "ok", "result_count": 1, "edits": 2, "files": 2, "created": 0, "trace_rungs_request": 0, "trace_rungs_declaration": 0, "trace_rungs_reference": 0, "trace_rungs_instantiation": 0, "trace_rungs_macro": 0, "trace_rungs_speller": 0, "trace_rungs_open": 0, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 0, "trace_indirect_instantiation": 0, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 0, "trace_verify_total": 728.7, "trace_verify_tokens": 4.3, "trace_verify_watched": 1200, "trace_verify_watched_bytes": 19257967, "trace_verify_before": 222.9, "trace_verify_rebuild": 276.7, "trace_verify_after": 138.9, "trace_verify_checks": 0.0, "trace_parses_index": 3975, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 2, "trace_parses_after": 0, "trace_select": 255.6, "trace_selected": 3976, "trace_fallback": true, "trace_bytes": 35813310, "trace_edited": 2, "trace_index": 1865.9, "trace_locate": 0.1, "trace_edits": 102.2, "trace_warnings": 444.7, "trace_parses": 3977, "ts": "2026-09-09T01:12:02", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "conflict: state_q -> state_d", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "96f32d4243b1dc541a3e1e90a29a077520688efcc3f8e6c278c5c5f83cdb146b", "peak_rss_kib": 514672.0, "file": "hw/ip/entropy_src/rtl/entropy_src_main_sm.sv", "new_name": "state_d", "titles": [], "note": "{\"rungs_request\": 1, \"rungs_declaration\": 98, \"rungs_reference\": 122, \"rungs_instantiation\": 19, \"rungs_macro\": 0, \"rungs_speller\": 1, \"rungs_open\": 1, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 112, \"indirect_instantiation\": 19, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 1, \"verify_total\": 64.8, \"verify_tokens\": 4.2, \"verify_watched\": 111, \"verify_watched_bytes\": 1962908, \"verify_before\": 14.1, \"verify_rebuild\": 36.9, \"verify_after\": 1.0, \"verify_checks\": 0.0, \"parses_index\": 242, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 2, \"parses_after\": 0, \"select\": 14.4, \"selected\": 242, \"fallback\": false, \"bytes\": 4570234, \"edited\": 2, \"index\": 217.5, \"locate\": 0.0, \"edits\": 11.9, \"warnings\": 0.0, \"parses\": 244}", "ms": [355.68770801182836, 324.15045803645626, 318.635290954262, 317.3258330207318], "status": "refused", "result_count": 0, "message": "lucisv: renaming `state_q` to `state_d` would change what `state_d` means in entropy_src_core.sv; the rename was abandoned.", "edits": 0, "files": 0, "created": 0, "trace_rungs_request": 1, "trace_rungs_declaration": 98, "trace_rungs_reference": 122, "trace_rungs_instantiation": 19, "trace_rungs_macro": 0, "trace_rungs_speller": 1, "trace_rungs_open": 1, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 112, "trace_indirect_instantiation": 19, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 1, "trace_verify_total": 64.8, "trace_verify_tokens": 4.2, "trace_verify_watched": 111, "trace_verify_watched_bytes": 1962908, "trace_verify_before": 14.1, "trace_verify_rebuild": 36.9, "trace_verify_after": 1.0, "trace_verify_checks": 0.0, "trace_parses_index": 242, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 2, "trace_parses_after": 0, "trace_select": 14.4, "trace_selected": 242, "trace_fallback": false, "trace_bytes": 4570234, "trace_edited": 2, "trace_index": 217.5, "trace_locate": 0.0, "trace_edits": 11.9, "trace_warnings": 0.0, "trace_parses": 244, "ts": "2026-09-09T01:12:07", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "new name many uses spell: cipher_alert -> clk_i", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "96f32d4243b1dc541a3e1e90a29a077520688efcc3f8e6c278c5c5f83cdb146b", "peak_rss_kib": 1617488.0, "file": "hw/ip/aes/rtl/aes_core.sv", "new_name": "clk_i", "titles": [], "note": "{\"rungs_request\": 0, \"rungs_declaration\": 0, \"rungs_reference\": 0, \"rungs_instantiation\": 0, \"rungs_macro\": 0, \"rungs_speller\": 0, \"rungs_open\": 0, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 0, \"indirect_instantiation\": 0, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 0, \"verify_total\": 671.0, \"verify_tokens\": 1.7, \"verify_watched\": 1200, \"verify_watched_bytes\": 19257967, \"verify_before\": 318.1, \"verify_rebuild\": 272.3, \"verify_after\": 3.7, \"verify_checks\": 0.0, \"parses_index\": 3975, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 1, \"parses_after\": 0, \"select\": 258.7, \"selected\": 3976, \"fallback\": true, \"bytes\": 35813310, \"edited\": 1, \"index\": 1872.4, \"locate\": 0.3, \"edits\": 2.3, \"warnings\": 0.0, \"parses\": 3976}", "ms": [3070.1524579781108, 2962.2283750213683, 2906.755500007421, 2867.969457991421], "status": "refused", "result_count": 0, "message": "lucisv: renaming `cipher_alert` to `clk_i` would change what the set of declarations means in aes_core.sv; the rename was abandoned.", "edits": 0, "files": 0, "created": 0, "trace_rungs_request": 0, "trace_rungs_declaration": 0, "trace_rungs_reference": 0, "trace_rungs_instantiation": 0, "trace_rungs_macro": 0, "trace_rungs_speller": 0, "trace_rungs_open": 0, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 0, "trace_indirect_instantiation": 0, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 0, "trace_verify_total": 671.0, "trace_verify_tokens": 1.7, "trace_verify_watched": 1200, "trace_verify_watched_bytes": 19257967, "trace_verify_before": 318.1, "trace_verify_rebuild": 272.3, "trace_verify_after": 3.7, "trace_verify_checks": 0.0, "trace_parses_index": 3975, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 1, "trace_parses_after": 0, "trace_select": 258.7, "trace_selected": 3976, "trace_fallback": true, "trace_bytes": 35813310, "trace_edited": 1, "trace_index": 1872.4, "trace_locate": 0.3, "trace_edits": 2.3, "trace_warnings": 0.0, "trace_parses": 3976, "ts": "2026-09-09T01:12:22", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "duplicate module: rstmgr_por -> rstmgr_por_x", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "96f32d4243b1dc541a3e1e90a29a077520688efcc3f8e6c278c5c5f83cdb146b", "peak_rss_kib": 918416.0, "file": "hw/top_darjeeling/ip_autogen/rstmgr/rtl/rstmgr.sv", "new_name": "rstmgr_por_x", "titles": [], "note": "{\"rungs_request\": 0, \"rungs_declaration\": 0, \"rungs_reference\": 0, \"rungs_instantiation\": 0, \"rungs_macro\": 0, \"rungs_speller\": 0, \"rungs_open\": 0, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 0, \"indirect_instantiation\": 0, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 0, \"verify_total\": 0.0, \"verify_tokens\": 0.0, \"verify_watched\": 0, \"verify_watched_bytes\": 0, \"verify_before\": 0.0, \"verify_rebuild\": 0.0, \"verify_after\": 0.0, \"verify_checks\": 0.0, \"parses_index\": 3975, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 0, \"parses_after\": 0, \"select\": 252.8, \"selected\": 3976, \"fallback\": true, \"bytes\": 35813310, \"edited\": 0, \"index\": 1891.3, \"locate\": 0.3, \"edits\": 0.0, \"warnings\": 0.0, \"parses\": 3975}", "ms": [2251.112958008889, 2206.4846249995753, 2207.0510829798877, 2180.649332993198], "status": "refused", "result_count": 0, "message": "lucisv: `rstmgr_por` is declared in more than one indexed file; lucisv will not guess which declaration this rename means.", "edits": 0, "files": 0, "created": 0, "trace_rungs_request": 0, "trace_rungs_declaration": 0, "trace_rungs_reference": 0, "trace_rungs_instantiation": 0, "trace_rungs_macro": 0, "trace_rungs_speller": 0, "trace_rungs_open": 0, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 0, "trace_indirect_instantiation": 0, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 0, "trace_verify_total": 0.0, "trace_verify_tokens": 0.0, "trace_verify_watched": 0, "trace_verify_watched_bytes": 0, "trace_verify_before": 0.0, "trace_verify_rebuild": 0.0, "trace_verify_after": 0.0, "trace_verify_checks": 0.0, "trace_parses_index": 3975, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 0, "trace_parses_after": 0, "trace_select": 252.8, "trace_selected": 3976, "trace_fallback": true, "trace_bytes": 35813310, "trace_edited": 0, "trace_index": 1891.3, "trace_locate": 0.3, "trace_edits": 0.0, "trace_warnings": 0.0, "trace_parses": 3975, "ts": "2026-09-09T01:12:34", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "no symbol: whole scope then refuse", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "peak_rss_kib": 914448.0, "file": "hw/ip/aes/dv/tb/tb.sv", "note": "{\"rungs_request\": 0, \"rungs_declaration\": 0, \"rungs_reference\": 0, \"rungs_instantiation\": 0, \"rungs_macro\": 0, \"rungs_speller\": 0, \"rungs_open\": 0, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 0, \"indirect_instantiation\": 0, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 0, \"verify_total\": 0.0, \"verify_tokens\": 0.0, \"verify_watched\": 0, \"verify_watched_bytes\": 0, \"verify_before\": 0.0, \"verify_rebuild\": 0.0, \"verify_after\": 0.0, \"verify_checks\": 0.0, \"parses_index\": 3975, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 0, \"parses_after\": 0, \"select\": 0.0, \"selected\": 3976, \"fallback\": true, \"bytes\": 35813310, \"edited\": 0, \"index\": 1891.5, \"locate\": 0.1, \"edits\": 0.0, \"warnings\": 0.0, \"parses\": 3975}", "ms": [2244.7303340304643, 2204.6456660027616, 2205.368582974188, 2177.3032499477267], "status": "refused", "result_count": 0, "message": "lucisv: there is no symbol to rename at this position.", "trace_rungs_request": 0, "trace_rungs_declaration": 0, "trace_rungs_reference": 0, "trace_rungs_instantiation": 0, "trace_rungs_macro": 0, "trace_rungs_speller": 0, "trace_rungs_open": 0, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 0, "trace_indirect_instantiation": 0, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 0, "trace_verify_total": 0.0, "trace_verify_tokens": 0.0, "trace_verify_watched": 0, "trace_verify_watched_bytes": 0, "trace_verify_before": 0.0, "trace_verify_rebuild": 0.0, "trace_verify_after": 0.0, "trace_verify_checks": 0.0, "trace_parses_index": 3975, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 0, "trace_parses_after": 0, "trace_select": 0.0, "trace_selected": 3976, "trace_fallback": true, "trace_bytes": 35813310, "trace_edited": 0, "trace_index": 1891.5, "trace_locate": 0.1, "trace_edits": 0.0, "trace_warnings": 0.0, "trace_parses": 3975, "ts": "2026-09-09T01:12:46", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "scan", "row": "default, cold cache", "ms": [92.21495903329924, 107.13670798577368, 91.90629201475531], "settled_ms": [92.21495903329924, 107.13670798577368, 91.90629201475531], "fresh_process": true, "result_count": 3, "note": "0 files indexed | 124 files indexed | nothing in flight during the scan", "ts": "2026-09-09T01:12:51", "label": "0.51.0-reference", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "default, warm cache", "ms": [53.92179201589897, 46.04308295529336, 41.25883401138708], "settled_ms": [53.92179201589897, 46.04308295529336, 41.25883401138708], "fresh_process": true, "result_count": 3, "note": "0 files indexed | 124 files indexed, 123 from cache | nothing in flight during the scan", "ts": "2026-09-09T01:12:56", "label": "0.51.0-reference", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "empty-index, cold cache", "ms": [105.30445899348706, 103.75137499067932, 108.87637495761737], "settled_ms": [105.30445899348706, 103.75137499067932, 108.87637495761737], "fresh_process": true, "result_count": 3, "note": "0 files indexed | 124 files indexed | nothing in flight during the scan", "ts": "2026-09-09T01:13:01", "label": "0.51.0-reference", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "empty-index, warm cache", "ms": [45.0200840132311, 43.97104197414592, 41.873250040225685], "settled_ms": [45.0200840132311, 43.97104197414592, 41.873250040225685], "fresh_process": true, "result_count": 3, "note": "124 files indexed, 123 from cache | nothing in flight during the scan", "ts": "2026-09-09T01:13:06", "label": "0.51.0-reference", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "depth0, cold cache", "ms": [7.711249985732138, 8.780958014540374, 10.425499989651144], "settled_ms": [7.711249985732138, 8.780958014540374, 10.425499989651144], "fresh_process": true, "result_count": 3, "note": "0 files indexed | 1 file indexed | nothing in flight during the scan", "ts": "2026-09-09T01:13:10", "label": "0.51.0-reference", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "depth0, warm cache", "ms": [7.134040992241353, 9.76633297977969, 10.451290989294648], "settled_ms": [7.134040992241353, 9.76633297977969, 10.451290989294648], "fresh_process": true, "result_count": 3, "note": "0 files indexed | 1 file indexed | nothing in flight during the scan", "ts": "2026-09-09T01:13:15", "label": "0.51.0-reference", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "workspace, cold cache", "ms": [2896.5727079776116, 2884.8891250090674, 2880.1893750205636], "settled_ms": [2896.5727079776116, 2884.8891250090674, 2880.1893750205636], "fresh_process": true, "result_count": 3, "note": "3976 files indexed, 3 skipped | nothing in flight during the scan", "ts": "2026-09-09T01:13:28", "label": "0.51.0-reference", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "workspace, warm cache", "ms": [1110.262457979843, 1068.6567079974338, 1073.9933750010096], "settled_ms": [1110.262457979843, 1068.6567079974338, 1073.9933750010096], "fresh_process": true, "result_count": 3, "note": "3976 files indexed, 3975 from cache, 3 skipped | nothing in flight during the scan", "ts": "2026-09-09T01:13:36", "label": "0.51.0-reference", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "workspace, cold cache, first useful answer", "ms": [276.73141699051484, 278.63349998369813, 279.1064159828238], "first_answer_ms": [276.73141699051484, 278.63349998369813, 279.1064159828238], "settled_ms": [2903.118457994424, 2916.8199590058066, 2931.6357920179144], "fresh_process": true, "status": "ok", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "message": null, "result_count": 1, "result_counts": [1, 1, 1], "note": "ms is the definition sent during the scan; a 0 result count means the answer arrived before the index could give one. settled_ms is that session's own scan, perturbed by serving the request", "ts": "2026-09-09T01:13:50", "label": "0.51.0-reference", "schema": 2, "units": "ms"}
|
||||
{"phase": "scan", "row": "workspace, warm cache, first useful answer", "ms": [294.1113749984652, 295.10295897489414, 294.5136670023203], "first_answer_ms": [294.1113749984652, 295.10295897489414, 294.5136670023203], "settled_ms": [1082.7908339560963, 1085.090084001422, 1084.30279197637], "fresh_process": true, "status": "ok", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "message": null, "result_count": 1, "result_counts": [1, 1, 1], "note": "ms is the definition sent during the scan; a 0 result count means the answer arrived before the index could give one. settled_ms is that session's own scan, perturbed by serving the request", "ts": "2026-09-09T01:13:58", "label": "0.51.0-reference", "schema": 2, "units": "ms"}
|
||||
{"phase": "scan", "row": "default, cold cache", "ms": [96.67558304499835, 111.83595901820809, 94.76049995282665], "settled_ms": [96.67558304499835, 111.83595901820809, 94.76049995282665], "fresh_process": true, "result_count": 3, "note": "0 files indexed | 124 files indexed | nothing in flight during the scan", "ts": "2026-09-09T01:14:04", "label": "0.52.0-review", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "default, warm cache", "ms": [56.957875029183924, 47.349958040285856, 46.934207959566265], "settled_ms": [56.957875029183924, 47.349958040285856, 46.934207959566265], "fresh_process": true, "result_count": 3, "note": "0 files indexed | 124 files indexed, 123 from cache | nothing in flight during the scan", "ts": "2026-09-09T01:14:09", "label": "0.52.0-review", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "empty-index, cold cache", "ms": [110.82133301533759, 100.80170800210908, 106.90266598248854], "settled_ms": [110.82133301533759, 100.80170800210908, 106.90266598248854], "fresh_process": true, "result_count": 3, "note": "124 files indexed | nothing in flight during the scan", "ts": "2026-09-09T01:14:13", "label": "0.52.0-review", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "empty-index, warm cache", "ms": [35.27233301429078, 47.46295895893127, 50.83083303179592], "settled_ms": [35.27233301429078, 47.46295895893127, 50.83083303179592], "fresh_process": true, "result_count": 3, "note": "124 files indexed, 123 from cache | nothing in flight during the scan", "ts": "2026-09-09T01:14:18", "label": "0.52.0-review", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "depth0, cold cache", "ms": [6.20275002438575, 8.890166995115578, 8.290541998576373], "settled_ms": [6.20275002438575, 8.890166995115578, 8.290541998576373], "fresh_process": true, "result_count": 3, "note": "1 file indexed | nothing in flight during the scan", "ts": "2026-09-09T01:14:23", "label": "0.52.0-review", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "depth0, warm cache", "ms": [9.672541986219585, 12.35333300428465, 13.59712501289323], "settled_ms": [9.672541986219585, 12.35333300428465, 13.59712501289323], "fresh_process": true, "result_count": 3, "note": "0 files indexed | 1 file indexed | nothing in flight during the scan", "ts": "2026-09-09T01:14:27", "label": "0.52.0-review", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "workspace, cold cache", "ms": [2913.358584046364, 2886.6533340187743, 2886.046791973058], "settled_ms": [2913.358584046364, 2886.6533340187743, 2886.046791973058], "fresh_process": true, "result_count": 3, "note": "3976 files indexed, 3 skipped | nothing in flight during the scan", "ts": "2026-09-09T01:14:41", "label": "0.52.0-review", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "workspace, warm cache", "ms": [1058.0805420177057, 1064.7187079885043, 1083.7782500311732], "settled_ms": [1058.0805420177057, 1064.7187079885043, 1083.7782500311732], "fresh_process": true, "result_count": 3, "note": "3976 files indexed, 3975 from cache, 3 skipped | nothing in flight during the scan", "ts": "2026-09-09T01:14:49", "label": "0.52.0-review", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "workspace, cold cache, first useful answer", "ms": [84.42629198543727, 82.43237499846146, 85.15745803015307], "first_answer_ms": [84.42629198543727, 82.43237499846146, 85.15745803015307], "settled_ms": [2996.103417011909, 2864.957375044469, 2927.270332991611], "fresh_process": true, "status": "ok", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "message": null, "result_count": 1, "result_counts": [1, 1, 1], "note": "ms is the definition sent during the scan; a 0 result count means the answer arrived before the index could give one. settled_ms is that session's own scan, perturbed by serving the request", "ts": "2026-09-09T01:15:02", "label": "0.52.0-review", "schema": 2, "units": "ms"}
|
||||
{"phase": "scan", "row": "workspace, warm cache, first useful answer", "ms": [120.29304099269211, 118.48579195793718, 118.49116702796891], "first_answer_ms": [120.29304099269211, 118.48579195793718, 118.49116702796891], "settled_ms": [1067.8267090115696, 1107.2501249727793, 1102.342874975875], "fresh_process": true, "status": "ok", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "message": null, "result_count": 1, "result_counts": [1, 1, 1], "note": "ms is the definition sent during the scan; a 0 result count means the answer arrived before the index could give one. settled_ms is that session's own scan, perturbed by serving the request", "ts": "2026-09-09T01:15:10", "label": "0.52.0-review", "schema": 2, "units": "ms"}
|
||||
{"phase": "rss", "row": "server RSS after workspace scan, cold cache", "units": "KiB", "rss_kib": [503632.0, 501264.0, 503824.0], "peak_rss_kib": [503632.0, 501264.0, 503824.0], "store_kib": 45404, "fresh_process": true, "result_count": 3, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "idle RSS a second after the scan settled; peak from `ps -o rss=` sampled at 50 ms; no latency in this row", "ts": "2026-09-09T01:15:27", "label": "0.52.0-review", "schema": 2, "status": "ok"}
|
||||
{"phase": "rss", "row": "server RSS after workspace scan, warm cache", "units": "KiB", "rss_kib": [428000.0, 428608.0, 428032.0], "peak_rss_kib": [428000.0, 428608.0, 428032.0], "store_kib": 45404, "fresh_process": true, "result_count": 3, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "idle RSS a second after the scan settled; peak from `ps -o rss=` sampled at 50 ms; no latency in this row", "ts": "2026-09-09T01:15:38", "label": "0.52.0-review", "schema": 2, "status": "ok"}
|
||||
{"phase": "rss", "row": "server RSS after workspace scan, cold cache", "units": "KiB", "rss_kib": [502304.0, 501808.0, 505712.0], "peak_rss_kib": [502304.0, 501808.0, 505712.0], "store_kib": 45404, "fresh_process": true, "result_count": 3, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "idle RSS a second after the scan settled; peak from `ps -o rss=` sampled at 50 ms; no latency in this row", "ts": "2026-09-09T01:15:56", "label": "0.51.0-reference", "schema": 2, "status": "ok"}
|
||||
{"phase": "rss", "row": "server RSS after workspace scan, warm cache", "units": "KiB", "rss_kib": [430048.0, 428992.0, 429824.0], "peak_rss_kib": [430048.0, 428992.0, 429824.0], "store_kib": 45404, "fresh_process": true, "result_count": 3, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "idle RSS a second after the scan settled; peak from `ps -o rss=` sampled at 50 ms; no latency in this row", "ts": "2026-09-09T01:16:07", "label": "0.51.0-reference", "schema": 2, "status": "ok"}
|
||||
{"phase": "scanload", "row": "definition every 100 ms, warm cache, 1 extra buffer(s)", "fresh_process": true, "status": "ok", "message": null, "result_count": 105, "requests_offered": 35, "rate_ms": 100, "open_buffers": 2, "note": "ms is every request's own wait, sorted, across all tries; the arrival rate is wall-clock and independent of the responses (`tick_jitter_ms` is the largest slip); `publication` is each try's first traced scan \u2014 the four publish_* stages, the publish count and the files published; `mismatched_answers` is the coherence contract of docs/features/index-scope/README.md, `unsettled_answers` the review \u00a72 gate (every answer, empty ones included, equal to the settled one)", "ms": [231.02662502788007, 272.09970902185887, 331.03475003736094, 340.92241601319984, 369.39124995842576, 430.9707919601351, 440.27550000464544, 469.78204196784645, 530.8990830089897, 540.1587910018861, 569.5378750097007, 630.5581249762326, 640.1443749782629, 671.7419580090791, 731.8317499593832, 739.0144579694606, 770.2299589873292, 832.5662499992177, 838.3662080159411, 870.1959579484537, 932.8641250031069, 940.040957997553, 969.7758330148645, 1031.0971660073847, 1039.0954170143232, 1071.4224579860456, 1130.5584160145372, 1140.0499579613097, 1171.6288750176318, 1232.7175000100397, 1239.933791977819, 1269.8522499995306, 1332.8708750195801, 1339.6738750161603, 1370.3380840015598, 1430.838499974925, 1439.9789590388536, 1469.619415991474, 1531.3660000101663, 1538.9199169585481, 1569.6899999747984, 1631.8986659753136, 1639.9600409786217, 1670.0302499812096, 1732.8165840008296, 1739.4487090059556, 1770.040458010044, 1830.7587080053054, 1839.7049169871025, 1870.1480000163428, 1931.5903329988942, 1939.2652499955148, 1970.9985830122605, 2031.8161670002155, 2038.5732920258306, 2071.1795419920236, 2131.9097920204513, 2139.734208001755, 2169.8138340143487, 2232.7430410077795, 2238.7706249719486, 2269.540250010323, 2330.260500020813, 2339.9529170128517, 2371.424290991854, 2430.893625016324, 2438.0488749593496, 2469.0436249948107, 2531.3126249820925, 2539.099332992919, 2569.7709579835646, 2631.048333016224, 2639.473250019364, 2669.6615829714574, 2730.802041012794, 2739.449583052192, 2770.3413339913823, 2830.8503750013188, 2838.9876669971272, 2870.1325000147335, 2930.2297080284916, 2939.758874999825, 2970.087166002486, 3032.330791989807, 3039.64408300817, 3069.535666028969, 3131.768374994863, 3140.2731670532376, 3170.615667011589, 3232.2637080214918, 3238.4166659903713, 3269.410874985624, 3332.262041978538, 3339.3877079943195, 3368.84916695999, 3430.7034999947064, 3439.3887919723056, 3468.9126249868423, 3532.510709017515, 3539.43108295789, 3569.068040989805, 3632.623917015735, 3638.7511249631643, 3671.2672500289045, 3740.291874972172], "latency_median_ms": 1970.9985830122605, "latency_max_ms": 3740.291874972172, "mid_scan_median_ms": 1970.9985830122605, "mid_scan_max_ms": 3740.291874972172, "requests_sent": [35, 35, 35], "requests_answered": 105, "mid_scan_answers": 105, "after_settle_answers": 0, "unanswered_requests": 0, "mismatched_answers": 0, "unsettled_answers": 0, "settled_ms": [5449.216000037268, 4283.975166967139, 4251.313499931712], "tick_jitter_ms": 2.73800001014024, "publication": [{"publish_absorb": 1943.89, "publish_candidates": 555.04, "publish_includes": 52.54, "publish_overlay": 5.24, "publish_total": 2556.71, "publishes": 35, "published": 1807, "first_publish": 172.45, "scan_total": 5435.57}, {"publish_absorb": 2423.5, "publish_candidates": 717.32, "publish_includes": 53.01, "publish_overlay": 5.25, "publish_total": 3199.08, "publishes": 34, "published": 1807, "first_publish": 267.32, "scan_total": 4276.19}, {"publish_absorb": 2406.18, "publish_candidates": 693.44, "publish_includes": 52.27, "publish_overlay": 5.15, "publish_total": 3157.04, "publishes": 34, "published": 1807, "first_publish": 275.31, "scan_total": 4243.78}], "ts": "2026-09-09T01:16:27", "label": "0.51.0-reference", "schema": 2, "units": "ms"}
|
||||
{"phase": "scanload", "row": "definition every 100 ms, warm cache, 1 extra buffer(s)", "fresh_process": true, "status": "ok", "message": null, "result_count": 105, "requests_offered": 35, "rate_ms": 100, "open_buffers": 2, "note": "ms is every request's own wait, sorted, across all tries; the arrival rate is wall-clock and independent of the responses (`tick_jitter_ms` is the largest slip); `publication` is each try's first traced scan \u2014 the four publish_* stages, the publish count and the files published; `mismatched_answers` is the coherence contract of docs/features/index-scope/README.md, `unsettled_answers` the review \u00a72 gate (every answer, empty ones included, equal to the settled one)", "ms": [0.2507920144125819, 0.254875048995018, 0.2752500004135072, 0.36295794416218996, 0.3658750210888684, 0.36633398849517107, 0.37595804315060377, 0.3797499812208116, 0.38595800288021564, 0.38662500446662307, 0.3871670342050493, 0.39129104698076844, 0.39199995808303356, 0.4087500274181366, 0.4116250202059746, 0.4124999977648258, 0.42108300840482116, 0.42679201578721404, 0.4311670199967921, 0.43145898962393403, 0.4496669862419367, 0.458541966509074, 0.4627919988706708, 0.4814580315724015, 0.48895797226577997, 0.49579201731830835, 0.5095829837955534, 0.5250420072115958, 0.6151669658720493, 0.6951250252313912, 0.7722079753875732, 1.1667080107145011, 1.2279170332476497, 1.2295409687794745, 1.2410409981384873, 1.2829999905079603, 1.2955829733982682, 1.3219169923104346, 1.4695830177515745, 1.5291669988073409, 1.767750014550984, 2.201541035901755, 2.298375009559095, 2.323874970898032, 2.4139999877661467, 2.4449999909847975, 2.7526660123839974, 2.9757089796476066, 2.9851250001229346, 3.46829101908952, 16.16749999811873, 56.933583051431924, 57.05958401085809, 63.06950002908707, 65.63550001010299, 85.42033302364871, 85.74033301556483, 86.31454198621213, 91.15687501616776, 92.75670803617686, 102.7654999634251, 104.0377079625614, 114.4633749499917, 156.94762498605996, 157.04829100286588, 162.06729202531278, 167.66520804958418, 184.46358299115673, 186.2744580139406, 187.62683303793892, 190.6358340056613, 192.6114580128342, 203.79220903851092, 203.98637501057237, 216.29620797466487, 257.43712502298877, 257.4719170224853, 265.0065829511732, 285.87370802415535, 286.47783404449, 291.2995829829015, 293.3724169852212, 304.28579199360684, 315.87270798627287, 386.30954100517556, 403.1678750179708, 415.92470899922773, 486.33124999469146, 504.24404203658924, 514.9935000226833, 586.5473749581724, 601.8317090347409, 615.8681670203805, 685.2300420287065, 704.1380000300705, 716.2059170077555, 785.5232919682749, 886.2317090388387, 985.2439580135979, 1084.3474169960245, 1184.8837499856018, 1285.2690410218202, 1386.270124989096, 1486.5427910117432, 1586.5333330002613], "latency_median_ms": 57.05958401085809, "latency_max_ms": 1586.5333330002613, "mid_scan_median_ms": 57.05958401085809, "mid_scan_max_ms": 1586.5333330002613, "requests_sent": [35, 35, 35], "requests_answered": 105, "mid_scan_answers": 105, "after_settle_answers": 0, "unanswered_requests": 0, "mismatched_answers": 0, "unsettled_answers": 0, "settled_ms": [4032.0170000195503, 3407.352709036786, 3408.2122499821708], "tick_jitter_ms": 5.591708060819656, "publication": [{"publish_absorb": 764.26, "publish_candidates": 275.96, "publish_includes": 19.26, "publish_overlay": 1.3, "publish_total": 1060.78, "publishes": 7, "published": 3676, "first_publish": 660.76, "scan_total": 4018.68}, {"publish_absorb": 470.51, "publish_candidates": 183.67, "publish_includes": 13.52, "publish_overlay": 0.65, "publish_total": 668.35, "publishes": 4, "published": 3441, "first_publish": 493.11, "scan_total": 1781.58}, {"publish_absorb": 474.3, "publish_candidates": 192.46, "publish_includes": 12.97, "publish_overlay": 0.66, "publish_total": 680.39, "publishes": 4, "published": 3482, "first_publish": 492.07, "scan_total": 1785.99}], "ts": "2026-09-09T01:16:43", "label": "0.52.0-review", "schema": 2, "units": "ms"}
|
||||
{"phase": "scanload", "row": "cross-folder definition every 100 ms, cold cache, 0 extra buffer(s)", "fresh_process": true, "status": "ok", "message": null, "result_count": 270, "requests_offered": 90, "rate_ms": 100, "open_buffers": 1, "note": "ms is every request's own wait, sorted, across all tries; the arrival rate is wall-clock and independent of the responses (`tick_jitter_ms` is the largest slip); `publication` is each try's first traced scan \u2014 the four publish_* stages, the publish count and the files published; `mismatched_answers` is the coherence contract of docs/features/index-scope/README.md, `unsettled_answers` the review \u00a72 gate (every answer, empty ones included, equal to the settled one)", "ms": [0.20474998746067286, 0.22149999858811498, 0.22633298067376018, 0.22674998035654426, 0.25866698706522584, 0.335542019456625, 0.33662497298792005, 0.342374958563596, 0.3535420401021838, 0.3541670157574117, 0.35570800537243485, 0.3559160395525396, 0.35924999974668026, 0.3604159574024379, 0.3625419922173023, 0.36291603464633226, 0.363041996024549, 0.36533299135044217, 0.3654159954749048, 0.36862498382106423, 0.3690419835038483, 0.36987499333918095, 0.3708339645527303, 0.37237495416775346, 0.3729589516296983, 0.37399999564513564, 0.3751249751076102, 0.3754580393433571, 0.37633400643244386, 0.3767090383917093, 0.3768749884329736, 0.3773330245167017, 0.37820899160578847, 0.37854205584153533, 0.37920899922028184, 0.3792499774135649, 0.37929200334474444, 0.37933303974568844, 0.3802499850280583, 0.38045895053073764, 0.3809579648077488, 0.38179202238097787, 0.3837919794023037, 0.38491602754220366, 0.38595800288021564, 0.38762501208111644, 0.3892919630743563, 0.39054203080013394, 0.39091601502150297, 0.39245799416676164, 0.39425003342330456, 0.3957499866373837, 0.39666699012741446, 0.3969999961555004, 0.39712502621114254, 0.3975420258939266, 0.39787503192201257, 0.3987079835496843, 0.40020799497142434, 0.400707998778671, 0.4023329820483923, 0.40495803114026785, 0.4065419780090451, 0.40675001218914986, 0.40691602043807507, 0.4069579881615937, 0.4075420438311994, 0.40791602805256844, 0.4095829790458083, 0.41024998063221574, 0.4107080167159438, 0.413707981351763, 0.4164170240983367, 0.41691696969792247, 0.4177080118097365, 0.419542018789798, 0.4201669944450259, 0.42033300269395113, 0.42212504195049405, 0.4242919967509806, 0.4248339682817459, 0.4274160019122064, 0.4309579962864518, 0.43233297765254974, 0.43258402729406953, 0.44362503103911877, 0.44470897410064936, 0.4504999960772693, 0.462208001408726, 0.4670420312322676, 0.46729197492823005, 0.4699170240201056, 0.4777089925482869, 0.48991700168699026, 0.4908330156467855, 0.49841601867228746, 0.5057909875176847, 0.5127500044181943, 0.5805420223623514, 0.5873749614693224, 0.5931250052526593, 0.6327499868348241, 0.6843330338597298, 0.7296249968931079, 0.759792048484087, 0.7769999792799354, 0.8421249804086983, 0.8471250184811652, 0.8660839521326125, 0.8999169804155827, 0.9412500075995922, 0.9451250080019236, 0.9730419842526317, 1.0114579927176237, 1.0394169948995113, 1.074250030796975, 1.1261670151725411, 1.1672499822452664, 1.1826250120066106, 1.1919999960809946, 1.1953340144827962, 1.1954579968005419, 1.2069999938830733, 1.2120829778723419, 1.2217919575050473, 1.2232079752720892, 1.2319170054979622, 1.2464590254239738, 1.2742499820888042, 1.2877089902758598, 1.2995409779250622, 1.3074579765088856, 1.3085830141790211, 1.3187919976189733, 1.3228750322014093, 1.3254169607535005, 1.3257079990580678, 1.3427499798126519, 1.348958001472056, 1.3496670289896429, 1.3552919845096767, 1.373290957417339, 1.3737920089624822, 1.3811249518767, 1.3877080054953694, 1.4210829976946115, 1.4228749787434936, 1.4255410060286522, 1.4413330354727805, 1.4820420183241367, 1.484000007621944, 1.4983330038376153, 1.4985839952714741, 1.5417920076288283, 1.5435419627465308, 1.55533297220245, 1.5656249597668648, 1.5688749845139682, 1.5930410008877516, 1.6286669997498393, 1.6395000275224447, 1.6602500109001994, 1.6760409926064312, 1.6874169814400375, 1.7006249981932342, 1.7213340033777058, 1.7252079560421407, 1.7261250177398324, 1.7387500265613198, 1.742499996908009, 1.743166008964181, 1.7470000311732292, 1.7499999958090484, 1.7636249540373683, 1.8167499802075326, 1.8392089987173676, 1.8726250273175538, 1.9636250217445195, 1.9641669932752848, 1.9680000259540975, 2.0008329884149134, 2.0903749973513186, 2.1107920329086483, 2.1733749890699983, 2.1801249822601676, 2.326708985492587, 2.3330420372076333, 2.4499999708496034, 2.465625002514571, 2.5036250008270144, 2.567416988313198, 2.6513339835219085, 2.6877920026890934, 2.7570000384002924, 2.9014170286245644, 3.0343750258907676, 3.4132080036215484, 3.4826669725589454, 3.908999962732196, 4.281750007066876, 4.511666018515825, 4.662249993998557, 5.844958999659866, 6.637290993239731, 8.537958026863635, 8.620499982498586, 9.497040999121964, 13.173083018045872, 13.2913330453448, 14.414749981369823, 17.024791974108666, 17.170417006127536, 22.697874985Line truncated
|
||||
{"phase": "scanload", "row": "cross-folder definition every 100 ms, cold cache, 10 extra buffer(s)", "fresh_process": true, "status": "ok", "message": null, "result_count": 270, "requests_offered": 90, "rate_ms": 100, "open_buffers": 11, "note": "ms is every request's own wait, sorted, across all tries; the arrival rate is wall-clock and independent of the responses (`tick_jitter_ms` is the largest slip); `publication` is each try's first traced scan \u2014 the four publish_* stages, the publish count and the files published; `mismatched_answers` is the coherence contract of docs/features/index-scope/README.md, `unsettled_answers` the review \u00a72 gate (every answer, empty ones included, equal to the settled one)", "ms": [0.30983303440734744, 0.3370419726707041, 0.35729201044887304, 0.36687497049570084, 0.37174997851252556, 0.37699996028095484, 0.3802920109592378, 0.38333400152623653, 0.38454204332083464, 0.38716697599738836, 0.3905409830622375, 0.39079098496586084, 0.39125001057982445, 0.39250002009794116, 0.3927499637939036, 0.3927919897250831, 0.3927919897250831, 0.3944169729948044, 0.39504095911979675, 0.39529200876131654, 0.3957919543609023, 0.3969580284319818, 0.39720896165817976, 0.3973339917138219, 0.39770902367308736, 0.39775000186637044, 0.39787503192201257, 0.39916601963341236, 0.4005000228062272, 0.40133402217179537, 0.40241697570309043, 0.4077079938724637, 0.4082500236108899, 0.40924997301772237, 0.4146249848417938, 0.41516695637255907, 0.41799998143687844, 0.4189580213278532, 0.4190829931758344, 0.4197079688310623, 0.42033399222418666, 0.4225000157020986, 0.42279198532924056, 0.42395800119265914, 0.425292004365474, 0.4265420138835907, 0.4267080221325159, 0.42799999937415123, 0.4300840082578361, 0.4306669579818845, 0.43291598558425903, 0.43337501119822264, 0.43641700176522136, 0.4408329841680825, 0.4409999819472432, 0.44237502152100205, 0.4467919934540987, 0.44741597957909107, 0.44875004095956683, 0.45324995880946517, 0.45416696229949594, 0.45774999307468534, 0.45904202852398157, 0.4615000216290355, 0.4622919950634241, 0.4653329961001873, 0.46720902901142836, 0.47083396930247545, 0.4742500022985041, 0.4751670057885349, 0.475957989692688, 0.48041599802672863, 0.4877499886788428, 0.48779096687212586, 0.4997500218451023, 0.5112919607199728, 0.5207500071264803, 0.5226670182310045, 0.5446249851956964, 0.553040998056531, 0.5556250107474625, 0.5634579574689269, 0.584208988584578, 0.5941659910604358, 0.5979160196147859, 0.6147499661892653, 0.6167909596115351, 0.6177910254336894, 0.6242080125957727, 0.6294170161709189, 0.6585000082850456, 0.6617920007556677, 0.685208011418581, 0.7040839991532266, 0.7118330104276538, 0.7658330141566694, 0.7750410004518926, 0.7893750444054604, 0.7909999694675207, 0.8316250168718398, 0.8324579684995115, 0.8532500360161066, 0.9313340415246785, 0.9760410175658762, 1.0762079618871212, 1.2182919890619814, 1.221290964167565, 1.2397499522194266, 1.2471670052036643, 1.2690420262515545, 1.3246249873191118, 1.340750022791326, 1.3515420141629875, 1.38766597956419, 1.4245000202208757, 1.4327910030260682, 1.4412080054171383, 1.4444999978877604, 1.46266701631248, 1.4721660409122705, 1.4892079634591937, 1.4954999787732959, 1.5902910381555557, 1.5985410427674651, 1.607084006536752, 1.6452079871669412, 1.64695899002254, 1.6876250156201422, 1.7329580150544643, 1.7848749994300306, 1.8157500308007002, 1.8334159976802766, 1.8654169980436563, 1.9495830056257546, 2.0004999823868275, 2.024749992415309, 2.0325829973444343, 2.0814170129597187, 2.120583027135581, 2.181417017709464, 2.2225420107133687, 2.2851249668747187, 2.3669590009376407, 2.3923339904285967, 2.500667003914714, 2.5042080087587237, 2.507208031602204, 2.5184580008499324, 2.523000002838671, 2.6686249766498804, 2.711333043407649, 2.772292005829513, 2.85274995258078, 2.8778749983757734, 2.9494999907910824, 2.9971670010127127, 3.046875004656613, 3.2251669908873737, 3.2452080049552023, 3.304417012259364, 3.400582994800061, 3.6621250328607857, 3.8219999987632036, 4.026332986541092, 4.794790991581976, 5.849041976034641, 6.338791979942471, 7.691999955568463, 14.305416960269213, 16.713917022570968, 18.137291015591472, 19.85200005583465, 20.210040966048837, 26.58591599902138, 30.635958013590425, 34.43729202263057, 37.48991701286286, 39.7868329891935, 46.27154103945941, 56.808458000887185, 61.78120902040973, 62.26433295523748, 63.64629196468741, 88.9579170034267, 89.34254199266434, 95.10308300377801, 105.09333299705759, 107.09433298325166, 117.04608297441155, 117.6811249461025, 133.5414579953067, 141.11837500240654, 145.95749997533858, 156.75395802827552, 162.67208300996572, 163.51245797704905, 163.76908303936943, 188.09583398979157, 189.94449998717755, 193.4614999918267, 204.7862090403214, 207.31595798861235, 213.70245900470763, 214.99179198872298, 234.83412497444078, 239.55479101277888, 248.0264589539729, 257.06808298127726, 261.8468749569729, 262.2977909632027, 262.5469579943456, 286.16537497146055, 288.01099996780977, 288.8112089713104,Line truncated
|
||||
{"phase": "scanload", "row": "cross-folder definition every 100 ms, warm cache, 0 extra buffer(s)", "fresh_process": true, "status": "ok", "message": null, "result_count": 105, "requests_offered": 35, "rate_ms": 100, "open_buffers": 1, "note": "ms is every request's own wait, sorted, across all tries; the arrival rate is wall-clock and independent of the responses (`tick_jitter_ms` is the largest slip); `publication` is each try's first traced scan \u2014 the four publish_* stages, the publish count and the files published; `mismatched_answers` is the coherence contract of docs/features/index-scope/README.md, `unsettled_answers` the review \u00a72 gate (every answer, empty ones included, equal to the settled one)", "ms": [0.1567089930176735, 0.17258297884836793, 0.1823750208131969, 0.25870901299640536, 0.2644580090418458, 0.36449998151510954, 0.36574999103322625, 0.3720829845406115, 0.3748340532183647, 0.37875003181397915, 0.38124999264255166, 0.3813749644905329, 0.38241699803620577, 0.383291975595057, 0.3884999896399677, 0.39187498623505235, 0.40145800448954105, 0.4021669737994671, 0.40433299727737904, 0.4044999950565398, 0.41087501449510455, 0.41108299046754837, 0.4130000015720725, 0.413333997130394, 0.4136249772273004, 0.4182499833405018, 0.4194590146653354, 0.4242080030962825, 0.4327499773353338, 0.43404201278463006, 0.43474999256432056, 0.4431669949553907, 0.4461670177988708, 0.4463749937713146, 0.4469580017030239, 0.44883304508402944, 0.45658304588869214, 0.4680419806391001, 0.47883298248052597, 0.5232089897617698, 0.5246659857220948, 0.5428750300779939, 0.5557909607887268, 0.5991249927319586, 0.7135000196285546, 0.7223749998956919, 0.7272089715115726, 0.8579160203225911, 1.209291978739202, 1.3354999828152359, 1.4036669745109975, 1.4447080320678651, 1.4527919702231884, 1.5151670086197555, 1.607124984730035, 1.6437500016763806, 1.8583749770186841, 2.0522080012597144, 2.193042018916458, 2.610374998766929, 2.73574999300763, 2.846500021405518, 5.394583975430578, 6.07674999628216, 17.992291948758066, 22.500499966554344, 42.14462504023686, 53.77991701243445, 58.73687501298264, 62.88029096322134, 64.46104100905359, 68.37300001643598, 69.29458299418911, 71.31700002355501, 73.76408303389326, 77.44875003118068, 91.45237499615178, 106.47966695250943, 117.42566601606086, 122.7285839850083, 143.3283329824917, 154.95533298235387, 159.0279579977505, 162.34554204856977, 163.19733299314976, 169.55983301158994, 169.74654200021178, 171.22979200212285, 173.7276670173742, 179.29766600718722, 192.81229202169925, 207.69812498474494, 243.17854194669053, 253.59558296622708, 263.5240840027109, 268.47504096804187, 272.7592080482282, 273.0323339928873, 278.23041699593887, 292.0156249892898, 305.3441250231117, 343.2315409881994, 355.6066660094075, 375.48070901539177, 379.6020420268178], "latency_median_ms": 1.4527919702231884, "latency_max_ms": 379.6020420268178, "mid_scan_median_ms": 1.4527919702231884, "mid_scan_max_ms": 379.6020420268178, "requests_sent": [35, 35, 35], "requests_answered": 105, "mid_scan_answers": 105, "after_settle_answers": 0, "unanswered_requests": 0, "mismatched_answers": 0, "unsettled_answers": 0, "settled_ms": [3407.0167089812458, 3410.8658749610186, 3406.7385410307907], "tick_jitter_ms": 5.397125030867755, "publication": [{"publish_absorb": 401.18, "publish_candidates": 173.44, "publish_includes": 13.0, "publish_overlay": 0.36, "publish_total": 587.98, "publishes": 5, "published": 3436, "first_publish": 120.52, "scan_total": 1701.39}, {"publish_absorb": 331.32, "publish_candidates": 139.03, "publish_includes": 11.15, "publish_overlay": 0.34, "publish_total": 481.84, "publishes": 4, "published": 3081, "first_publish": 118.75, "scan_total": 1536.76}, {"publish_absorb": 400.81, "publish_candidates": 171.16, "publish_includes": 13.23, "publish_overlay": 0.36, "publish_total": 585.56, "publishes": 5, "published": 3456, "first_publish": 118.22, "scan_total": 1687.39}], "ts": "2026-09-09T01:18:02", "label": "0.52.0-review", "schema": 2, "units": "ms"}
|
||||
{"phase": "scanload", "row": "cross-folder definition every 100 ms, warm cache, 10 extra buffer(s)", "fresh_process": true, "status": "ok", "message": null, "result_count": 105, "requests_offered": 35, "rate_ms": 100, "open_buffers": 11, "note": "ms is every request's own wait, sorted, across all tries; the arrival rate is wall-clock and independent of the responses (`tick_jitter_ms` is the largest slip); `publication` is each try's first traced scan \u2014 the four publish_* stages, the publish count and the files published; `mismatched_answers` is the coherence contract of docs/features/index-scope/README.md, `unsettled_answers` the review \u00a72 gate (every answer, empty ones included, equal to the settled one)", "ms": [0.2995419781655073, 0.36920898128300905, 0.3736250218935311, 0.37712499033659697, 0.3893329994753003, 0.3900409792549908, 0.3937500296160579, 0.41191698983311653, 0.41683303425088525, 0.4172499757260084, 0.41916698683053255, 0.42216700967401266, 0.42983301682397723, 0.44733297545462847, 0.4491670406423509, 0.4497499903663993, 0.4505419638007879, 0.4556670319288969, 0.46545802615582943, 0.47637498937547207, 0.4775419947691262, 0.517958018463105, 0.5207500071264803, 0.5358750349842012, 0.5608749925158918, 0.5793749587610364, 0.5881660035811365, 0.589708040934056, 0.6294999620877206, 0.6559999892488122, 0.6595830200240016, 0.7256660028360784, 0.8640410378575325, 0.9828750044107437, 1.304500037804246, 1.3474579900503159, 1.413875026628375, 1.4257910079322755, 1.4327919925563037, 1.4707499649375677, 1.5054999967105687, 1.5845000161789358, 1.5974999987520278, 1.8340839887969196, 1.9388750079087913, 1.9652079790830612, 1.9924999796785414, 2.091667032800615, 2.192125015426427, 2.3298750165849924, 2.576208033133298, 3.8130839820951223, 9.627292049117386, 10.309334029443562, 11.340291996020824, 35.95295798731968, 43.56899997219443, 67.1394580276683, 70.5937499878928, 76.90470904344693, 86.34304197039455, 100.13583302497864, 104.83595903497189, 109.47245801799, 111.3881670171395, 111.64237500634044, 131.83370896149427, 142.8550000418909, 165.45312496600673, 169.5360830053687, 174.75624999497086, 187.0386659866199, 200.70391695480794, 202.87862495752051, 210.3013750165701, 211.4611670258455, 212.0887089986354, 233.8570419815369, 241.73633399186656, 267.42375001776963, 270.5379169783555, 275.0038750236854, 285.7787079992704, 301.1213330319151, 309.6685410127975, 310.35241700010374, 335.9032919979654, 385.5018329923041, 410.56766599649563, 434.6805409877561, 487.36441700020805, 511.1273330403492, 534.6575410221703, 587.2191250091419, 611.5488329669461, 635.8172500040382, 686.5012499620207, 711.7035000119358, 733.7996250134893, 786.4580830209889, 811.6557910107076, 834.1072909533978, 887.8402920090593, 912.226666987408, 935.9836250077933], "latency_median_ms": 9.627292049117386, "latency_max_ms": 935.9836250077933, "mid_scan_median_ms": 93.2394374976866, "mid_scan_max_ms": 935.9836250077933, "requests_sent": [35, 35, 35], "requests_answered": 105, "mid_scan_answers": 88, "after_settle_answers": 17, "unanswered_requests": 0, "mismatched_answers": 0, "unsettled_answers": 0, "settled_ms": [3414.8414590163156, 3411.4109999500215, 1714.3974580103531], "tick_jitter_ms": 4.853875027038157, "publication": [{"publish_absorb": 584.21, "publish_candidates": 218.45, "publish_includes": 15.06, "publish_overlay": 3.37, "publish_total": 821.09, "publishes": 5, "published": 3644, "first_publish": 455.71, "scan_total": 1962.48}, {"publish_absorb": 589.67, "publish_candidates": 227.47, "publish_includes": 14.66, "publish_overlay": 3.31, "publish_total": 835.11, "publishes": 5, "published": 3577, "first_publish": 453.08, "scan_total": 1989.54}, {"publish_absorb": 425.04, "publish_candidates": 178.03, "publish_includes": 12.39, "publish_overlay": 2.43, "publish_total": 617.89, "publishes": 4, "published": 3244, "first_publish": 499.65, "scan_total": 1703.0}], "ts": "2026-09-09T01:18:18", "label": "0.52.0-review", "schema": 2, "units": "ms"}
|
||||
{"phase": "scanload", "row": "cross-folder definition every 100 ms, cold cache, 0 extra buffer(s)", "fresh_process": true, "status": "ok", "message": null, "result_count": 270, "requests_offered": 90, "rate_ms": 100, "open_buffers": 1, "note": "ms is every request's own wait, sorted, across all tries; the arrival rate is wall-clock and independent of the responses (`tick_jitter_ms` is the largest slip); `publication` is each try's first traced scan \u2014 the four publish_* stages, the publish count and the files published; `mismatched_answers` is the coherence contract of docs/features/index-scope/README.md, `unsettled_answers` the review \u00a72 gate (every answer, empty ones included, equal to the settled one)", "ms": [9.902124991640449, 10.340040957089514, 10.616042010951787, 22.2932500182651, 23.17745902109891, 25.093042000662535, 32.31020801467821, 34.17783399345353, 36.73487500054762, 37.10945800412446, 37.140625005122274, 39.037459006067365, 41.09216696815565, 45.823332970030606, 47.85100003937259, 54.68316696351394, 55.404125014320016, 57.97408299986273, 58.836374955717474, 62.380584015045315, 63.21670801844448, 64.11545805167407, 64.65700000990182, 68.94033396383747, 70.02041599480435, 71.02074997965246, 71.06916705379263, 71.84799999231473, 73.54337500873953, 73.76087503507733, 74.9115829821676, 76.5977919800207, 78.02445802371949, 78.11358396429569, 78.71583302039653, 78.77341599669307, 79.56245803507045, 80.36583400098607, 80.4101669928059, 80.86512499721721, 81.91404095850885, 82.29991601547226, 82.66950002871454, 83.45495798857883, 83.7867499794811, 83.92108301632106, 85.03516699420288, 85.23691701702774, 85.43437503976747, 85.49024997046217, 85.72933299001306, 86.40499995090067, 86.91891597118229, 87.58845902048051, 88.1728749955073, 88.21699995314702, 88.39762501884252, 88.51129101822153, 90.50724998814985, 91.40500001376495, 91.48658404592425, 92.35129202716053, 92.88879198720679, 92.89891697699204, 92.94633299577981, 92.97058399533853, 93.1052920059301, 93.22491701459512, 93.30479195341468, 94.42141698673368, 94.95887497905642, 95.17824999056756, 95.35841702017933, 95.46820801915601, 95.47904197825119, 95.94995900988579, 96.0554169723764, 96.22308297548443, 96.26812499482185, 96.40537499217317, 96.61700000287965, 97.11925004376099, 97.12937497533858, 97.32412500306964, 97.41849999409169, 97.48870803741738, 97.63412503525615, 97.68000000622123, 97.70887502236292, 97.8191249887459, 97.87066699936986, 97.93595899827778, 98.22325001005083, 98.47858402645215, 98.54566701687872, 98.85624999878928, 99.1745840292424, 99.51433399692178, 99.68670801026747, 99.70341698499396, 100.00020900042728, 100.02937499666587, 100.02995899412781, 100.04245804157108, 100.25141696678475, 100.47062498051673, 100.56333401007578, 100.58312502223998, 100.65420804312453, 100.82325001712888, 101.37779201613739, 101.7637500190176, 102.01987496111542, 102.06549998838454, 102.17554197879508, 102.56441700039431, 102.6337500079535, 102.95125003904104, 102.97695797635242, 103.00500004086643, 103.29733300022781, 103.68308302713558, 103.757124976255, 103.99470804259181, 104.04420900158584, 104.10029097693041, 104.14316697278991, 104.35429197968915, 104.35658297501504, 104.80116697726771, 104.91241596173495, 104.95158296544105, 105.39924999466166, 106.36249999515712, 106.42679099692032, 106.6551249823533, 106.89729102887213, 106.89845896558836, 107.16545803006738, 107.48775000683963, 107.64308302896097, 108.03720896365121, 108.17570798099041, 108.61404100432992, 108.90716704307124, 109.02274999534711, 109.03570899972692, 109.07679196679965, 109.42029202124104, 109.71345799043775, 109.79629104258493, 109.84841600293294, 110.11154198786244, 110.57020799489692, 110.6995830195956, 111.01520800730214, 111.03195900795981, 111.03754199575633, 111.08987499028444, 111.12729198066518, 111.35487497085705, 111.44095798954368, 111.64083302719519, 112.00345802353695, 112.08024999359623, 112.14445903897285, 112.59324999991804, 112.73483303375542, 112.80195799190551, 113.13004198018461, 113.20254195015877, 113.86216699611396, 113.87333302991465, 113.88779198750854, 114.08149998169392, 114.25145802786574, 114.28316595265642, 114.30666700471193, 114.87383302301168, 115.44000002322719, 115.6363749760203, 116.20345897972584, 116.24716699589044, 116.73141596838832, 116.73908401280642, 117.07812501117587, 117.14137502713129, 118.51104197558016, 119.12933300482109, 119.44983300054446, 119.60916599491611, 120.20429200492799, 120.42283295886591, 120.45120797120035, 120.76920800609514, 120.83033297676593, 121.53358396608382, 122.62758304132149, 123.52154101245105, 125.31479197787121, 126.85050000436604, 127.04187497729436, 127.08387500606477, 127.41695798467845, 127.52749997889623, 127.88216699846089, 128.0113750253804, 128.78487503621727, 129.35466703493148, 129.83937497483566, 129.93595900479704, 130.18787500914186, 130.81549998605624, 131.55774999177083, 131.71712501207367, 131.85233296826482, 136.42591598909348, 136.98545895749703, 137.199042015708Line truncated
|
||||
{"phase": "scanload", "row": "cross-folder definition every 100 ms, cold cache, 10 extra buffer(s)", "fresh_process": true, "status": "ok", "message": null, "result_count": 270, "requests_offered": 90, "rate_ms": 100, "open_buffers": 11, "note": "ms is every request's own wait, sorted, across all tries; the arrival rate is wall-clock and independent of the responses (`tick_jitter_ms` is the largest slip); `publication` is each try's first traced scan \u2014 the four publish_* stages, the publish count and the files published; `mismatched_answers` is the coherence contract of docs/features/index-scope/README.md, `unsettled_answers` the review \u00a72 gate (every answer, empty ones included, equal to the settled one)", "ms": [335.74629097711295, 351.9685410428792, 361.7872910108417, 436.1903340322897, 450.64200001070276, 462.3638750053942, 537.0929580531083, 551.2578340130858, 561.5836659562774, 637.1752499835566, 652.9722500126809, 661.7090840009041, 736.8382080458105, 750.9314999915659, 762.0219580130652, 836.098832951393, 850.7772920420393, 861.2403749721125, 936.1467079725116, 950.924834003672, 961.6388329886831, 1036.666292056907, 1050.789333996363, 1061.6964590153657, 1134.976709028706, 1151.3806660077535, 1161.6623749723658, 1235.4647500324063, 1251.331165956799, 1262.5051669892855, 1336.8653330253437, 1352.5381250074133, 1361.712499987334, 1434.553833969403, 1453.097500023432, 1462.4552500317805, 1535.2574580465443, 1551.0733330156654, 1560.5822910438292, 1636.1803750041872, 1650.3649160149507, 1660.5697919731028, 1736.7307919776067, 1752.9838330228813, 1761.341916047968, 1836.5692910156213, 1851.1388340266421, 1860.4713749955408, 1936.8341660010628, 1951.8172919633798, 1962.0588749530725, 2036.9501669774763, 2052.606332988944, 2062.866166990716, 2136.9384579593316, 2151.1245000292547, 2160.258124989923, 2236.4027090370655, 2251.535875024274, 2260.2882910287008, 2334.7892920137383, 2351.7933749826625, 2361.9327500346117, 2436.7287079803646, 2452.03612500336, 2460.1993749965914, 2534.561541979201, 2552.803083031904, 2561.2569169607013, 2634.696041001007, 2651.343417004682, 2660.55241698632, 2736.4757080213167, 2751.4027080032974, 2760.564249998424, 2836.0392909962684, 2851.03129199706, 2860.690000001341, 2935.699583031237, 2950.104999996256, 2960.808083007578, 3035.130958945956, 3052.327666024212, 3060.855708026793, 3135.3868329897523, 3150.8257089881226, 3160.465083026793, 3235.545625037048, 3252.2037499584258, 3260.0273749558255, 3335.622207960114, 3350.1388329896145, 3362.3819159693085, 3435.717415995896, 3450.4259579698555, 3462.3161670169793, 3534.327791945543, 3551.6020829672925, 3561.8043749709614, 3635.847500001546, 3651.9291659933515, 3660.8253750018775, 3735.834957973566, 3751.119041990023, 3760.7715419726446, 3835.8214999898337, 3852.3707089480013, 3861.0295420512557, 3935.972916020546, 3952.2335839574225, 3961.5827500238083, 4036.1124590272084, 4050.8453749935143, 4062.064333993476, 4136.53008302208, 4151.65745903505, 4161.061082966626, 4234.56112499116, 4249.953665945213, 4261.988916958217, 4334.784250007942, 4350.1046250457875, 4361.916207999457, 4434.790125000291, 4451.016917009838, 4459.975999954622, 4535.127500013914, 4551.052875001915, 4561.625790956896, 4636.227999988478, 4651.573707989883, 4661.608667054679, 4734.10458303988, 4752.478415961377, 4761.7021659971215, 4834.567292011343, 4852.371957967989, 4861.618166032713, 4934.934791002888, 4950.29137498932, 4959.832750027999, 5034.84416694846, 5050.135708996095, 5059.938499995042, 5134.383374999743, 5150.64979204908, 5161.724624980707, 5234.324791003019, 5250.175666995347, 5261.034708004445, 5336.349499993958, 5352.110082982108, 5360.941874969285, 5436.137166980188, 5451.938499987591, 5460.516208957415, 5536.146625003312, 5550.955416983925, 5561.64616701426, 5635.494499991182, 5650.373124983162, 5660.847416962497, 5735.971832997166, 5750.328625028487, 5759.625124977902, 5835.67054203013, 5850.075749971438, 5860.600541986059, 5935.748916992452, 5952.0846249652095, 5961.269500025082, 6035.470750008244, 6051.5090840053745, 6061.692541989032, 6135.092667012941, 6151.113583007827, 6161.9017500197515, 6234.673833008856, 6250.1529170549475, 6261.178332963027, 6334.493833011948, 6350.415916997008, 6359.344583004713, 6434.55033301143, 6450.561375007965, 6460.448333004024, 6534.61316699395, 6550.55587500101, 6561.3799169659615, 6634.737292013597, 6650.008541007992, 6659.567583992612, 6734.620917006396, 6750.328458962031, 6760.721541999374, 6834.66870803386, 6851.530292013194, 6860.454749956261, 6934.099042031448, 6952.039625030011, 6959.739916026592, 7033.839791023638, 7051.724791992456, 7059.883916983381, 7135.669874958694, 7151.214708050247, 7160.776167002041, 7234.227417036891, 7251.2259999639355, 7259.151500009466, 7335.687457991298, 7351.7887920024805, 7360.632415977307, 7434.30637504207, 7450.542458042037, 7460.5222920072265, 7535.302457981743, 7549.733499996364, 7560.988833953161, 7634.430457954295, 7651.1622500256635, 7659.22620799392Line truncated
|
||||
{"phase": "scanload", "row": "cross-folder definition every 100 ms, warm cache, 0 extra buffer(s)", "fresh_process": true, "status": "ok", "message": null, "result_count": 105, "requests_offered": 35, "rate_ms": 100, "open_buffers": 1, "note": "ms is every request's own wait, sorted, across all tries; the arrival rate is wall-clock and independent of the responses (`tick_jitter_ms` is the largest slip); `publication` is each try's first traced scan \u2014 the four publish_* stages, the publish count and the files published; `mismatched_answers` is the coherence contract of docs/features/index-scope/README.md, `unsettled_answers` the review \u00a72 gate (every answer, empty ones included, equal to the settled one)", "ms": [8.513291017152369, 11.442125018220395, 12.872666004113853, 76.23354200040922, 76.31550001678988, 81.47733402438462, 82.56333303870633, 83.7337090051733, 84.72541702212766, 84.82645801268518, 84.92162497714162, 85.51645802799612, 87.48149999883026, 87.49133296078071, 88.42720795655623, 90.84254200570285, 93.97200000239536, 95.2837910153903, 95.64212500117719, 95.79679102171212, 96.48095798911527, 97.31587499845773, 97.7104589692317, 98.02520804805681, 98.66770799271762, 98.9327909774147, 100.29308299999684, 100.76791699975729, 101.10033303499222, 101.34108300553635, 101.37787502026185, 101.54699999839067, 101.93033301038668, 105.4825410246849, 107.4730419786647, 109.47445797501132, 109.68079202575609, 109.70870801247656, 110.58504099491984, 110.72158301249146, 114.05054200440645, 114.19520899653435, 115.08333298843354, 116.50779203046113, 116.99279199820012, 118.19325003307313, 118.2911250507459, 122.54924996523187, 122.89016600698233, 123.42962494585663, 123.96112503483891, 125.28491602279246, 127.27191601879895, 127.64533399604261, 130.29279198963195, 132.18741700984538, 134.1168750077486, 134.126249991823, 136.49312499910593, 138.40866700047627, 139.75083304103464, 142.4806250142865, 144.7386249783449, 145.521208003629, 147.74429198587313, 149.14729201700538, 150.63629194628447, 152.63079199939966, 153.0972920008935, 156.06504201423377, 157.84966695355251, 158.5612500202842, 159.38783303136006, 163.85599999921396, 164.79541698936373, 165.45358300209045, 167.76574996765703, 170.40729196742177, 170.94570898916572, 174.81820797547698, 175.1023749820888, 176.07629200210795, 180.17962499288842, 180.74187502497807, 180.8608749997802, 184.17195801157504, 185.63754198839888, 186.6147500113584, 188.66854201769456, 190.0606660055928, 191.27537502208725, 192.07662501139566, 195.47370803775266, 196.9412500038743, 199.61499999044463, 200.48254198627546, 201.30316604627296, 203.65920796757564, 205.54445800371468, 207.62016699882224, 208.53337500011548, 209.34441598365083, 288.89537503710017, 303.5131670185365, 305.71375001454726], "latency_median_ms": 127.27191601879895, "latency_max_ms": 305.71375001454726, "mid_scan_median_ms": 127.27191601879895, "mid_scan_max_ms": 305.71375001454726, "requests_sent": [35, 35, 35], "requests_answered": 105, "mid_scan_answers": 105, "after_settle_answers": 0, "unanswered_requests": 0, "mismatched_answers": 0, "unsettled_answers": 12, "settled_ms": [4105.060499976389, 4136.745374009479, 4203.156500996556], "tick_jitter_ms": 2.624417014885694, "publication": [{"publish_absorb": 2365.93, "publish_candidates": 616.22, "publish_includes": 51.27, "publish_overlay": 2.46, "publish_total": 3035.8799999999997, "publishes": 33, "published": 1861, "first_publish": 281.79, "scan_total": 4096.56}, {"publish_absorb": 2379.36, "publish_candidates": 636.7, "publish_includes": 50.72, "publish_overlay": 2.45, "publish_total": 3069.23, "publishes": 33, "published": 1860, "first_publish": 263.35, "scan_total": 4126.52}, {"publish_absorb": 2435.46, "publish_candidates": 642.64, "publish_includes": 51.03, "publish_overlay": 2.47, "publish_total": 3131.6, "publishes": 34, "published": 1859, "first_publish": 277.67, "scan_total": 4195.38}], "ts": "2026-09-09T01:19:51", "label": "0.51.0-reference", "schema": 2, "units": "ms"}
|
||||
{"phase": "scanload", "row": "cross-folder definition every 100 ms, warm cache, 10 extra buffer(s)", "fresh_process": true, "status": "ok", "message": null, "result_count": 105, "requests_offered": 35, "rate_ms": 100, "open_buffers": 11, "note": "ms is every request's own wait, sorted, across all tries; the arrival rate is wall-clock and independent of the responses (`tick_jitter_ms` is the largest slip); `publication` is each try's first traced scan \u2014 the four publish_* stages, the publish count and the files published; `mismatched_answers` is the coherence contract of docs/features/index-scope/README.md, `unsettled_answers` the review \u00a72 gate (every answer, empty ones included, equal to the settled one)", "ms": [226.20341699803248, 241.39650003053248, 271.0190420038998, 326.0454999981448, 342.26066700648516, 368.59662499045953, 424.6195000014268, 442.2450000420213, 468.7907920451835, 524.4040419929661, 541.9453749782406, 568.753416009713, 625.2409999724478, 641.9290840276517, 668.817957979627, 725.5809999769554, 741.6812080191448, 769.7975840419531, 825.5425000097603, 841.4298749994487, 868.5702080256306, 925.7162499707192, 941.3640000275336, 968.4813329949975, 1026.1333329835907, 1039.744374982547, 1069.9023330234922, 1125.8545409655198, 1141.3147920393385, 1168.9767920179293, 1225.8606659597717, 1241.5034580044448, 1269.3024579784833, 1326.0361250140704, 1340.0207090307958, 1369.5688750012778, 1426.2369999778457, 1440.6650839955546, 1469.5063750259578, 1524.385875032749, 1541.6793749900535, 1570.564249996096, 1625.3879999858327, 1642.1471670037135, 1669.5357079734094, 1725.0406249659136, 1740.206750051584, 1769.6382910362445, 1825.250750000123, 1840.3770829900168, 1868.4078750084154, 1925.3137079649605, 1940.7753749983385, 1970.4457079642452, 2025.6511659827083, 2040.7403749995865, 2068.381874996703, 2123.9959170343354, 2142.0173750375398, 2170.1701669953763, 2224.2987499921583, 2241.965666995384, 2267.0772920246236, 2323.862958000973, 2341.871041979175, 2369.6067499695346, 2424.045916995965, 2441.2017079885118, 2469.0970000228845, 2524.6080000069924, 2540.580125001725, 2568.7733750091866, 2624.219916004222, 2640.973749978002, 2669.201167009305, 2724.7269169893116, 2740.3815000434406, 2768.9377079950646, 2824.7620839974843, 2839.9895830079913, 2868.495417002123, 2924.243541958276, 2939.602416998241, 2970.3808749909513, 3026.1651659966446, 3041.0785830463283, 3070.2625829726458, 3124.8390420223586, 3139.5699169952422, 3170.6455829553306, 3225.3422920475714, 3240.330583998002, 3269.8907500016503, 3325.589958985802, 3340.089374978561, 3368.367124989163, 3425.539707997814, 3441.8976670131087, 3468.500499962829, 3526.063041004818, 3539.5341250114143, 3568.935749994125, 3626.2147499946877, 3641.9260410475545, 3670.666290970985], "latency_median_ms": 1940.7753749983385, "latency_max_ms": 3670.666290970985, "mid_scan_median_ms": 1940.7753749983385, "mid_scan_max_ms": 3670.666290970985, "requests_sent": [35, 35, 35], "requests_answered": 105, "mid_scan_answers": 105, "after_settle_answers": 0, "unanswered_requests": 0, "mismatched_answers": 0, "unsettled_answers": 105, "settled_ms": [4220.629334042314, 4275.046957947779, 4244.135040964466], "tick_jitter_ms": 3.8492910098284483, "publication": [{"publish_absorb": 2420.6, "publish_candidates": 663.82, "publish_includes": 50.22, "publish_overlay": 19.98, "publish_total": 3154.62, "publishes": 34, "published": 1807, "first_publish": 263.8, "scan_total": 4203.5}, {"publish_absorb": 2422.37, "publish_candidates": 703.05, "publish_includes": 51.54, "publish_overlay": 20.9, "publish_total": 3197.8599999999997, "publishes": 34, "published": 1807, "first_publish": 266.04, "scan_total": 4258.06}, {"publish_absorb": 2410.72, "publish_candidates": 678.44, "publish_includes": 51.64, "publish_overlay": 20.77, "publish_total": 3161.5699999999997, "publishes": 34, "published": 1808, "first_publish": 266.93, "scan_total": 4231.64}], "ts": "2026-09-09T01:20:09", "label": "0.51.0-reference", "schema": 2, "units": "ms"}
|
||||
{"phase": "refactor", "row": "expand-wildcard offer", "titles": ["lucisv: expand .* (32 connections)", "lucisv: extract selection into module\u2026"], "shapes": ["data", "command"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/kmac/fpv/tb/sha3_fpv.sv", "position": {"line": 54, "character": 4}, "ms": [4.856499959714711, 2.038917038589716, 1.6384579939767718, 1.6377920401282609], "status": "ok", "result_count": 2, "ts": "2026-09-09T01:20:13", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "expand-wildcard resolve: lucisv: expand .* (32 connections)", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "8f3a26dd147b2b8031ee2af6e47f52228c91d69fea1ab9a5b885e8b653c56115", "ms": [75.03170799463987, 56.26808403758332, 55.418417032342404, 54.370458994526416], "status": "ok", "result_count": 1, "edits": 1, "files": 1, "created": 0, "ts": "2026-09-09T01:20:13", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "expand-wildcard offer is a command: lucisv: extract selection into module\u2026", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.extractModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-09T01:20:13", "label": "0.51.0-reference", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "organize-imports offer", "titles": ["lucisv: organize imports (removes 1, sorts 1)", "lucisv: extract selection into module\u2026"], "shapes": ["data", "command"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_sbox_canright_masked.sv", "position": {"line": 42, "character": 2}, "ms": [4.029750009067357, 3.460415988229215, 3.4175420296378434, 3.51687497459352], "status": "ok", "result_count": 2, "ts": "2026-09-09T01:20:16", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "organize-imports resolve: lucisv: organize imports (removes 1, sorts 1)", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "0ee027e37d070d54804a9a08169e8b8c5669ed7b81d9915e6637949d208bfa91", "ms": [9.7159169963561, 8.239208022132516, 7.986999989952892, 7.797166996169835], "status": "ok", "result_count": 1, "edits": 1, "files": 1, "created": 0, "ts": "2026-09-09T01:20:16", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "organize-imports offer is a command: lucisv: extract selection into module\u2026", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.extractModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-09T01:20:16", "label": "0.51.0-reference", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "inline-module offer", "titles": ["lucisv: extract selection into module\u2026", "lucisv: inline `tlul_cmd_intg_gen` here"], "shapes": ["command", "command"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_wrap.sv", "position": {"line": 66, "character": 2}, "ms": [0.9933750261552632, 0.612374977208674, 0.6608749972656369, 0.582791049964726], "status": "ok", "result_count": 2, "ts": "2026-09-09T01:20:20", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "inline-module offer is a command: lucisv: extract selection into module\u2026", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.extractModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-09T01:20:20", "label": "0.51.0-reference", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "inline-module offer is a command: lucisv: inline `tlul_cmd_intg_gen` here", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.inlineModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-09T01:20:20", "label": "0.51.0-reference", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "port-actions offer", "titles": ["lucisv: connect 2 missing ports", "lucisv: extract selection into module\u2026"], "shapes": ["data", "command"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_wrap.sv", "position": {"line": 78, "character": 2}, "ms": [2.08212505094707, 1.1158339912071824, 1.870499982032925, 1.207916997373104], "status": "ok", "result_count": 2, "ts": "2026-09-09T01:20:23", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "port-actions resolve: lucisv: connect 2 missing ports", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "4b534a16bca7abd205bd16458820936d4dc0c4cea9c963c5374c29a47b13fffb", "ms": [161.33249999256805, 142.7456249948591, 132.87641695933416, 132.62791599845514], "status": "ok", "result_count": 1, "edits": 2, "files": 1, "created": 0, "ts": "2026-09-09T01:20:23", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "port-actions offer is a command: lucisv: extract selection into module\u2026", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.extractModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-09T01:20:23", "label": "0.51.0-reference", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "ansi-header (no offer expected) offer", "titles": [], "shapes": [], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 8, "character": 0}, "ms": [0.6442079902626574, 0.4128750297240913, 0.43245794950053096, 0.3673749743029475], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:20:27", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "extract-module offer (selection)", "titles": ["lucisv: extract selection into module\u2026"], "shapes": ["command"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 220, "character": 0}, "note": "selection 220:0-222:53", "ms": [2.6587090105749667, 0.5566250183619559, 0.5232089897617698, 0.4752080421894789], "status": "ok", "result_count": 1, "ts": "2026-09-09T01:20:30", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "extract-module offer is a command: lucisv: extract selection into module\u2026", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.extractModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-09T01:20:30", "label": "0.51.0-reference", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "expand-wildcard offer", "titles": ["lucisv: expand .* (32 connections)", "lucisv: extract selection into module\u2026"], "shapes": ["data", "command"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/kmac/fpv/tb/sha3_fpv.sv", "position": {"line": 54, "character": 4}, "ms": [1.682459027506411, 1.080457994248718, 1.0803749901242554, 1.00733304861933], "status": "ok", "result_count": 2, "ts": "2026-09-09T01:20:34", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "expand-wildcard resolve: lucisv: expand .* (32 connections)", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "8f3a26dd147b2b8031ee2af6e47f52228c91d69fea1ab9a5b885e8b653c56115", "ms": [71.55108300503343, 54.28687500534579, 53.77562501234934, 53.80616703769192], "status": "ok", "result_count": 1, "edits": 1, "files": 1, "created": 0, "ts": "2026-09-09T01:20:34", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "expand-wildcard offer is a command: lucisv: extract selection into module\u2026", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.extractModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-09T01:20:34", "label": "0.52.0-review", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "organize-imports offer", "titles": ["lucisv: organize imports (removes 1, sorts 1)", "lucisv: extract selection into module\u2026"], "shapes": ["data", "command"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_sbox_canright_masked.sv", "position": {"line": 42, "character": 2}, "ms": [5.887124978471547, 6.326834030915052, 10.169624991249293, 9.62525000795722], "status": "ok", "result_count": 2, "ts": "2026-09-09T01:20:37", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "organize-imports resolve: lucisv: organize imports (removes 1, sorts 1)", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "0ee027e37d070d54804a9a08169e8b8c5669ed7b81d9915e6637949d208bfa91", "ms": [14.393708028364927, 10.427791974507272, 8.306875010021031, 8.056457969360054], "status": "ok", "result_count": 1, "edits": 1, "files": 1, "created": 0, "ts": "2026-09-09T01:20:37", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "organize-imports offer is a command: lucisv: extract selection into module\u2026", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.extractModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-09T01:20:37", "label": "0.52.0-review", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "inline-module offer", "titles": ["lucisv: extract selection into module\u2026", "lucisv: inline `tlul_cmd_intg_gen` here"], "shapes": ["command", "command"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_wrap.sv", "position": {"line": 66, "character": 2}, "ms": [0.5479159881360829, 0.2696249866858125, 0.3247920540161431, 0.2489580074325204], "status": "ok", "result_count": 2, "ts": "2026-09-09T01:20:41", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "inline-module offer is a command: lucisv: extract selection into module\u2026", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.extractModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-09T01:20:41", "label": "0.52.0-review", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "inline-module offer is a command: lucisv: inline `tlul_cmd_intg_gen` here", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.inlineModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-09T01:20:41", "label": "0.52.0-review", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "port-actions offer", "titles": ["lucisv: connect 2 missing ports", "lucisv: extract selection into module\u2026"], "shapes": ["data", "command"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_wrap.sv", "position": {"line": 78, "character": 2}, "ms": [0.9376669768244028, 0.6111669936217368, 0.5560829886235297, 0.5026250146329403], "status": "ok", "result_count": 2, "ts": "2026-09-09T01:20:44", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "port-actions resolve: lucisv: connect 2 missing ports", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "4b534a16bca7abd205bd16458820936d4dc0c4cea9c963c5374c29a47b13fffb", "ms": [132.0979169686325, 127.92104197433218, 130.39050000952557, 130.16649999190122], "status": "ok", "result_count": 1, "edits": 2, "files": 1, "created": 0, "ts": "2026-09-09T01:20:44", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "port-actions offer is a command: lucisv: extract selection into module\u2026", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.extractModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-09T01:20:44", "label": "0.52.0-review", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "ansi-header (no offer expected) offer", "titles": [], "shapes": [], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 8, "character": 0}, "ms": [0.6773339700885117, 0.2851660246960819, 0.2228749799542129, 0.24008401669561863], "status": "ok", "result_count": 0, "ts": "2026-09-09T01:20:48", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "extract-module offer (selection)", "titles": ["lucisv: extract selection into module\u2026"], "shapes": ["command"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 220, "character": 0}, "note": "selection 220:0-222:53", "ms": [1.9001670298166573, 0.3470000228844583, 0.1950410078279674, 0.15654199523851275], "status": "ok", "result_count": 1, "ts": "2026-09-09T01:20:51", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "extract-module offer is a command: lucisv: extract selection into module\u2026", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.extractModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-09T01:20:51", "label": "0.52.0-review", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "execute", "row": "extract-module offer", "client": {"resolveSupport": true, "applyEdit": true, "createFiles": true}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 220, "character": 0}, "titles": ["lucisv: extract selection into module\u2026"], "shapes": ["command"], "ms": [1.0923329973593354, 0.6979579920880497, 0.4639580147340894, 0.41924999095499516], "status": "ok", "result_count": 1, "ts": "2026-09-09T01:20:55", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "execute", "row": "extract-module: lucisv: extract selection into module\u2026", "ms": [174.1382500040345, 150.16983303939924, 145.6700830021873, 146.66933397529647], "status": "capture", "message": "perf capture: the benchmark client never writes", "result_count": 1, "client": {"resolveSupport": true, "applyEdit": true, "createFiles": true}, "command": "lucisv.extractModule", "arguments": 3, "total_ms": [174.1775830159895, 150.20600002026185, 145.69983299588785, 146.70116698835045], "deliver_ms": [0.01529202563688159, 0.01370901009067893, 0.010917021427303553, 0.012416974641382694], "fingerprint": "090e92e7736e0a5a93557d75befa65a5bea0c2f44494d71dc67e3f8d70d05835", "warnings": ["lucisv: `aes_extracted` was written to a new file, `aes_extracted.sv`. (and 2 more \u2014 see the lucisv log)"], "note": "ms is executeCommand -> applyEdit: the edit computation. applyEdit label 'lucisv: lucisv.extractModule'", "edits": 2, "files": 2, "created": 1, "ts": "2026-09-09T01:20:55", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "execute", "row": "inline-module offer", "client": {"resolveSupport": true, "applyEdit": true, "createFiles": true}, "file": "hw/ip/aes/rtl/aes_wrap.sv", "position": {"line": 66, "character": 2}, "titles": ["lucisv: extract selection into module\u2026", "lucisv: inline `tlul_cmd_intg_gen` here"], "shapes": ["command", "command"], "ms": [1.8940420122817159, 0.7072500302456319, 0.5643750191666186, 0.5397089989855886], "status": "ok", "result_count": 2, "ts": "2026-09-09T01:20:59", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "execute", "row": "inline-module: lucisv: extract selection into module\u2026", "ms": [835.7801670208573, 807.4812090490013, 803.160791983828, 806.56983301742], "status": "refused", "message": "lucisv: the selection drives `h2d_intg`, and something outside it passes the same name to a task or function, which may drive it too; lucisv will not make it an output over that.", "result_count": 0, "client": {"resolveSupport": true, "applyEdit": true, "createFiles": true}, "command": "lucisv.extractModule", "arguments": 3, "total_ms": [835.7801670208573, 807.4812090490013, 803.160791983828, 806.56983301742], "deliver_ms": null, "fingerprint": null, "warnings": [], "note": "no edit was pushed, so ms is the whole executeCommand round trip", "edits": 0, "files": 0, "created": 0, "ts": "2026-09-09T01:21:02", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "execute", "row": "inline-module: lucisv: inline `tlul_cmd_intg_gen` here", "ms": [7.2315839934162796, 6.213875021785498, 6.317083025351167, 5.685417039785534], "status": "refused", "message": "lucisv: `tlul_cmd_intg_gen` uses a `generate` construct, whose block names are reachable through the hierarchy (`u_tlul_cmd_intg_gen.gen.x`) and would become names of `M`'s own; lucisv will not inline it.", "result_count": 0, "client": {"resolveSupport": true, "applyEdit": true, "createFiles": true}, "command": "lucisv.inlineModule", "arguments": 2, "total_ms": [7.2315839934162796, 6.213875021785498, 6.317083025351167, 5.685417039785534], "deliver_ms": null, "fingerprint": null, "warnings": [], "note": "no edit was pushed, so ms is the whole executeCommand round trip", "edits": 0, "files": 0, "created": 0, "ts": "2026-09-09T01:21:02", "label": "0.52.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "execute", "row": "extract-module offer", "client": {"resolveSupport": true, "applyEdit": true, "createFiles": true}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 220, "character": 0}, "titles": ["lucisv: extract selection into module\u2026"], "shapes": ["command"], "ms": [2.516667009331286, 1.024707977194339, 1.3964169775135815, 0.6415829993784428], "status": "ok", "result_count": 1, "ts": "2026-09-09T01:21:06", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "execute", "row": "extract-module: lucisv: extract selection into module\u2026", "ms": [178.08345798403025, 150.63129202462733, 148.5303749796003, 147.98329200129956], "status": "capture", "message": "perf capture: the benchmark client never writes", "result_count": 1, "client": {"resolveSupport": true, "applyEdit": true, "createFiles": true}, "command": "lucisv.extractModule", "arguments": 3, "total_ms": [178.11804095981643, 150.67979198647663, 148.60950002912432, 148.02891702856869], "deliver_ms": [0.011041003745049238, 0.02704199869185686, 0.029875023756176233, 0.02195802517235279], "fingerprint": "090e92e7736e0a5a93557d75befa65a5bea0c2f44494d71dc67e3f8d70d05835", "warnings": ["lucisv: `aes_extracted` was written to a new file, `aes_extracted.sv`. (and 2 more \u2014 see the lucisv log)"], "note": "ms is executeCommand -> applyEdit: the edit computation. applyEdit label 'lucisv: lucisv.extractModule'", "edits": 2, "files": 2, "created": 1, "ts": "2026-09-09T01:21:06", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "execute", "row": "inline-module offer", "client": {"resolveSupport": true, "applyEdit": true, "createFiles": true}, "file": "hw/ip/aes/rtl/aes_wrap.sv", "position": {"line": 66, "character": 2}, "titles": ["lucisv: extract selection into module\u2026", "lucisv: inline `tlul_cmd_intg_gen` here"], "shapes": ["command", "command"], "ms": [5.88275003246963, 1.3801250024698675, 1.6199999954551458, 1.1981670395471156], "status": "ok", "result_count": 2, "ts": "2026-09-09T01:21:10", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "execute", "row": "inline-module: lucisv: extract selection into module\u2026", "ms": [827.52095797332, 790.144250029698, 788.2610830129124, 794.3716250010766], "status": "refused", "message": "lucisv: the selection drives `h2d_intg`, and something outside it passes the same name to a task or function, which may drive it too; lucisv will not make it an output over that.", "result_count": 0, "client": {"resolveSupport": true, "applyEdit": true, "createFiles": true}, "command": "lucisv.extractModule", "arguments": 3, "total_ms": [827.52095797332, 790.144250029698, 788.2610830129124, 794.3716250010766], "deliver_ms": null, "fingerprint": null, "warnings": [], "note": "no edit was pushed, so ms is the whole executeCommand round trip", "edits": 0, "files": 0, "created": 0, "ts": "2026-09-09T01:21:13", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "execute", "row": "inline-module: lucisv: inline `tlul_cmd_intg_gen` here", "ms": [7.030457956716418, 6.090875016525388, 5.8352499618195, 5.980540998280048], "status": "refused", "message": "lucisv: `tlul_cmd_intg_gen` uses a `generate` construct, whose block names are reachable through the hierarchy (`u_tlul_cmd_intg_gen.gen.x`) and would become names of `M`'s own; lucisv will not inline it.", "result_count": 0, "client": {"resolveSupport": true, "applyEdit": true, "createFiles": true}, "command": "lucisv.inlineModule", "arguments": 2, "total_ms": [7.030457956716418, 6.090875016525388, 5.8352499618195, 5.980540998280048], "deliver_ms": null, "fingerprint": null, "warnings": [], "note": "no edit was pushed, so ms is the whole executeCommand round trip", "edits": 0, "files": 0, "created": 0, "ts": "2026-09-09T01:21:13", "label": "0.51.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
@@ -0,0 +1,20 @@
|
||||
import subprocess,os,json,time,hashlib
|
||||
from pathlib import Path
|
||||
root=Path('/Users/guoliangchen/repo/verilogrustformatter'); out=Path('/tmp/lucisv-perf-review-20260909'); corpus=Path('/Users/guoliangchen/repo/opentitan')
|
||||
old=str(out/'reference/target/release/lucisv-server')
|
||||
bins={'0.51.0-reference':old,'0.52.0-review':str(root/'target/release/lucisv-server')}
|
||||
def state():
|
||||
s=subprocess.check_output(['git','-C',str(corpus),'status','--porcelain'],text=True)
|
||||
return s,{p:hashlib.sha256((corpus/p).read_bytes()).hexdigest() for p in ['hw/ip/aes/dv/tb/tb.sv','hw/top_darjeeling/ip/ast/rtl/ast.sv','hw/top_earlgrey/ip/ast/rtl/ast.sv']}
|
||||
initial=state()
|
||||
for i,phase in enumerate(['offerkinds','offerqueue','offeredit','renametrace','scan','rss','scanloadprobe','scanloadcross','refactor','execute']):
|
||||
labels=list(bins) if i%2==0 else list(reversed(bins))
|
||||
for label in labels:
|
||||
cmd=['tools/guard.sh','-m','8','-t','1800','--','python3','tools/perf/bench.py',phase,'--server',bins[label],'--label',label,'--opentitan',str(corpus),'--storage',str(out/'caches'/label),'--out',str(out/'results.jsonl'),'--tries','3']
|
||||
r=dict(phase=phase,label=label,command=cmd,start=time.time(),load_before=os.getloadavg())
|
||||
print('START',phase,label,flush=True)
|
||||
with (out/(phase+'-'+label+'.log')).open('w') as f:p=subprocess.run(cmd,cwd=root,env=dict(os.environ,PYTHONDONTWRITEBYTECODE='1'),stdout=f,stderr=subprocess.STDOUT)
|
||||
r.update(exit=p.returncode,end=time.time(),load_after=os.getloadavg(),corpus_unchanged=state()==initial)
|
||||
with (out/'runs.jsonl').open('a') as f:f.write(json.dumps(r)+'\n')
|
||||
print('END',phase,label,p.returncode,flush=True)
|
||||
if p.returncode or not r['corpus_unchanged']:raise RuntimeError(r)
|
||||
@@ -0,0 +1,20 @@
|
||||
{"phase": "offerkinds", "label": "0.51.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "offerkinds", "--server", "/tmp/lucisv-perf-review-20260909/reference/target/release/lucisv-server", "--label", "0.51.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.51.0-reference", "--out", "/tmp/lucisv-perf-review-20260909/results.jsonl", "--tries", "3"], "start": 1788934163.9507682, "load_before": [5.1650390625, 6.98046875, 6.77099609375], "exit": 0, "end": 1788934183.659245, "load_after": [5.35009765625, 6.900390625, 6.74609375], "corpus_unchanged": true}
|
||||
{"phase": "offerkinds", "label": "0.52.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "offerkinds", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.52.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.52.0-review", "--out", "/tmp/lucisv-perf-review-20260909/results.jsonl", "--tries", "3"], "start": 1788934183.7768419, "load_before": [5.35009765625, 6.900390625, 6.74609375], "exit": 0, "end": 1788934202.40133, "load_after": [4.86328125, 6.6943359375, 6.67578125], "corpus_unchanged": true}
|
||||
{"phase": "offerqueue", "label": "0.52.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "offerqueue", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.52.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.52.0-review", "--out", "/tmp/lucisv-perf-review-20260909/results.jsonl", "--tries", "3"], "start": 1788934202.5280929, "load_before": [4.86328125, 6.6943359375, 6.67578125], "exit": 0, "end": 1788934206.886931, "load_after": [5.4345703125, 6.7822265625, 6.70654296875], "corpus_unchanged": true}
|
||||
{"phase": "offerqueue", "label": "0.51.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "offerqueue", "--server", "/tmp/lucisv-perf-review-20260909/reference/target/release/lucisv-server", "--label", "0.51.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.51.0-reference", "--out", "/tmp/lucisv-perf-review-20260909/results.jsonl", "--tries", "3"], "start": 1788934207.02068, "load_before": [5.4345703125, 6.7822265625, 6.70654296875], "exit": 0, "end": 1788934211.369911, "load_after": [5.9599609375, 6.86865234375, 6.7373046875], "corpus_unchanged": true}
|
||||
{"phase": "offeredit", "label": "0.51.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "offeredit", "--server", "/tmp/lucisv-perf-review-20260909/reference/target/release/lucisv-server", "--label", "0.51.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.51.0-reference", "--out", "/tmp/lucisv-perf-review-20260909/results.jsonl", "--tries", "3"], "start": 1788934211.502112, "load_before": [5.9599609375, 6.86865234375, 6.7373046875], "exit": 0, "end": 1788934222.4556859, "load_after": [5.978515625, 6.84033203125, 6.728515625], "corpus_unchanged": true}
|
||||
{"phase": "offeredit", "label": "0.52.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "offeredit", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.52.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.52.0-review", "--out", "/tmp/lucisv-perf-review-20260909/results.jsonl", "--tries", "3"], "start": 1788934222.5621262, "load_before": [5.978515625, 6.84033203125, 6.728515625], "exit": 0, "end": 1788934233.511609, "load_after": [5.74755859375, 6.7626953125, 6.7021484375], "corpus_unchanged": true}
|
||||
{"phase": "renametrace", "label": "0.52.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "renametrace", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.52.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.52.0-review", "--out", "/tmp/lucisv-perf-review-20260909/results.jsonl", "--tries", "3"], "start": 1788934233.624834, "load_before": [5.74755859375, 6.7626953125, 6.7021484375], "exit": 0, "end": 1788934290.385715, "load_after": [5.0947265625, 6.37841796875, 6.5595703125], "corpus_unchanged": true}
|
||||
{"phase": "renametrace", "label": "0.51.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "renametrace", "--server", "/tmp/lucisv-perf-review-20260909/reference/target/release/lucisv-server", "--label", "0.51.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.51.0-reference", "--out", "/tmp/lucisv-perf-review-20260909/results.jsonl", "--tries", "3"], "start": 1788934290.497727, "load_before": [5.0947265625, 6.37841796875, 6.5595703125], "exit": 0, "end": 1788934366.829311, "load_after": [3.87353515625, 5.6357421875, 6.25439453125], "corpus_unchanged": true}
|
||||
{"phase": "scan", "label": "0.51.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "scan", "--server", "/tmp/lucisv-perf-review-20260909/reference/target/release/lucisv-server", "--label", "0.51.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.51.0-reference", "--out", "/tmp/lucisv-perf-review-20260909/results.jsonl", "--tries", "3"], "start": 1788934366.928801, "load_before": [3.87353515625, 5.6357421875, 6.25439453125], "exit": 0, "end": 1788934439.322835, "load_after": [4.4677734375, 5.47900390625, 6.1455078125], "corpus_unchanged": true}
|
||||
{"phase": "scan", "label": "0.52.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "scan", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.52.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.52.0-review", "--out", "/tmp/lucisv-perf-review-20260909/results.jsonl", "--tries", "3"], "start": 1788934439.4233239, "load_before": [4.4677734375, 5.47900390625, 6.1455078125], "exit": 0, "end": 1788934510.867989, "load_after": [4.39306640625, 5.193359375, 5.97998046875], "corpus_unchanged": true}
|
||||
{"phase": "rss", "label": "0.52.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "rss", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.52.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.52.0-review", "--out", "/tmp/lucisv-perf-review-20260909/results.jsonl", "--tries", "3"], "start": 1788934510.962989, "load_before": [4.39306640625, 5.193359375, 5.97998046875], "exit": 0, "end": 1788934539.531492, "load_after": [4.2470703125, 5.0908203125, 5.91552734375], "corpus_unchanged": true}
|
||||
{"phase": "rss", "label": "0.51.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "rss", "--server", "/tmp/lucisv-perf-review-20260909/reference/target/release/lucisv-server", "--label", "0.51.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.51.0-reference", "--out", "/tmp/lucisv-perf-review-20260909/results.jsonl", "--tries", "3"], "start": 1788934539.6351821, "load_before": [4.2470703125, 5.0908203125, 5.91552734375], "exit": 0, "end": 1788934568.203514, "load_after": [3.87060546875, 4.9208984375, 5.82470703125], "corpus_unchanged": true}
|
||||
{"phase": "scanloadprobe", "label": "0.51.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "scanloadprobe", "--server", "/tmp/lucisv-perf-review-20260909/reference/target/release/lucisv-server", "--label", "0.51.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.51.0-reference", "--out", "/tmp/lucisv-perf-review-20260909/results.jsonl", "--tries", "3"], "start": 1788934568.3059351, "load_before": [3.87060546875, 4.9208984375, 5.82470703125], "exit": 0, "end": 1788934587.887279, "load_after": [4.56494140625, 4.99365234375, 5.82861328125], "corpus_unchanged": true}
|
||||
{"phase": "scanloadprobe", "label": "0.52.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "scanloadprobe", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.52.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.52.0-review", "--out", "/tmp/lucisv-perf-review-20260909/results.jsonl", "--tries", "3"], "start": 1788934588.0167758, "load_before": [4.56494140625, 4.99365234375, 5.82861328125], "exit": 0, "end": 1788934604.39112, "load_after": [5.30078125, 5.13916015625, 5.86572265625], "corpus_unchanged": true}
|
||||
{"phase": "scanloadcross", "label": "0.52.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "scanloadcross", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.52.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.52.0-review", "--out", "/tmp/lucisv-perf-review-20260909/results.jsonl", "--tries", "3"], "start": 1788934604.5086, "load_before": [5.30078125, 5.13916015625, 5.86572265625], "exit": 0, "end": 1788934698.6455839, "load_after": [4.8388671875, 4.93994140625, 5.70556640625], "corpus_unchanged": true}
|
||||
{"phase": "scanloadcross", "label": "0.51.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "scanloadcross", "--server", "/tmp/lucisv-perf-review-20260909/reference/target/release/lucisv-server", "--label", "0.51.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.51.0-reference", "--out", "/tmp/lucisv-perf-review-20260909/results.jsonl", "--tries", "3"], "start": 1788934698.75788, "load_before": [4.8388671875, 4.93994140625, 5.70556640625], "exit": 0, "end": 1788934809.883633, "load_after": [4.57666015625, 4.986328125, 5.63720703125], "corpus_unchanged": true}
|
||||
{"phase": "refactor", "label": "0.51.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "refactor", "--server", "/tmp/lucisv-perf-review-20260909/reference/target/release/lucisv-server", "--label", "0.51.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.51.0-reference", "--out", "/tmp/lucisv-perf-review-20260909/results.jsonl", "--tries", "3"], "start": 1788934809.995477, "load_before": [4.57666015625, 4.986328125, 5.63720703125], "exit": 0, "end": 1788934830.940748, "load_after": [4.8779296875, 5.0205078125, 5.63330078125], "corpus_unchanged": true}
|
||||
{"phase": "refactor", "label": "0.52.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "refactor", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.52.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.52.0-review", "--out", "/tmp/lucisv-perf-review-20260909/results.jsonl", "--tries", "3"], "start": 1788934831.072156, "load_before": [4.8779296875, 5.0205078125, 5.63330078125], "exit": 0, "end": 1788934851.975531, "load_after": [5.02880859375, 5.0234375, 5.6142578125], "corpus_unchanged": true}
|
||||
{"phase": "execute", "label": "0.52.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "execute", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.52.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.52.0-review", "--out", "/tmp/lucisv-perf-review-20260909/results.jsonl", "--tries", "3"], "start": 1788934852.0846488, "load_before": [5.02880859375, 5.0234375, 5.6142578125], "exit": 0, "end": 1788934863.005026, "load_after": [4.99853515625, 5.02099609375, 5.6064453125], "corpus_unchanged": true}
|
||||
{"phase": "execute", "label": "0.51.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "execute", "--server", "/tmp/lucisv-perf-review-20260909/reference/target/release/lucisv-server", "--label", "0.51.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.51.0-reference", "--out", "/tmp/lucisv-perf-review-20260909/results.jsonl", "--tries", "3"], "start": 1788934863.116577, "load_before": [4.99853515625, 5.02099609375, 5.6064453125], "exit": 0, "end": 1788934874.024811, "load_after": [5.1455078125, 5.052734375, 5.6103515625], "corpus_unchanged": true}
|
||||
@@ -0,0 +1,6 @@
|
||||
{"label": "0.51.0", "trial": 0, "answer": {"jsonrpc": "2.0", "id": 2, "result": [{"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv"}]}, "prepare": {"jsonrpc": "2.0", "id": 3, "result": {"placeholder": "child", "range": {"end": {"character": 16, "line": 0}, "start": {"character": 11, "line": 0}}}}, "after_rescan": {"jsonrpc": "2.0", "id": 4, "result": [{"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv"}]}, "prepare_after_rescan": {"jsonrpc": "2.0", "id": 5, "result": {"placeholder": "child", "range": {"end": {"character": 16, "line": 0}, "start": {"character": 11, "line": 0}}}}, "logs": ["timing: textDocument/didOpen handled in 0.25 ms", "timing: configuration answered in 0.35 ms", "timing: scan started: 3 files", "analyzed: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/tb.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/tb.sv", "timing: scan finished: 3 files (0 skipped, 0 from cache) in 1.18 ms", "timing: scan 1 stages (whole, 3 files): discovery=0.21 order=0.00 cache_open=0.03 read=0.06 lookup=0.00 decode=0.00 parse=0.03 encode=0.02 store_write=0.32 publish_absorb=0.00 publish_candidates=0.00 publish_includes=0.00 publish_overlay=0.00 gone=0.00 absorb=0.01 compact=0.32 candidates=0.00 includes=0.00 overlay=0.00 total=1.16 since_start=0.46 ms", "timing: scan 1 counts (whole): read=3 read_kib=0 skipped=0 hits=0 misses=2 buffers=1 records=3 repeats=0 decoded_kib=0 written_kib=0 opens=1 compactions=1 publishes=0 published=0 first_publish=0.00 overlays=1", "timing: scan 1 memory (whole): store_before_kib=0 store_after_kib=0 cache_entries=3 cache_encoded_kib=0 index_files=3 unit_names=2 unit_defs=3 members=0 hier_members=2 reference_keys=1 reference_sites=2 defines=0 instantiations=2 fact_words=7 fact_word_kib=0 candidate_units=2 candidate_macros=0 candidate_words=3 candidate_word_kib=0 include_edges=0 include_known=3 work_kib=0", "timing: textDocument/definition answered in 0.31 ms", "timing: textDocument/prepareRename answered in 0.03 ms", "timing: scan started: 3 files", "analyzed: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/tb.sv", "cached: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv", "cached: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/tb.sv", "timing: scan finished: 3 files (0 skipped, 2 from cache) in 1.72 ms", "timing: scan 2 stages (whole, 3 files): discovery=0.55 order=0.01 cache_open=0.08 read=0.22 lookup=0.00 decode=0.05 parse=0.00 encode=0.01 store_write=0.00 publish_absorb=0.00 publish_candidates=0.00 publish_includes=0.00 publish_overlay=0.00 gone=0.00 absorb=0.03 compact=0.03 candidates=0.02 includes=0.02 overlay=0.00 total=1.28 since_start=508.73 ms", "timing: scan 2 counts (whole): read=3 read_kib=0 skipped=0 hits=2 misses=0 buffers=1 records=0 repeats=1 decoded_kib=0 written_kib=0 opens=1 compactions=0 publishes=0 published=0 first_publish=0.00 overlays=1", "timing: scan 2 memory (whole): store_before_kib=0 store_after_kib=0 cache_entries=3 cache_encoded_kib=0 index_files=3 unit_names=2 unit_defs=3 members=0 hier_members=2 reference_keys=1 reference_sites=2 defines=0 instantiations=2 fact_words=7 fact_word_kib=0 candidate_units=2 candidate_macros=0 candidate_words=3 candidate_word_kib=0 include_edges=0 include_known=3 work_kib=0", "timing: workspace/didChangeWatchedFiles handled in 2.95 ms", "timing: textDocument/definition answered in 0.03 ms", "timing: textDocument/prepareRename answered in 0.01 ms"]}
|
||||
{"label": "0.51.0", "trial": 1, "answer": {"jsonrpc": "2.0", "id": 2, "result": [{"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv"}]}, "prepare": {"jsonrpc": "2.0", "id": 3, "result": {"placeholder": "child", "range": {"end": {"character": 16, "line": 0}, "start": {"character": 11, "line": 0}}}}, "after_rescan": {"jsonrpc": "2.0", "id": 4, "result": [{"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv"}]}, "prepare_after_rescan": {"jsonrpc": "2.0", "id": 5, "result": {"placeholder": "child", "range": {"end": {"character": 16, "line": 0}, "start": {"character": 11, "line": 0}}}}, "logs": ["timing: configuration answered in 0.16 ms", "timing: scan started: 2 files", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/tb.sv", "timing: scan finished: 2 files (0 skipped, 0 from cache) in 2.89 ms", "timing: scan 1 stages (whole, 2 files): discovery=0.34 order=0.00 cache_open=0.02 read=0.14 lookup=0.00 decode=0.00 parse=0.16 encode=0.01 store_write=1.16 publish_absorb=0.00 publish_candidates=0.00 publish_includes=0.00 publish_overlay=0.00 gone=0.00 absorb=0.02 compact=0.76 candidates=0.01 includes=0.00 overlay=0.00 total=2.84 since_start=0.43 ms", "timing: scan 1 counts (whole): read=2 read_kib=0 skipped=0 hits=0 misses=2 buffers=0 records=2 repeats=0 decoded_kib=0 written_kib=0 opens=1 compactions=1 publishes=0 published=0 first_publish=0.00 overlays=0", "timing: scan 1 memory (whole): store_before_kib=0 store_after_kib=0 cache_entries=2 cache_encoded_kib=0 index_files=2 unit_names=2 unit_defs=2 members=0 hier_members=1 reference_keys=1 reference_sites=1 defines=0 instantiations=1 fact_words=4 fact_word_kib=0 candidate_units=2 candidate_macros=0 candidate_words=3 candidate_word_kib=0 include_edges=0 include_known=2 work_kib=0", "timing: textDocument/didOpen handled in 0.37 ms", "timing: textDocument/definition answered in 0.07 ms", "timing: textDocument/prepareRename answered in 0.02 ms", "timing: scan started: 3 files", "analyzed: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/tb.sv", "cached: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv", "cached: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/tb.sv", "timing: scan finished: 3 files (0 skipped, 2 from cache) in 1.80 ms", "timing: scan 2 stages (whole, 3 files): discovery=0.37 order=0.01 cache_open=0.06 read=0.15 lookup=0.00 decode=0.03 parse=0.00 encode=0.01 store_write=0.10 publish_absorb=0.00 publish_candidates=0.00 publish_includes=0.00 publish_overlay=0.00 gone=0.00 absorb=0.03 compact=0.73 candidates=0.01 includes=0.01 overlay=0.01 total=1.75 since_start=508.33 ms", "timing: scan 2 counts (whole): read=3 read_kib=0 skipped=0 hits=2 misses=0 buffers=1 records=1 repeats=0 decoded_kib=0 written_kib=0 opens=1 compactions=1 publishes=0 published=0 first_publish=0.00 overlays=1", "timing: scan 2 memory (whole): store_before_kib=0 store_after_kib=0 cache_entries=3 cache_encoded_kib=0 index_files=3 unit_names=2 unit_defs=3 members=0 hier_members=2 reference_keys=1 reference_sites=2 defines=0 instantiations=2 fact_words=7 fact_word_kib=0 candidate_units=2 candidate_macros=0 candidate_words=3 candidate_word_kib=0 include_edges=0 include_known=3 work_kib=0", "timing: workspace/didChangeWatchedFiles handled in 2.44 ms", "timing: textDocument/definition answered in 0.01 ms", "timing: textDocument/prepareRename answered in 0.01 ms"]}
|
||||
{"label": "0.51.0", "trial": 2, "answer": {"jsonrpc": "2.0", "id": 2, "result": [{"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv"}]}, "prepare": {"jsonrpc": "2.0", "id": 3, "result": {"placeholder": "child", "range": {"end": {"character": 16, "line": 0}, "start": {"character": 11, "line": 0}}}}, "after_rescan": {"jsonrpc": "2.0", "id": 4, "result": [{"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv"}]}, "prepare_after_rescan": {"jsonrpc": "2.0", "id": 5, "result": {"placeholder": "child", "range": {"end": {"character": 16, "line": 0}, "start": {"character": 11, "line": 0}}}}, "logs": ["timing: textDocument/didOpen handled in 0.22 ms", "timing: configuration answered in 0.36 ms", "timing: scan started: 3 files", "analyzed: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/tb.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/tb.sv", "timing: scan finished: 3 files (0 skipped, 0 from cache) in 1.43 ms", "timing: scan 1 stages (whole, 3 files): discovery=0.27 order=0.00 cache_open=0.02 read=0.08 lookup=0.00 decode=0.00 parse=0.04 encode=0.02 store_write=0.35 publish_absorb=0.00 publish_candidates=0.00 publish_includes=0.00 publish_overlay=0.00 gone=0.00 absorb=0.01 compact=0.44 candidates=0.01 includes=0.00 overlay=0.00 total=1.40 since_start=0.49 ms", "timing: scan 1 counts (whole): read=3 read_kib=0 skipped=0 hits=0 misses=2 buffers=1 records=3 repeats=0 decoded_kib=0 written_kib=0 opens=1 compactions=1 publishes=0 published=0 first_publish=0.00 overlays=1", "timing: scan 1 memory (whole): store_before_kib=0 store_after_kib=0 cache_entries=3 cache_encoded_kib=0 index_files=3 unit_names=2 unit_defs=3 members=0 hier_members=2 reference_keys=1 reference_sites=2 defines=0 instantiations=2 fact_words=7 fact_word_kib=0 candidate_units=2 candidate_macros=0 candidate_words=3 candidate_word_kib=0 include_edges=0 include_known=3 work_kib=0", "timing: textDocument/definition answered in 0.19 ms", "timing: textDocument/prepareRename answered in 0.03 ms", "timing: scan started: 3 files", "analyzed: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/tb.sv", "cached: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv", "cached: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/tb.sv", "timing: scan finished: 3 files (0 skipped, 2 from cache) in 2.28 ms", "timing: scan 2 stages (whole, 3 files): discovery=1.54 order=0.01 cache_open=0.14 read=0.09 lookup=0.00 decode=0.03 parse=0.00 encode=0.01 store_write=0.00 publish_absorb=0.00 publish_candidates=0.00 publish_includes=0.00 publish_overlay=0.00 gone=0.01 absorb=0.03 compact=0.02 candidates=0.01 includes=0.01 overlay=0.00 total=2.22 since_start=514.82 ms", "timing: scan 2 counts (whole): read=3 read_kib=0 skipped=0 hits=2 misses=0 buffers=1 records=0 repeats=1 decoded_kib=0 written_kib=0 opens=1 compactions=0 publishes=0 published=0 first_publish=0.00 overlays=1", "timing: scan 2 memory (whole): store_before_kib=0 store_after_kib=0 cache_entries=3 cache_encoded_kib=0 index_files=3 unit_names=2 unit_defs=3 members=0 hier_members=2 reference_keys=1 reference_sites=2 defines=0 instantiations=2 fact_words=7 fact_word_kib=0 candidate_units=2 candidate_macros=0 candidate_words=3 candidate_word_kib=0 include_edges=0 include_known=3 work_kib=0", "timing: workspace/didChangeWatchedFiles handled in 3.29 ms", "timing: textDocument/definition answered in 0.02 ms", "timing: textDocument/prepareRename answered in 0.01 ms"]}
|
||||
{"label": "0.52.0", "trial": 0, "answer": {"jsonrpc": "2.0", "id": 2, "result": [{"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv"}, {"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/child.sv"}]}, "prepare": {"jsonrpc": "2.0", "id": 3, "error": {"code": -32803, "message": "lucisv: `child` is declared in more than one indexed file; lucisv will not guess which declaration this rename means."}}, "after_rescan": {"jsonrpc": "2.0", "id": 4, "result": [{"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv"}]}, "prepare_after_rescan": {"jsonrpc": "2.0", "id": 5, "result": {"placeholder": "child", "range": {"end": {"character": 16, "line": 0}, "start": {"character": 11, "line": 0}}}}, "logs": ["timing: configuration answered in 0.16 ms", "timing: textDocument/didOpen handled in 0.56 ms", "timing: scan started: 2 files (the folder first), interleaved", "analyzed: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/tb.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/child.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/tb.sv", "timing: scan finished: 4 files (0 skipped, 0 from cache) in 3.18 ms", "timing: scan 1 stages (whole, 4 files): discovery=0.67 config=0.13 walk=0.41 filelist=0.00 sort=0.00 cap=0.00 buffers=0.02 order=0.00 cache_open=0.03 read=0.19 lookup=0.00 decode=0.00 parse=0.08 encode=0.02 store_write=1.10 publish_absorb=0.00 publish_candidates=0.00 publish_includes=0.00 publish_overlay=0.00 gone=0.00 absorb=0.02 compact=0.75 candidates=0.01 includes=0.01 overlay=0.01 total=3.13 since_start=1.03 ms", "timing: scan 1 counts (whole): read=4 read_kib=0 walk_dirs=2 stats=0 skipped=0 hits=0 misses=3 buffers=1 records=4 repeats=0 decoded_kib=0 written_kib=0 opens=1 compactions=1 publishes=0 published=0 first_publish=0.00 overlays=1", "timing: scan 1 memory (whole): store_before_kib=1 store_after_kib=1 cache_entries=4 cache_encoded_kib=0 index_files=4 unit_names=2 unit_defs=4 members=0 hier_members=2 reference_keys=0 reference_sites=0 defines=0 instantiations=2 fact_words=8 fact_word_kib=0 candidate_units=2 candidate_macros=0 candidate_words=3 candidate_word_kib=0 include_edges=0 include_known=4 work_kib=0", "timing: textDocument/definition answered in 0.09 ms", "timing: textDocument/prepareRename answered in 0.02 ms", "timing: scan started: 3 files", "analyzed: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/tb.sv", "cached: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv", "cached: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/tb.sv", "timing: scan finished: 3 files (0 skipped, 2 from cache) in 0.96 ms", "timing: scan 2 stages (whole, 3 files): discovery=0.48 config=0.06 walk=0.25 filelist=0.00 sort=0.00 cap=0.00 buffers=0.03 order=0.01 cache_open=0.07 read=0.10 lookup=0.00 decode=0.02 parse=0.00 encode=0.01 store_write=0.00 publish_absorb=0.00 publish_candidates=0.00 publish_includes=0.00 publish_overlay=0.00 gone=0.00 absorb=0.02 compact=0.02 candidates=0.01 includes=0.01 overlay=0.01 total=0.93 since_start=512.26 ms", "timing: scan 2 counts (whole): read=3 read_kib=0 walk_dirs=1 stats=0 skipped=0 hits=2 misses=0 buffers=1 records=0 repeats=1 decoded_kib=0 written_kib=0 opens=1 compactions=0 publishes=0 published=0 first_publish=0.00 overlays=1", "timing: scan 2 memory (whole): store_before_kib=1 store_after_kib=1 cache_entries=4 cache_encoded_kib=0 index_files=3 unit_names=2 unit_defs=3 members=0 hier_members=2 reference_keys=1 reference_sites=2 defines=0 instantiations=2 fact_words=7 fact_word_kib=0 candidate_units=2 candidate_macros=0 candidate_words=3 candidate_word_kib=0 include_edges=0 include_known=3 work_kib=0", "timing: workspace/didChangeWatchedFiles handled in 1.90 ms", "timing: textDocument/definition answered in 0.03 ms", "timing: textDocument/prepareRename answered in 0.01 ms"]}
|
||||
{"label": "0.52.0", "trial": 1, "answer": {"jsonrpc": "2.0", "id": 2, "result": [{"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv"}, {"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/child.sv"}]}, "prepare": {"jsonrpc": "2.0", "id": 3, "error": {"code": -32803, "message": "lucisv: `child` is declared in more than one indexed file; lucisv will not guess which declaration this rename means."}}, "after_rescan": {"jsonrpc": "2.0", "id": 4, "result": [{"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv"}]}, "prepare_after_rescan": {"jsonrpc": "2.0", "id": 5, "result": {"placeholder": "child", "range": {"end": {"character": 16, "line": 0}, "start": {"character": 11, "line": 0}}}}, "logs": ["timing: textDocument/didOpen handled in 0.40 ms", "timing: configuration answered in 0.59 ms", "timing: scan started: 2 files (the folder first), interleaved", "analyzed: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/tb.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/child.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/tb.sv", "timing: scan finished: 4 files (0 skipped, 0 from cache) in 2.78 ms", "timing: scan 1 stages (whole, 4 files): discovery=0.52 config=0.10 walk=0.31 filelist=0.00 sort=0.00 cap=0.00 buffers=0.01 order=0.00 cache_open=0.02 read=0.19 lookup=0.00 decode=0.00 parse=0.08 encode=0.02 store_write=1.00 publish_absorb=0.00 publish_candidates=0.00 publish_includes=0.00 publish_overlay=0.00 gone=0.00 absorb=0.02 compact=0.66 candidates=0.01 includes=0.01 overlay=0.01 total=2.74 since_start=0.76 ms", "timing: scan 1 counts (whole): read=4 read_kib=0 walk_dirs=2 stats=0 skipped=0 hits=0 misses=3 buffers=1 records=4 repeats=0 decoded_kib=0 written_kib=0 opens=1 compactions=1 publishes=0 published=0 first_publish=0.00 overlays=1", "timing: scan 1 memory (whole): store_before_kib=1 store_after_kib=1 cache_entries=4 cache_encoded_kib=0 index_files=4 unit_names=2 unit_defs=4 members=0 hier_members=2 reference_keys=0 reference_sites=0 defines=0 instantiations=2 fact_words=8 fact_word_kib=0 candidate_units=2 candidate_macros=0 candidate_words=3 candidate_word_kib=0 include_edges=0 include_known=4 work_kib=0", "timing: textDocument/definition answered in 0.41 ms", "timing: textDocument/prepareRename answered in 0.07 ms", "timing: scan started: 3 files", "analyzed: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/tb.sv", "cached: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv", "cached: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/tb.sv", "timing: scan finished: 3 files (0 skipped, 2 from cache) in 1.45 ms", "timing: scan 2 stages (whole, 3 files): discovery=0.62 config=0.04 walk=0.36 filelist=0.00 sort=0.00 cap=0.00 buffers=0.05 order=0.01 cache_open=0.16 read=0.17 lookup=0.00 decode=0.03 parse=0.00 encode=0.03 store_write=0.00 publish_absorb=0.00 publish_candidates=0.00 publish_includes=0.00 publish_overlay=0.00 gone=0.00 absorb=0.02 compact=0.02 candidates=0.02 includes=0.01 overlay=0.01 total=1.38 since_start=513.23 ms", "timing: scan 2 counts (whole): read=3 read_kib=0 walk_dirs=1 stats=0 skipped=0 hits=2 misses=0 buffers=1 records=0 repeats=1 decoded_kib=0 written_kib=0 opens=1 compactions=0 publishes=0 published=0 first_publish=0.00 overlays=1", "timing: scan 2 memory (whole): store_before_kib=1 store_after_kib=1 cache_entries=4 cache_encoded_kib=0 index_files=3 unit_names=2 unit_defs=3 members=0 hier_members=2 reference_keys=1 reference_sites=2 defines=0 instantiations=2 fact_words=7 fact_word_kib=0 candidate_units=2 candidate_macros=0 candidate_words=3 candidate_word_kib=0 include_edges=0 include_known=3 work_kib=0", "timing: workspace/didChangeWatchedFiles handled in 2.48 ms", "timing: textDocument/definition answered in 0.02 ms", "timing: textDocument/prepareRename answered in 0.01 ms"]}
|
||||
{"label": "0.52.0", "trial": 2, "answer": {"jsonrpc": "2.0", "id": 2, "result": [{"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv"}, {"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/child.sv"}]}, "prepare": {"jsonrpc": "2.0", "id": 3, "error": {"code": -32803, "message": "lucisv: `child` is declared in more than one indexed file; lucisv will not guess which declaration this rename means."}}, "after_rescan": {"jsonrpc": "2.0", "id": 4, "result": [{"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv"}]}, "prepare_after_rescan": {"jsonrpc": "2.0", "id": 5, "result": {"placeholder": "child", "range": {"end": {"character": 16, "line": 0}, "start": {"character": 11, "line": 0}}}}, "logs": ["timing: configuration answered in 0.26 ms", "timing: textDocument/didOpen handled in 0.53 ms", "timing: scan started: 2 files (the folder first), interleaved", "analyzed: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/tb.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/child.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/tb.sv", "timing: scan finished: 4 files (0 skipped, 0 from cache) in 3.10 ms", "timing: scan 1 stages (whole, 4 files): discovery=0.62 config=0.10 walk=0.38 filelist=0.00 sort=0.00 cap=0.00 buffers=0.02 order=0.00 cache_open=0.02 read=0.20 lookup=0.00 decode=0.00 parse=0.09 encode=0.03 store_write=1.11 publish_absorb=0.00 publish_candidates=0.00 publish_includes=0.00 publish_overlay=0.00 gone=0.00 absorb=0.02 compact=0.63 candidates=0.01 includes=0.01 overlay=0.00 total=3.06 since_start=1.10 ms", "timing: scan 1 counts (whole): read=4 read_kib=0 walk_dirs=2 stats=0 skipped=0 hits=0 misses=3 buffers=1 records=4 repeats=0 decoded_kib=0 written_kib=0 opens=1 compactions=1 publishes=0 published=0 first_publish=0.00 overlays=1", "timing: scan 1 memory (whole): store_before_kib=1 store_after_kib=1 cache_entries=4 cache_encoded_kib=0 index_files=4 unit_names=2 unit_defs=4 members=0 hier_members=2 reference_keys=0 reference_sites=0 defines=0 instantiations=2 fact_words=8 fact_word_kib=0 candidate_units=2 candidate_macros=0 candidate_words=3 candidate_word_kib=0 include_edges=0 include_known=4 work_kib=0", "timing: textDocument/definition answered in 0.08 ms", "timing: textDocument/prepareRename answered in 0.02 ms", "timing: scan started: 3 files", "analyzed: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/tb.sv", "cached: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv", "cached: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/tb.sv", "timing: scan finished: 3 files (0 skipped, 2 from cache) in 1.46 ms", "timing: scan 2 stages (whole, 3 files): discovery=0.61 config=0.09 walk=0.31 filelist=0.00 sort=0.00 cap=0.00 buffers=0.03 order=0.01 cache_open=0.09 read=0.11 lookup=0.00 decode=0.05 parse=0.00 encode=0.01 store_write=0.00 publish_absorb=0.00 publish_candidates=0.00 publish_includes=0.00 publish_overlay=0.00 gone=0.00 absorb=0.02 compact=0.02 candidates=0.01 includes=0.01 overlay=0.00 total=1.34 since_start=507.71 ms", "timing: scan 2 counts (whole): read=3 read_kib=0 walk_dirs=1 stats=0 skipped=0 hits=2 misses=0 buffers=1 records=0 repeats=1 decoded_kib=0 written_kib=0 opens=1 compactions=0 publishes=0 published=0 first_publish=0.00 overlays=1", "timing: scan 2 memory (whole): store_before_kib=1 store_after_kib=1 cache_entries=4 cache_encoded_kib=0 index_files=3 unit_names=2 unit_defs=3 members=0 hier_members=2 reference_keys=1 reference_sites=2 defines=0 instantiations=2 fact_words=7 fact_word_kib=0 candidate_units=2 candidate_macros=0 candidate_words=3 candidate_word_kib=0 include_edges=0 include_known=3 work_kib=0", "timing: workspace/didChangeWatchedFiles handled in 2.47 ms", "timing: textDocument/definition answered in 0.02 ms", "timing: textDocument/prepareRename answered in 0.01 ms"]}
|
||||
@@ -0,0 +1,6 @@
|
||||
{"label": "0.51.0", "trial": 0, "answer": {"jsonrpc": "2.0", "id": 2, "result": [{"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv"}]}, "logs": ["timing: textDocument/didOpen handled in 0.66 ms", "timing: configuration answered in 0.72 ms", "timing: scan started: 3 files", "analyzed: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/tb.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/tb.sv", "timing: scan finished: 3 files (0 skipped, 0 from cache) in 2.38 ms", "timing: scan 1 stages (whole, 3 files): discovery=0.36 order=0.00 cache_open=0.02 read=0.09 lookup=0.00 decode=0.00 parse=0.11 encode=0.06 store_write=0.52 publish_absorb=0.00 publish_candidates=0.00 publish_includes=0.00 publish_overlay=0.00 gone=0.00 absorb=0.12 compact=0.70 candidates=0.01 includes=0.01 overlay=0.03 total=2.33 since_start=0.89 ms", "timing: scan 1 counts (whole): read=3 read_kib=0 skipped=0 hits=0 misses=2 buffers=1 records=3 repeats=0 decoded_kib=0 written_kib=0 opens=1 compactions=1 publishes=0 published=0 first_publish=0.00 overlays=1", "timing: scan 1 memory (whole): store_before_kib=0 store_after_kib=0 cache_entries=3 cache_encoded_kib=0 index_files=3 unit_names=2 unit_defs=3 members=0 hier_members=2 reference_keys=1 reference_sites=2 defines=0 instantiations=2 fact_words=7 fact_word_kib=0 candidate_units=2 candidate_macros=0 candidate_words=3 candidate_word_kib=0 include_edges=0 include_known=3 work_kib=0", "timing: textDocument/definition answered in 0.15 ms"]}
|
||||
{"label": "0.51.0", "trial": 1, "answer": {"jsonrpc": "2.0", "id": 2, "result": [{"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv"}]}, "logs": ["timing: textDocument/didOpen handled in 0.27 ms", "timing: configuration answered in 0.40 ms", "timing: scan started: 3 files", "analyzed: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/tb.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/tb.sv", "timing: scan finished: 3 files (0 skipped, 0 from cache) in 2.18 ms", "timing: scan 1 stages (whole, 3 files): discovery=0.31 order=0.00 cache_open=0.02 read=0.14 lookup=0.00 decode=0.00 parse=0.07 encode=0.04 store_write=0.76 publish_absorb=0.00 publish_candidates=0.00 publish_includes=0.00 publish_overlay=0.00 gone=0.00 absorb=0.02 compact=0.55 candidates=0.01 includes=0.00 overlay=0.00 total=2.15 since_start=0.55 ms", "timing: scan 1 counts (whole): read=3 read_kib=0 skipped=0 hits=0 misses=2 buffers=1 records=3 repeats=0 decoded_kib=0 written_kib=0 opens=1 compactions=1 publishes=0 published=0 first_publish=0.00 overlays=1", "timing: scan 1 memory (whole): store_before_kib=0 store_after_kib=0 cache_entries=3 cache_encoded_kib=0 index_files=3 unit_names=2 unit_defs=3 members=0 hier_members=2 reference_keys=1 reference_sites=2 defines=0 instantiations=2 fact_words=7 fact_word_kib=0 candidate_units=2 candidate_macros=0 candidate_words=3 candidate_word_kib=0 include_edges=0 include_known=3 work_kib=0", "timing: textDocument/definition answered in 0.04 ms"]}
|
||||
{"label": "0.51.0", "trial": 2, "answer": {"jsonrpc": "2.0", "id": 2, "result": [{"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv"}]}, "logs": ["timing: configuration answered in 0.21 ms", "timing: scan started: 2 files", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/tb.sv", "timing: scan finished: 2 files (0 skipped, 0 from cache) in 2.24 ms", "timing: scan 1 stages (whole, 2 files): discovery=0.25 order=0.00 cache_open=0.02 read=0.07 lookup=0.00 decode=0.00 parse=0.14 encode=0.01 store_write=0.87 publish_absorb=0.00 publish_candidates=0.00 publish_includes=0.00 publish_overlay=0.00 gone=0.00 absorb=0.01 compact=0.67 candidates=0.01 includes=0.00 overlay=0.00 total=2.21 since_start=0.39 ms", "timing: scan 1 counts (whole): read=2 read_kib=0 skipped=0 hits=0 misses=2 buffers=0 records=2 repeats=0 decoded_kib=0 written_kib=0 opens=1 compactions=1 publishes=0 published=0 first_publish=0.00 overlays=0", "timing: scan 1 memory (whole): store_before_kib=0 store_after_kib=0 cache_entries=2 cache_encoded_kib=0 index_files=2 unit_names=2 unit_defs=2 members=0 hier_members=1 reference_keys=1 reference_sites=1 defines=0 instantiations=1 fact_words=4 fact_word_kib=0 candidate_units=2 candidate_macros=0 candidate_words=3 candidate_word_kib=0 include_edges=0 include_known=2 work_kib=0", "timing: textDocument/didOpen handled in 0.25 ms", "timing: textDocument/definition answered in 0.09 ms"]}
|
||||
{"label": "0.52.0", "trial": 0, "answer": {"jsonrpc": "2.0", "id": 2, "result": [{"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv"}, {"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/child.sv"}]}, "logs": ["timing: textDocument/didOpen handled in 1.33 ms", "timing: configuration answered in 1.46 ms", "timing: scan started: 2 files (the folder first), interleaved", "analyzed: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/tb.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/child.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/tb.sv", "timing: scan finished: 4 files (0 skipped, 0 from cache) in 1.82 ms", "timing: scan 1 stages (whole, 4 files): discovery=0.45 config=0.06 walk=0.24 filelist=0.00 sort=0.02 cap=0.00 buffers=0.03 order=0.00 cache_open=0.04 read=0.08 lookup=0.00 decode=0.00 parse=0.09 encode=0.02 store_write=0.41 publish_absorb=0.00 publish_candidates=0.00 publish_includes=0.00 publish_overlay=0.00 gone=0.00 absorb=0.05 compact=0.42 candidates=0.00 includes=0.01 overlay=0.02 total=1.77 since_start=1.82 ms", "timing: scan 1 counts (whole): read=4 read_kib=0 walk_dirs=2 stats=0 skipped=0 hits=0 misses=3 buffers=1 records=4 repeats=0 decoded_kib=0 written_kib=0 opens=1 compactions=1 publishes=0 published=0 first_publish=0.00 overlays=1", "timing: scan 1 memory (whole): store_before_kib=1 store_after_kib=1 cache_entries=4 cache_encoded_kib=0 index_files=4 unit_names=2 unit_defs=4 members=0 hier_members=2 reference_keys=0 reference_sites=0 defines=0 instantiations=2 fact_words=8 fact_word_kib=0 candidate_units=2 candidate_macros=0 candidate_words=3 candidate_word_kib=0 include_edges=0 include_known=4 work_kib=0", "timing: textDocument/definition answered in 0.18 ms"]}
|
||||
{"label": "0.52.0", "trial": 1, "answer": {"jsonrpc": "2.0", "id": 2, "result": [{"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv"}, {"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/child.sv"}]}, "logs": ["timing: configuration answered in 0.21 ms", "timing: textDocument/didOpen handled in 0.57 ms", "timing: scan started: 2 files (the folder first), interleaved", "analyzed: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/tb.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/child.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/tb.sv", "timing: scan finished: 4 files (0 skipped, 0 from cache) in 1.58 ms", "timing: scan 1 stages (whole, 4 files): discovery=0.39 config=0.06 walk=0.23 filelist=0.00 sort=0.00 cap=0.00 buffers=0.01 order=0.00 cache_open=0.02 read=0.08 lookup=0.00 decode=0.00 parse=0.05 encode=0.02 store_write=0.38 publish_absorb=0.00 publish_candidates=0.00 publish_includes=0.00 publish_overlay=0.00 gone=0.00 absorb=0.01 compact=0.45 candidates=0.01 includes=0.00 overlay=0.01 total=1.55 since_start=1.09 ms", "timing: scan 1 counts (whole): read=4 read_kib=0 walk_dirs=2 stats=0 skipped=0 hits=0 misses=3 buffers=1 records=4 repeats=0 decoded_kib=0 written_kib=0 opens=1 compactions=1 publishes=0 published=0 first_publish=0.00 overlays=1", "timing: scan 1 memory (whole): store_before_kib=1 store_after_kib=1 cache_entries=4 cache_encoded_kib=0 index_files=4 unit_names=2 unit_defs=4 members=0 hier_members=2 reference_keys=0 reference_sites=0 defines=0 instantiations=2 fact_words=8 fact_word_kib=0 candidate_units=2 candidate_macros=0 candidate_words=3 candidate_word_kib=0 include_edges=0 include_known=4 work_kib=0", "timing: textDocument/definition answered in 0.09 ms"]}
|
||||
{"label": "0.52.0", "trial": 2, "answer": {"jsonrpc": "2.0", "id": 2, "result": [{"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv"}, {"range": {"end": {"character": 12, "line": 0}, "start": {"character": 7, "line": 0}}, "uri": "file:///tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/child.sv"}]}, "logs": ["timing: configuration answered in 0.20 ms", "timing: textDocument/didOpen handled in 0.40 ms", "timing: scan started: 2 files (the folder first), interleaved", "analyzed: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/tb.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/z_real/child.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/child.sv", "indexing: /tmp/lucisv-perf-review-20260909/symlink-fixture/a_alias/tb.sv", "timing: scan finished: 4 files (0 skipped, 0 from cache) in 2.19 ms", "timing: scan 1 stages (whole, 4 files): discovery=0.44 config=0.06 walk=0.29 filelist=0.00 sort=0.00 cap=0.00 buffers=0.01 order=0.00 cache_open=0.02 read=0.18 lookup=0.00 decode=0.00 parse=0.07 encode=0.02 store_write=0.50 publish_absorb=0.00 publish_candidates=0.00 publish_includes=0.00 publish_overlay=0.00 gone=0.00 absorb=0.02 compact=0.56 candidates=0.01 includes=0.01 overlay=0.00 total=2.13 since_start=0.84 ms", "timing: scan 1 counts (whole): read=4 read_kib=0 walk_dirs=2 stats=0 skipped=0 hits=0 misses=3 buffers=1 records=4 repeats=0 decoded_kib=0 written_kib=0 opens=1 compactions=1 publishes=0 published=0 first_publish=0.00 overlays=1", "timing: scan 1 memory (whole): store_before_kib=1 store_after_kib=1 cache_entries=4 cache_encoded_kib=0 index_files=4 unit_names=2 unit_defs=4 members=0 hier_members=2 reference_keys=0 reference_sites=0 defines=0 instantiations=2 fact_words=8 fact_word_kib=0 candidate_units=2 candidate_macros=0 candidate_words=3 candidate_word_kib=0 include_edges=0 include_known=4 work_kib=0", "timing: textDocument/definition answered in 0.08 ms"]}
|
||||
@@ -0,0 +1,20 @@
|
||||
import sys,json,pathlib
|
||||
sys.path.insert(0,'/Users/guoliangchen/repo/verilogrustformatter/tools/perf')
|
||||
from lspclient import Session,uri
|
||||
out=pathlib.Path('/tmp/lucisv-perf-review-20260909');root=out/'symlink-fixture';(root/'z_real').mkdir(parents=True,exist_ok=True)
|
||||
(root/'z_real/child.sv').write_text('module child; endmodule\n')
|
||||
(root/'z_real/tb.sv').write_text('module tb; child u(); endmodule\n')
|
||||
link=root/'a_alias'
|
||||
if not link.exists():link.symlink_to('z_real',target_is_directory=True)
|
||||
for label,server in [('0.51.0',out/'reference/target/release/lucisv-server'),('0.52.0',pathlib.Path('/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server'))]:
|
||||
for trial in range(3):
|
||||
with Session(str(server),str(root),str(out/'symlink-cache'/label),scope={'index':{'scope':'workspace','scopeDepth':0}},cold=True,verbose=True) as s:
|
||||
s.initialize();s.did_open(str(root/'z_real/tb.sv'));s.wait_quiet(0.5)
|
||||
params={'textDocument':{'uri':uri(str(root/'z_real/tb.sv'))},'position':{'line':0,'character':12}}
|
||||
answer=s.request('textDocument/definition',params)[1]
|
||||
prepare=s.request('textDocument/prepareRename',params)[1]
|
||||
s.notify('workspace/didChangeWatchedFiles',{'changes':[{'uri':uri(str(root/'z_real/child.sv')),'type':2},{'uri':uri(str(root/'z_real/tb.sv')),'type':2}]})
|
||||
after=s.request('textDocument/definition',params)[1]
|
||||
prepare_after=s.request('textDocument/prepareRename',params)[1]
|
||||
s.drain()
|
||||
print(json.dumps(dict(label=label,trial=trial,answer=answer,prepare=prepare,after_rescan=after,prepare_after_rescan=prepare_after,logs=s.log_messages)),flush=True)
|
||||
@@ -0,0 +1,16 @@
|
||||
import sys,json,pathlib
|
||||
sys.path.insert(0,'/Users/guoliangchen/repo/verilogrustformatter/tools/perf')
|
||||
from lspclient import Session,uri
|
||||
out=pathlib.Path('/tmp/lucisv-perf-review-20260909');root=out/'symlink-fixture';(root/'z_real').mkdir(parents=True,exist_ok=True)
|
||||
(root/'z_real/child.sv').write_text('module child; endmodule\n')
|
||||
(root/'z_real/tb.sv').write_text('module tb; child u(); endmodule\n')
|
||||
link=root/'a_alias'
|
||||
if not link.exists():link.symlink_to('z_real',target_is_directory=True)
|
||||
for label,server in [('0.51.0',out/'reference/target/release/lucisv-server'),('0.52.0',pathlib.Path('/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server'))]:
|
||||
for trial in range(3):
|
||||
with Session(str(server),str(root),str(out/'symlink-cache'/label),scope={'index':{'scope':'workspace','scopeDepth':0}},cold=True,verbose=True) as s:
|
||||
s.initialize();s.did_open(str(root/'z_real/tb.sv'));s.wait_quiet(0.5)
|
||||
params={'textDocument':{'uri':uri(str(root/'z_real/tb.sv'))},'position':{'line':0,'character':12}}
|
||||
answer=s.request('textDocument/definition',params)[1]
|
||||
s.drain()
|
||||
print(json.dumps(dict(label=label,trial=trial,answer=answer,logs=s.log_messages)),flush=True)
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"tests": {
|
||||
"passed": 4374,
|
||||
"failed": 0,
|
||||
"ignored": 45,
|
||||
"result_blocks": 59
|
||||
},
|
||||
"paired_outcome_rows_compared": 84,
|
||||
"outcome_differences": [],
|
||||
"verification_commands_all_succeeded": true,
|
||||
"corpus_unchanged": true,
|
||||
"reproduced_findings": [
|
||||
"F1",
|
||||
"F2",
|
||||
"F3"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{"name": "warm-retest-0.52.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "scanloadprobe", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.52.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.52.0-review", "--out", "/tmp/lucisv-perf-review-20260909/load-retest.jsonl", "--tries", "3"], "exit": 0, "start": 1788934913.070663, "end": 1788934928.407276}
|
||||
{"name": "warm-retest-0.51.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "scanloadprobe", "--server", "/tmp/lucisv-perf-review-20260909/reference/target/release/lucisv-server", "--label", "0.51.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260909/caches/0.51.0-reference", "--out", "/tmp/lucisv-perf-review-20260909/load-retest.jsonl", "--tries", "3"], "exit": 0, "start": 1788934928.407598, "end": 1788934946.945303}
|
||||
{"name": "warm-priming-proof", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "/tmp/lucisv-perf-review-20260909/warm_priming_probe.py"], "exit": 0, "start": 1788934946.945431, "end": 1788934957.894967}
|
||||
{"name": "symlink-lifecycle", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "/tmp/lucisv-perf-review-20260909/symlink_lifecycle.py"], "exit": 0, "start": 1788934957.895423, "end": 1788934961.194865}
|
||||
{"name": "fmt", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "cargo", "fmt", "--all", "--", "--check"], "exit": 0, "start": 1788934961.1951082, "end": 1788934963.357418}
|
||||
{"name": "clippy", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "cargo", "clippy", "--workspace", "--all-targets", "--locked", "--", "-D", "warnings"], "exit": 0, "start": 1788934963.357829, "end": 1788935088.440186}
|
||||
{"name": "tests", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "cargo", "test", "--workspace", "--locked"], "exit": 0, "start": 1788935088.4404638, "end": 1788935983.462829}
|
||||
@@ -0,0 +1,11 @@
|
||||
import subprocess,pathlib,json,time,os
|
||||
out=pathlib.Path('/tmp/lucisv-perf-review-20260909')
|
||||
commands=[('warm-priming-proof',['python3',str(out/'warm_priming_probe.py')]),('symlink-lifecycle',['python3',str(out/'symlink_lifecycle.py')]),('fmt',['cargo','fmt','--all','--','--check']),('clippy',['cargo','clippy','--workspace','--all-targets','--locked','--','-D','warnings']),('tests',['cargo','test','--workspace','--locked'])]
|
||||
for label,server in [('0.51.0-reference',str(out/'reference/target/release/lucisv-server')),('0.52.0-review','/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server')]:
|
||||
commands.insert(0,('warm-retest-'+label,['python3','tools/perf/bench.py','scanloadprobe','--server',server,'--label',label,'--opentitan','/Users/guoliangchen/repo/opentitan','--storage',str(out/'caches'/label),'--out',str(out/'load-retest.jsonl'),'--tries','3']))
|
||||
for name,args in commands:
|
||||
cmd=['tools/guard.sh','-m','8','-t','1800','--']+args
|
||||
print('START',name,flush=True);started=time.time()
|
||||
with (out/(name+'.log')).open('w') as f:r=subprocess.run(cmd,stdout=f,stderr=subprocess.STDOUT,env=dict(os.environ,PYTHONDONTWRITEBYTECODE='1'))
|
||||
with (out/'verification-runs.jsonl').open('a') as f:f.write(json.dumps(dict(name=name,command=cmd,exit=r.returncode,start=started,end=time.time()))+'\n')
|
||||
print('END',name,r.returncode,flush=True)
|
||||
@@ -0,0 +1,2 @@
|
||||
{"trial": 0, "cache_directory_existed": false, "requested_cold": false, "scans": [{"n": 1, "kind": "whole", "stages": {"discovery": 206.7, "config": 0.01, "walk": 203.31, "filelist": 0.0, "sort": 0.84, "cap": 0.59, "buffers": 0.47, "order": 1.82, "cache_open": 0.02, "read": 118.65, "lookup": 0.71, "decode": 0.0, "parse": 1684.19, "encode": 186.82, "store_write": 116.94, "publish_absorb": 702.03, "publish_candidates": 243.34, "publish_includes": 17.67, "publish_overlay": 1.24, "gone": 0.82, "absorb": 213.51, "compact": 93.7, "candidates": 115.35, "includes": 8.8, "overlay": 0.2, "total": 3810.23, "since_start": 1.53}, "counts": {"read": 3976, "read_kib": 34957, "walk_dirs": 3, "stats": 0, "skipped": 3, "hits": 0, "misses": 3974, "buffers": 2, "records": 3976, "repeats": 0, "decoded_kib": 0, "written_kib": 45260, "opens": 1, "compactions": 1, "publishes": 7, "published": 3461, "first_publish": 545.29, "overlays": 2}, "memory": {"store_before_kib": 45396, "store_after_kib": 45396, "cache_entries": 3976, "cache_encoded_kib": 45260, "index_files": 3976, "unit_names": 3067, "unit_defs": 4013, "members": 91894, "hier_members": 56913, "reference_keys": 59529, "reference_sites": 457666, "defines": 1358, "instantiations": 13894, "fact_words": 345127, "fact_word_kib": 4754, "candidate_units": 50726, "candidate_macros": 658, "candidate_words": 105042, "candidate_word_kib": 1888, "include_edges": 1984, "include_known": 3976, "work_kib": 16}}], "median_ms": 160.1128340116702, "max_ms": 1536.1322090029716}
|
||||
{"trial": 1, "cache_directory_existed": true, "requested_cold": false, "scans": [{"n": 1, "kind": "whole", "stages": {"discovery": 219.99, "config": 0.03, "walk": 216.68, "filelist": 0.0, "sort": 0.84, "cap": 0.46, "buffers": 0.48, "order": 1.87, "cache_open": 89.55, "read": 122.66, "lookup": 47.58, "decode": 194.08, "parse": 0.0, "encode": 0.13, "store_write": 0.0, "publish_absorb": 455.71, "publish_candidates": 180.6, "publish_includes": 12.77, "publish_overlay": 0.64, "gone": 0.78, "absorb": 222.69, "compact": 8.81, "candidates": 118.4, "includes": 9.52, "overlay": 0.18, "total": 1774.44, "since_start": 1.43}, "counts": {"read": 3976, "read_kib": 34957, "walk_dirs": 3, "stats": 0, "skipped": 3, "hits": 3974, "misses": 0, "buffers": 2, "records": 0, "repeats": 2, "decoded_kib": 45237, "written_kib": 0, "opens": 1, "compactions": 0, "publishes": 4, "published": 3519, "first_publish": 474.1, "overlays": 2}, "memory": {"store_before_kib": 45396, "store_after_kib": 45396, "cache_entries": 3976, "cache_encoded_kib": 45260, "index_files": 3976, "unit_names": 3067, "unit_defs": 4013, "members": 91894, "hier_members": 56913, "reference_keys": 59529, "reference_sites": 457666, "defines": 1358, "instantiations": 13894, "fact_words": 345127, "fact_word_kib": 4754, "candidate_units": 50726, "candidate_macros": 658, "candidate_words": 105042, "candidate_word_kib": 1888, "include_edges": 1984, "include_known": 3976, "work_kib": 16}}], "median_ms": 3.2108339946717024, "max_ms": 713.6129999998957}
|
||||
@@ -0,0 +1,13 @@
|
||||
import sys,pathlib,argparse,json,statistics
|
||||
sys.path.insert(0,'/Users/guoliangchen/repo/verilogrustformatter/tools/perf')
|
||||
import harness,phases_r4,sites
|
||||
from lspclient import Session
|
||||
out=pathlib.Path('/tmp/lucisv-perf-review-20260909');store=out/'warm-priming-proof'
|
||||
assert not store.exists(), 'use a new proof directory for a rerun'
|
||||
server='/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server';root='/Users/guoliangchen/repo/opentitan'
|
||||
harness.configure(argparse.Namespace(server=server,label='0.52.0-warm-proof',opentitan=root,storage=str(store.parent),out=str(out/'unused.jsonl'),tries=1))
|
||||
for trial in range(2):
|
||||
existed=store.exists()
|
||||
with Session(server,root,str(store),scope={'index':{'scope':'workspace'}},verbose=True,cold=False) as s:
|
||||
r=phases_r4.one_session(s,100,35,phases_r4.rtl_files(1),harness.at(sites.TB,' aes #(',1,2))
|
||||
print(json.dumps(dict(trial=trial,cache_directory_existed=existed,requested_cold=False,scans=r['scans'],median_ms=statistics.median(a['ms'] for a in r['answers']),max_ms=max(a['ms'] for a in r['answers']))),flush=True)
|
||||
@@ -0,0 +1,55 @@
|
||||
# Independent 0.51.0 performance review evidence
|
||||
|
||||
Collected 2026-09-08. Interpretation and follow-up priorities are in
|
||||
[the review](../../performance_take5_review.md); implementation result cells
|
||||
are in [the tracker](../take5-tracking.md#independent-review--2026-09-08-released-0510).
|
||||
|
||||
## Files
|
||||
|
||||
- `provenance.json`: commits, binary SHA256, compiler/OS, corpus state and modified-file SHA256.
|
||||
- `results.jsonl`: paired 0.50.0/0.51.0 schema-2 LSP measurements, full arrays and result fingerprints.
|
||||
- `runs.jsonl`: exact commands, start/end times, load samples, guard exits and corpus invariance for all 24 paired phase invocations.
|
||||
- `trace-results.jsonl`: candidate-only startup stages and broad rename/fallback/refusal probes. These rows must not be presented as old/new regressions.
|
||||
- `cli-results.jsonl`: paired CLI check timings, user/system CPU, peak RSS, diagnostic counts, output hashes and commands; candidate-only format-cache sanity probe.
|
||||
- `post-runs.jsonl`: CLI driver, trace and focused test commands and exits.
|
||||
- `run.py`, `post.py`, `cli_probe.py`: the actual scratch orchestration scripts, preserved as evidence. They contain machine-specific paths and are not project tooling.
|
||||
- `build*.log`, `verified-*.log`: release freshness checks and corrected focused test results. `test-server-tests-startup.log` preserves an initial invocation error: the server is a binary crate, so `--lib` had to be corrected to `--bin lucisv-server`; no test ran in that failed invocation.
|
||||
|
||||
Verbose console logs and CLI stdout/stderr remain in
|
||||
`/tmp/lucisv-perf-review-20260908`. Persistent benchmark caches also remain
|
||||
there; they are excluded from this evidence directory. Retained JSON contains
|
||||
the diagnostic hashes/counts and timings needed for comparisons without adding
|
||||
megabytes of repeated diagnostic text to the repository.
|
||||
|
||||
## Reproduction
|
||||
|
||||
Build both commits in separate clean checkouts before benchmarking. Use the
|
||||
**current harness for both servers**. `runs.jsonl` is the exact invocation
|
||||
record; replace binary, corpus, storage and output paths for another machine.
|
||||
For one representative candidate phase from the repository root:
|
||||
|
||||
```sh
|
||||
tools/guard.sh -m 8 -t 1800 -- python3 tools/perf/bench.py offerkinds \
|
||||
--server target/release/lucisv-server --label candidate \
|
||||
--opentitan /Users/guoliangchen/repo/opentitan \
|
||||
--storage /tmp/lucisv-perf-repeat/candidate \
|
||||
--out /tmp/lucisv-perf-repeat/results.jsonl --tries 3
|
||||
```
|
||||
|
||||
Repeat sequentially with the reference server and its own storage directory.
|
||||
Alternate reference/candidate order between phases. `scan` and `rss` manage
|
||||
their specified cold/warm cache cells. No benchmark should overlap a build,
|
||||
test suite or another benchmark. Always use the guard. Do not apply captured
|
||||
workspace edits or format the corpus in place.
|
||||
|
||||
In the ordinary request rows, `ms[0]` is first and `ms[1:]` are repeats.
|
||||
Fresh-process and first-after-change rows instead contain independent trials;
|
||||
use all samples. `offerqueue` has leader/follower fields and must not be reduced
|
||||
as if its two `ms` values were repeats. `scanserve` is a response-paced probe,
|
||||
not a fixed offered-load throughput benchmark. Its zero mismatch count allows
|
||||
empty interim answers. `refactor` rows saying “offer is a command” contain a
|
||||
zero placeholder, not an executed command measurement; use `execute` instead.
|
||||
`capture` means the edit reached applyEdit and the client refused to write it;
|
||||
`refused` means no edit was produced. RSS is KiB, CLI peak RSS is bytes, and
|
||||
CLI process timings are seconds. Three samples support prioritization, not
|
||||
percentile or significance claims.
|
||||
@@ -0,0 +1 @@
|
||||
Finished `release` profile [optimized] target(s) in 0.03s
|
||||
@@ -0,0 +1 @@
|
||||
Finished `release` profile [optimized] target(s) in 0.10s
|
||||
@@ -0,0 +1,24 @@
|
||||
{"label": "0.51.0", "row": "default", "trial": 1, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv", "check", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 1, "wall_s": 0.53, "user_s": 2.29, "sys_s": 0.28, "peak_rss_bytes": 176914432, "summary": ["found 445 violations"], "stdout_sha256": "c2444712e23ea59224972b977a2ad55cae0ad7520ecd71923e13e5d1d28c74a5", "load_before": [6.33740234375, 5.05517578125, 5.57421875], "load_after": [6.33740234375, 5.05517578125, 5.57421875], "corpus_unchanged": true}
|
||||
{"label": "0.51.0", "row": "style", "trial": 1, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv", "check", "--select", "error,warning,style", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 1, "wall_s": 0.49, "user_s": 2.49, "sys_s": 0.26, "peak_rss_bytes": 193658880, "summary": ["found 7751 violations"], "stdout_sha256": "97201de03bca32fab4761b49902c0bef48fd159c3f4baca625f37446061a1155", "load_before": [6.33740234375, 5.05517578125, 5.57421875], "load_after": [6.33740234375, 5.05517578125, 5.57421875], "corpus_unchanged": true}
|
||||
{"label": "0.51.0", "row": "style-no-unused-import", "trial": 1, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv", "check", "--select", "error,warning,style", "--ignore", "unused-import", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 1, "wall_s": 0.57, "user_s": 2.42, "sys_s": 0.3, "peak_rss_bytes": 192479232, "summary": ["found 7734 violations"], "stdout_sha256": "58780c3e81b897b4104cecd17ca72c69b45a1a14375396d9c21b6fcea3b7bb3f", "load_before": [6.33740234375, 5.05517578125, 5.57421875], "load_after": [6.33740234375, 5.05517578125, 5.57421875], "corpus_unchanged": true}
|
||||
{"label": "0.50.0", "row": "default", "trial": 1, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/.cache/lucisv-baselines/lucisv-0.50.0", "check", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 1, "wall_s": 0.43, "user_s": 2.26, "sys_s": 0.28, "peak_rss_bytes": 172883968, "summary": ["found 445 violations"], "stdout_sha256": "c2444712e23ea59224972b977a2ad55cae0ad7520ecd71923e13e5d1d28c74a5", "load_before": [6.33740234375, 5.05517578125, 5.57421875], "load_after": [7.75146484375, 5.36962890625, 5.68212890625], "corpus_unchanged": true}
|
||||
{"label": "0.50.0", "row": "style", "trial": 1, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/.cache/lucisv-baselines/lucisv-0.50.0", "check", "--select", "error,warning,style", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 1, "wall_s": 0.66, "user_s": 3.5, "sys_s": 0.3, "peak_rss_bytes": 224673792, "summary": ["found 7751 violations"], "stdout_sha256": "97201de03bca32fab4761b49902c0bef48fd159c3f4baca625f37446061a1155", "load_before": [7.75146484375, 5.36962890625, 5.68212890625], "load_after": [7.75146484375, 5.36962890625, 5.68212890625], "corpus_unchanged": true}
|
||||
{"label": "0.50.0", "row": "style-no-unused-import", "trial": 1, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/.cache/lucisv-baselines/lucisv-0.50.0", "check", "--select", "error,warning,style", "--ignore", "unused-import", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 1, "wall_s": 0.48, "user_s": 2.43, "sys_s": 0.25, "peak_rss_bytes": 192905216, "summary": ["found 7734 violations"], "stdout_sha256": "58780c3e81b897b4104cecd17ca72c69b45a1a14375396d9c21b6fcea3b7bb3f", "load_before": [7.75146484375, 5.36962890625, 5.68212890625], "load_after": [7.75146484375, 5.36962890625, 5.68212890625], "corpus_unchanged": true}
|
||||
{"label": "0.51.0", "row": "format-cold", "trial": 1, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv", "format", "--check", "--cache-dir", "/tmp/lucisv-perf-review-20260908/cli-format-cache", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 2, "wall_s": 0.67, "user_s": 3.97, "sys_s": 0.23, "peak_rss_bytes": 204668928, "summary": ["1772 files would be reformatted, 30 files left unchanged, 4 files failed to format"], "stdout_sha256": "fdae6259fca3340f190d63b1625a968d7186a76653d2a5d7f8c25ca489e9d878", "load_before": [7.75146484375, 5.36962890625, 5.68212890625], "load_after": [7.75146484375, 5.36962890625, 5.68212890625], "corpus_unchanged": true}
|
||||
{"label": "0.51.0", "row": "format-warm", "trial": 1, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv", "format", "--check", "--cache-dir", "/tmp/lucisv-perf-review-20260908/cli-format-cache", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 2, "wall_s": 0.71, "user_s": 3.87, "sys_s": 0.23, "peak_rss_bytes": 217284608, "summary": ["1772 files would be reformatted, 30 files left unchanged, 30 files from cache, 4 files failed to format"], "stdout_sha256": "fdae6259fca3340f190d63b1625a968d7186a76653d2a5d7f8c25ca489e9d878", "load_before": [7.75146484375, 5.36962890625, 5.68212890625], "load_after": [8.97216796875, 5.662109375, 5.783203125], "corpus_unchanged": true}
|
||||
{"label": "0.50.0", "row": "default", "trial": 2, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/.cache/lucisv-baselines/lucisv-0.50.0", "check", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 1, "wall_s": 0.42, "user_s": 2.23, "sys_s": 0.25, "peak_rss_bytes": 188514304, "summary": ["found 445 violations"], "stdout_sha256": "c2444712e23ea59224972b977a2ad55cae0ad7520ecd71923e13e5d1d28c74a5", "load_before": [8.97216796875, 5.662109375, 5.783203125], "load_after": [8.97216796875, 5.662109375, 5.783203125], "corpus_unchanged": true}
|
||||
{"label": "0.50.0", "row": "style", "trial": 2, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/.cache/lucisv-baselines/lucisv-0.50.0", "check", "--select", "error,warning,style", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 1, "wall_s": 0.66, "user_s": 3.47, "sys_s": 0.28, "peak_rss_bytes": 223330304, "summary": ["found 7751 violations"], "stdout_sha256": "97201de03bca32fab4761b49902c0bef48fd159c3f4baca625f37446061a1155", "load_before": [8.97216796875, 5.662109375, 5.783203125], "load_after": [8.97216796875, 5.662109375, 5.783203125], "corpus_unchanged": true}
|
||||
{"label": "0.50.0", "row": "style-no-unused-import", "trial": 2, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/.cache/lucisv-baselines/lucisv-0.50.0", "check", "--select", "error,warning,style", "--ignore", "unused-import", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 1, "wall_s": 0.48, "user_s": 2.39, "sys_s": 0.25, "peak_rss_bytes": 203112448, "summary": ["found 7734 violations"], "stdout_sha256": "58780c3e81b897b4104cecd17ca72c69b45a1a14375396d9c21b6fcea3b7bb3f", "load_before": [8.97216796875, 5.662109375, 5.783203125], "load_after": [8.97216796875, 5.662109375, 5.783203125], "corpus_unchanged": true}
|
||||
{"label": "0.51.0", "row": "default", "trial": 2, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv", "check", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 1, "wall_s": 0.44, "user_s": 2.31, "sys_s": 0.25, "peak_rss_bytes": 179404800, "summary": ["found 445 violations"], "stdout_sha256": "c2444712e23ea59224972b977a2ad55cae0ad7520ecd71923e13e5d1d28c74a5", "load_before": [8.97216796875, 5.662109375, 5.783203125], "load_after": [9.45458984375, 5.81689453125, 5.8369140625], "corpus_unchanged": true}
|
||||
{"label": "0.51.0", "row": "style", "trial": 2, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv", "check", "--select", "error,warning,style", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 1, "wall_s": 0.49, "user_s": 2.44, "sys_s": 0.25, "peak_rss_bytes": 202866688, "summary": ["found 7751 violations"], "stdout_sha256": "97201de03bca32fab4761b49902c0bef48fd159c3f4baca625f37446061a1155", "load_before": [9.45458984375, 5.81689453125, 5.8369140625], "load_after": [9.45458984375, 5.81689453125, 5.8369140625], "corpus_unchanged": true}
|
||||
{"label": "0.51.0", "row": "style-no-unused-import", "trial": 2, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv", "check", "--select", "error,warning,style", "--ignore", "unused-import", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 1, "wall_s": 0.51, "user_s": 2.47, "sys_s": 0.25, "peak_rss_bytes": 182272000, "summary": ["found 7734 violations"], "stdout_sha256": "58780c3e81b897b4104cecd17ca72c69b45a1a14375396d9c21b6fcea3b7bb3f", "load_before": [9.45458984375, 5.81689453125, 5.8369140625], "load_after": [9.45458984375, 5.81689453125, 5.8369140625], "corpus_unchanged": true}
|
||||
{"label": "0.51.0", "row": "format-cold", "trial": 2, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv", "format", "--check", "--cache-dir", "/tmp/lucisv-perf-review-20260908/cli-format-cache", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 2, "wall_s": 0.74, "user_s": 3.89, "sys_s": 0.24, "peak_rss_bytes": 206077952, "summary": ["1772 files would be reformatted, 30 files left unchanged, 4 files failed to format"], "stdout_sha256": "fdae6259fca3340f190d63b1625a968d7186a76653d2a5d7f8c25ca489e9d878", "load_before": [9.45458984375, 5.81689453125, 5.8369140625], "load_after": [9.45458984375, 5.81689453125, 5.8369140625], "corpus_unchanged": true}
|
||||
{"label": "0.51.0", "row": "format-warm", "trial": 2, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv", "format", "--check", "--cache-dir", "/tmp/lucisv-perf-review-20260908/cli-format-cache", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 2, "wall_s": 0.65, "user_s": 3.86, "sys_s": 0.21, "peak_rss_bytes": 192020480, "summary": ["1772 files would be reformatted, 30 files left unchanged, 30 files from cache, 4 files failed to format"], "stdout_sha256": "fdae6259fca3340f190d63b1625a968d7186a76653d2a5d7f8c25ca489e9d878", "load_before": [9.45458984375, 5.81689453125, 5.8369140625], "load_after": [10.138671875, 6.01904296875, 5.90771484375], "corpus_unchanged": true}
|
||||
{"label": "0.51.0", "row": "default", "trial": 3, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv", "check", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 1, "wall_s": 0.44, "user_s": 2.29, "sys_s": 0.25, "peak_rss_bytes": 201654272, "summary": ["found 445 violations"], "stdout_sha256": "c2444712e23ea59224972b977a2ad55cae0ad7520ecd71923e13e5d1d28c74a5", "load_before": [10.138671875, 6.01904296875, 5.90771484375], "load_after": [10.138671875, 6.01904296875, 5.90771484375], "corpus_unchanged": true}
|
||||
{"label": "0.51.0", "row": "style", "trial": 3, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv", "check", "--select", "error,warning,style", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 1, "wall_s": 0.52, "user_s": 2.42, "sys_s": 0.25, "peak_rss_bytes": 178946048, "summary": ["found 7751 violations"], "stdout_sha256": "97201de03bca32fab4761b49902c0bef48fd159c3f4baca625f37446061a1155", "load_before": [10.138671875, 6.01904296875, 5.90771484375], "load_after": [10.138671875, 6.01904296875, 5.90771484375], "corpus_unchanged": true}
|
||||
{"label": "0.51.0", "row": "style-no-unused-import", "trial": 3, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv", "check", "--select", "error,warning,style", "--ignore", "unused-import", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 1, "wall_s": 0.49, "user_s": 2.45, "sys_s": 0.25, "peak_rss_bytes": 172441600, "summary": ["found 7734 violations"], "stdout_sha256": "58780c3e81b897b4104cecd17ca72c69b45a1a14375396d9c21b6fcea3b7bb3f", "load_before": [10.138671875, 6.01904296875, 5.90771484375], "load_after": [10.138671875, 6.01904296875, 5.90771484375], "corpus_unchanged": true}
|
||||
{"label": "0.50.0", "row": "default", "trial": 3, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/.cache/lucisv-baselines/lucisv-0.50.0", "check", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 1, "wall_s": 0.44, "user_s": 2.2, "sys_s": 0.24, "peak_rss_bytes": 175669248, "summary": ["found 445 violations"], "stdout_sha256": "c2444712e23ea59224972b977a2ad55cae0ad7520ecd71923e13e5d1d28c74a5", "load_before": [10.138671875, 6.01904296875, 5.90771484375], "load_after": [10.76806640625, 6.2177734375, 5.978515625], "corpus_unchanged": true}
|
||||
{"label": "0.50.0", "row": "style", "trial": 3, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/.cache/lucisv-baselines/lucisv-0.50.0", "check", "--select", "error,warning,style", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 1, "wall_s": 0.68, "user_s": 3.48, "sys_s": 0.3, "peak_rss_bytes": 224608256, "summary": ["found 7751 violations"], "stdout_sha256": "97201de03bca32fab4761b49902c0bef48fd159c3f4baca625f37446061a1155", "load_before": [10.76806640625, 6.2177734375, 5.978515625], "load_after": [10.76806640625, 6.2177734375, 5.978515625], "corpus_unchanged": true}
|
||||
{"label": "0.50.0", "row": "style-no-unused-import", "trial": 3, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/.cache/lucisv-baselines/lucisv-0.50.0", "check", "--select", "error,warning,style", "--ignore", "unused-import", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 1, "wall_s": 0.52, "user_s": 2.31, "sys_s": 0.24, "peak_rss_bytes": 163807232, "summary": ["found 7734 violations"], "stdout_sha256": "58780c3e81b897b4104cecd17ca72c69b45a1a14375396d9c21b6fcea3b7bb3f", "load_before": [10.76806640625, 6.2177734375, 5.978515625], "load_after": [10.76806640625, 6.2177734375, 5.978515625], "corpus_unchanged": true}
|
||||
{"label": "0.51.0", "row": "format-cold", "trial": 3, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv", "format", "--check", "--cache-dir", "/tmp/lucisv-perf-review-20260908/cli-format-cache", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 2, "wall_s": 0.63, "user_s": 3.98, "sys_s": 0.25, "peak_rss_bytes": 213221376, "summary": ["1772 files would be reformatted, 30 files left unchanged, 4 files failed to format"], "stdout_sha256": "fdae6259fca3340f190d63b1625a968d7186a76653d2a5d7f8c25ca489e9d878", "load_before": [10.76806640625, 6.2177734375, 5.978515625], "load_after": [10.76806640625, 6.2177734375, 5.978515625], "corpus_unchanged": true}
|
||||
{"label": "0.51.0", "row": "format-warm", "trial": 3, "command": ["/Users/guoliangchen/repo/verilogrustformatter/tools/guard.sh", "-m", "8", "-t", "1800", "--", "/usr/bin/time", "-l", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv", "format", "--check", "--cache-dir", "/tmp/lucisv-perf-review-20260908/cli-format-cache", "/Users/guoliangchen/repo/opentitan/hw/ip"], "exit": 2, "wall_s": 0.68, "user_s": 3.89, "sys_s": 0.22, "peak_rss_bytes": 197410816, "summary": ["1772 files would be reformatted, 30 files left unchanged, 30 files from cache, 4 files failed to format"], "stdout_sha256": "fdae6259fca3340f190d63b1625a968d7186a76653d2a5d7f8c25ca489e9d878", "load_before": [10.76806640625, 6.2177734375, 5.978515625], "load_after": [12.06787109375, 6.5625, 6.1015625], "corpus_unchanged": true}
|
||||
@@ -0,0 +1,29 @@
|
||||
import subprocess, pathlib, os, time, json, re, shutil, hashlib
|
||||
root=pathlib.Path('/Users/guoliangchen/repo/verilogrustformatter')
|
||||
out=pathlib.Path('/tmp/lucisv-perf-review-20260908'); corpus='/Users/guoliangchen/repo/opentitan'
|
||||
tree=corpus+'/hw/ip'
|
||||
binaries={'0.51.0':str(root/'target/release/lucisv'),'0.50.0':'/Users/guoliangchen/.cache/lucisv-baselines/lucisv-0.50.0'}
|
||||
initial=subprocess.check_output(['git','-C',corpus,'status','--porcelain'],text=True)
|
||||
def run(label,kind,trial,args):
|
||||
cmd=[str(root/'tools/guard.sh'),'-m','8','-t','1800','--','/usr/bin/time','-l',binaries[label]]+args+[tree]
|
||||
load=os.getloadavg()
|
||||
r=subprocess.run(cmd,cwd=root,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||
log=r.stdout+r.stderr
|
||||
(out/f'cli-{label}-{kind}-{trial}.log').write_bytes(log)
|
||||
err=r.stderr.decode(errors='replace')
|
||||
timing=re.search(r'([\d.]+) real\s+([\d.]+) user\s+([\d.]+) sys',err)
|
||||
rss=re.search(r'(\d+)\s+maximum resident set size',err)
|
||||
summary=[x for x in log.decode(errors='replace').splitlines() if re.search(r'^found \d+ violations|files? (checked|already|would|from)|violations? in|failed to format|files?,',x)]
|
||||
record=dict(label=label,row=kind,trial=trial,command=cmd,exit=r.returncode,wall_s=float(timing[1]) if timing else None,user_s=float(timing[2]) if timing else None,sys_s=float(timing[3]) if timing else None,peak_rss_bytes=int(rss[1]) if rss else None,summary=summary[-4:],stdout_sha256=hashlib.sha256(r.stdout).hexdigest(),load_before=load,load_after=os.getloadavg(),corpus_unchanged=initial==subprocess.check_output(['git','-C',corpus,'status','--porcelain'],text=True))
|
||||
with (out/'cli-results.jsonl').open('a') as f:f.write(json.dumps(record)+'\n')
|
||||
print(label,kind,trial,record['wall_s'],record['summary'],flush=True)
|
||||
if r.returncode not in (0,1,2) or not record['corpus_unchanged'] or not timing: raise RuntimeError(record)
|
||||
for trial in range(1,4):
|
||||
for label in (list(binaries) if trial%2 else list(reversed(binaries))):
|
||||
for kind,args in [('default',['check']),('style',['check','--select','error,warning,style']),('style-no-unused-import',['check','--select','error,warning,style','--ignore','unused-import'])]:
|
||||
if label=='0.43.0' and kind=='style-no-unused-import':continue
|
||||
run(label,kind,trial,args)
|
||||
cache=out/'cli-format-cache'
|
||||
shutil.rmtree(cache,ignore_errors=True)
|
||||
for warmth in ['cold','warm']:
|
||||
run('0.51.0','format-'+warmth,trial,['format','--check','--cache-dir',str(cache)])
|
||||
@@ -0,0 +1,7 @@
|
||||
{"name": "cli-probe", "command": ["python3", "/tmp/lucisv-perf-review-20260908/cli_probe.py"], "exit": 0, "start": 1788892552.6839921, "end": 1788892582.947894}
|
||||
{"name": "scanwait", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "scanwait", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.51.0-review-trace", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/trace-cache", "--out", "/tmp/lucisv-perf-review-20260908/trace-results.jsonl", "--tries", "3"], "exit": 0, "start": 1788892582.948035, "end": 1788892604.772197}
|
||||
{"name": "renametrace", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "renametrace", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.51.0-review-trace", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/trace-cache", "--out", "/tmp/lucisv-perf-review-20260908/trace-results.jsonl", "--tries", "3"], "exit": 0, "start": 1788892604.772367, "end": 1788892681.231309}
|
||||
{"name": "test-server-tests-startup", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "cargo", "test", "--locked", "-p", "lucisv_server", "--lib", "server::tests::startup"], "exit": 101, "start": 1788892681.2315872, "end": 1788892682.290122}
|
||||
{"name": "verified-server-tests-startup", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "cargo", "test", "--locked", "-p", "lucisv_server", "--bin", "lucisv-server", "server::tests::startup"], "exit": 0, "start": 1788892795.358142, "end": 1788892865.41644}
|
||||
{"name": "verified-check-after", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "cargo", "test", "--locked", "-p", "vlog_refactor", "--lib", "check::after"], "exit": 0, "start": 1788892865.416606, "end": 1788892892.895669}
|
||||
{"name": "verified-scan_order", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "cargo", "test", "--locked", "-p", "lucisv_server", "--bin", "lucisv-server", "scan_order"], "exit": 0, "start": 1788892892.895793, "end": 1788892893.966313}
|
||||
@@ -0,0 +1,15 @@
|
||||
import subprocess, pathlib, os, json, time
|
||||
root=pathlib.Path('/Users/guoliangchen/repo/verilogrustformatter'); out=pathlib.Path('/tmp/lucisv-perf-review-20260908')
|
||||
commands=[('cli-probe',['python3',str(out/'cli_probe.py')])]
|
||||
for phase in ['scanwait','renametrace']:
|
||||
commands.append((phase,['tools/guard.sh','-m','8','-t','1800','--','python3','tools/perf/bench.py',phase,'--server',str(root/'target/release/lucisv-server'),'--label','0.51.0-review-trace','--opentitan','/Users/guoliangchen/repo/opentitan','--storage',str(out/'trace-cache'),'--out',str(out/'trace-results.jsonl'),'--tries','3']))
|
||||
for package,pattern in [('lucisv_server','server::tests::startup'),('vlog_refactor','check::after'),('lucisv_server','scan_order')]:
|
||||
commands.append(('test-'+pattern.replace('::','-'),['tools/guard.sh','-m','8','-t','1800','--','cargo','test','--locked','-p',package,'--lib',pattern]))
|
||||
for name,cmd in commands:
|
||||
print('START',name,flush=True)
|
||||
start=time.time()
|
||||
with (out/(name+'.log')).open('w') as f:
|
||||
r=subprocess.run(cmd,cwd=root,stdout=f,stderr=subprocess.STDOUT,env=dict(os.environ,PYTHONDONTWRITEBYTECODE='1'))
|
||||
with (out/'post-runs.jsonl').open('a') as f:f.write(json.dumps(dict(name=name,command=cmd,exit=r.returncode,start=start,end=time.time()))+'\n')
|
||||
print('END',name,r.returncode,flush=True)
|
||||
if r.returncode: raise RuntimeError(name)
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"date": "2026-09-08",
|
||||
"candidate_commit": "126a6bcdac99e940534c87bce94a5269cdc53ae4",
|
||||
"reference_commit": "3bd55acb983776bef0bf035d7ec7bc894d4bbd04",
|
||||
"reference_clean": true,
|
||||
"reference_crates_diff_from_original_baseline": "",
|
||||
"corpus_commit": "00981352642fb65ef2b6c47143a0f6bb31fd4a97",
|
||||
"corpus_status": "M hw/ip/aes/dv/tb/tb.sv\n M hw/top_darjeeling/ip/ast/rtl/ast.sv\n M hw/top_earlgrey/ip/ast/rtl/ast.sv",
|
||||
"corpus_modified_sha256": {
|
||||
"hw/ip/aes/dv/tb/tb.sv": "09ae059220caa7667bb22acdd3157647b55d36de96ff2ca55a801bbbcd08146e",
|
||||
"hw/top_darjeeling/ip/ast/rtl/ast.sv": "2b63f9d7bc0068388e47a80383eaf048183cf5868b1cfd4692eac325393d2803",
|
||||
"hw/top_earlgrey/ip/ast/rtl/ast.sv": "15efd90c99030c6a43486ef1ed622897b967ad5153697d6b2c2c21cfb6eba35f"
|
||||
},
|
||||
"binary_sha256": {
|
||||
"/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server": "271b7f7ce386a6db0f0c346c3879944b6d2109f4eb985edd6c58ae60da93bb77",
|
||||
"/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv": "c7ae21fc121d375ddd750fe494a9aa509246a6f4e307740b8f533ef4daf5ebd5",
|
||||
"/private/tmp/claude-501/-Users-guoliangchen-repo-verilogrustformatter/7b09ba01-f222-4ace-bf9a-b321331bf159/scratchpad/qa-p1/clone-base/target/release/lucisv-server": "a225d7ab17d5d7081c5d68c4484c554041238882ee5a0e7e3f47399ce5b4beaa",
|
||||
"/Users/guoliangchen/.cache/lucisv-baselines/lucisv-0.50.0": "894054128495b764bb966e7b923e08267e57aea83fdc611fad4b4ed7a66b51e3"
|
||||
},
|
||||
"compiler": "rustc 1.97.1 (8bab26f4f 2026-07-14) (Homebrew)\nbinary: rustc\ncommit-hash: 8bab26f4f68e0e26f0bb7960be334d5b520ea452\ncommit-date: 2026-07-14\nhost: aarch64-apple-darwin\nrelease: 1.97.1\nLLVM version: 22.1.8",
|
||||
"os": "ProductName:\t\tmacOS\nProductVersion:\t\t27.0\nBuildVersion:\t\t26A5425a",
|
||||
"machine": "arm64",
|
||||
"logical_cpus": 10,
|
||||
"python": "3.14.7",
|
||||
"guard": {
|
||||
"memory_gib": 8,
|
||||
"timeout_s": 1800
|
||||
},
|
||||
"notes": [
|
||||
"Initial candidate git status was clean.",
|
||||
"No review code or corpus edits; current repository changes are review documentation/evidence.",
|
||||
"LSP runner compares corpus status and modified-file SHA256 before and after each phase.",
|
||||
"CLI runner compares corpus status after every trial; final modified-file hashes match original baseline provenance.",
|
||||
"No builds overlapped timed review workloads.",
|
||||
"Server tests initially used --lib in error; corrected to --bin lucisv-server."
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
{"phase": "baseline", "row": "initialize", "ms": [228.443125000922], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fresh_process": true, "ts": "2026-09-08T13:27:15", "label": "0.50.0-reference", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "baseline", "row": "transport baseline ($/lucisvNoSuchMethod)", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "expected_status": "error", "note": "an unknown method, rejected without work \u2014 by design", "ms": [0.18812500638887286, 0.05804200191050768, 0.06316599319688976, 0.05062500713393092], "status": "error", "result_count": 0, "message": "code -32601: unhandled method: $/lucisvNoSuchMethod", "ts": "2026-09-08T13:27:20", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "baseline", "row": "initialize", "ms": [148.933999997098], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fresh_process": true, "ts": "2026-09-08T13:27:21", "label": "0.51.0-review", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "baseline", "row": "transport baseline ($/lucisvNoSuchMethod)", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "expected_status": "error", "note": "an unknown method, rejected without work \u2014 by design", "ms": [0.21212498540990055, 0.07679199916310608, 0.08095800876617432, 0.052584015065804124], "status": "error", "result_count": 0, "message": "code -32601: unhandled method: $/lucisvNoSuchMethod", "ts": "2026-09-08T13:27:25", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment None", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": null, "load": [3.3359375, 4.6591796875, 6.13427734375], "ms": [0.9247090201824903, 0.3572499845176935, 0.3267909924034029, 0.28583398670889437], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:29", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment []", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": [], "load": [3.3359375, 4.6591796875, 6.13427734375], "ms": [0.0872919918037951, 0.05079200491309166, 0.051915994845330715, 0.05991599755361676], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:29", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment ['quickfix']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": ["quickfix"], "load": [3.3359375, 4.6591796875, 6.13427734375], "ms": [0.25954199372790754, 0.23345797671936452, 0.22262500715442002, 0.2679169992916286], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:29", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment ['refactor.extract']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.extract"], "load": [3.3359375, 4.6591796875, 6.13427734375], "ms": [0.06887500057928264, 0.06466597551479936, 0.0670420122332871, 0.05787500413134694], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:29", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment ['refactor.inline']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.inline"], "load": [3.3359375, 4.6591796875, 6.13427734375], "ms": [0.059542013332247734, 0.04791599349118769, 0.04949999856762588, 0.04720900324173272], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:29", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment ['refactor.rewrite.lucisv.ports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.rewrite.lucisv.ports"], "load": [3.3359375, 4.6591796875, 6.13427734375], "ms": [0.06345799192786217, 0.04937499761581421, 0.041749997762963176, 0.040790997445583344], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:29", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment ['source.organizeImports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": ["source.organizeImports"], "load": [3.3359375, 4.6591796875, 6.13427734375], "ms": [0.04666598397307098, 0.04166600410826504, 0.04529199213720858, 0.04024998634122312], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:29", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance None", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": null, "load": [3.1484375, 4.59814453125, 6.10400390625], "ms": [7.774957979563624, 5.237083008978516, 4.9062919861171395, 5.132042017066851], "status": "ok", "result_count": 2, "ts": "2026-09-08T13:27:32", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance []", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": [], "load": [3.1484375, 4.59814453125, 6.10400390625], "ms": [0.17862499225884676, 0.08533400250598788, 0.08854101179167628, 0.11066699516959488], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:32", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance ['quickfix']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": ["quickfix"], "load": [3.1484375, 4.59814453125, 6.10400390625], "ms": [0.6698330107610673, 0.43041599565185606, 0.38587499875575304, 0.3650840080808848], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:32", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance ['refactor.extract']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": ["refactor.extract"], "load": [3.1484375, 4.59814453125, 6.10400390625], "ms": [0.10950001887977123, 0.06354099605232477, 0.05287499516271055, 0.05020899698138237], "status": "ok", "result_count": 1, "ts": "2026-09-08T13:27:32", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance ['refactor.inline']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": ["refactor.inline"], "load": [3.1484375, 4.59814453125, 6.10400390625], "ms": [0.08616698323749006, 0.12154201976954937, 0.11158300912939012, 0.06666700937785208], "status": "ok", "result_count": 1, "ts": "2026-09-08T13:27:32", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance ['refactor.rewrite.lucisv.ports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": ["refactor.rewrite.lucisv.ports"], "load": [3.1484375, 4.59814453125, 6.10400390625], "ms": [4.193874978227541, 4.126958985580131, 3.901667019817978, 3.742832981515676], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:32", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance ['source.organizeImports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": ["source.organizeImports"], "load": [3.1484375, 4.59814453125, 6.10400390625], "ms": [0.13529200805351138, 0.12924999464303255, 0.08425000123679638, 0.0926670036278665], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:32", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment None", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": null, "load": [3.1484375, 4.59814453125, 6.10400390625], "ms": [2.786958997603506, 1.0770830267574638, 0.9920409938786179, 1.073958002962172], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:36", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment []", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": [], "load": [3.1484375, 4.59814453125, 6.10400390625], "ms": [0.07829102105461061, 0.1298749994020909, 0.09120799950323999, 0.06637501064687967], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:36", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment ['quickfix']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": ["quickfix"], "load": [3.1484375, 4.59814453125, 6.10400390625], "ms": [1.3045409868936986, 1.106542011257261, 0.9245409746654332, 0.8812920132186264], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:36", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment ['refactor.extract']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.extract"], "load": [3.1484375, 4.59814453125, 6.10400390625], "ms": [0.051709008403122425, 0.03674998879432678, 0.03229102003388107, 0.030291994335129857], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:36", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment ['refactor.inline']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.inline"], "load": [3.1484375, 4.59814453125, 6.10400390625], "ms": [0.03345799632370472, 0.030291994335129857, 0.03162497887387872, 0.030750001315027475], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:36", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment ['refactor.rewrite.lucisv.ports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.rewrite.lucisv.ports"], "load": [3.1484375, 4.59814453125, 6.10400390625], "ms": [0.05062500713393092, 0.031584000680595636, 0.030625000363215804, 0.029874994652345777], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:36", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment ['source.organizeImports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": ["source.organizeImports"], "load": [3.1484375, 4.59814453125, 6.10400390625], "ms": [0.03250001464039087, 0.0295409990940243, 0.03070800448767841, 0.029041984817013144], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:36", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment None", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": null, "load": [3.13623046875, 4.5712890625, 6.08544921875], "ms": [3.8234169769566506, 2.370457979850471, 2.2460839827544987, 1.937499997438863], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:39", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment []", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": [], "load": [3.13623046875, 4.5712890625, 6.08544921875], "ms": [0.1170419855043292, 0.07929198909550905, 0.06845800089649856, 0.06916600978001952], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:39", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment ['quickfix']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": ["quickfix"], "load": [3.13623046875, 4.5712890625, 6.08544921875], "ms": [2.1836670057382435, 2.134708018274978, 1.908209000248462, 1.863792014773935], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:39", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment ['refactor.extract']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.extract"], "load": [3.13623046875, 4.5712890625, 6.08544921875], "ms": [0.10379200102761388, 0.07375000859610736, 0.06704102270305157, 0.06066600326448679], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:39", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment ['refactor.inline']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.inline"], "load": [3.13623046875, 4.5712890625, 6.08544921875], "ms": [0.0620420032646507, 0.059667014284059405, 0.06454202230088413, 0.06420898716896772], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:39", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment ['refactor.rewrite.lucisv.ports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.rewrite.lucisv.ports"], "load": [3.13623046875, 4.5712890625, 6.08544921875], "ms": [0.1179169921670109, 0.09279200457967818, 0.059833022532984614, 0.05733300349675119], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:39", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment ['source.organizeImports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": ["source.organizeImports"], "load": [3.13623046875, 4.5712890625, 6.08544921875], "ms": [0.0939579913392663, 0.12266702833585441, 0.10812497930601239, 0.1084580144379288], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:39", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment None", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": null, "load": [3.125, 4.544921875, 6.06689453125], "ms": [25.135959003819153, 24.991540994960815, 24.950332997832447, 25.31654099584557], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:43", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment []", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": [], "load": [3.125, 4.544921875, 6.06689453125], "ms": [0.15429200720973313, 0.072750000981614, 0.06270798621699214, 0.058667006669566035], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:43", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment ['quickfix']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": ["quickfix"], "load": [3.125, 4.544921875, 6.06689453125], "ms": [23.742541001411155, 23.074291995726526, 23.12887500738725, 23.65116699365899], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:43", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment ['refactor.extract']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.extract"], "load": [3.125, 4.544921875, 6.06689453125], "ms": [0.12358298408798873, 0.08016597712412477, 0.04445802187547088, 0.03675001789815724], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:43", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment ['refactor.inline']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.inline"], "load": [3.125, 4.544921875, 6.06689453125], "ms": [0.04754198016598821, 0.09820799459703267, 0.06454100366681814, 0.03933301195502281], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:43", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment ['refactor.rewrite.lucisv.ports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.rewrite.lucisv.ports"], "load": [3.125, 4.544921875, 6.06689453125], "ms": [0.20275000133551657, 0.055459007853642106, 0.05337499896995723, 0.04775001434609294], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:43", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment ['source.organizeImports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": ["source.organizeImports"], "load": [3.125, 4.544921875, 6.06689453125], "ms": [0.05033300840295851, 0.04008298856206238, 0.0372079957742244, 0.029457994969561696], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:43", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment None", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": null, "load": [3.35498046875, 4.56884765625, 6.06640625], "ms": [1.8199170008301735, 1.2884580064564943, 0.929874979192391, 0.8977079996839166], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:47", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment []", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": [], "load": [3.35498046875, 4.56884765625, 6.06640625], "ms": [0.40179200004786253, 0.33450001501478255, 0.4087080014869571, 0.3928749938495457], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:47", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment ['quickfix']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": ["quickfix"], "load": [3.35498046875, 4.56884765625, 6.06640625], "ms": [0.8583330200053751, 0.5131249781697989, 0.45262498315423727, 0.4457079921849072], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:47", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment ['refactor.extract']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.extract"], "load": [3.35498046875, 4.56884765625, 6.06640625], "ms": [0.5570419889409095, 0.5363329837564379, 0.4675840027630329, 0.49266699352301657], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:47", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment ['refactor.inline']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.inline"], "load": [3.35498046875, 4.56884765625, 6.06640625], "ms": [0.4653329961001873, 0.4569999873638153, 0.46370801283046603, 0.4620830004569143], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:47", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment ['refactor.rewrite.lucisv.ports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.rewrite.lucisv.ports"], "load": [3.35498046875, 4.56884765625, 6.06640625], "ms": [0.4922079970128834, 0.469457998406142, 0.4442499775905162, 0.541499990504235], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:47", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "tb-comment ['source.organizeImports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "only": ["source.organizeImports"], "load": [3.35498046875, 4.56884765625, 6.06640625], "ms": [0.4797089786734432, 0.4532499879132956, 0.5587080086115748, 0.5167910130694509], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:47", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance None", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": null, "load": [3.35498046875, 4.56884765625, 6.06640625], "ms": [36.40420801821165, 28.38825000799261, 25.547249999362975, 23.09475000947714], "status": "ok", "result_count": 2, "ts": "2026-09-08T13:27:51", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance []", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": [], "load": [3.35498046875, 4.56884765625, 6.06640625], "ms": [0.8582080190535635, 0.6152499991003424, 0.6771660118829459, 0.5863330152351409], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:51", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance ['quickfix']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": ["quickfix"], "load": [3.35498046875, 4.56884765625, 6.06640625], "ms": [0.6191669963300228, 0.6072500254958868, 0.7004590006545186, 0.6449169886764139], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:51", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance ['refactor.extract']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": ["refactor.extract"], "load": [3.35498046875, 4.56884765625, 6.06640625], "ms": [0.9814579971134663, 1.077249995432794, 1.051166997058317, 1.097541011404246], "status": "ok", "result_count": 1, "ts": "2026-09-08T13:27:51", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance ['refactor.inline']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": ["refactor.inline"], "load": [3.35498046875, 4.56884765625, 6.06640625], "ms": [0.9315420174971223, 0.9317500225733966, 0.9461250156164169, 0.9242079977411777], "status": "ok", "result_count": 1, "ts": "2026-09-08T13:27:51", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance ['refactor.rewrite.lucisv.ports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": ["refactor.rewrite.lucisv.ports"], "load": [3.35498046875, 4.56884765625, 6.06640625], "ms": [21.56129098148085, 22.149416006868705, 22.300959011772648, 22.847457992611453], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:51", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-reg-instance ['source.organizeImports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "only": ["source.organizeImports"], "load": [3.35498046875, 4.56884765625, 6.06640625], "ms": [1.1925419967155904, 0.9538329904899001, 1.0387089860159904, 0.9318329975940287], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:51", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment None", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": null, "load": [3.326171875, 4.54248046875, 6.04833984375], "ms": [17.45845901314169, 13.65824998356402, 12.541541014797986, 10.851166996872053], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:54", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment []", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": [], "load": [3.326171875, 4.54248046875, 6.04833984375], "ms": [3.191124997101724, 3.1506659870501608, 3.0033329967409372, 2.90024999412708], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:54", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment ['quickfix']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": ["quickfix"], "load": [3.326171875, 4.54248046875, 6.04833984375], "ms": [3.022583987331018, 2.773624990368262, 2.5182089884765446, 2.599208994070068], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:54", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment ['refactor.extract']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.extract"], "load": [3.326171875, 4.54248046875, 6.04833984375], "ms": [4.053499986184761, 4.062000021804124, 4.126999992877245, 3.9252499991562217], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:54", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment ['refactor.inline']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.inline"], "load": [3.326171875, 4.54248046875, 6.04833984375], "ms": [4.103125014808029, 4.292917001293972, 3.805916989222169, 3.6044580047018826], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:54", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment ['refactor.rewrite.lucisv.ports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.rewrite.lucisv.ports"], "load": [3.326171875, 4.54248046875, 6.04833984375], "ms": [3.8591249904129654, 4.008415999123827, 4.238666995661333, 3.8263750029727817], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:55", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "aes-core-comment ['source.organizeImports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_core.sv", "position": {"line": 0, "character": 2}, "only": ["source.organizeImports"], "load": [3.326171875, 4.54248046875, 6.04833984375], "ms": [4.005833005066961, 4.07225001254119, 3.8246250187512487, 3.9732919831294566], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:55", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment None", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": null, "load": [3.1396484375, 4.4833984375, 6.0185546875], "ms": [21.192084008362144, 17.48316700104624, 15.657582989661023, 14.468208013568074], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:58", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment []", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": [], "load": [3.1396484375, 4.4833984375, 6.0185546875], "ms": [4.034959012642503, 4.296583007089794, 4.03370798449032, 4.1466250258963555], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:58", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment ['quickfix']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": ["quickfix"], "load": [3.1396484375, 4.4833984375, 6.0185546875], "ms": [3.8766250072512776, 4.150583001319319, 3.836791991489008, 4.116791998967528], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:58", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment ['refactor.extract']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.extract"], "load": [3.1396484375, 4.4833984375, 6.0185546875], "ms": [6.027374998666346, 6.47133300662972, 6.754583009751514, 6.553749990416691], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:58", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment ['refactor.inline']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.inline"], "load": [3.1396484375, 4.4833984375, 6.0185546875], "ms": [5.925542005570605, 6.34087499929592, 6.204125005751848, 6.535291991895065], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:58", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment ['refactor.rewrite.lucisv.ports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.rewrite.lucisv.ports"], "load": [3.1396484375, 4.4833984375, 6.0185546875], "ms": [6.49245799286291, 6.063500011805445, 6.526792014483362, 6.935000012163073], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:58", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "spi-comment ['source.organizeImports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/spi_device/rtl/spi_device.sv", "position": {"line": 0, "character": 2}, "only": ["source.organizeImports"], "load": [3.1396484375, 4.4833984375, 6.0185546875], "ms": [6.5934590238612145, 6.166124978335574, 6.133542017778382, 6.819834001362324], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:27:58", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment None", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": null, "load": [2.96826171875, 4.42529296875, 5.98876953125], "ms": [316.19779200991616, 300.1452090102248, 301.80604199995287, 300.40954099968076], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:28:03", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment []", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": [], "load": [2.96826171875, 4.42529296875, 5.98876953125], "ms": [79.93691699812189, 83.25566700659692, 82.3886249854695, 81.88420897931792], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:28:04", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment ['quickfix']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": ["quickfix"], "load": [2.96826171875, 4.42529296875, 5.98876953125], "ms": [81.75466701504774, 81.51704102056101, 81.44849998643622, 81.87562497914769], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:28:04", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment ['refactor.extract']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.extract"], "load": [2.96826171875, 4.42529296875, 5.98876953125], "ms": [138.40758401784115, 138.9665419992525, 140.53400000557303, 138.57099998858757], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:28:04", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment ['refactor.inline']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.inline"], "load": [2.96826171875, 4.42529296875, 5.98876953125], "ms": [138.00350000383332, 138.00154201453552, 139.426417008508, 139.58404201548547], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:28:05", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment ['refactor.rewrite.lucisv.ports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": ["refactor.rewrite.lucisv.ports"], "load": [2.96826171875, 4.42529296875, 5.98876953125], "ms": [136.90566600416787, 138.01537500694394, 137.6121659995988, 139.56458299071528], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:28:06", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerkinds", "row": "pinmux-comment ['source.organizeImports']", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "only": ["source.organizeImports"], "load": [3.05078125, 4.41796875, 5.97705078125], "ms": [138.1640830077231, 139.22358301351778, 138.04591601365246, 137.76287500513718], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:28:06", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerqueue", "row": "pinmux comment -> aes definition, pipeline 1", "ms": [328.61204200889915, 328.5897919849958], "leader_ms": 328.61204200889915, "follower_ms": 328.5897919849958, "status": "ok", "message": null, "result_count": 0, "follower_result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "ms is [leader, follower], not repeats", "ts": "2026-09-08T13:28:11", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerqueue", "row": "pinmux comment -> aes definition, pipeline 2", "ms": [310.59787500998937, 310.5905409902334], "leader_ms": 310.59787500998937, "follower_ms": 310.5905409902334, "status": "ok", "message": null, "result_count": 0, "follower_result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "ms is [leader, follower], not repeats", "ts": "2026-09-08T13:28:11", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerqueue", "row": "pinmux comment -> aes definition, pipeline 3", "ms": [311.6908750089351, 311.67745802667923], "leader_ms": 311.6908750089351, "follower_ms": 311.67745802667923, "status": "ok", "message": null, "result_count": 0, "follower_result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "ms is [leader, follower], not repeats", "ts": "2026-09-08T13:28:11", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerqueue", "row": "pinmux comment -> aes definition, pipeline 1", "ms": [27.800874988315627, 27.780292002717033], "leader_ms": 27.800874988315627, "follower_ms": 27.780292002717033, "status": "ok", "message": null, "result_count": 0, "follower_result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "ms is [leader, follower], not repeats", "ts": "2026-09-08T13:28:16", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerqueue", "row": "pinmux comment -> aes definition, pipeline 2", "ms": [24.082208023173735, 24.07300000777468], "leader_ms": 24.082208023173735, "follower_ms": 24.07300000777468, "status": "ok", "message": null, "result_count": 0, "follower_result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "ms is [leader, follower], not repeats", "ts": "2026-09-08T13:28:16", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offerqueue", "row": "pinmux comment -> aes definition, pipeline 3", "ms": [24.170124990632758, 24.159708991646767], "leader_ms": 24.170124990632758, "follower_ms": 24.159708991646767, "status": "ok", "message": null, "result_count": 0, "follower_result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "ms is [leader, follower], not repeats", "ts": "2026-09-08T13:28:16", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "pinmux-comment, first offer after didChange", "ms": [138.38645798387006, 135.8739580027759, 131.7320830130484], "status": "ok", "message": null, "result_count": 0, "result_counts": [0, 0, 0], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "load": [3.05517578125, 4.37109375, 5.94189453125], "note": "each try is the first codeAction after its own didChange: the document is rebuilt, so nothing from the previous revision can be reused", "ts": "2026-09-08T13:28:20", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "pinmux-comment, repeated offer on the unchanged buffer", "titles": [], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "load": [3.05517578125, 4.37109375, 5.94189453125], "note": "the same cursor and session as the row above, with no didChange between the tries", "ms": [23.65241601364687, 23.996208008611575, 24.195167003199458, 23.86908300104551], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:28:20", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "aes-reg-instance, first offer after didChange", "ms": [10.441332997288555, 7.520667015342042, 6.5355420229025185], "status": "ok", "message": null, "result_count": 2, "result_counts": [2, 2, 2], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "load": [3.29052734375, 4.39794921875, 5.94189453125], "note": "each try is the first codeAction after its own didChange: the document is rebuilt, so nothing from the previous revision can be reused", "ts": "2026-09-08T13:28:24", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "aes-reg-instance, repeated offer on the unchanged buffer", "titles": ["lucisv: extract selection into module\u2026", "lucisv: inline `aes_reg_top` here"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "load": [3.29052734375, 4.39794921875, 5.94189453125], "note": "the same cursor and session as the row above, with no didChange between the tries", "ms": [4.975499992724508, 4.781708004884422, 4.316957987612113, 4.319958999985829], "status": "ok", "result_count": 2, "ts": "2026-09-08T13:28:24", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "tb-comment, first offer after didChange", "ms": [1.0070829885080457, 0.7866249943617731, 0.6592910212930292], "status": "ok", "message": null, "result_count": 0, "result_counts": [0, 0, 0], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "load": [3.26708984375, 4.37451171875, 5.92431640625], "note": "each try is the first codeAction after its own didChange: the document is rebuilt, so nothing from the previous revision can be reused", "ts": "2026-09-08T13:28:27", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "tb-comment, repeated offer on the unchanged buffer", "titles": [], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "load": [3.26708984375, 4.37451171875, 5.92431640625], "note": "the same cursor and session as the row above, with no didChange between the tries", "ms": [0.21141697652637959, 0.2687909873202443, 0.2849159936886281, 0.22674998035654426], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:28:27", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "pinmux-comment, first offer after didChange", "ms": [453.4160420007538, 413.8576250115875, 412.63079197960906], "status": "ok", "message": null, "result_count": 0, "result_counts": [0, 0, 0], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "load": [3.24560546875, 4.3515625, 5.90673828125], "note": "each try is the first codeAction after its own didChange: the document is rebuilt, so nothing from the previous revision can be reused", "ts": "2026-09-08T13:28:33", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "pinmux-comment, repeated offer on the unchanged buffer", "titles": [], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/top_darjeeling/ip_autogen/pinmux/rtl/pinmux_reg_top.sv", "position": {"line": 0, "character": 2}, "load": [3.24560546875, 4.3515625, 5.90673828125], "note": "the same cursor and session as the row above, with no didChange between the tries", "ms": [308.3623329875991, 314.03912499081343, 313.20799997774884, 311.98224998661317], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:28:34", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "aes-reg-instance, first offer after didChange", "ms": [41.74787501688115, 29.437457997119054, 25.338417006423697], "status": "ok", "message": null, "result_count": 2, "result_counts": [2, 2, 2], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "load": [3.1455078125, 4.3125, 5.8837890625], "note": "each try is the first codeAction after its own didChange: the document is rebuilt, so nothing from the previous revision can be reused", "ts": "2026-09-08T13:28:37", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "aes-reg-instance, repeated offer on the unchanged buffer", "titles": ["lucisv: extract selection into module\u2026", "lucisv: inline `aes_reg_top` here"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 103, "character": 2}, "load": [3.1455078125, 4.3125, 5.8837890625], "note": "the same cursor and session as the row above, with no didChange between the tries", "ms": [23.260958027094603, 23.25154101708904, 23.791291983798146, 23.079125006916], "status": "ok", "result_count": 2, "ts": "2026-09-08T13:28:38", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "tb-comment, first offer after didChange", "ms": [7.162875001085922, 1.6509160050190985, 1.418542000465095], "status": "ok", "message": null, "result_count": 0, "result_counts": [0, 0, 0], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "load": [2.9736328125, 4.25732421875, 5.85498046875], "note": "each try is the first codeAction after its own didChange: the document is rebuilt, so nothing from the previous revision can be reused", "ts": "2026-09-08T13:28:41", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "offeredit", "row": "tb-comment, repeated offer on the unchanged buffer", "titles": [], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/dv/tb/tb.sv", "position": {"line": 0, "character": 2}, "load": [2.9736328125, 4.25732421875, 5.85498046875], "note": "the same cursor and session as the row above, with no didChange between the tries", "ms": [1.0742500016931444, 0.9755830105859786, 0.9447500051464885, 0.9912920068018138], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:28:41", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "tailrename", "row": "tail rename cursor", "ms": [0.0], "result_count": 0, "note": "{\"line\": 41, \"character\": 19}", "file": "hw/ip/entropy_src/rtl/entropy_src_main_sm.sv", "ts": "2026-09-08T13:28:46", "label": "0.50.0-reference", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "tailrename", "row": "rename state_q (tail through u_entropy_src_main_sm)", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "b39defb212655f29e68c0e15b88dda405d2779a24c4b522a1798b6f44c9a04f7", "note": "tail edited", "titles": ["entropy_src_core.sv", "entropy_src_main_sm.sv"], "ms": [813.2140410016291, 798.266791010974, 794.077541999286, 795.1471249980386], "status": "ok", "result_count": 1, "edits": 5, "files": 2, "created": 0, "ts": "2026-09-08T13:28:49", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "tailrename", "row": "tail rename cursor", "ms": [0.0], "result_count": 0, "note": "{\"line\": 41, \"character\": 19}", "file": "hw/ip/entropy_src/rtl/entropy_src_main_sm.sv", "ts": "2026-09-08T13:28:53", "label": "0.51.0-review", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "tailrename", "row": "rename state_q (tail through u_entropy_src_main_sm)", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "b39defb212655f29e68c0e15b88dda405d2779a24c4b522a1798b6f44c9a04f7", "note": "tail edited", "titles": ["entropy_src_core.sv", "entropy_src_main_sm.sv"], "ms": [419.25958401407115, 403.3081670058891, 398.12087500467896, 398.31987500656396], "status": "ok", "result_count": 1, "edits": 5, "files": 2, "created": 0, "ts": "2026-09-08T13:28:55", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "rename", "row": "prepareRename on aes", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "{\"placeholder\": \"aes\", \"range\": {\"end\": {\"character\": 5, \"line\": 44}, \"start\": {\"character\": 2, \"line\": 44}}}", "ms": [0.15683300443924963, 0.06054100231267512, 0.04404198261909187, 0.0524159986525774], "status": "ok", "result_count": 1, "ts": "2026-09-08T13:28:58", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "rename", "row": "rename aes -> aes_renamed", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "fa7e31c78382176d5f96d661228ce82328df8bc77bd6d8575dd38717814cb26c", "titles": ["aes.sv", "aes_bind.sv", "aes_cov_bind.sv", "aes_tb.sv", "aes_wrap.sv", "darjeeling_pd_main.sv", "earlgrey_pd_main.sv", "englishbreakfast_pd_main.sv", "tb.sv"], "ms": [110.66924998885952, 92.60091697797179, 92.45075000217184, 92.29524998227134], "status": "ok", "result_count": 1, "edits": 14, "files": 9, "created": 0, "ts": "2026-09-08T13:28:58", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "rename", "row": "prepareRename on aes", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "{\"placeholder\": \"aes\", \"range\": {\"end\": {\"character\": 5, \"line\": 44}, \"start\": {\"character\": 2, \"line\": 44}}}", "ms": [0.1772079849615693, 0.055500015150755644, 0.04874999285675585, 0.05137498374097049], "status": "ok", "result_count": 1, "ts": "2026-09-08T13:29:01", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "rename", "row": "rename aes -> aes_renamed", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "fa7e31c78382176d5f96d661228ce82328df8bc77bd6d8575dd38717814cb26c", "titles": ["aes.sv", "aes_bind.sv", "aes_cov_bind.sv", "aes_tb.sv", "aes_wrap.sv", "darjeeling_pd_main.sv", "earlgrey_pd_main.sv", "englishbreakfast_pd_main.sv", "tb.sv"], "ms": [151.9268749980256, 144.69449999160133, 141.75341598456725, 144.06883300398476], "status": "ok", "result_count": 1, "edits": 14, "files": 9, "created": 0, "ts": "2026-09-08T13:29:02", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "scan", "row": "default, cold cache", "ms": [94.80212500784546, 102.04554200754501, 96.6694580274634], "settled_ms": [94.80212500784546, 102.04554200754501, 96.6694580274634], "fresh_process": true, "result_count": 3, "note": "0 files indexed | 124 files indexed | nothing in flight during the scan", "ts": "2026-09-08T13:29:08", "label": "0.50.0-reference", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "default, warm cache", "ms": [50.692666991380975, 48.61537500983104, 47.6588330056984], "settled_ms": [50.692666991380975, 48.61537500983104, 47.6588330056984], "fresh_process": true, "result_count": 3, "note": "0 files indexed | 124 files indexed, 123 from cache | nothing in flight during the scan", "ts": "2026-09-08T13:29:12", "label": "0.50.0-reference", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "empty-index, cold cache", "ms": [86.36366701102816, 96.99679201003164, 102.94466698542237], "settled_ms": [86.36366701102816, 96.99679201003164, 102.94466698542237], "fresh_process": true, "result_count": 3, "note": "0 files indexed | 124 files indexed | nothing in flight during the scan", "ts": "2026-09-08T13:29:17", "label": "0.50.0-reference", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "empty-index, warm cache", "ms": [38.85233300388791, 59.32287499308586, 50.2504579781089], "settled_ms": [38.85233300388791, 59.32287499308586, 50.2504579781089], "fresh_process": true, "result_count": 3, "note": "0 files indexed | 124 files indexed, 123 from cache | nothing in flight during the scan", "ts": "2026-09-08T13:29:22", "label": "0.50.0-reference", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "depth0, cold cache", "ms": [112.45566699653864, 107.59575001429766, 109.2191250063479], "settled_ms": [112.45566699653864, 107.59575001429766, 109.2191250063479], "fresh_process": true, "result_count": 3, "note": "124 files indexed | 1 file indexed | nothing in flight during the scan", "ts": "2026-09-08T13:29:27", "label": "0.50.0-reference", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "depth0, warm cache", "ms": [58.72512498172, 67.85175000550225, 65.52350000129081], "settled_ms": [58.72512498172, 67.85175000550225, 65.52350000129081], "fresh_process": true, "result_count": 3, "note": "124 files indexed, 123 from cache | 1 file indexed | nothing in flight during the scan", "ts": "2026-09-08T13:29:32", "label": "0.50.0-reference", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "workspace, cold cache", "ms": [2899.697374989046, 2910.1578340050764, 2908.613500010688], "settled_ms": [2899.697374989046, 2910.1578340050764, 2908.613500010688], "fresh_process": true, "result_count": 3, "note": "124 files indexed | 3976 files indexed, 123 from cache, 3 skipped | nothing in flight during the scan", "ts": "2026-09-08T13:29:45", "label": "0.50.0-reference", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "workspace, warm cache", "ms": [1411.2669999885838, 1381.403584004147, 1347.7066670020577], "settled_ms": [1411.2669999885838, 1381.403584004147, 1347.7066670020577], "fresh_process": true, "result_count": 3, "note": "124 files indexed, 123 from cache | 3976 files indexed, 3975 from cache, 3 skipped | nothing in flight during the scan", "ts": "2026-09-08T13:29:54", "label": "0.50.0-reference", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "workspace, cold cache, first useful answer", "ms": [85.57245900738053, 86.42945799510926, 85.58045799145475], "first_answer_ms": [85.57245900738053, 86.42945799510926, 85.58045799145475], "settled_ms": [2900.0096670060884, 2888.8116249872837, 2899.8457500129007], "fresh_process": true, "status": "ok", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "message": null, "result_count": 1, "result_counts": [1, 1, 1], "note": "ms is the definition sent during the scan; a 0 result count means the answer arrived before the index could give one. settled_ms is that session's own scan, perturbed by serving the request", "ts": "2026-09-08T13:30:07", "label": "0.50.0-reference", "schema": 2, "units": "ms"}
|
||||
{"phase": "scan", "row": "workspace, warm cache, first useful answer", "ms": [214.71287499298342, 214.87995798815973, 214.01358299772255], "first_answer_ms": [214.71287499298342, 214.87995798815973, 214.01358299772255], "settled_ms": [1396.46466600243, 1362.8175829944666, 1410.7110420009121], "fresh_process": true, "status": "ok", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "message": null, "result_count": 1, "result_counts": [1, 1, 1], "note": "ms is the definition sent during the scan; a 0 result count means the answer arrived before the index could give one. settled_ms is that session's own scan, perturbed by serving the request", "ts": "2026-09-08T13:30:16", "label": "0.50.0-reference", "schema": 2, "units": "ms"}
|
||||
{"phase": "scan", "row": "default, cold cache", "ms": [98.99616698385216, 116.51704198447987, 96.87337500508875], "settled_ms": [98.99616698385216, 116.51704198447987, 96.87337500508875], "fresh_process": true, "result_count": 3, "note": "0 files indexed | 124 files indexed | nothing in flight during the scan", "ts": "2026-09-08T13:30:22", "label": "0.51.0-review", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "default, warm cache", "ms": [42.021041008410975, 38.43308301293291, 50.31574997701682], "settled_ms": [42.021041008410975, 38.43308301293291, 50.31574997701682], "fresh_process": true, "result_count": 3, "note": "0 files indexed | 124 files indexed, 123 from cache | nothing in flight during the scan", "ts": "2026-09-08T13:30:27", "label": "0.51.0-review", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "empty-index, cold cache", "ms": [98.36795899900608, 102.20241700881161, 93.00566601450555], "settled_ms": [98.36795899900608, 102.20241700881161, 93.00566601450555], "fresh_process": true, "result_count": 3, "note": "124 files indexed | nothing in flight during the scan", "ts": "2026-09-08T13:30:32", "label": "0.51.0-review", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "empty-index, warm cache", "ms": [37.08958299830556, 43.60020798048936, 48.34720800863579], "settled_ms": [37.08958299830556, 43.60020798048936, 48.34720800863579], "fresh_process": true, "result_count": 3, "note": "124 files indexed, 123 from cache | nothing in flight during the scan", "ts": "2026-09-08T13:30:37", "label": "0.51.0-review", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "depth0, cold cache", "ms": [8.619708998594433, 9.979916998418048, 12.882165989140049], "settled_ms": [8.619708998594433, 9.979916998418048, 12.882165989140049], "fresh_process": true, "result_count": 3, "note": "0 files indexed | 1 file indexed | nothing in flight during the scan", "ts": "2026-09-08T13:30:41", "label": "0.51.0-review", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "depth0, warm cache", "ms": [9.142541995970532, 14.50575000490062, 7.749207987217233], "settled_ms": [9.142541995970532, 14.50575000490062, 7.749207987217233], "fresh_process": true, "result_count": 3, "note": "1 file indexed | nothing in flight during the scan", "ts": "2026-09-08T13:30:46", "label": "0.51.0-review", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "workspace, cold cache", "ms": [2926.224082999397, 2904.2602500121575, 2907.338124990929], "settled_ms": [2926.224082999397, 2904.2602500121575, 2907.338124990929], "fresh_process": true, "result_count": 3, "note": "3976 files indexed, 3 skipped | nothing in flight during the scan", "ts": "2026-09-08T13:30:59", "label": "0.51.0-review", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "workspace, warm cache", "ms": [1117.8656670090277, 1121.1862500058487, 1074.3031250021886], "settled_ms": [1117.8656670090277, 1121.1862500058487, 1074.3031250021886], "fresh_process": true, "result_count": 3, "note": "3976 files indexed, 3975 from cache, 3 skipped | nothing in flight during the scan", "ts": "2026-09-08T13:31:07", "label": "0.51.0-review", "schema": 2, "units": "ms", "status": "ok"}
|
||||
{"phase": "scan", "row": "workspace, cold cache, first useful answer", "ms": [291.24412502278574, 286.70066699851304, 286.82108398061246], "first_answer_ms": [291.24412502278574, 286.70066699851304, 286.82108398061246], "settled_ms": [2918.748541997047, 2918.748541997047, 2917.477584007429], "fresh_process": true, "status": "ok", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "message": null, "result_count": 1, "result_counts": [1, 1, 1], "note": "ms is the definition sent during the scan; a 0 result count means the answer arrived before the index could give one. settled_ms is that session's own scan, perturbed by serving the request", "ts": "2026-09-08T13:31:21", "label": "0.51.0-review", "schema": 2, "units": "ms"}
|
||||
{"phase": "scan", "row": "workspace, warm cache, first useful answer", "ms": [328.2647080195602, 326.83554201503284, 328.16266699228436], "first_answer_ms": [328.2647080195602, 326.83554201503284, 328.16266699228436], "settled_ms": [1141.10375000746, 1136.7974169843365, 1128.8991250039544], "fresh_process": true, "status": "ok", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "message": null, "result_count": 1, "result_counts": [1, 1, 1], "note": "ms is the definition sent during the scan; a 0 result count means the answer arrived before the index could give one. settled_ms is that session's own scan, perturbed by serving the request", "ts": "2026-09-08T13:31:29", "label": "0.51.0-review", "schema": 2, "units": "ms"}
|
||||
{"phase": "rss", "row": "server RSS after workspace scan, cold cache", "units": "KiB", "rss_kib": [502768.0, 552176.0, 508832.0], "peak_rss_kib": [502768.0, 552176.0, 508832.0], "store_kib": 45404, "fresh_process": true, "result_count": 3, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "idle RSS a second after the scan settled; peak from `ps -o rss=` sampled at 50 ms; no latency in this row", "ts": "2026-09-08T13:31:47", "label": "0.51.0-review", "schema": 2, "status": "ok"}
|
||||
{"phase": "rss", "row": "server RSS after workspace scan, warm cache", "units": "KiB", "rss_kib": [431456.0, 429040.0, 427456.0], "peak_rss_kib": [431456.0, 429040.0, 427456.0], "store_kib": 45404, "fresh_process": true, "result_count": 3, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "idle RSS a second after the scan settled; peak from `ps -o rss=` sampled at 50 ms; no latency in this row", "ts": "2026-09-08T13:31:58", "label": "0.51.0-review", "schema": 2, "status": "ok"}
|
||||
{"phase": "rss", "row": "server RSS after workspace scan, cold cache", "units": "KiB", "rss_kib": [543376.0, 544688.0, 543968.0], "peak_rss_kib": [543376.0, 544688.0, 543968.0], "store_kib": 45404, "fresh_process": true, "result_count": 3, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "idle RSS a second after the scan settled; peak from `ps -o rss=` sampled at 50 ms; no latency in this row", "ts": "2026-09-08T13:32:15", "label": "0.50.0-reference", "schema": 2, "status": "ok"}
|
||||
{"phase": "rss", "row": "server RSS after workspace scan, warm cache", "units": "KiB", "rss_kib": [588224.0, 588160.0, 586960.0], "peak_rss_kib": [588224.0, 588160.0, 586960.0], "store_kib": 45404, "fresh_process": true, "result_count": 3, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "note": "idle RSS a second after the scan settled; peak from `ps -o rss=` sampled at 50 ms; no latency in this row", "ts": "2026-09-08T13:32:27", "label": "0.50.0-reference", "schema": 2, "status": "ok"}
|
||||
{"phase": "scanserve", "row": "definition every 200 ms during a cold scan", "ms": [0.19120800425298512, 0.2044999855570495, 0.22362498566508293, 83.99750001262873, 85.32879099948332, 86.07262498117052, 2583.722166978987, 2588.9756250253413, 2594.1124590171967], "fresh_process": true, "result_count": 9, "requests_per_session": [3, 3, 3], "mismatched_answers": 0, "settled_ms": [3297.474625025643, 3305.5262079869863, 3311.4465410180856], "status": "ok", "message": null, "note": "ms is every mid-scan definition, sorted, across all tries; `mismatched_answers` counts non-empty answers that named somewhere the settled index does not \u2014 the coherence contract of docs/features/index-scope/README.md", "ts": "2026-09-08T13:32:42", "label": "0.50.0-reference", "schema": 2, "units": "ms"}
|
||||
{"phase": "scanserve", "row": "definition every 200 ms during a warm scan", "ms": [0.18154099234379828, 0.1819589815568179, 0.18470900249667466, 214.063207997242, 215.5356660077814, 229.40758400363848, 928.2474999781698, 930.5676670046523, 932.8275840089191], "fresh_process": true, "result_count": 9, "requests_per_session": [3, 3, 3], "mismatched_answers": 0, "settled_ms": [1773.1592080090195, 1763.6283340107184, 1798.9245839999057], "status": "ok", "message": null, "note": "ms is every mid-scan definition, sorted, across all tries; `mismatched_answers` counts non-empty answers that named somewhere the settled index does not \u2014 the coherence contract of docs/features/index-scope/README.md", "ts": "2026-09-08T13:32:52", "label": "0.50.0-reference", "schema": 2, "units": "ms"}
|
||||
{"phase": "scanserve", "row": "definition every 200 ms during a cold scan", "ms": [0.16833297559060156, 0.17804099479690194, 0.20575002417899668, 37.772000010591, 38.03166700527072, 40.607583010569215, 64.27737500052899, 68.86070800828747, 69.43858301383443, 91.97595901787281, 92.54179199342616, 95.01775001990609, 111.61487500066869, 141.30937500158325, 146.58987501752563, 147.1325829916168, 151.96687501156703, 157.66770800109953, 167.50870799296536, 169.7648749977816, 180.042833002517, 209.61312498548068, 210.92362501076423, 211.07300001312979, 221.58845799276605, 224.43395902519114, 225.96487498958595, 249.5718330028467, 259.53212499734946, 260.4944579943549, 268.68191600078717, 277.3411250091158, 278.9452919969335, 280.38870901218615, 289.2455830005929, 293.23062498588115, 306.119334010873, 308.78649998339824, 336.851541971555], "fresh_process": true, "result_count": 39, "requests_per_session": [13, 13, 13], "mismatched_answers": 0, "settled_ms": [4897.50783299678, 4925.127915979829, 4964.85745802056], "status": "ok", "message": null, "note": "ms is every mid-scan definition, sorted, across all tries; `mismatched_answers` counts non-empty answers that named somewhere the settled index does not \u2014 the coherence contract of docs/features/index-scope/README.md", "ts": "2026-09-08T13:33:12", "label": "0.51.0-review", "schema": 2, "units": "ms"}
|
||||
{"phase": "scanserve", "row": "definition every 200 ms during a warm scan", "ms": [0.17166600446216762, 0.18933400860987604, 0.20741700427606702, 156.49541601305827, 161.8596250191331, 165.49191600643098, 172.91158399893902, 176.56820800038986, 177.21991598955356, 303.62837499706075, 304.207375011174, 309.46008302271366, 315.881457994692, 321.9189159863163, 327.7779170020949], "fresh_process": true, "result_count": 15, "requests_per_session": [5, 5, 5], "mismatched_answers": 0, "settled_ms": [2016.8803330161609, 2021.98637498077, 2003.5682920133695], "status": "ok", "message": null, "note": "ms is every mid-scan definition, sorted, across all tries; `mismatched_answers` counts non-empty answers that named somewhere the settled index does not \u2014 the coherence contract of docs/features/index-scope/README.md", "ts": "2026-09-08T13:33:23", "label": "0.51.0-review", "schema": 2, "units": "ms"}
|
||||
{"phase": "didopen", "row": "didOpen aes.sv -> definition", "ms": [2.157832990633324, 1.552790985442698, 2.110832981998101], "n": 326, "lines": 326, "fresh_process": true, "status": "ok", "message": null, "result_count": 0, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "second_definition_ms": [0.0695830094628036, 0.06516597932204604, 0.104957987787202], "note": "each try is a fresh server; second definition 0.07 / 0.07 / 0.10", "ts": "2026-09-08T13:33:31", "label": "0.51.0-review", "schema": 2, "units": "ms"}
|
||||
{"phase": "didopen", "row": "didOpen aes_core.sv -> definition", "ms": [4.96720802038908, 4.387583001516759, 5.9444579819682986], "n": 1145, "lines": 1145, "fresh_process": true, "status": "ok", "message": null, "result_count": 0, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "second_definition_ms": [0.08474997594021261, 0.08145798346959054, 0.09037498966790736], "note": "each try is a fresh server; second definition 0.08 / 0.08 / 0.09", "ts": "2026-09-08T13:33:39", "label": "0.51.0-review", "schema": 2, "units": "ms"}
|
||||
{"phase": "didopen", "row": "didOpen spi_device.sv -> definition", "ms": [6.674000003840774, 12.65449999482371, 9.971833002055064], "n": 1985, "lines": 1985, "fresh_process": true, "status": "ok", "message": null, "result_count": 0, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "second_definition_ms": [0.07945799734443426, 0.11145899770781398, 0.09645899990573525], "note": "each try is a fresh server; second definition 0.08 / 0.11 / 0.10", "ts": "2026-09-08T13:33:47", "label": "0.51.0-review", "schema": 2, "units": "ms"}
|
||||
{"phase": "didopen", "row": "didOpen pinmux_reg_top.sv -> definition", "ms": [114.19954197481275, 149.54949999810196, 118.10037499526516], "n": 42192, "lines": 42192, "fresh_process": true, "status": "ok", "message": null, "result_count": 0, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "second_definition_ms": [0.10533398017287254, 0.12087498907931149, 0.10187498992308974], "note": "each try is a fresh server; second definition 0.11 / 0.12 / 0.10", "ts": "2026-09-08T13:33:55", "label": "0.51.0-review", "schema": 2, "units": "ms"}
|
||||
{"phase": "didopen", "row": "didOpen aes.sv -> definition", "ms": [1.649500016355887, 2.8636250062845647, 1.543833001051098], "n": 326, "lines": 326, "fresh_process": true, "status": "ok", "message": null, "result_count": 0, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "second_definition_ms": [0.10245799785479903, 0.06600000779144466, 0.0686249986756593], "note": "each try is a fresh server; second definition 0.10 / 0.07 / 0.07", "ts": "2026-09-08T13:34:05", "label": "0.50.0-reference", "schema": 2, "units": "ms"}
|
||||
{"phase": "didopen", "row": "didOpen aes_core.sv -> definition", "ms": [4.2928339971695095, 4.856874991673976, 4.072082985658199], "n": 1145, "lines": 1145, "fresh_process": true, "status": "ok", "message": null, "result_count": 0, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "second_definition_ms": [0.08479200187139213, 0.08150000940077007, 0.09641700307838619], "note": "each try is a fresh server; second definition 0.08 / 0.08 / 0.10", "ts": "2026-09-08T13:34:14", "label": "0.50.0-reference", "schema": 2, "units": "ms"}
|
||||
{"phase": "didopen", "row": "didOpen spi_device.sv -> definition", "ms": [6.343250017380342, 7.441124995239079, 6.940582999959588], "n": 1985, "lines": 1985, "fresh_process": true, "status": "ok", "message": null, "result_count": 0, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "second_definition_ms": [0.12487501953728497, 0.07216600351966918, 0.09366701124235988], "note": "each try is a fresh server; second definition 0.12 / 0.07 / 0.09", "ts": "2026-09-08T13:34:23", "label": "0.50.0-reference", "schema": 2, "units": "ms"}
|
||||
{"phase": "didopen", "row": "didOpen pinmux_reg_top.sv -> definition", "ms": [115.5812089855317, 126.30183401051909, 119.7859589883592], "n": 42192, "lines": 42192, "fresh_process": true, "status": "ok", "message": null, "result_count": 0, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "second_definition_ms": [0.12795798829756677, 0.07916701724752784, 0.12854201486334205], "note": "each try is a fresh server; second definition 0.13 / 0.08 / 0.13", "ts": "2026-09-08T13:34:32", "label": "0.50.0-reference", "schema": 2, "units": "ms"}
|
||||
{"phase": "refactor", "row": "expand-wildcard offer", "titles": ["lucisv: expand .* (32 connections)", "lucisv: extract selection into module\u2026"], "shapes": ["data", "command"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/kmac/fpv/tb/sha3_fpv.sv", "position": {"line": 54, "character": 4}, "ms": [8.273250015918165, 6.531958002597094, 7.095542008755729, 6.288375006988645], "status": "ok", "result_count": 2, "ts": "2026-09-08T13:34:36", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "expand-wildcard resolve: lucisv: expand .* (32 connections)", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "8f3a26dd147b2b8031ee2af6e47f52228c91d69fea1ab9a5b885e8b653c56115", "ms": [81.28108302480541, 72.74412500555627, 73.18979100091383, 71.01437498931773], "status": "ok", "result_count": 1, "edits": 1, "files": 1, "created": 0, "ts": "2026-09-08T13:34:36", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "expand-wildcard offer is a command: lucisv: extract selection into module\u2026", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.extractModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-08T13:34:36", "label": "0.50.0-reference", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "organize-imports offer", "titles": ["lucisv: organize imports (removes 1, sorts 1)", "lucisv: extract selection into module\u2026"], "shapes": ["data", "command"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_sbox_canright_masked.sv", "position": {"line": 42, "character": 2}, "ms": [21.118208998814225, 13.100707990815863, 13.465833995724097, 13.582165993284434], "status": "ok", "result_count": 2, "ts": "2026-09-08T13:34:40", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "organize-imports resolve: lucisv: organize imports (removes 1, sorts 1)", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "0ee027e37d070d54804a9a08169e8b8c5669ed7b81d9915e6637949d208bfa91", "ms": [11.003833002177998, 10.433666000608355, 10.52658399567008, 9.969290986191481], "status": "ok", "result_count": 1, "edits": 1, "files": 1, "created": 0, "ts": "2026-09-08T13:34:40", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "organize-imports offer is a command: lucisv: extract selection into module\u2026", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.extractModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-08T13:34:40", "label": "0.50.0-reference", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "inline-module offer", "titles": ["lucisv: extract selection into module\u2026", "lucisv: inline `tlul_cmd_intg_gen` here"], "shapes": ["command", "command"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_wrap.sv", "position": {"line": 66, "character": 2}, "ms": [15.514499973505735, 14.722291001817212, 13.878708996344358, 13.630667002871633], "status": "ok", "result_count": 2, "ts": "2026-09-08T13:34:43", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "inline-module offer is a command: lucisv: extract selection into module\u2026", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.extractModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-08T13:34:43", "label": "0.50.0-reference", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "inline-module offer is a command: lucisv: inline `tlul_cmd_intg_gen` here", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.inlineModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-08T13:34:43", "label": "0.50.0-reference", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "port-actions offer", "titles": ["lucisv: connect 2 missing ports", "lucisv: extract selection into module\u2026"], "shapes": ["data", "command"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_wrap.sv", "position": {"line": 78, "character": 2}, "ms": [31.706540990853682, 27.266624994808808, 25.946167006623, 25.293791986769065], "status": "ok", "result_count": 2, "ts": "2026-09-08T13:34:47", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "port-actions resolve: lucisv: connect 2 missing ports", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "4b534a16bca7abd205bd16458820936d4dc0c4cea9c963c5374c29a47b13fffb", "ms": [172.5459999870509, 168.02233300404623, 170.41337498812936, 170.4850000096485], "status": "ok", "result_count": 1, "edits": 2, "files": 1, "created": 0, "ts": "2026-09-08T13:34:48", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "port-actions offer is a command: lucisv: extract selection into module\u2026", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.extractModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-08T13:34:48", "label": "0.50.0-reference", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "ansi-header (no offer expected) offer", "titles": [], "shapes": [], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 8, "character": 0}, "ms": [3.7424170004669577, 2.6539170066826046, 2.250666992040351, 1.9106249965261668], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:34:51", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "extract-module offer (selection)", "titles": ["lucisv: extract selection into module\u2026"], "shapes": ["command"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 220, "character": 0}, "note": "selection 220:0-222:53", "ms": [3.7095409934408963, 2.0305420039221644, 1.8934579857159406, 2.646415989147499], "status": "ok", "result_count": 1, "ts": "2026-09-08T13:34:55", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "extract-module offer is a command: lucisv: extract selection into module\u2026", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.extractModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-08T13:34:55", "label": "0.50.0-reference", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "expand-wildcard offer", "titles": ["lucisv: expand .* (32 connections)", "lucisv: extract selection into module\u2026"], "shapes": ["data", "command"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/kmac/fpv/tb/sha3_fpv.sv", "position": {"line": 54, "character": 4}, "ms": [1.182875013910234, 0.6538330053444952, 0.8004170085769147, 0.671749992761761], "status": "ok", "result_count": 2, "ts": "2026-09-08T13:34:58", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "expand-wildcard resolve: lucisv: expand .* (32 connections)", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "8f3a26dd147b2b8031ee2af6e47f52228c91d69fea1ab9a5b885e8b653c56115", "ms": [58.99629200575873, 56.67687498498708, 55.38983299629763, 54.15937499492429], "status": "ok", "result_count": 1, "edits": 1, "files": 1, "created": 0, "ts": "2026-09-08T13:34:59", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "expand-wildcard offer is a command: lucisv: extract selection into module\u2026", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.extractModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-08T13:34:59", "label": "0.51.0-review", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "organize-imports offer", "titles": ["lucisv: organize imports (removes 1, sorts 1)", "lucisv: extract selection into module\u2026"], "shapes": ["data", "command"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_sbox_canright_masked.sv", "position": {"line": 42, "character": 2}, "ms": [3.9250419940799475, 4.377415985800326, 4.129875014768913, 3.5729169903788716], "status": "ok", "result_count": 2, "ts": "2026-09-08T13:35:02", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "organize-imports resolve: lucisv: organize imports (removes 1, sorts 1)", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "0ee027e37d070d54804a9a08169e8b8c5669ed7b81d9915e6637949d208bfa91", "ms": [8.764500002143905, 7.4158330098725855, 7.926999998744577, 8.842874987749383], "status": "ok", "result_count": 1, "edits": 1, "files": 1, "created": 0, "ts": "2026-09-08T13:35:02", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "organize-imports offer is a command: lucisv: extract selection into module\u2026", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.extractModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-08T13:35:02", "label": "0.51.0-review", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "inline-module offer", "titles": ["lucisv: extract selection into module\u2026", "lucisv: inline `tlul_cmd_intg_gen` here"], "shapes": ["command", "command"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_wrap.sv", "position": {"line": 66, "character": 2}, "ms": [2.1436669921968132, 0.7441249908879399, 0.5621250020340085, 0.5425419949460775], "status": "ok", "result_count": 2, "ts": "2026-09-08T13:35:05", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "inline-module offer is a command: lucisv: extract selection into module\u2026", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.extractModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-08T13:35:05", "label": "0.51.0-review", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "inline-module offer is a command: lucisv: inline `tlul_cmd_intg_gen` here", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.inlineModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-08T13:35:05", "label": "0.51.0-review", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "port-actions offer", "titles": ["lucisv: connect 2 missing ports", "lucisv: extract selection into module\u2026"], "shapes": ["data", "command"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes_wrap.sv", "position": {"line": 78, "character": 2}, "ms": [3.199458005838096, 1.3524999958463013, 0.7964579854160547, 1.2081250024493784], "status": "ok", "result_count": 2, "ts": "2026-09-08T13:35:09", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "port-actions resolve: lucisv: connect 2 missing ports", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "4b534a16bca7abd205bd16458820936d4dc0c4cea9c963c5374c29a47b13fffb", "ms": [138.7624170165509, 135.47958299750462, 131.30670797545463, 134.30091697955504], "status": "ok", "result_count": 1, "edits": 2, "files": 1, "created": 0, "ts": "2026-09-08T13:35:09", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "port-actions offer is a command: lucisv: extract selection into module\u2026", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.extractModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-08T13:35:09", "label": "0.51.0-review", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "ansi-header (no offer expected) offer", "titles": [], "shapes": [], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 8, "character": 0}, "ms": [0.5603749887086451, 0.3041660238523036, 0.30462502036243677, 0.34324999433010817], "status": "ok", "result_count": 0, "ts": "2026-09-08T13:35:13", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "extract-module offer (selection)", "titles": ["lucisv: extract selection into module\u2026"], "shapes": ["command"], "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 220, "character": 0}, "note": "selection 220:0-222:53", "ms": [1.7445830162614584, 1.1153749946970493, 0.906708010006696, 0.9864160092547536], "status": "ok", "result_count": 1, "ts": "2026-09-08T13:35:16", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "refactor", "row": "extract-module offer is a command: lucisv: extract selection into module\u2026", "ms": [0.0], "result_count": 1, "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "command": "lucisv.extractModule", "note": "timed by the `execute` phase, not by resolve", "ts": "2026-09-08T13:35:16", "label": "0.51.0-review", "schema": 2, "units": "ms", "status": "ok", "fresh_process": false}
|
||||
{"phase": "execute", "row": "extract-module offer", "client": {"resolveSupport": true, "applyEdit": true, "createFiles": true}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 220, "character": 0}, "titles": ["lucisv: extract selection into module\u2026"], "shapes": ["command"], "ms": [0.6445419858209789, 0.3437920240685344, 0.3765840083360672, 0.35279200528748333], "status": "ok", "result_count": 1, "ts": "2026-09-08T13:35:19", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "execute", "row": "extract-module: lucisv: extract selection into module\u2026", "ms": [154.08770900103264, 151.97912498842925, 149.99887498561293, 150.27974999975413], "status": "capture", "message": "perf capture: the benchmark client never writes", "result_count": 1, "client": {"resolveSupport": true, "applyEdit": true, "createFiles": true}, "command": "lucisv.extractModule", "arguments": 3, "total_ms": [154.16791700408794, 152.02162499190308, 150.0427079736255, 150.31783399172127], "deliver_ms": [0.0262079993262887, 0.017082988051697612, 0.019540981156751513, 0.015874975360929966], "fingerprint": "090e92e7736e0a5a93557d75befa65a5bea0c2f44494d71dc67e3f8d70d05835", "warnings": ["lucisv: `aes_extracted` was written to a new file, `aes_extracted.sv`. (and 2 more \u2014 see the lucisv log)"], "note": "ms is executeCommand -> applyEdit: the edit computation. applyEdit label 'lucisv: lucisv.extractModule'", "edits": 2, "files": 2, "created": 1, "ts": "2026-09-08T13:35:20", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "execute", "row": "inline-module offer", "client": {"resolveSupport": true, "applyEdit": true, "createFiles": true}, "file": "hw/ip/aes/rtl/aes_wrap.sv", "position": {"line": 66, "character": 2}, "titles": ["lucisv: extract selection into module\u2026", "lucisv: inline `tlul_cmd_intg_gen` here"], "shapes": ["command", "command"], "ms": [3.4391660010442138, 1.434875011909753, 0.9444580064155161, 0.5931250052526593], "status": "ok", "result_count": 2, "ts": "2026-09-08T13:35:23", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "execute", "row": "inline-module: lucisv: extract selection into module\u2026", "ms": [828.9644999895245, 804.9110410211142, 796.6194579785224, 805.8524999942165], "status": "refused", "message": "lucisv: the selection drives `h2d_intg`, and something outside it passes the same name to a task or function, which may drive it too; lucisv will not make it an output over that.", "result_count": 0, "client": {"resolveSupport": true, "applyEdit": true, "createFiles": true}, "command": "lucisv.extractModule", "arguments": 3, "total_ms": [828.9644999895245, 804.9110410211142, 796.6194579785224, 805.8524999942165], "deliver_ms": null, "fingerprint": null, "warnings": [], "note": "no edit was pushed, so ms is the whole executeCommand round trip", "edits": 0, "files": 0, "created": 0, "ts": "2026-09-08T13:35:27", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "execute", "row": "inline-module: lucisv: inline `tlul_cmd_intg_gen` here", "ms": [7.553917006589472, 6.798499991418794, 6.364542001392692, 5.977041000733152], "status": "refused", "message": "lucisv: `tlul_cmd_intg_gen` uses a `generate` construct, whose block names are reachable through the hierarchy (`u_tlul_cmd_intg_gen.gen.x`) and would become names of `M`'s own; lucisv will not inline it.", "result_count": 0, "client": {"resolveSupport": true, "applyEdit": true, "createFiles": true}, "command": "lucisv.inlineModule", "arguments": 2, "total_ms": [7.553917006589472, 6.798499991418794, 6.364542001392692, 5.977041000733152], "deliver_ms": null, "fingerprint": null, "warnings": [], "note": "no edit was pushed, so ms is the whole executeCommand round trip", "edits": 0, "files": 0, "created": 0, "ts": "2026-09-08T13:35:27", "label": "0.51.0-review", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "execute", "row": "extract-module offer", "client": {"resolveSupport": true, "applyEdit": true, "createFiles": true}, "file": "hw/ip/aes/rtl/aes.sv", "position": {"line": 220, "character": 0}, "titles": ["lucisv: extract selection into module\u2026"], "shapes": ["command"], "ms": [2.2431249963119626, 1.8541669996920973, 1.9568330026231706, 2.240166999399662], "status": "ok", "result_count": 1, "ts": "2026-09-08T13:35:31", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "execute", "row": "extract-module: lucisv: extract selection into module\u2026", "ms": [259.5107499801088, 248.13120800536126, 249.54270900343545, 250.6487909995485], "status": "capture", "message": "perf capture: the benchmark client never writes", "result_count": 1, "client": {"resolveSupport": true, "applyEdit": true, "createFiles": true}, "command": "lucisv.extractModule", "arguments": 3, "total_ms": [259.5512910047546, 248.17066700779833, 249.58170900936238, 250.7042080105748], "deliver_ms": [0.01479100319556892, 0.015833997167646885, 0.013791985111311078, 0.032625015592202544], "fingerprint": "090e92e7736e0a5a93557d75befa65a5bea0c2f44494d71dc67e3f8d70d05835", "warnings": ["lucisv: `aes_extracted` was written to a new file, `aes_extracted.sv`. (and 2 more \u2014 see the lucisv log)"], "note": "ms is executeCommand -> applyEdit: the edit computation. applyEdit label 'lucisv: lucisv.extractModule'", "edits": 2, "files": 2, "created": 1, "ts": "2026-09-08T13:35:32", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "execute", "row": "inline-module offer", "client": {"resolveSupport": true, "applyEdit": true, "createFiles": true}, "file": "hw/ip/aes/rtl/aes_wrap.sv", "position": {"line": 66, "character": 2}, "titles": ["lucisv: extract selection into module\u2026", "lucisv: inline `tlul_cmd_intg_gen` here"], "shapes": ["command", "command"], "ms": [20.005375001346692, 17.9198750120122, 14.657082996563986, 14.49750000028871], "status": "ok", "result_count": 2, "ts": "2026-09-08T13:35:35", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "execute", "row": "inline-module: lucisv: extract selection into module\u2026", "ms": [828.147166990675, 811.7350839893334, 801.6469160211273, 815.4769160028081], "status": "refused", "message": "lucisv: the selection drives `h2d_intg`, and something outside it passes the same name to a task or function, which may drive it too; lucisv will not make it an output over that.", "result_count": 0, "client": {"resolveSupport": true, "applyEdit": true, "createFiles": true}, "command": "lucisv.extractModule", "arguments": 3, "total_ms": [828.147166990675, 811.7350839893334, 801.6469160211273, 815.4769160028081], "deliver_ms": null, "fingerprint": null, "warnings": [], "note": "no edit was pushed, so ms is the whole executeCommand round trip", "edits": 0, "files": 0, "created": 0, "ts": "2026-09-08T13:35:39", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "execute", "row": "inline-module: lucisv: inline `tlul_cmd_intg_gen` here", "ms": [6.423707993235439, 6.12779101356864, 5.659874994307756, 6.66708400240168], "status": "refused", "message": "lucisv: `tlul_cmd_intg_gen` uses a `generate` construct, whose block names are reachable through the hierarchy (`u_tlul_cmd_intg_gen.gen.x`) and would become names of `M`'s own; lucisv will not inline it.", "result_count": 0, "client": {"resolveSupport": true, "applyEdit": true, "createFiles": true}, "command": "lucisv.inlineModule", "arguments": 2, "total_ms": [6.423707993235439, 6.12779101356864, 5.659874994307756, 6.66708400240168], "deliver_ms": null, "fingerprint": null, "warnings": [], "note": "no edit was pushed, so ms is the whole executeCommand round trip", "edits": 0, "files": 0, "created": 0, "ts": "2026-09-08T13:35:39", "label": "0.50.0-reference", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
@@ -0,0 +1,20 @@
|
||||
import subprocess,os,json,time,hashlib
|
||||
from pathlib import Path
|
||||
root=Path('/Users/guoliangchen/repo/verilogrustformatter'); out=Path('/tmp/lucisv-perf-review-20260908'); corpus=Path('/Users/guoliangchen/repo/opentitan')
|
||||
old='/private/tmp/claude-501/-Users-guoliangchen-repo-verilogrustformatter/7b09ba01-f222-4ace-bf9a-b321331bf159/scratchpad/qa-p1/clone-base/target/release/lucisv-server'
|
||||
bins={'0.50.0-reference':old,'0.51.0-review':str(root/'target/release/lucisv-server')}
|
||||
def state():
|
||||
s=subprocess.check_output(['git','-C',str(corpus),'status','--porcelain'],text=True)
|
||||
return s,{p:hashlib.sha256((corpus/p).read_bytes()).hexdigest() for p in ['hw/ip/aes/dv/tb/tb.sv','hw/top_darjeeling/ip/ast/rtl/ast.sv','hw/top_earlgrey/ip/ast/rtl/ast.sv']}
|
||||
initial=state()
|
||||
for i,phase in enumerate(['baseline','offerkinds','offerqueue','offeredit','tailrename','rename','scan','rss','scanserve','didopen','refactor','execute']):
|
||||
labels=list(bins) if i%2==0 else list(reversed(bins))
|
||||
for label in labels:
|
||||
cmd=['tools/guard.sh','-m','8','-t','1800','--','python3','tools/perf/bench.py',phase,'--server',bins[label],'--label',label,'--opentitan',str(corpus),'--storage',str(out/'caches'/label),'--out',str(out/'results.jsonl'),'--tries','3']
|
||||
r=dict(phase=phase,label=label,command=cmd,start=time.time(),load_before=os.getloadavg())
|
||||
print('START',phase,label,flush=True)
|
||||
with (out/(phase+'-'+label+'.log')).open('w') as f:p=subprocess.run(cmd,cwd=root,env=dict(os.environ,PYTHONDONTWRITEBYTECODE='1'),stdout=f,stderr=subprocess.STDOUT)
|
||||
r.update(exit=p.returncode,end=time.time(),load_after=os.getloadavg(),corpus_unchanged=state()==initial)
|
||||
with (out/'runs.jsonl').open('a') as f:f.write(json.dumps(r)+'\n')
|
||||
print('END',phase,label,p.returncode,flush=True)
|
||||
if p.returncode or not r['corpus_unchanged']:raise RuntimeError(r)
|
||||
@@ -0,0 +1,24 @@
|
||||
{"phase": "baseline", "label": "0.50.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "baseline", "--server", "/private/tmp/claude-501/-Users-guoliangchen-repo-verilogrustformatter/7b09ba01-f222-4ace-bf9a-b321331bf159/scratchpad/qa-p1/clone-base/target/release/lucisv-server", "--label", "0.50.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.50.0-reference", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892035.364898, "load_before": [3.1484375, 4.69384765625, 6.1728515625], "exit": 0, "end": 1788892040.7913768, "load_after": [3.13623046875, 4.66552734375, 6.15380859375], "corpus_unchanged": true}
|
||||
{"phase": "baseline", "label": "0.51.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "baseline", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.51.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.51.0-review", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892040.8935091, "load_before": [3.13623046875, 4.66552734375, 6.15380859375], "exit": 0, "end": 1788892046.3251321, "load_after": [3.365234375, 4.6875, 6.15283203125], "corpus_unchanged": true}
|
||||
{"phase": "offerkinds", "label": "0.51.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "offerkinds", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.51.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.51.0-review", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892046.4258618, "load_before": [3.365234375, 4.6875, 6.15283203125], "exit": 0, "end": 1788892063.931115, "load_after": [3.125, 4.544921875, 6.06689453125], "corpus_unchanged": true}
|
||||
{"phase": "offerkinds", "label": "0.50.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "offerkinds", "--server", "/private/tmp/claude-501/-Users-guoliangchen-repo-verilogrustformatter/7b09ba01-f222-4ace-bf9a-b321331bf159/scratchpad/qa-p1/clone-base/target/release/lucisv-server", "--label", "0.50.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.50.0-reference", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892064.038305, "load_before": [3.125, 4.544921875, 6.06689453125], "exit": 0, "end": 1788892086.933341, "load_after": [3.05078125, 4.41796875, 5.97705078125], "corpus_unchanged": true}
|
||||
{"phase": "offerqueue", "label": "0.50.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "offerqueue", "--server", "/private/tmp/claude-501/-Users-guoliangchen-repo-verilogrustformatter/7b09ba01-f222-4ace-bf9a-b321331bf159/scratchpad/qa-p1/clone-base/target/release/lucisv-server", "--label", "0.50.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.50.0-reference", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892087.038445, "load_before": [3.05078125, 4.41796875, 5.97705078125], "exit": 0, "end": 1788892092.464992, "load_after": [2.88623046875, 4.36083984375, 5.94775390625], "corpus_unchanged": true}
|
||||
{"phase": "offerqueue", "label": "0.51.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "offerqueue", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.51.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.51.0-review", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892092.584379, "load_before": [2.88623046875, 4.36083984375, 5.94775390625], "exit": 0, "end": 1788892096.941994, "load_after": [3.05517578125, 4.37109375, 5.94189453125], "corpus_unchanged": true}
|
||||
{"phase": "offeredit", "label": "0.51.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "offeredit", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.51.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.51.0-review", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892097.044162, "load_before": [3.05517578125, 4.37109375, 5.94189453125], "exit": 0, "end": 1788892107.999397, "load_after": [3.26708984375, 4.37451171875, 5.92431640625], "corpus_unchanged": true}
|
||||
{"phase": "offeredit", "label": "0.50.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "offeredit", "--server", "/private/tmp/claude-501/-Users-guoliangchen-repo-verilogrustformatter/7b09ba01-f222-4ace-bf9a-b321331bf159/scratchpad/qa-p1/clone-base/target/release/lucisv-server", "--label", "0.50.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.50.0-reference", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892108.1040409, "load_before": [3.26708984375, 4.37451171875, 5.92431640625], "exit": 0, "end": 1788892122.272806, "load_after": [2.9736328125, 4.25732421875, 5.85498046875], "corpus_unchanged": true}
|
||||
{"phase": "tailrename", "label": "0.50.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "tailrename", "--server", "/private/tmp/claude-501/-Users-guoliangchen-repo-verilogrustformatter/7b09ba01-f222-4ace-bf9a-b321331bf159/scratchpad/qa-p1/clone-base/target/release/lucisv-server", "--label", "0.50.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.50.0-reference", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892122.37522, "load_before": [2.9736328125, 4.25732421875, 5.85498046875], "exit": 0, "end": 1788892129.9690938, "load_after": [3.0556640625, 4.2529296875, 5.84375], "corpus_unchanged": true}
|
||||
{"phase": "tailrename", "label": "0.51.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "tailrename", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.51.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.51.0-review", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892130.065344, "load_before": [3.0556640625, 4.2529296875, 5.84375], "exit": 0, "end": 1788892135.523405, "load_after": [2.970703125, 4.21533203125, 5.82080078125], "corpus_unchanged": true}
|
||||
{"phase": "rename", "label": "0.51.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "rename", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.51.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.51.0-review", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892135.621879, "load_before": [2.970703125, 4.21533203125, 5.82080078125], "exit": 0, "end": 1788892138.869815, "load_after": [2.892578125, 4.17822265625, 5.79833984375], "corpus_unchanged": true}
|
||||
{"phase": "rename", "label": "0.50.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "rename", "--server", "/private/tmp/claude-501/-Users-guoliangchen-repo-verilogrustformatter/7b09ba01-f222-4ace-bf9a-b321331bf159/scratchpad/qa-p1/clone-base/target/release/lucisv-server", "--label", "0.50.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.50.0-reference", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892138.970944, "load_before": [2.892578125, 4.17822265625, 5.79833984375], "exit": 0, "end": 1788892143.292224, "load_after": [2.82080078125, 4.1416015625, 5.77587890625], "corpus_unchanged": true}
|
||||
{"phase": "scan", "label": "0.50.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "scan", "--server", "/private/tmp/claude-501/-Users-guoliangchen-repo-verilogrustformatter/7b09ba01-f222-4ace-bf9a-b321331bf159/scratchpad/qa-p1/clone-base/target/release/lucisv-server", "--label", "0.50.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.50.0-reference", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892143.395048, "load_before": [2.82080078125, 4.1416015625, 5.77587890625], "exit": 0, "end": 1788892217.94282, "load_after": [5.275390625, 4.53271484375, 5.77734375], "corpus_unchanged": true}
|
||||
{"phase": "scan", "label": "0.51.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "scan", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.51.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.51.0-review", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892218.056525, "load_before": [5.275390625, 4.53271484375, 5.77734375], "exit": 0, "end": 1788892290.323183, "load_after": [6.001953125, 4.84033203125, 5.78857421875], "corpus_unchanged": true}
|
||||
{"phase": "rss", "label": "0.51.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "rss", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.51.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.51.0-review", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892290.430812, "load_before": [6.001953125, 4.84033203125, 5.78857421875], "exit": 0, "end": 1788892318.858037, "load_after": [5.36328125, 4.8046875, 5.74169921875], "corpus_unchanged": true}
|
||||
{"phase": "rss", "label": "0.50.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "rss", "--server", "/private/tmp/claude-501/-Users-guoliangchen-repo-verilogrustformatter/7b09ba01-f222-4ace-bf9a-b321331bf159/scratchpad/qa-p1/clone-base/target/release/lucisv-server", "--label", "0.50.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.50.0-reference", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892318.967324, "load_before": [5.36328125, 4.8046875, 5.74169921875], "exit": 0, "end": 1788892347.392648, "load_after": [4.62451171875, 4.67822265625, 5.66259765625], "corpus_unchanged": true}
|
||||
{"phase": "scanserve", "label": "0.50.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "scanserve", "--server", "/private/tmp/claude-501/-Users-guoliangchen-repo-verilogrustformatter/7b09ba01-f222-4ace-bf9a-b321331bf159/scratchpad/qa-p1/clone-base/target/release/lucisv-server", "--label", "0.50.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.50.0-reference", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892347.518341, "load_before": [4.62451171875, 4.67822265625, 5.66259765625], "exit": 0, "end": 1788892372.657131, "load_after": [4.24462890625, 4.58935546875, 5.60205078125], "corpus_unchanged": true}
|
||||
{"phase": "scanserve", "label": "0.51.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "scanserve", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.51.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.51.0-review", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892372.765426, "load_before": [4.24462890625, 4.58935546875, 5.60205078125], "exit": 0, "end": 1788892403.314707, "load_after": [4.27197265625, 4.56298828125, 5.55712890625], "corpus_unchanged": true}
|
||||
{"phase": "didopen", "label": "0.51.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "didopen", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.51.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.51.0-review", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892403.4214458, "load_before": [4.27197265625, 4.56298828125, 5.55712890625], "exit": 0, "end": 1788892436.2839959, "load_after": [4.0380859375, 4.48828125, 5.49560546875], "corpus_unchanged": true}
|
||||
{"phase": "didopen", "label": "0.50.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "didopen", "--server", "/private/tmp/claude-501/-Users-guoliangchen-repo-verilogrustformatter/7b09ba01-f222-4ace-bf9a-b321331bf159/scratchpad/qa-p1/clone-base/target/release/lucisv-server", "--label", "0.50.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.50.0-reference", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892436.393248, "load_before": [4.0380859375, 4.48828125, 5.49560546875], "exit": 0, "end": 1788892472.481503, "load_after": [4.7978515625, 4.6162109375, 5.4951171875], "corpus_unchanged": true}
|
||||
{"phase": "refactor", "label": "0.50.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "refactor", "--server", "/private/tmp/claude-501/-Users-guoliangchen-repo-verilogrustformatter/7b09ba01-f222-4ace-bf9a-b321331bf159/scratchpad/qa-p1/clone-base/target/release/lucisv-server", "--label", "0.50.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.50.0-reference", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892472.585057, "load_before": [4.7978515625, 4.6162109375, 5.4951171875], "exit": 0, "end": 1788892495.574228, "load_after": [4.40478515625, 4.54248046875, 5.4482421875], "corpus_unchanged": true}
|
||||
{"phase": "refactor", "label": "0.51.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "refactor", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.51.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.51.0-review", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892495.6992269, "load_before": [4.40478515625, 4.54248046875, 5.4482421875], "exit": 0, "end": 1788892516.448375, "load_after": [4.466796875, 4.54052734375, 5.4248046875], "corpus_unchanged": true}
|
||||
{"phase": "execute", "label": "0.51.0-review", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "execute", "--server", "/Users/guoliangchen/repo/verilogrustformatter/target/release/lucisv-server", "--label", "0.51.0-review", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.51.0-review", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892516.575686, "load_before": [4.466796875, 4.54052734375, 5.4248046875], "exit": 0, "end": 1788892527.477731, "load_after": [5.8291015625, 4.83935546875, 5.515625], "corpus_unchanged": true}
|
||||
{"phase": "execute", "label": "0.50.0-reference", "command": ["tools/guard.sh", "-m", "8", "-t", "1800", "--", "python3", "tools/perf/bench.py", "execute", "--server", "/private/tmp/claude-501/-Users-guoliangchen-repo-verilogrustformatter/7b09ba01-f222-4ace-bf9a-b321331bf159/scratchpad/qa-p1/clone-base/target/release/lucisv-server", "--label", "0.50.0-reference", "--opentitan", "/Users/guoliangchen/repo/opentitan", "--storage", "/tmp/lucisv-perf-review-20260908/caches/0.50.0-reference", "--out", "/tmp/lucisv-perf-review-20260908/results.jsonl", "--tries", "3"], "start": 1788892527.5977442, "load_before": [5.8291015625, 4.83935546875, 5.515625], "exit": 0, "end": 1788892539.601702, "load_after": [6.2841796875, 4.974609375, 5.5556640625], "corpus_unchanged": true}
|
||||
@@ -0,0 +1 @@
|
||||
error: no library targets found in package `lucisv_server`
|
||||
@@ -0,0 +1,12 @@
|
||||
{"phase": "scanwait", "row": "workspace, cold cache, first useful answer", "ms": [277.2708749980666, 296.13141700974666, 285.29025000170805], "first_answer_ms": [277.2708749980666, 296.13141700974666, 285.29025000170805], "settled_ms": [2895.9847090009134, 2936.972750001587, 2919.4915409898385], "fresh_process": true, "status": "ok", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "message": null, "result_count": 1, "result_counts": [1, 1, 1], "config_wait_ms": [0.66, 0.67, 0.6], "scans": [{"n": 1, "kind": "whole", "first_publish": 197.48, "publishes": 2, "total": 2881.19}], "note": "ms is the definition sent during the scan; `scans` is the first try's trace, so the answer can be placed inside it", "ts": "2026-09-08T13:36:36", "label": "0.51.0-review-trace", "schema": 2, "units": "ms"}
|
||||
{"phase": "scanwait", "row": "workspace, cold cache, answering, scan 1 (whole)", "ms": [2881.19], "settled_ms": [2895.9847090009134, 2936.972750001587, 2919.4915409898385], "stages": {"discovery": 193.59, "order": 1.64, "cache_open": 0.02, "read": 128.26, "lookup": 0.72, "decode": 0.0, "parse": 1699.38, "encode": 189.86, "store_write": 130.65, "publish_absorb": 4.21, "publish_candidates": 3.42, "publish_includes": 2.77, "publish_overlay": 0.08, "gone": 0.42, "absorb": 215.75, "compact": 94.95, "candidates": 113.46, "includes": 9.36, "overlay": 0.09, "total": 2881.19, "since_start": 0.75}, "counts": {"read": 3976, "read_kib": 34970, "skipped": 3, "hits": 0, "misses": 3975, "buffers": 1, "records": 3976, "repeats": 0, "decoded_kib": 0, "written_kib": 45260, "opens": 1, "compactions": 1, "publishes": 2, "published": 124, "first_publish": 197.48, "overlays": 1}, "memory": {"store_before_kib": 45396, "store_after_kib": 45396, "cache_entries": 3976, "cache_encoded_kib": 45260, "index_files": 3976, "unit_names": 3067, "unit_defs": 4013, "members": 91894, "hier_members": 56913, "reference_keys": 59529, "reference_sites": 457666, "defines": 1358, "instantiations": 13894, "fact_words": 345127, "fact_word_kib": 4754, "candidate_units": 50726, "candidate_macros": 658, "candidate_words": 105042, "candidate_word_kib": 1888, "include_edges": 1984, "include_known": 3976, "work_kib": 3}, "fresh_process": true, "result_count": 3976, "status": "ok", "message": null, "note": "the session that answered the first request", "ts": "2026-09-08T13:36:36", "label": "0.51.0-review-trace", "schema": 2, "units": "ms"}
|
||||
{"phase": "scanwait", "row": "workspace, warm cache, first useful answer", "ms": [325.38416600436904, 327.3793339903932, 324.7831250191666], "first_answer_ms": [325.38416600436904, 327.3793339903932, 324.7831250191666], "settled_ms": [1117.4713750078809, 1138.1681250059046, 1133.5577919962816], "fresh_process": true, "status": "ok", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "message": null, "result_count": 1, "result_counts": [1, 1, 1], "config_wait_ms": [0.73, 0.69, 0.56], "scans": [{"n": 1, "kind": "whole", "first_publish": 300.82, "publishes": 2, "total": 1105.59}], "note": "ms is the definition sent during the scan; `scans` is the first try's trace, so the answer can be placed inside it", "ts": "2026-09-08T13:36:44", "label": "0.51.0-review-trace", "schema": 2, "units": "ms"}
|
||||
{"phase": "scanwait", "row": "workspace, warm cache, answering, scan 1 (whole)", "ms": [1105.59], "settled_ms": [1117.4713750078809, 1138.1681250059046, 1133.5577919962816], "stages": {"discovery": 205.02, "order": 1.8, "cache_open": 92.29, "read": 109.87, "lookup": 48.27, "decode": 199.88, "parse": 0.0, "encode": 0.05, "store_write": 0.0, "publish_absorb": 4.08, "publish_candidates": 3.44, "publish_includes": 2.8, "publish_overlay": 0.1, "gone": 0.44, "absorb": 217.08, "compact": 9.52, "candidates": 113.77, "includes": 9.0, "overlay": 0.09, "total": 1105.59, "since_start": 0.83}, "counts": {"read": 3976, "read_kib": 34970, "skipped": 3, "hits": 3975, "misses": 0, "buffers": 1, "records": 0, "repeats": 1, "decoded_kib": 45254, "written_kib": 0, "opens": 1, "compactions": 0, "publishes": 2, "published": 124, "first_publish": 300.82, "overlays": 1}, "memory": {"store_before_kib": 45396, "store_after_kib": 45396, "cache_entries": 3976, "cache_encoded_kib": 45260, "index_files": 3976, "unit_names": 3067, "unit_defs": 4013, "members": 91894, "hier_members": 56913, "reference_keys": 59529, "reference_sites": 457666, "defines": 1358, "instantiations": 13894, "fact_words": 345127, "fact_word_kib": 4754, "candidate_units": 50726, "candidate_macros": 658, "candidate_words": 105042, "candidate_word_kib": 1888, "include_edges": 1984, "include_known": 3976, "work_kib": 3}, "fresh_process": true, "result_count": 3976, "status": "ok", "message": null, "note": "the session that answered the first request", "ts": "2026-09-08T13:36:44", "label": "0.51.0-review-trace", "schema": 2, "units": "ms"}
|
||||
{"phase": "renametrace", "row": "tail: state_q -> state_q_x", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "b39defb212655f29e68c0e15b88dda405d2779a24c4b522a1798b6f44c9a04f7", "peak_rss_kib": 585456.0, "file": "hw/ip/entropy_src/rtl/entropy_src_main_sm.sv", "new_name": "state_q_x", "titles": ["entropy_src_core.sv", "entropy_src_main_sm.sv"], "note": "{\"rungs_request\": 1, \"rungs_declaration\": 95, \"rungs_reference\": 122, \"rungs_instantiation\": 19, \"rungs_macro\": 0, \"rungs_speller\": 0, \"rungs_open\": 1, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 113, \"indirect_instantiation\": 19, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 1, \"verify_total\": 74.3, \"verify_tokens\": 4.3, \"verify_watched\": 106, \"verify_watched_bytes\": 1919528, \"verify_before\": 13.8, \"verify_rebuild\": 38.6, \"verify_after\": 7.9, \"verify_checks\": 0.0, \"parses_index\": 238, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 2, \"parses_after\": 0, \"select\": 14.1, \"selected\": 238, \"fallback\": false, \"bytes\": 4554326, \"edited\": 2, \"index\": 229.2, \"locate\": 0.0, \"edits\": 12.4, \"warnings\": 50.9, \"parses\": 240}", "ms": [409.60441701463424, 393.93470899085514, 391.79995900485665, 392.48679199954495], "status": "ok", "result_count": 1, "edits": 5, "files": 2, "created": 0, "trace_rungs_request": 1, "trace_rungs_declaration": 95, "trace_rungs_reference": 122, "trace_rungs_instantiation": 19, "trace_rungs_macro": 0, "trace_rungs_speller": 0, "trace_rungs_open": 1, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 113, "trace_indirect_instantiation": 19, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 1, "trace_verify_total": 74.3, "trace_verify_tokens": 4.3, "trace_verify_watched": 106, "trace_verify_watched_bytes": 1919528, "trace_verify_before": 13.8, "trace_verify_rebuild": 38.6, "trace_verify_after": 7.9, "trace_verify_checks": 0.0, "trace_parses_index": 238, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 2, "trace_parses_after": 0, "trace_select": 14.1, "trace_selected": 238, "trace_fallback": false, "trace_bytes": 4554326, "trace_edited": 2, "trace_index": 229.2, "trace_locate": 0.0, "trace_edits": 12.4, "trace_warnings": 50.9, "trace_parses": 240, "ts": "2026-09-08T13:36:51", "label": "0.51.0-review-trace", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "ordinary: aes -> aes_renamed", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "fa7e31c78382176d5f96d661228ce82328df8bc77bd6d8575dd38717814cb26c", "peak_rss_kib": 459632.0, "file": "hw/ip/aes/dv/tb/tb.sv", "new_name": "aes_renamed", "titles": ["aes.sv", "aes_bind.sv", "aes_cov_bind.sv", "aes_tb.sv", "aes_wrap.sv", "darjeeling_pd_main.sv", "earlgrey_pd_main.sv", "englishbreakfast_pd_main.sv", "tb.sv"], "note": "{\"rungs_request\": 1, \"rungs_declaration\": 4, \"rungs_reference\": 8, \"rungs_instantiation\": 0, \"rungs_macro\": 0, \"rungs_speller\": 0, \"rungs_open\": 0, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 1, \"indirect_instantiation\": 0, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 0, \"verify_total\": 47.6, \"verify_tokens\": 15.3, \"verify_watched\": 12, \"verify_watched_bytes\": 398160, \"verify_before\": 4.5, \"verify_rebuild\": 23.2, \"verify_after\": 3.0, \"verify_checks\": 0.0, \"parses_index\": 13, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 9, \"parses_after\": 0, \"select\": 8.4, \"selected\": 13, \"fallback\": false, \"bytes\": 400051, \"edited\": 9, \"index\": 22.8, \"locate\": 0.1, \"edits\": 2.4, \"warnings\": 8.3, \"parses\": 22}", "ms": [99.91995900054462, 93.61079201335087, 91.68662500451319, 92.37425000173971], "status": "ok", "result_count": 1, "edits": 14, "files": 9, "created": 0, "trace_rungs_request": 1, "trace_rungs_declaration": 4, "trace_rungs_reference": 8, "trace_rungs_instantiation": 0, "trace_rungs_macro": 0, "trace_rungs_speller": 0, "trace_rungs_open": 0, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 1, "trace_indirect_instantiation": 0, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 0, "trace_verify_total": 47.6, "trace_verify_tokens": 15.3, "trace_verify_watched": 12, "trace_verify_watched_bytes": 398160, "trace_verify_before": 4.5, "trace_verify_rebuild": 23.2, "trace_verify_after": 3.0, "trace_verify_checks": 0.0, "trace_parses_index": 13, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 9, "trace_parses_after": 0, "trace_select": 8.4, "trace_selected": 13, "trace_fallback": false, "trace_bytes": 400051, "trace_edited": 9, "trace_index": 22.8, "trace_locate": 0.1, "trace_edits": 2.4, "trace_warnings": 8.3, "trace_parses": 22, "ts": "2026-09-08T13:36:55", "label": "0.51.0-review-trace", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "unique internal: cipher_alert -> cipher_alert_x", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "5f53e977da59093f59ac3153a59036de64ff2fc041017271d8ebbd9ba41ba1e1", "peak_rss_kib": 433952.0, "file": "hw/ip/aes/rtl/aes_core.sv", "new_name": "cipher_alert_x", "titles": ["aes_core.sv"], "note": "{\"rungs_request\": 1, \"rungs_declaration\": 0, \"rungs_reference\": 2, \"rungs_instantiation\": 0, \"rungs_macro\": 0, \"rungs_speller\": 0, \"rungs_open\": 1, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 2, \"indirect_instantiation\": 0, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 1, \"verify_total\": 5.6, \"verify_tokens\": 1.8, \"verify_watched\": 1, \"verify_watched_bytes\": 48933, \"verify_before\": 0.5, \"verify_rebuild\": 2.9, \"verify_after\": 0.2, \"verify_checks\": 0.0, \"parses_index\": 4, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 1, \"parses_after\": 0, \"select\": 6.2, \"selected\": 4, \"fallback\": false, \"bytes\": 68475, \"edited\": 1, \"index\": 3.6, \"locate\": 0.2, \"edits\": 0.0, \"warnings\": 1.0, \"parses\": 5}", "ms": [18.699292006203905, 17.402541998308152, 16.96154201636091, 17.652250011451542], "status": "ok", "result_count": 1, "edits": 3, "files": 1, "created": 0, "trace_rungs_request": 1, "trace_rungs_declaration": 0, "trace_rungs_reference": 2, "trace_rungs_instantiation": 0, "trace_rungs_macro": 0, "trace_rungs_speller": 0, "trace_rungs_open": 1, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 2, "trace_indirect_instantiation": 0, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 1, "trace_verify_total": 5.6, "trace_verify_tokens": 1.8, "trace_verify_watched": 1, "trace_verify_watched_bytes": 48933, "trace_verify_before": 0.5, "trace_verify_rebuild": 2.9, "trace_verify_after": 0.2, "trace_verify_checks": 0.0, "trace_parses_index": 4, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 1, "trace_parses_after": 0, "trace_select": 6.2, "trace_selected": 4, "trace_fallback": false, "trace_bytes": 68475, "trace_edited": 1, "trace_index": 3.6, "trace_locate": 0.2, "trace_edits": 0.0, "trace_warnings": 1.0, "trace_parses": 5, "ts": "2026-09-08T13:36:59", "label": "0.51.0-review-trace", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "common port: clk_i -> clk_ix", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "31aadc134628bf567da7423a8fc20dda98a76fec4abd9ffa6392f80d4923420a", "peak_rss_kib": 1844032.0, "file": "hw/ip/entropy_src/rtl/entropy_src_main_sm.sv", "new_name": "clk_ix", "titles": ["entropy_src_core.sv", "entropy_src_main_sm.sv"], "note": "{\"rungs_request\": 0, \"rungs_declaration\": 0, \"rungs_reference\": 0, \"rungs_instantiation\": 0, \"rungs_macro\": 0, \"rungs_speller\": 0, \"rungs_open\": 0, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 0, \"indirect_instantiation\": 0, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 0, \"verify_total\": 722.9, \"verify_tokens\": 4.2, \"verify_watched\": 1200, \"verify_watched_bytes\": 19257967, \"verify_before\": 220.5, \"verify_rebuild\": 274.2, \"verify_after\": 139.0, \"verify_checks\": 0.0, \"parses_index\": 3975, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 2, \"parses_after\": 0, \"select\": 263.4, \"selected\": 3976, \"fallback\": true, \"bytes\": 35813310, \"edited\": 2, \"index\": 1841.6, \"locate\": 0.1, \"edits\": 102.6, \"warnings\": 440.4, \"parses\": 3977}", "ms": [3592.943915980868, 3517.926875007106, 3445.247041003313, 3454.967708006734], "status": "ok", "result_count": 1, "edits": 2, "files": 2, "created": 0, "trace_rungs_request": 0, "trace_rungs_declaration": 0, "trace_rungs_reference": 0, "trace_rungs_instantiation": 0, "trace_rungs_macro": 0, "trace_rungs_speller": 0, "trace_rungs_open": 0, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 0, "trace_indirect_instantiation": 0, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 0, "trace_verify_total": 722.9, "trace_verify_tokens": 4.2, "trace_verify_watched": 1200, "trace_verify_watched_bytes": 19257967, "trace_verify_before": 220.5, "trace_verify_rebuild": 274.2, "trace_verify_after": 139.0, "trace_verify_checks": 0.0, "trace_parses_index": 3975, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 2, "trace_parses_after": 0, "trace_select": 263.4, "trace_selected": 3976, "trace_fallback": true, "trace_bytes": 35813310, "trace_edited": 2, "trace_index": 1841.6, "trace_locate": 0.1, "trace_edits": 102.6, "trace_warnings": 440.4, "trace_parses": 3977, "ts": "2026-09-08T13:37:16", "label": "0.51.0-review-trace", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "conflict: state_q -> state_d", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "96f32d4243b1dc541a3e1e90a29a077520688efcc3f8e6c278c5c5f83cdb146b", "peak_rss_kib": 516432.0, "file": "hw/ip/entropy_src/rtl/entropy_src_main_sm.sv", "new_name": "state_d", "titles": [], "note": "{\"rungs_request\": 1, \"rungs_declaration\": 98, \"rungs_reference\": 122, \"rungs_instantiation\": 19, \"rungs_macro\": 0, \"rungs_speller\": 1, \"rungs_open\": 1, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 112, \"indirect_instantiation\": 19, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 1, \"verify_total\": 67.5, \"verify_tokens\": 4.2, \"verify_watched\": 111, \"verify_watched_bytes\": 1962908, \"verify_before\": 14.9, \"verify_rebuild\": 38.4, \"verify_after\": 1.1, \"verify_checks\": 0.0, \"parses_index\": 242, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 2, \"parses_after\": 0, \"select\": 14.9, \"selected\": 242, \"fallback\": false, \"bytes\": 4570234, \"edited\": 2, \"index\": 227.8, \"locate\": 0.0, \"edits\": 12.2, \"warnings\": 0.0, \"parses\": 244}", "ms": [353.26324999914505, 338.5489590000361, 332.7372499916237, 331.558000005316], "status": "refused", "result_count": 0, "message": "lucisv: renaming `state_q` to `state_d` would change what `state_d` means in entropy_src_core.sv; the rename was abandoned.", "edits": 0, "files": 0, "created": 0, "trace_rungs_request": 1, "trace_rungs_declaration": 98, "trace_rungs_reference": 122, "trace_rungs_instantiation": 19, "trace_rungs_macro": 0, "trace_rungs_speller": 1, "trace_rungs_open": 1, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 112, "trace_indirect_instantiation": 19, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 1, "trace_verify_total": 67.5, "trace_verify_tokens": 4.2, "trace_verify_watched": 111, "trace_verify_watched_bytes": 1962908, "trace_verify_before": 14.9, "trace_verify_rebuild": 38.4, "trace_verify_after": 1.1, "trace_verify_checks": 0.0, "trace_parses_index": 242, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 2, "trace_parses_after": 0, "trace_select": 14.9, "trace_selected": 242, "trace_fallback": false, "trace_bytes": 4570234, "trace_edited": 2, "trace_index": 227.8, "trace_locate": 0.0, "trace_edits": 12.2, "trace_warnings": 0.0, "trace_parses": 244, "ts": "2026-09-08T13:37:21", "label": "0.51.0-review-trace", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "new name many uses spell: cipher_alert -> clk_i", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "96f32d4243b1dc541a3e1e90a29a077520688efcc3f8e6c278c5c5f83cdb146b", "peak_rss_kib": 1624864.0, "file": "hw/ip/aes/rtl/aes_core.sv", "new_name": "clk_i", "titles": [], "note": "{\"rungs_request\": 0, \"rungs_declaration\": 0, \"rungs_reference\": 0, \"rungs_instantiation\": 0, \"rungs_macro\": 0, \"rungs_speller\": 0, \"rungs_open\": 0, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 0, \"indirect_instantiation\": 0, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 0, \"verify_total\": 657.4, \"verify_tokens\": 1.7, \"verify_watched\": 1200, \"verify_watched_bytes\": 19257967, \"verify_before\": 312.7, \"verify_rebuild\": 266.0, \"verify_after\": 3.3, \"verify_checks\": 0.0, \"parses_index\": 3975, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 1, \"parses_after\": 0, \"select\": 316.9, \"selected\": 3976, \"fallback\": true, \"bytes\": 35813310, \"edited\": 1, \"index\": 1842.8, \"locate\": 0.3, \"edits\": 2.2, \"warnings\": 0.0, \"parses\": 3976}", "ms": [2985.4518749925774, 2902.685874985764, 2858.6283340118825, 2884.1867499868385], "status": "refused", "result_count": 0, "message": "lucisv: renaming `cipher_alert` to `clk_i` would change what the set of declarations means in aes_core.sv; the rename was abandoned.", "edits": 0, "files": 0, "created": 0, "trace_rungs_request": 0, "trace_rungs_declaration": 0, "trace_rungs_reference": 0, "trace_rungs_instantiation": 0, "trace_rungs_macro": 0, "trace_rungs_speller": 0, "trace_rungs_open": 0, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 0, "trace_indirect_instantiation": 0, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 0, "trace_verify_total": 657.4, "trace_verify_tokens": 1.7, "trace_verify_watched": 1200, "trace_verify_watched_bytes": 19257967, "trace_verify_before": 312.7, "trace_verify_rebuild": 266.0, "trace_verify_after": 3.3, "trace_verify_checks": 0.0, "trace_parses_index": 3975, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 1, "trace_parses_after": 0, "trace_select": 316.9, "trace_selected": 3976, "trace_fallback": true, "trace_bytes": 35813310, "trace_edited": 1, "trace_index": 1842.8, "trace_locate": 0.3, "trace_edits": 2.2, "trace_warnings": 0.0, "trace_parses": 3976, "ts": "2026-09-08T13:37:36", "label": "0.51.0-review-trace", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "duplicate module: rstmgr_por -> rstmgr_por_x", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "fingerprint": "96f32d4243b1dc541a3e1e90a29a077520688efcc3f8e6c278c5c5f83cdb146b", "peak_rss_kib": 916656.0, "file": "hw/top_darjeeling/ip_autogen/rstmgr/rtl/rstmgr.sv", "new_name": "rstmgr_por_x", "titles": [], "note": "{\"rungs_request\": 0, \"rungs_declaration\": 0, \"rungs_reference\": 0, \"rungs_instantiation\": 0, \"rungs_macro\": 0, \"rungs_speller\": 0, \"rungs_open\": 0, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 0, \"indirect_instantiation\": 0, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 0, \"verify_total\": 0.0, \"verify_tokens\": 0.0, \"verify_watched\": 0, \"verify_watched_bytes\": 0, \"verify_before\": 0.0, \"verify_rebuild\": 0.0, \"verify_after\": 0.0, \"verify_checks\": 0.0, \"parses_index\": 3975, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 0, \"parses_after\": 0, \"select\": 312.7, \"selected\": 3976, \"fallback\": true, \"bytes\": 35813310, \"edited\": 0, \"index\": 1871.6, \"locate\": 0.3, \"edits\": 0.0, \"warnings\": 0.0, \"parses\": 3975}", "ms": [2237.4572080152575, 2189.16999999783, 2200.3200000035577, 2220.047250011703], "status": "refused", "result_count": 0, "message": "lucisv: `rstmgr_por` is declared in more than one indexed file; lucisv will not guess which declaration this rename means.", "edits": 0, "files": 0, "created": 0, "trace_rungs_request": 0, "trace_rungs_declaration": 0, "trace_rungs_reference": 0, "trace_rungs_instantiation": 0, "trace_rungs_macro": 0, "trace_rungs_speller": 0, "trace_rungs_open": 0, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 0, "trace_indirect_instantiation": 0, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 0, "trace_verify_total": 0.0, "trace_verify_tokens": 0.0, "trace_verify_watched": 0, "trace_verify_watched_bytes": 0, "trace_verify_before": 0.0, "trace_verify_rebuild": 0.0, "trace_verify_after": 0.0, "trace_verify_checks": 0.0, "trace_parses_index": 3975, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 0, "trace_parses_after": 0, "trace_select": 312.7, "trace_selected": 3976, "trace_fallback": true, "trace_bytes": 35813310, "trace_edited": 0, "trace_index": 1871.6, "trace_locate": 0.3, "trace_edits": 0.0, "trace_warnings": 0.0, "trace_parses": 3975, "ts": "2026-09-08T13:37:49", "label": "0.51.0-review-trace", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
{"phase": "renametrace", "row": "no symbol: whole scope then refuse", "client": {"resolveSupport": true, "applyEdit": false, "createFiles": false}, "peak_rss_kib": 915264.0, "file": "hw/ip/aes/dv/tb/tb.sv", "note": "{\"rungs_request\": 0, \"rungs_declaration\": 0, \"rungs_reference\": 0, \"rungs_instantiation\": 0, \"rungs_macro\": 0, \"rungs_speller\": 0, \"rungs_open\": 0, \"indirect_request\": 0, \"indirect_declaration\": 0, \"indirect_reference\": 0, \"indirect_instantiation\": 0, \"indirect_macro\": 0, \"indirect_speller\": 0, \"indirect_open\": 0, \"verify_total\": 0.0, \"verify_tokens\": 0.0, \"verify_watched\": 0, \"verify_watched_bytes\": 0, \"verify_before\": 0.0, \"verify_rebuild\": 0.0, \"verify_after\": 0.0, \"verify_checks\": 0.0, \"parses_index\": 3975, \"parses_locate\": 0, \"parses_edits\": 0, \"parses_before\": 0, \"parses_rebuild\": 0, \"parses_after\": 0, \"select\": 0.0, \"selected\": 3976, \"fallback\": true, \"bytes\": 35813310, \"edited\": 0, \"index\": 1904.0, \"locate\": 0.1, \"edits\": 0.0, \"warnings\": 0.0, \"parses\": 3975}", "ms": [2227.9127500078175, 2185.5564580182545, 2191.6602499841247, 2245.604875002755], "status": "refused", "result_count": 0, "message": "lucisv: there is no symbol to rename at this position.", "trace_rungs_request": 0, "trace_rungs_declaration": 0, "trace_rungs_reference": 0, "trace_rungs_instantiation": 0, "trace_rungs_macro": 0, "trace_rungs_speller": 0, "trace_rungs_open": 0, "trace_indirect_request": 0, "trace_indirect_declaration": 0, "trace_indirect_reference": 0, "trace_indirect_instantiation": 0, "trace_indirect_macro": 0, "trace_indirect_speller": 0, "trace_indirect_open": 0, "trace_verify_total": 0.0, "trace_verify_tokens": 0.0, "trace_verify_watched": 0, "trace_verify_watched_bytes": 0, "trace_verify_before": 0.0, "trace_verify_rebuild": 0.0, "trace_verify_after": 0.0, "trace_verify_checks": 0.0, "trace_parses_index": 3975, "trace_parses_locate": 0, "trace_parses_edits": 0, "trace_parses_before": 0, "trace_parses_rebuild": 0, "trace_parses_after": 0, "trace_select": 0.0, "trace_selected": 3976, "trace_fallback": true, "trace_bytes": 35813310, "trace_edited": 0, "trace_index": 1904.0, "trace_locate": 0.1, "trace_edits": 0.0, "trace_warnings": 0.0, "trace_parses": 3975, "ts": "2026-09-08T13:38:00", "label": "0.51.0-review-trace", "schema": 2, "units": "ms", "fresh_process": false}
|
||||
@@ -0,0 +1,11 @@
|
||||
Compiling vlog_refactor v0.51.0 (/Users/guoliangchen/repo/verilogrustformatter/crates/vlog_refactor)
|
||||
Finished `test` profile [unoptimized + debuginfo] target(s) in 10.97s
|
||||
Running unittests src/lib.rs (target/debug/deps/vlog_refactor-6fa98d39c8c1041c)
|
||||
|
||||
running 3 tests
|
||||
test check::after::tests::absorbing_an_edited_file_keeps_every_file_id ... ok
|
||||
test check::after::tests::a_print_names_paths_so_shifted_file_ids_cannot_change_it ... ok
|
||||
test check::after::tests::an_absorbed_after_index_is_the_index_a_rebuild_would_give ... ok
|
||||
|
||||
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 134 filtered out; finished in 0.01s
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.03s
|
||||
Running unittests src/main.rs (target/debug/deps/lucisv_server-9b8908a6a3cd6f3d)
|
||||
|
||||
running 7 tests
|
||||
test scan_order::tests::exactly_half_is_still_a_head_and_one_more_is_not ... ok
|
||||
test scan_order::tests::the_bound_is_against_the_whole_scan_and_not_against_what_is_left ... ok
|
||||
test scan_order::tests::a_folder_that_is_most_of_the_workspace_is_not_a_head_to_wait_for ... ok
|
||||
test scan_order::tests::an_open_buffer_outside_the_scope_still_lends_its_folder ... ok
|
||||
test scan_order::tests::with_nothing_open_the_list_is_path_order_and_there_is_no_head ... ok
|
||||
test scan_order::tests::the_open_buffer_leads_then_its_folder_then_the_rest ... ok
|
||||
test scan_order::tests::a_path_handed_over_twice_is_one_file ... ok
|
||||
|
||||
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 1636 filtered out; finished in 0.00s
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
Compiling vlog_parser v0.51.0 (/Users/guoliangchen/repo/verilogrustformatter/crates/vlog_parser)
|
||||
Compiling lucisv_core v0.51.0 (/Users/guoliangchen/repo/verilogrustformatter/crates/lucisv_core)
|
||||
Compiling vlog_semantic v0.51.0 (/Users/guoliangchen/repo/verilogrustformatter/crates/vlog_semantic)
|
||||
Compiling vlog_formatter v0.51.0 (/Users/guoliangchen/repo/verilogrustformatter/crates/vlog_formatter)
|
||||
Compiling vlog_refactor v0.51.0 (/Users/guoliangchen/repo/verilogrustformatter/crates/vlog_refactor)
|
||||
Compiling vlog_linter v0.51.0 (/Users/guoliangchen/repo/verilogrustformatter/crates/vlog_linter)
|
||||
Compiling lucisv_server v0.51.0 (/Users/guoliangchen/repo/verilogrustformatter/crates/lucisv_server)
|
||||
Finished `test` profile [unoptimized + debuginfo] target(s) in 52.26s
|
||||
Running unittests src/main.rs (target/debug/deps/lucisv_server-9b8908a6a3cd6f3d)
|
||||
|
||||
running 8 tests
|
||||
test server::tests::startup::a_client_that_cannot_be_asked_scans_at_once_exactly_as_it_always_did ... ok
|
||||
test server::tests::startup::a_client_that_answers_pays_one_scan_at_the_scope_it_asked_for ... ok
|
||||
test server::tests::startup::an_answer_behind_a_held_request_is_not_stranded_for_the_whole_bound ... ok
|
||||
test server::tests::startup::a_did_open_that_beats_the_answer_is_folded_into_the_one_scan_and_indexed_first ... ok
|
||||
test server::tests::startup::a_request_that_beats_the_answer_is_answered_inside_the_startup_scan ... ok
|
||||
test server::tests::startup::a_request_that_beats_the_answer_is_answered_from_the_users_own_folder ... ok
|
||||
test server::tests::startup::a_did_open_answered_mid_scan_pulls_its_folder_in_front_of_the_request_behind_it ... ok
|
||||
test server::tests::startup::a_client_that_never_answers_is_bounded_and_then_scanned_at_the_defaults ... ok
|
||||
|
||||
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 1635 filtered out; finished in 0.14s
|
||||
|
||||
@@ -1975,3 +1975,878 @@ this stage; each says so rather than being left ambiguous.
|
||||
- Interpretation, remaining bottleneck, tradeoffs, rejected alternatives:
|
||||
- Decision: retain / revise / reject / defer; next stage justified by evidence:
|
||||
- QA result and lead review link:
|
||||
|
||||
## Independent review — 2026-09-08, released 0.51.0
|
||||
|
||||
An independent paired rerun at `126a6bcdac99e940534c87bce94a5269cdc53ae4`
|
||||
confirms the main improvements. See [the review, causes and next plan](../performance_take5_review.md)
|
||||
and [preserved evidence](take5-review-20260908/README.md). This section does
|
||||
not reopen or overwrite the completed P0–P4 implementation records above.
|
||||
|
||||
Paired repeat medians: pinmux no-offer **300.4 → 25.0 ms**, queued definition
|
||||
**311.7 → 24.2 ms**, tail rename **795.1 → 398.3 ms**, successful extract edit
|
||||
computation **249.5 → 150.3 ms**, CLI style check **660 → 490 ms**. Warm scan
|
||||
**1,381.4 → 1,117.9 ms**, warm idle RSS **574.4 → 419.0 MiB**. Cold scan is
|
||||
unchanged at about **2.91 s**. First useful definition is slower in the paired
|
||||
run: **85.6 → 286.8 ms cold**, **214.7 → 328.2 ms warm**, with a result in
|
||||
every trial. This confirms the documented P4b3 latency tradeoff rather than
|
||||
closing its missed target.
|
||||
|
||||
Candidate-only broader rename probes still cost **3,455 ms** for a common
|
||||
port and **2,192 ms** to refuse a cursor with no symbol. The latter parses
|
||||
3,975 files before refusing. These are remaining costs; they are not labeled
|
||||
as regressions without paired reference measurements.
|
||||
|
||||
### Follow-up experiment queue — implementation agent to fill
|
||||
|
||||
**Status (2026-09-09): every row below has run** — R1a, R1b, R2a, R2b, R3a, R3b, R3c, R4 retained (each with its experiment record; the tail trade and the two refused designs recorded in their rows). These were proposed experiments when written, **not implemented or accepted improvements** at the time.
|
||||
Use the experiment-record template above for each retained or rejected change.
|
||||
Keep the 0.51.0 cells below fixed; enter candidate results and raw evidence in
|
||||
the blank columns. Rebase the comparison explicitly if implementation starts
|
||||
from a different commit. Before accepting any change, fill first/repeat/range,
|
||||
work counts, result parity, peak and idle memory, guard outcome, and correctness
|
||||
checks in its full experiment record. Targets are proposed gates, not promises.
|
||||
|
||||
| ID | Hypothesis / proposed work | 0.51.0 review baseline | Proposed gate | Owner / candidate commit | Candidate result / raw evidence | Decision |
|
||||
|---|---|---|---|---|---|---|
|
||||
| R1a | Dependency-correct lint-result reuse removes repeated quickfix work | pinmux all 25.0 ms; quickfix 23.1 ms; queued definition 24.2 ms | unchanged all/queued ≤16 ms; current results after every invalidation | dev (Opus), §61.2, tree at `51cbfd2` + the §61.2 diff | Paired against this session's own reference (`51cbfd2`, 22.61 / 24.51 / 22.39 ms): **all families 0.98 ms (−95.6%)**, **quickfix only 0.11 ms (−99.5%)**, **queued definition leader/follower 0.78 / 0.76 ms (−96.5%)**. Snapshot on the `Document`, key compared by value; idle RSS at 100 open buffers 574.0 → 574.6 MiB (+0.1%); diagnostics publish +0.3%. 21 tests added, one per invalidation row plus a stale-fix attack. [Record R1a-2026-09-08](#experiment-record--r1a-2026-09-08-stage-r1a); `~/.cache/lucisv-perf/take5r-2/` | Retained — QA PASS → lead; committed 2026-09-08 |
|
||||
| R1b | Profile then reduce dirty-buffer analysis on the first action after an edit | pinmux 135.9 ms; unchanged repeat about 24 ms | first-edit reduction shown separately; didChange ordering preserved | dev (Opus), §61.2, trace-only build of `51cbfd2` + `lint_trace.rs` | **Attribution, no behaviour change.** The unchanged 22 ms menu is **20.9 ms `lint_with`**, 0.04 ms config I/O, 0.01 ms run build, 0.03 ms serialization, fence skipped (zero violations). Of the 127.5 ms first-after-edit: **99.7 ms flush** (1 parse of 1.3 MB + the diagnostics publish, itself **21.1 ms**) and **20.2 ms** the handler's own second pass — so a lint cache can only remove one 21 ms pass, which R1a then did (**125.65 → 106.89 ms, −14.9%**). Per-rule ablation: `unused-signal` +8.2, `undriven-net` +7.4, `multiply-driven` +7.5 ms over a 1.3 ms floor; the other 55 default rules ≤ +2.2 ms each. [Record R1b-2026-09-08](#experiment-record--r1b-2026-09-08-stage-r1b) | Retained — QA PASS → lead; committed 2026-09-08 |
|
||||
| R2a | Remove redundant discovery metadata/config work | traced warm discovery 205.0 ms; first useful answer 328.2 ms paired | first useful answer ≤200 ms milestone, correct settled target | dev (Opus), §61.3, tree at `a1c77c0` + the §61.3 diff | **Measured first, then fixed — and the measurement is the finding.** The warm 165.6 ms discovery splits `walk` **158.0**, `cap` **6.9** (3 979 `metadata`), `sort` 0.5, `config` 0.00, `filelist` 0.00, `buffers` 0.00: the cap's second `stat` is **6.9 ms, not the ~45 §P4b3 guessed**, because the walk has just warmed those inodes, and the walk is 95 % of discovery. The hand-off (`lucisv_core::walk::collect_files_with`, additive) takes `stats` **3 979 → 0** and `cap` **6.92 → 0.10 ms**, discovery **165.6 → 154.9** (−6.4 %); the first answer does not move outside its spread. Kept as a tidy-up; **R2b is the lever**. [Record R2a-2026-09-08](#experiment-record--r2a-2026-09-08-stage-r2a); `~/.cache/lucisv-perf/take5r-3/` | Retained — QA PASS → lead; committed 2026-09-08 |
|
||||
| R2b | Begin useful local-folder work before full discovery/cache loading finishes | warm cache open 92.3 ms in traced session; cold/warm first answer 286.8/328.2 ms | single coherent scan, correct results across startup ordering cases | dev (Opus), §61.3, tree at `a1c77c0` + the §61.3 diff | Paired against this session's own reference (`a1c77c0`): first useful definition **265.9 → 77.9 ms cold (−70.7 %)** and **301.3 → 115.1 ms warm (−61.8 %)**, result count **1 in 12 of 12** sessions of both binaries; `first_publish` **274.7 → 92.0 ms** warm and **192.0 → 5.7** cold. One scan, one work list, `read=3 976` in every cell, **store byte-identical** (three sha256s over 28 stores), 24 of 24 scope cells equal, `mismatched_answers` **0** and the new stricter `unsettled_answers` **0**. Warm quiet settle **1 033.9 → 997.4 ms** (≤ 1 s, first time); idle RSS **−8.6 % cold / −0.7 % warm**, peak = idle. Cost named: **+2.5 % / +4.8 %** settled at 1 / 10 open buffers, the neighbourhood subtree walked twice. The store open's 89 ms is **61 ms of checksum**; a bounded local load was designed and measured (~26 ms, ~50 ms first answer) and **not shipped** — it moves cost rather than removing it and changes `Load::canonical`. [Record R2b-2026-09-08](#experiment-record--r2b-2026-09-08-stage-r2b); `~/.cache/lucisv-perf/take5r-3/` | Retained — QA PASS → lead; committed 2026-09-08 |
|
||||
| R3a | Engine-owned empty-cursor preflight avoids whole-workspace materialization | no-symbol refusal 2,192 ms; 3,975 parses, candidate-only trace | ≤16 ms; zero closed-workspace parses; exact refusal/precedence | dev (Opus), §61.1, tree at `e13ae4c` + the §61.1 diff | **0.3 ms** repeat median (paired reference 2,012.3 ms, −100.0%); `trace_parses` **0**, `trace_selected` **0** off the wire; refusal byte-identical; peak RSS 909 → 429 MiB. [Record R3a-2026-09-08](#experiment-record--r3a-2026-09-08-stage-r3a); `~/.cache/lucisv-perf/take5r-1/` | Retained — QA PASS → lead; committed 2026-09-08 |
|
||||
| R3b | Reuse valid source analysis and reduce initial scope construction | tail rename 398.3 ms; traced index stage 229.2 ms; 238 selected files | ≥20% wire improvement milestone; same edits/warnings/refusals; bounded RSS | dev (Opus), §61.5, tree at `07ef771` + the §61.5 diff | **An engine door (`vlog_refactor::KnownFacts`), one server implementation, no persistent decoded cache.** A caller may hand back the index record it already holds **for exactly the bytes it is handing over**; the engine then skips that file's parse. The tie is `IndexCache`'s own store entry — record and FNV-1a written by one read, compared in one function (`entry_for`) — never the workspace index's record, which carries no hash. Paired against this session's own reference (`07ef771`, order alternated per phase): tail rename **380.2 → 314.0 ms (−17.4 %)**, parses **240 → 137** = `(K − 103 reused) + E`, peak RSS 615 → 596 MiB. Fallback `clk_i` **3 346.5 → 2 762.5 (−17.4 %)**, conflict **−18.8 %**, new-name-many-uses **−18.5 %**, duplicate-module refusal **2 053.1 → 695.2 (−66.1 %, 3 975 → 14 parses)**; `aes` −0.5 %, extract refusal −0.7 %, both resolves within ±1.4 %. RSS lower or level on every row. Parity: 36 paired rows equal on fingerprint/message/status/counts/titles (**0 mismatches**) and a new `renamewarn` phase compared **1 750 warning sentences line by line** — identical. `check/` has no diff. 4 366 → 4 374 tests. [Record R3b-2026-09-08](#experiment-record--r3b-2026-09-08-stage-r3b); `~/.cache/lucisv-perf/take5r-5/` | Retained — QA PASS → lead; committed 2026-09-09 |
|
||||
| R3c | Profile broad fallbacks, warnings and refused extraction before optimizing | common port 3,455 ms; tail warning stage 50.9 ms; extract refusal 804.9 ms | measured work reduction; no weaker selection or verification | dev (Opus), §61.1 — **refused-extraction half only**; the broad fallbacks and the warning stage remain open for §61.5 | Extract refusal **761.1 → 767.8 ms (+0.9%, unchanged)**: its stage is `boundary::Crossing::read`, which needs `flow::read(&scope, …)` for instantiated-module port directions, so no bounded preflight reaches it. A region-local preflight was built, measured and **removed** — `site_at` (= `extract_site_in`) already answers the parse and `Region::read` refusals, and `plain_identifier`/occupied are already ahead of `Extraction::plan`. New phase `extractrefuse`. [Record R3c-x-2026-09-08](#experiment-record--r3c-x-2026-09-08-stage-r3c-extraction-half) | **Reject** the preflight (no work to remove); **defer** the 805 ms to §61.5's scope reuse. **Second half, §61.5 (dev Opus, tree `07ef771`): the split, shipped in the engine trace.** The tail's 242.4 ms scope stage is `lead` 0.4 + `kept` 133.5 + **`other` 83.1 (34.3 %)** + `merge` 23.4 — `other` being the 103 container files analysed for their index record and never read again. Inside one analysis (trace-only build, not shipped): **lex 34 %, parse 32 %, analyse 20 %, read-off 13 %** — the stage is two thirds lexer-and-parser, so the lever is not running it rather than making it faster. The 49.7 ms warning pass is **84 % the macro-argument scan**, which is one lex per name-spelling file *already shared* by all five scans — nothing duplicated left to remove, and retaining the tokens instead is refused on the `clk_i` row's 1.9 GiB peak. Allocation reported as peak RSS per row (no `GlobalAlloc` counter: that needs `unsafe`). Broad fallbacks: 35.8 % / 36.0 % / **87.8 %** `other`. [Record R3c-2026-09-08](#experiment-record--r3c-2026-09-08-stage-r3c-measurement-half) | Retained — QA PASS → lead; committed 2026-09-09 |
|
||||
| R4 | Separate publication overhead from quiet scan decode/merge cost | quiet cold/warm 2,907/1,118 ms; scanserve max 337/328 ms | same offered load; improve queue latency and completion; warm quiet ≤1 s | dev (Opus), §61.4, tree at `eb54042` + the §61.4 diff | **Measured first, and the split named a different lever than the plan.** New phase `scanload` — a definition every 100/250 ms of **wall clock**, a fixed count of them, so both binaries are offered the same load. At `eb54042`, warm, one open buffer, 100 ms: **34 publishes**, `absorb` **2 433 ms (78 %)**, `candidates` **623 (20 %)**, `includes` 47, `overlay` **2.4 (0.08 %)** — **3 105 ms of publication in a 4 206 ms scan** whose quiet form is 1 005 ms; cold **7 973 of 10 675** against 2 766 quiet. `absorb` dominates because it ends in a whole-index merge; the **overlay refresh is not a lever** (0.08 % at 1 buffer, 9.6 % at 101), so the selective refresh the plan asked for was **not built**. Shipped instead: a **publication cadence** (`PUBLISH_EVERY` 512, the first-answer drain exempt). Same offered load, requests answered equal in every cell: publication **−78 to −88 %**, traced scan **−48 to −65 %**, median wait **−98 to −99.5 %** (warm 112.3 → 1.9 ms; cold at 2+ buffers 4 706 → 2.1). Tail improved in **10 of 16** loaded cells, level in 2, higher in 4 — three of them single-open-buffer cells (worst warm 168 → 422 ms), against cold 101 buffers 9 308 → 1 583. Quiet warm scan **1 005 → 985 ms**, quiet cold 2 724 → 2 694. `scanserve` cold median **122.2 → 45.6 ms**, same 13 requests served; quiet `scan` matrix, the first useful answer (78.2 → 80.8 cold, 115.1 → 115.8 warm), idle RSS (−0.2 %), the store size and 24 of 24 scope cells all unchanged. `mismatched_answers` **0** and `unsettled_answers` **0** everywhere — including a new **cross-folder** cell where the reference is unsettled **12 of 270** with one buffer open and **270 of 270** with eleven, and the candidate **0 of 270** in both. Also here: the lead's §61.3 empty-answer ruling and the `HEAD_WALK_MAX` fixture. [Record R4-2026-09-08](#experiment-record--r4-2026-09-08-stage-r4); `~/.cache/lucisv-perf/take5r-4/` | Retained — QA PASS → lead; the single-buffer tail (max 168 → 422 ms warm, cadence spacing) accepted as the trade for median −98 % and completion −48 to −65 %; a cancel-while-deferred fix by the lead; committed 2026-09-08 |
|
||||
|
||||
Maintain the successful P3 CLI result as a control: 7,751 style diagnostics,
|
||||
byte-identical stdout, about 490 ms wall / 2.44 s user CPU here. Preserve the
|
||||
warm idle memory gain and all source-selection/fence/after-index contracts in
|
||||
[topo.md](../topo.md). Cross-module API changes need their handshake recorded
|
||||
before implementation; no verifier forgiveness may be weakened for speed.
|
||||
|
||||
## Experiment record — R2a-2026-09-08 (stage R2a)
|
||||
|
||||
- **Experiment ID / stage / date / owner:** `R2a-2026-09-08` / R2a (TODO §61.3)
|
||||
/ 2026-09-08, America/Chicago / dev agent (Opus).
|
||||
- **Hypothesis and exact expected work reduction:** the review's "measure
|
||||
walk / config-ignore handling / repeated metadata for the size cap / path
|
||||
sorting / cache container load independently", then "reuse metadata already
|
||||
obtained by the core walker for the cap". Expected: 3 976 `metadata` calls
|
||||
removed per scan, and — per §P4b3's note — something like 45 ms of the 158 ms
|
||||
discovery.
|
||||
- **Reference commit, candidate commit or diff hash, binary hashes:** reference
|
||||
trunk `a1c77c053fd940db4e8ac3b112aff1ef3d3d7235`, sha256
|
||||
`827c7ac222c829d1…` (`REF`). Two candidates: `SPLIT` (the stage split alone,
|
||||
`oversize` still stat'ing), sha256 `afc5bf04474dd8ab…`; `R2A` (the hand-off),
|
||||
sha256 `533a364dd18782db…`. Release, `rustc 1.97.1 (Homebrew)`,
|
||||
`cargo build --release --locked`.
|
||||
- **Files changed / API contracts amended / topology references:**
|
||||
`crates/lucisv_core/src/walk.rs` (`collect_files_with`, additive;
|
||||
`collect_files` becomes a wrapper), `crates/lucisv_server/src/scan_trace.rs`
|
||||
(eight fields, six on the stage line, two on the count line),
|
||||
`crates/lucisv_server/src/state/discover.rs` (new; the scope ladder moved out
|
||||
of `state/mod.rs`), `state/mod.rs`. Topology: `lucisv_server ──▶ lucisv_core`
|
||||
(walk) — a request for the lead, recorded in
|
||||
`docs/features/perf5r-first-answer/README.md` and
|
||||
`docs/features/walk-cycles/README.md`.
|
||||
- **Workload, corpus/input hashes, open files, cursor, capabilities:**
|
||||
OpenTitan `0098135264` with its three known modified files,
|
||||
`git status --porcelain` checked after every phase. `bench.py scanwait`,
|
||||
`lucisv.index.scope: "workspace"`, one open buffer (`sites.TB`), the `aes #(`
|
||||
cursor. `--verbose`, so the traced session is the one that answered.
|
||||
- **Machine, profile, load, competing activity:** M1 Max, macOS 27.0, release,
|
||||
default worker count. One-minute load 2.4–4.6 across both phases. No cargo
|
||||
command during a timed run.
|
||||
- **Commands, cache state, trial ordering, fresh sessions:**
|
||||
`tools/guard.sh -m 8 -t 1800 -- python3 tools/perf/bench.py scanwait
|
||||
--server … --tries 3`, `SPLIT` then `R2A`, three fresh processes per cell,
|
||||
cold and warm store per cell.
|
||||
- **Results:** `discovery` warm **165.56 → 154.90 ms**, cold
|
||||
**186.59 → 179.95**; `cap` warm **6.92 → 0.10**, cold **7.53 → 0.49**;
|
||||
`stats` **3 979 → 0** in both. First useful answer, three sessions each:
|
||||
cold 273.1/260.9/258.0 → 263.3/257.3/256.1; warm 281.3/300.8/282.8 →
|
||||
271.1/294.8/290.9 — **inside the spread, both ways**. The split itself
|
||||
attributes warm discovery as `walk` 158.01, `cap` 6.92, `sort` 0.52,
|
||||
`config` 0.00, `filelist` 0.00, `buffers` 0.00.
|
||||
- **Result parity:** result count 1 in every session; the persistent store
|
||||
byte-identical to the reference's (sha256 `1f7799db4885dc8d…`, 46 486 433
|
||||
bytes).
|
||||
- **Memory:** unchanged by construction (no retention moved); measured with
|
||||
R2b below.
|
||||
- **Guard outcome:** no kill.
|
||||
- **Decision:** **retained**, as a tidy-up rather than a fix — 3 976 syscalls
|
||||
for a number already in hand is work with no defence, and it costs nothing.
|
||||
The first answer is not what it moved. The finding that mattered is that
|
||||
`walk` is 95 % of discovery, which is what sent §61.3 at the *order* of the
|
||||
scan (R2b) rather than at the walk.
|
||||
|
||||
## Experiment record — R2b-2026-09-08 (stage R2b)
|
||||
|
||||
- **Experiment ID / stage / date / owner:** `R2b-2026-09-08` / R2b (TODO §61.3)
|
||||
/ 2026-09-08, America/Chicago / dev agent (Opus).
|
||||
- **Hypothesis and exact expected work reduction:** hand the raised-folder work
|
||||
to the scan before the remaining discovery finishes — one coherent scan, the
|
||||
folder walked, stepped and published first. Expected: the first useful answer
|
||||
≈ folder walk + store open + the folder's own steps, i.e. the 155 ms
|
||||
workspace walk out from in front of it.
|
||||
- **Reference commit, candidate commit or diff hash, binary hashes:** reference
|
||||
trunk `a1c77c053fd940db4e8ac3b112aff1ef3d3d7235`, sha256
|
||||
`827c7ac222c829d1…`. Candidate `R2` = that tree + the whole §61.3 diff,
|
||||
sha256 `3db0c799a8302696…`. Release, `rustc 1.97.1 (Homebrew)`.
|
||||
- **Files changed / API contracts amended / topology references:**
|
||||
`lucisv_core/src/walk.rs` (`collect_files_below`, additive),
|
||||
`lucisv_server/src/state/{discover.rs (new), mod.rs, scan.rs}`,
|
||||
`scan_trace.rs`, `server/{index.rs, startup.rs}`, `server/tests/startup.rs`,
|
||||
`tools/perf/phases_p4.py`. Amended in their own READMEs, rules unchanged:
|
||||
index-scope, scan-interleave, indexing-ux, index-persistence, walk-cycles.
|
||||
Requests for the lead are listed in
|
||||
`docs/features/perf5r-first-answer/README.md`.
|
||||
- **Workload, corpus/input hashes, open files, cursor, capabilities:**
|
||||
OpenTitan `0098135264`, three known modified files, `git status --porcelain`
|
||||
checked after every phase. Phases `scanwait`, `scan`, `scanprofile`,
|
||||
`scanserve`, `rss`, `didopen`, `scopes`; `sites.TB` open, the `aes #(`
|
||||
cursor; 0 / 1 / 10 / 100 buffer cells.
|
||||
- **Machine, profile, load, competing activity:** M1 Max, macOS 27.0, release.
|
||||
Load 1.8–4.2, except the first `scanprofile` pair which ran into a
|
||||
`syspolicyd` burst at 8.6 and was re-run in the quiet window — **both runs
|
||||
quoted**. No cargo command during a timed run.
|
||||
- **Commands, cache state, trial ordering, fresh sessions:**
|
||||
`tools/guard.sh -m 8 -t 1800 -- python3 tools/perf/bench.py <phase>
|
||||
--tries 3`, `REF` then `R2` per phase, `didopen` re-run
|
||||
R2/REF/R2/REF alternating. Three fresh processes per cell.
|
||||
- **Results — first / repeat / range (ms, three fresh sessions):**
|
||||
|
||||
| cell | `REF` | `R2` | paired |
|
||||
|---|---|---|---|
|
||||
| `scanwait` cold, first useful answer | 272.1 / 265.9 / 265.1 | 83.9 / 77.9 / 77.2 | **−70.7 %** |
|
||||
| `scanwait` warm, first useful answer | 300.6 / 301.3 / 303.4 | 113.4 / 115.1 / 115.5 | **−61.8 %** |
|
||||
| `scan` cold, first useful answer | 261.3 / 260.7 / 262.7 | 78.8 / 83.2 / 81.5 | **−68.8 %** |
|
||||
| `scan` warm, first useful answer | 280.8 / 284.7 / 281.6 | 114.2 / 115.0 / 116.2 | **−59.2 %** |
|
||||
| `scan` workspace, cold settled | 2 716.8 / 2 785.9 / 2 740.0 | 2 703.3 / 2 704.1 / 2 733.1 | −1.3 % |
|
||||
| `scan` workspace, warm settled | 1 045.3 / 999.4 / 1 034.0 | 995.4 / 997.4 / 1 026.5 | −3.5 % |
|
||||
| `scanprofile` warm, 0 / 1 / 10 / 100 buffers | 1 046.2 / 1 013.7 / 1 020.0 / 1 231.6 | 991.9 / 1 038.6 / 1 069.3 / 1 169.0 | −5.2 / **+2.5** / **+4.8** / −5.1 % |
|
||||
|
||||
- **Work counts:** `read` 3 976 in every workspace cell of both binaries;
|
||||
`stats` 0; `walk_dirs` 2 (one folder, one root). Traced `scanwait`:
|
||||
`discovery` 182.8 → 155.9 warm and 188.4 → 160.3 cold, `cache_open`
|
||||
89.7 → 88.9, **`first_publish` 274.7 → 92.0 warm and 192.0 → 5.7 cold**.
|
||||
- **Result parity:** result count **1 in 12 of 12** sessions, both binaries.
|
||||
`scopes` 24 of 24 result counts equal. `scanserve` `mismatched_answers` 0 and
|
||||
`unsettled_answers` (new: every answer, empty ones included, equal to the
|
||||
settled one) **0** for both binaries, cold and warm, over 54 mid-scan
|
||||
requests. **The persistent store is byte-identical**: 28 stores over seven
|
||||
phases and both binaries reduce to three sha256s —
|
||||
workspace `1f7799db4885dc8d…` (46 486 433 B), default `fea51578039cf937…`
|
||||
(1 615 179 B), depth 0 `d5e641a24188960e…` (6 833 B).
|
||||
- **Peak and idle memory:** idle RSS cold **549 184 → 501 840 KiB (−8.6 %)**,
|
||||
warm **429 936 → 426 752 (−0.7 %)**; peak equals idle in all 12 sessions of
|
||||
both binaries, as in every round since §P4a.
|
||||
- **Guard outcome:** no kill, `-m 8 -t 1800` throughout.
|
||||
- **Correctness checks:** eight new wire tests over the ordering matrix
|
||||
(configuration before/after `didOpen`, late/no reply, unsaved buffer, two
|
||||
buffers in two folders, root-level file, a dependency outside the first
|
||||
folder, the bar's denominator, the opening bound) plus the four existing
|
||||
§P4b2/§P4b3 startup tests — 24 startup tests green. Seven new
|
||||
`lucisv_core::walk` tests, including three that assert
|
||||
`collect_files_below` equals the whole-root walk restricted to that subtree.
|
||||
Workspace suite 4 343 → **4 360**, none dropped; `cargo fmt` clean, guarded
|
||||
`cargo clippy --all-targets` clean.
|
||||
- **Decision:** **retained.** Gates: ≤ 200 ms first definition met cold and
|
||||
warm with a wide margin; warm quiet settle ≤ 1 s met for the first time
|
||||
(997 ms, by less than the run-to-run spread); RSS kept; store bytes
|
||||
identical; scope cells identical; coherence 0/0. Two things named rather than
|
||||
hidden: the settled scan is **+2.5 % / +4.8 % with 1 / 10 open buffers**
|
||||
because the neighbourhood subtree is walked twice, and the "every first
|
||||
definition equals the settled target" gate is met on the measured cursor and
|
||||
on all 54 probe requests but is **not true by construction** for a
|
||||
cross-folder cursor — pinned by a test, argued in the feature README, and
|
||||
filed as a `server/dispatch.rs` handshake.
|
||||
|
||||
## Experiment record — R1b-2026-09-08 (stage R1b)
|
||||
|
||||
- **Experiment ID / stage / date / owner:** `R1b-2026-09-08` / R1b (TODO
|
||||
§61.2) / 2026-09-08, America/Chicago / dev agent (Opus).
|
||||
- **Hypothesis and exact expected work reduction:** none — this is the
|
||||
review's "trace the stages first". The expected *output* is an attribution
|
||||
of the 23 ms quickfix menu and the 136 ms first-after-edit across config
|
||||
discovery, `LintRun` build, lint, fence and serialization, plus the dirty
|
||||
buffer flush measured apart from the handler.
|
||||
- **Reference commit, candidate commit or diff hash, binary hashes:** the
|
||||
traced build is trunk `51cbfd27dfd22720856c501c9c17277460cc6a68` plus
|
||||
`lint_trace.rs` and its call sites — behaviour-identical, the trace armed
|
||||
only under `--verbose`. Release, rustc 1.97.1 (Homebrew). The R1b numbers
|
||||
are candidate-only by construction: the reference has no trace to read.
|
||||
- **Files changed / API contracts amended / topology references:**
|
||||
`crates/lucisv_server/src/lint_trace.rs` (new), `lint.rs` (two stages around
|
||||
the discovery and the run build, one around `lint_with`), `fences.rs` (a
|
||||
read-only `held` predicate), `code_action.rs` (the serialization stage),
|
||||
`server/dispatch.rs` (`flush_dirty_traced`, and the line). No contract
|
||||
amended. `tools/perf/phases_r1.py` (new): phases `actionprofile` and
|
||||
`ruleablation`.
|
||||
- **Workload, corpus/input hashes, open files, cursor/range, rules, client
|
||||
capabilities:** OpenTitan, the three known pre-existing modified files,
|
||||
`git status --porcelain` checked after every phase. Cursors are
|
||||
`phases_p1.EDIT_CURSORS` — the pinmux comment, the `tb.sv` comment, the
|
||||
`aes.sv` `aes_reg_top` instance — so the profile rows sit beside the
|
||||
`offeredit` latency rows they explain. Lazy resolving client. 57 default
|
||||
rules (the workspace set).
|
||||
- **Machine, compiler/profile, threads, load before/after, competing
|
||||
activity:** M1 Max, macOS 27.0, release profile, default worker count. Load
|
||||
1.9–3.6 one-minute across both phases. No build or test suite overlapped a
|
||||
timed run.
|
||||
- **Commands, cache reset/prime steps, trial ordering and fresh-session
|
||||
count:** `bench.py actionprofile --tries 3` and `bench.py ruleablation
|
||||
--tries 3`, each through `tools/guard.sh -m 8 -t 1800`. One fresh
|
||||
`--verbose` session per cursor; the ablation is one warm session with
|
||||
`lucisv.lint.select` pushed by `didChangeConfiguration` per row (a selection
|
||||
change rescans nothing — `notification.rs::apply_settings`), with the
|
||||
unrestricted control taken first **and** last.
|
||||
- **Raw evidence path, explicit units, full sample arrays:**
|
||||
`~/.cache/lucisv-perf/take5r-2/results.jsonl`, label `r1b-cand`. Latency in
|
||||
`ms`; every field of the trace line is a `trace_*` row field
|
||||
(`trace_action_lint`, `trace_flush_wall`, `trace_flush_parses`, …).
|
||||
- **Reference first / repeat median / range; candidate first / repeat median /
|
||||
range:** pinmux comment — first request of a session 25.10; unchanged
|
||||
repeats **21.97** (21.82–22.01); queued behind a definition 22.33; first
|
||||
after a `didChange` **127.54** (121.84–130.67). `tb.sv` 0.52 / 0.98;
|
||||
`aes.sv` 3.20 / 4.19.
|
||||
- **Work counts: reads, parses, analyzed/selected/watched/edited files and
|
||||
bytes:** the unchanged menu performs **0** whole-file parses and **1**
|
||||
`lint_with` pass over 57 rules finding **0** violations; the fence filter is
|
||||
skipped (no fix to protect, §P1a). The first request after a `didChange`
|
||||
performs **1** parse — the flush's — and **2** `lint_with` passes over the
|
||||
same revision.
|
||||
- **Result/status/count/fingerprint comparisons, warnings and refusal
|
||||
checks:** every row `status=ok`; result counts unchanged from the reference
|
||||
rows of the same cursors. No edit-bearing row in this phase.
|
||||
- **Idle RSS / peak RSS / cache size / guard outcomes:** not sampled here (the
|
||||
memory cell belongs to R1a). **Zero guard kills.**
|
||||
- **Target achieved or missed; paired improvement and variability:** not a
|
||||
target — an attribution. The two numbers the review asked for:
|
||||
**the 23 ms is `lint_with` (20.9 of 22.0)**, config I/O being 0.04 ms; and
|
||||
**the 136 ms is 78% dirty-buffer flush** (99.7 ms of 127.5, of which 21.1 ms
|
||||
is the diagnostics pass, leaving ~78.6 ms of `Document::new`), with the
|
||||
handler's own 20.2 ms lint pass the only part a cache can remove.
|
||||
- **Where the reference disagrees with the baseline beyond tolerance (neither
|
||||
number adjusted):** the review's cells are 25.0 (all families), 23.1
|
||||
(quickfix) and 135.9 (first after change); this session reads 22.0–22.6,
|
||||
24.5 and 127.5 — within 3–7% and in both directions, on a machine whose load
|
||||
was at the low end of the review's band. Nothing is adjusted.
|
||||
- **Correctness tests and logs:** 4 unit tests in `lint_trace.rs` (an unarmed
|
||||
trace records nothing and returns the work; `close_flush` divides the
|
||||
request; one recompute makes the whole request a miss; the line names every
|
||||
stage in both groups). The whole workspace suite is reported under R1a,
|
||||
which is the change that could break something.
|
||||
- **Interpretation, remaining bottleneck, tradeoffs, rejected alternatives:**
|
||||
the per-rule ablation is the finding the previous lane guessed at ("it may
|
||||
be cheaper to ask *which* rules cost 24 ms than to cache their answer"):
|
||||
three semantic rules — `unused-signal` **+8.2 ms**, `multiply-driven`
|
||||
**+7.5**, `undriven-net` **+7.4** over a **1.3 ms** floor — are effectively
|
||||
the whole pass, and the other 55 default rules together are about 2 ms.
|
||||
Making *those* cheaper is a `vlog_linter` change and is not this lane's; a
|
||||
snapshot is what removes the repetition without touching a rule. **Rejected
|
||||
alternative:** splitting the flush into parse / analysis / overlay stages,
|
||||
which lives inside `Document::new` and `Workspace::set_document` — outside
|
||||
this lane's file ownership, and unnecessary for the question asked, since
|
||||
flush-minus-diagnostics answers it.
|
||||
- **Decision: retain / revise / reject / defer; next stage justified by
|
||||
evidence:** **retain** the trace (it is what R1a is judged by, and what a
|
||||
future lane will read when it goes after the 78 ms rebuild). The rule cost
|
||||
is filed as evidence for whoever takes the semantic rules on.
|
||||
- **QA result and lead review link:** pending —
|
||||
`docs/features/perf5r-lint-snapshot/README.md`.
|
||||
|
||||
## Experiment record — R1a-2026-09-08 (stage R1a)
|
||||
|
||||
- **Experiment ID / stage / date / owner:** `R1a-2026-09-08` / R1a (TODO
|
||||
§61.2) / 2026-09-08, America/Chicago / dev agent (Opus).
|
||||
- **Hypothesis and exact expected work reduction:** R1b measured a request
|
||||
that runs `lint_with` **twice** on one revision — once to publish
|
||||
diagnostics, once to discover quick fixes — and a repeat menu that runs it
|
||||
again on a revision nothing has touched. If one snapshot per open
|
||||
`Document`, keyed by every input of that call, is read by both doors, the
|
||||
expected reduction is **the whole 21 ms pass on every unchanged request**
|
||||
and **one of the two passes** on the first request after an edit.
|
||||
- **Reference commit, candidate commit or diff hash, binary hashes:**
|
||||
reference = trunk `51cbfd27dfd22720856c501c9c17277460cc6a68` (0.51.0 plus
|
||||
§61.1's rename preflight, which this lane does not touch), built from a
|
||||
clean clone in scratch, binary
|
||||
`5d2a7aa2a4fd0d1747aec4011a482defd2d8a1dccc08b6156b17d9a820375770`.
|
||||
Candidate = that tree plus the §61.2 diff, binary
|
||||
`827c7ac222c829d12a4e245b4d720b67a3dca6c799fd6bb8ee525fe697587b12`. Both
|
||||
`--release --locked`, rustc 1.97.1 (Homebrew).
|
||||
- **Files changed / API contracts amended / topology references:**
|
||||
`crates/lucisv_server/src/lint_snapshot.rs` (new), `lint.rs`,
|
||||
`code_action.rs`, `server/dispatch.rs`, `state/mod.rs` (**one field**, its
|
||||
two initializers and one line in `refresh_overlay`),
|
||||
`server/tests/lint_snapshot.rs` (new). In-crate signature changes:
|
||||
`lint::violations_in` and `lint::fixable` return `Arc<[Violation]>`, and
|
||||
`fixable`/`code_action::code_actions` no longer take a `tab_width` — the
|
||||
width is on the `LintRun`, read through `format::indent_width`, whose call
|
||||
the dispatcher no longer makes. `vlog_linter`, `vlog_formatter` and
|
||||
`fence.rs` are untouched; the shared-fence-filter contract is not amended. A
|
||||
`docs/topo.md` amendment is *requested* in the feature README's Handshakes
|
||||
and was not applied by this lane.
|
||||
- **Workload, corpus/input hashes, open files, cursor/range, rules, client
|
||||
capabilities:** OpenTitan, the three known pre-existing modified files,
|
||||
`git status --porcelain` checked after **every** phase invocation. Cursors
|
||||
are `tools/perf/sites.py`'s and `phases_p1.EDIT_CURSORS`', unchanged. Client
|
||||
shapes are in every row.
|
||||
- **Machine, compiler/profile, threads, load before/after, competing
|
||||
activity:** M1 Max, macOS 27.0, release profile, default worker count. Load
|
||||
recorded before every phase: **2.47–5.88** one-minute, inside the review's
|
||||
own 2.82–6.00 band. **No build, test suite or second benchmark overlapped
|
||||
any timed run** — both binaries and both test suites finished first.
|
||||
- **Commands, cache reset/prime steps, trial ordering and fresh-session
|
||||
count:** 12 guarded `bench.py <phase>` invocations, `--tries 3`, each
|
||||
through `tools/guard.sh -m 8 -t 1800`. Phases `offerkinds offeredit
|
||||
offerqueue codeaction diagnostics didopen snapshotrss`, each once per
|
||||
binary, with reference/candidate order **alternated between phases**
|
||||
(`offerkinds` ref→cand, `offeredit` cand→ref, `offerqueue` ref→cand,
|
||||
`codeaction` cand→ref, `diagnostics` ref→cand, `didopen` cand→ref,
|
||||
`snapshotrss` ref→cand), plus `actionprofile` on the candidate for its
|
||||
trace. Separate `--storage` per (label, phase); `snapshotrss` and `didopen`
|
||||
open a fresh process per try.
|
||||
- **Raw evidence path, explicit units, full sample arrays:**
|
||||
`~/.cache/lucisv-perf/take5r-2/results.jsonl`, labels `r1a-ref`,
|
||||
`r1a-cand`, `r1a-cand-2` (the corrected trace run). Units in every row:
|
||||
latency `ms`, memory `rss_kib` / `peak_rss_kib`. Trace fields are `trace_*`.
|
||||
- **Reference first / repeat median / range; candidate first / repeat median /
|
||||
range:** pinmux all families — reference 30.84 / **22.61** / 21.9–24.5;
|
||||
candidate 2.42 / **0.98** / 0.41–1.24. Quickfix only — reference 22.35 /
|
||||
**24.51**; candidate 0.15 / **0.11**. `offeredit` repeat — reference 23.88 /
|
||||
**23.44**; candidate 0.23 / **0.18**. First after `didChange` — reference
|
||||
128.96 / **125.65** / 123.5–129.0; candidate 106.07 / **106.89** /
|
||||
105.1–108.6. Queued definition (leader / follower, pipeline 3) — reference
|
||||
22.39 / 22.38; candidate **0.78 / 0.76**. Diagnostics publish — reference
|
||||
**162.29**, candidate **162.75**. The full arrays are in the JSONL.
|
||||
- **Work counts: reads, parses, analyzed/selected/watched/edited files and
|
||||
bytes:** the unchanged menu now runs **zero** `lint_with` passes
|
||||
(`trace_action_lint=0.00ms`, `trace_action_snapshot=hit`) and **zero**
|
||||
parses. The first request after a `didChange` runs **one** pass, the
|
||||
diagnostics publish's, inside the flush (`trace_flush_lint=21.87ms`,
|
||||
`snapshot=miss`) and **none** in the handler (`snapshot=hit`) — down from
|
||||
two. Config discovery still runs per request; the
|
||||
indent-width read moved from the dispatcher into the run, so a code-action
|
||||
request does the same two `Discovery` walks it always did and the
|
||||
diagnostics publish now does two where it did one — about **+0.11 ms** on
|
||||
the config stage, publish row **+0.3%**. A handshake request to give
|
||||
`format::indent_width` a form that takes an already-read `FileConfig` is
|
||||
recorded in the feature README.
|
||||
- **Result/status/count/fingerprint comparisons, warnings and refusal
|
||||
checks:** every row `status=ok`, and every row's `result_count` equal
|
||||
between the two binaries — the pinmux cursor offers nothing before and
|
||||
after, the `aes_reg_top` cursor offers the same port actions, the take-3
|
||||
`codeaction` cells answer the same counts. The correctness argument is the
|
||||
test matrix rather than a fingerprint: this lane changes no edit, only when
|
||||
one is computed.
|
||||
- **Idle RSS / peak RSS / cache size / guard outcomes:** a new `snapshotrss`
|
||||
phase opens 1 / 10 / 100 RTL buffers, sends one quickfix-only `codeAction`
|
||||
into each so that every open document holds a snapshot, and reads idle RSS a
|
||||
second after the session goes quiet: **420.9 → 422.2 MiB (1 buffer)**,
|
||||
**429.4 → 428.4 (10)**, **574.0 → 574.6 (100, +0.1%)**. **Zero guard
|
||||
kills.**
|
||||
- **Target achieved or missed; paired improvement and variability:**
|
||||
**achieved.** Gate ≤16 ms unchanged menu → **0.98 ms** (quickfix-only
|
||||
0.11); gate ≤16 ms queued definition → **0.76 ms**; gate "first-after-edit
|
||||
improved and reported separately with its stage split" → **125.65 → 106.89
|
||||
ms (−14.9%)**, with the split saying the remaining 106 ms is 84 ms of
|
||||
`Document::new` plus the 22 ms diagnostics pass and **0.00 ms** of
|
||||
code-action lint; gate "diagnostics publish must not regress" → **+0.3%**;
|
||||
gate "no higher retained memory" → **+0.1% at 100 buffers**. Unchanged rows
|
||||
move −23% to +15% on sub-10 ms cells, in both directions and with no
|
||||
pattern: `didopen` (median of three fresh processes) 4.53 → 3.49, 5.72 →
|
||||
5.56, 8.68 → 8.15, and the `tb.sv` menu 0.19 → 0.23 / 1.26 → 1.45. None of
|
||||
these is read as movement at that scale.
|
||||
- **Where the reference disagrees with the baseline beyond tolerance (neither
|
||||
number adjusted):** the review's 0.51.0 cells are 25.0 / 23.1 / 24.2 /
|
||||
135.9 ms; this session's own reference reads 22.6 / 24.5 / 22.4 / 125.7 —
|
||||
within about 8% in both directions. The improvement is stated against **this
|
||||
session's own reference**, so the ratios are unaffected.
|
||||
- **Correctness tests and logs:** `cargo fmt` clean; guarded `cargo clippy
|
||||
--all-targets` clean, no new `#[allow]`; guarded `cargo test --workspace`
|
||||
**4 343 passed, 0 failed** against the reference tree's **4 322 passed, 0
|
||||
failed** measured the same way — **+21, none removed**, confirmed by
|
||||
diffing `cargo test -- --list` between the two trees. The 21 are: 11 in
|
||||
`server/tests/lint_snapshot.rs` (one per invalidation-table row — an edited
|
||||
buffer, a large buffer, a pushed rule selection, a rewritten `lucisv.toml`,
|
||||
a rewritten waiver file, a changed indent width, a change in **another**
|
||||
file that moves the census, close/reopen, a UTF-16 fix range, the shared
|
||||
pass, and the **stale-fix attack**), 4 in `lint_snapshot.rs` (every field of
|
||||
the key forces a recompute; a same-length waiver rewrite is a different
|
||||
key), 4 in `lint_trace.rs`, 2 in `lint.rs` (the indent ladder rung by rung;
|
||||
a reused snapshot compared violation for violation and fix for fix against a
|
||||
fresh `lint_with`).
|
||||
- **Interpretation, remaining bottleneck, tradeoffs, rejected alternatives:**
|
||||
the code-action path is now transport-bound on the largest file in
|
||||
opentitan. What is left of the edit-time pause is **not** lint: ~84 ms of
|
||||
`Document::new` on 1.3 MB, which is a parser/analysis question and belongs
|
||||
with the review's item 4 as a separate lane. **Rejected alternatives:**
|
||||
hashing the key (a digest would make "no stale fix" a collision argument
|
||||
instead of a `PartialEq` fact); keying on the waiver files' mtime or length
|
||||
(weaker than the contents, and wrong across a same-second rewrite);
|
||||
memoizing the `FileConfig` read (the trace measures it at 0.04–0.16 ms, and
|
||||
its failure mode would be a stale *rule selection* on files nothing
|
||||
watches); an index generation counter (`refresh_overlay` is already called
|
||||
at every index mutation, so a counter would be a second thing to keep in
|
||||
step); a bounded map keyed by URI (a field on the `Document` is dropped by
|
||||
`didClose` for free and cannot outlive its text).
|
||||
- **Decision: retain / revise / reject / defer; next stage justified by
|
||||
evidence:** **retain.** The next lever on this path is the 84 ms
|
||||
`Document::new`, not the linter.
|
||||
- **QA result and lead review link:** pending —
|
||||
`docs/features/perf5r-lint-snapshot/README.md`.
|
||||
|
||||
## Experiment record — R3a-2026-09-08 (stage R3a)
|
||||
|
||||
- **Experiment ID / stage / date / owner:** `R3a-2026-09-08` / R3a (TODO §61.1)
|
||||
/ 2026-09-08, America/Chicago / dev agent (Opus).
|
||||
- **Hypothesis and exact expected work reduction:** a `textDocument/rename` on
|
||||
a cursor with no symbol selects all 3 976 in-scope files and performs 3 975
|
||||
whole-file parses before `Scope::locate` refuses in 0.1 ms from the request
|
||||
buffer's own analysis. If the engine is asked that question from the buffer
|
||||
*first*, the expected reduction is the whole of it: 3 975 → 0 parses, and the
|
||||
~1.9 s scope build plus the ~0.25 s selection removed entirely.
|
||||
- **Reference commit, candidate commit or diff hash, binary hashes:** reference
|
||||
= tag `v0.51.0` (`bc59336`, "Release 0.51.0"), built from a clean shallow
|
||||
clone in scratch, binary
|
||||
`271b7f7ce386a6db0f0c346c3879944b6d2109f4eb985edd6c58ae60da93bb77`. Candidate
|
||||
= tree at `e13ae4c89b4480d658ec2122a625b54ce000062f` plus the uncommitted
|
||||
§61.1 diff, binary
|
||||
`5f815542ac16854acb77f545805378324e0025eaaf48662f28bcc8ae8b6ebdb9`. Both
|
||||
`--release`, rustc 1.97.1 (8bab26f4f 2026-07-14) (Homebrew).
|
||||
- **Files changed / API contracts amended / topology references:**
|
||||
`crates/vlog_refactor/src/rename/preflight.rs` (new, 84 lines),
|
||||
`crates/vlog_refactor/src/rename/mod.rs` (the `mod`/`pub use`, and the
|
||||
same-name sentence factored into `already_named`),
|
||||
`crates/vlog_refactor/src/lib.rs` (one export),
|
||||
`crates/lucisv_server/src/rename.rs` (the call, and the trace on the refusal
|
||||
path). One **new public API**: `vlog_refactor::rename_preflight`, additive.
|
||||
A `docs/topo.md` §1.2 amendment is *requested* in
|
||||
`docs/features/perf5r-preflight/README.md`'s Handshakes and was not applied
|
||||
by this lane.
|
||||
- **Workload, corpus/input hashes, open files, cursor/range, rules, client
|
||||
capabilities:** OpenTitan, the same three pre-existing modified files,
|
||||
verified unchanged by `git status --porcelain` after **every one of the 12**
|
||||
phase invocations. Cursors are `tools/perf/sites.py`'s, unchanged. The
|
||||
no-symbol row is `phases_p2.no_symbol_row`'s own cursor; the duplicate-module
|
||||
row is `rstmgr_por`; the common-port row is `clk_i` in
|
||||
`entropy_src_main_sm.sv`. Client shape is in every row.
|
||||
- **Machine, compiler/profile, threads, load before/after, competing
|
||||
activity:** M1 Max, macOS 27.0, release profile, default worker count. Load
|
||||
recorded before every phase: 1.67–4.78 one-minute, inside the review's own
|
||||
2.82–6.00 band. **No build, test suite or second benchmark overlapped any
|
||||
timed run** — both binaries were built to completion first, and the workspace
|
||||
test suite finished before the first phase started.
|
||||
- **Commands, cache reset/prime steps, trial ordering and fresh-session
|
||||
count:** 12 guarded `bench.py <phase>` invocations, `--tries 3` (one first +
|
||||
three repeats), each through `tools/guard.sh -m 8 -t 1800`. Phases
|
||||
`renametrace tailrename rename execute refactor extractrefuse`, each run once
|
||||
per label. Reference/candidate order **alternated between phases**
|
||||
(`renametrace` ref→cand, `tailrename` cand→ref, `rename` ref→cand, `execute`
|
||||
cand→ref, `refactor` ref→cand, `extractrefuse` cand→ref). Separate
|
||||
`--storage` per label; `renametrace` opens a fresh session per row.
|
||||
- **Raw evidence path, explicit units, full sample arrays:**
|
||||
`~/.cache/lucisv-perf/take5r-1/results.jsonl` (and `results2.jsonl` for the
|
||||
corrected `extractrefuse` run). Units in every row: latency `ms`, memory
|
||||
`peak_rss_kib`. Trace fields are `trace_*`; the new one is `trace_preflight`.
|
||||
- **Reference first / repeat median / range; candidate first / repeat median /
|
||||
range:** no-symbol — reference 2 039.6 / **2 012.3** / 1 991.8–2 023.3;
|
||||
candidate 3.6 / **0.34** / 0.26–0.42. Duplicate module — reference 2 088.2 /
|
||||
**2 012.6** / 2 003.1–2 021.5; candidate 2 051.7 / **2 032.0** /
|
||||
2 001.9–2 058.0. Common port — reference 3 345.6 / **3 242.4**; candidate
|
||||
3 387.8 / **3 252.7**. Tail — 367.3 vs 365.0. The full arrays are in the
|
||||
JSONL; the feature README carries the whole table.
|
||||
- **Work counts: reads, parses, analyzed/selected/watched/edited files and
|
||||
bytes:** the no-symbol refusal goes from `selected=3976`, `bytes=35 813 310`,
|
||||
`parses=3975`, `index=1 713.7 ms`, `fallback=true` to `selected=0`,
|
||||
`parses=0`, `index=0.0 ms`, `preflight=true`. Every other row's counts are
|
||||
**byte-for-byte unchanged**, including the duplicate-module row's 3 975
|
||||
parses, which the decision deliberately leaves in place.
|
||||
- **Result/status/count/fingerprint comparisons, warnings and refusal
|
||||
checks:** all fingerprints identical — tail `b39defb21265…`, `aes`
|
||||
`fa7e31c78382…`, `clk_i` `31aadc134628…`, `cipher_alert` `5f53e977da59…`,
|
||||
extraction `090e92e7736e…`. Every refusal message compared programmatically
|
||||
and identical, the no-symbol sentence included. `aes_extracted.sv` still does
|
||||
not exist.
|
||||
- **Idle RSS / peak RSS / cache size / guard outcomes:** the no-symbol row's
|
||||
peak drops **909.1 → 428.8 MiB (−52.8%)** — it no longer holds an index over
|
||||
35.8 MB of source. Every other row within ±8 MiB except the tail rename
|
||||
(611 → 659 MiB, +7.8%, a single-session sample on an unchanged code path).
|
||||
**Zero guard kills.**
|
||||
- **Target achieved or missed; paired improvement and variability:**
|
||||
**achieved, with margin.** Gate ≤16 ms → 0.34 ms; gate zero closed-workspace
|
||||
parses → 0, read off the wire rather than asserted; gate exact
|
||||
refusal/precedence → byte-identical sentence, and precedence pinned by
|
||||
`the_preflight_does_not_disturb_the_refusal_order`. Unchanged rows vary
|
||||
+0.3% to +4.4%, none read as movement.
|
||||
- **Where the reference disagrees with the baseline beyond tolerance (neither
|
||||
number adjusted):** the review's candidate-only cells were 2 192 ms
|
||||
(no-symbol), 2 200 ms (`rstmgr_por`), 3 455 ms (`clk_i`). This paired rerun's
|
||||
reference reads 2 012, 2 013 and 3 242 — **8–6% below** all three, in the same
|
||||
direction, on a machine whose load was lower this session (1.7–4.8 vs the
|
||||
review's 2.8–6.0). The improvement is stated against **this session's own
|
||||
reference**, not against the review's cells, so the ratio is unaffected.
|
||||
- **Correctness tests and logs:** `cargo fmt` clean; guarded `cargo clippy
|
||||
--all-targets` clean, no new `#[allow]`; guarded `cargo test --workspace`
|
||||
**4 328 passed, 0 failed, exit 0**. New: a 10-test equality oracle
|
||||
(`crates/vlog_refactor/tests/preflight_oracle.rs`) comparing the preflight's
|
||||
refusal against whole-scope `rename` at **every byte** of seven hostile
|
||||
fixtures × six new names, failing on any reworded or invented refusal; 4
|
||||
server tests including the zero-parse assertion and the large-buffer gate.
|
||||
- **Interpretation, remaining bottleneck, tradeoffs, rejected alternatives:**
|
||||
the cheap door into `ws.sources()` is closed; the two expensive doors are
|
||||
still open and are *deliberately* open. `rstmgr_por` (2 032 ms) and
|
||||
`cipher_alert → clk_i` (2 730 ms) both need the whole scope — the first
|
||||
because the index is not current with respect to unsaved edits and `rename`
|
||||
is the authority that re-derives the count, the second because the refusal is
|
||||
the verifier's. **Rejected alternatives:** taking the duplicate-declaration
|
||||
refusal from the index (evidence and argument in the feature README —
|
||||
`state/mod.rs::set_document` reads the index and never writes it, so a
|
||||
refusal from it could be wrong with no later road to correct it); taking the
|
||||
`ExternalCandidate` refusals from the buffer's overlay (same argument);
|
||||
taking `new_name == module` unconditionally (it would jump the ambiguity
|
||||
check and change which sentence the user sees).
|
||||
- **Decision: retain / revise / reject / defer; next stage justified by
|
||||
evidence:** **retain.** R3b/R3c's remaining halves are unblocked and now have
|
||||
a sharper target: with the cheap refusal gone, the ~2.0 s floor on the two
|
||||
surviving whole-scope rows is entirely `Scope::build`, which is exactly what
|
||||
§61.5 proposes to reuse.
|
||||
- **QA result and lead review link:** pending —
|
||||
`docs/features/perf5r-preflight/README.md`.
|
||||
|
||||
## Experiment record — R3c-x-2026-09-08 (stage R3c, extraction half)
|
||||
|
||||
- **Experiment ID / stage / date / owner:** `R3c-x-2026-09-08` / R3c, the
|
||||
refused-extraction half only / 2026-09-08 / dev agent (Opus). The broad
|
||||
fallback and warning-stage halves of R3c are untouched and remain Pending.
|
||||
- **Hypothesis and exact expected work reduction:** that the 805 ms refused
|
||||
extraction at `aes_wrap.sv` 66:2 spends its time in `Scope::build` ahead of
|
||||
region-local safety checks, and that moving those checks in front of the
|
||||
build would remove most of it.
|
||||
- **Reference commit / candidate / binary hashes:** as R3a above; the same two
|
||||
binaries and the same session.
|
||||
- **Files changed:** `tools/perf/phases_r3.py` (new, phase `extractrefuse`) and
|
||||
one import line in `tools/perf/bench.py`. **No production Rust survives from
|
||||
this half.** An `extract_preflight` (~130 lines, `extract/preflight.rs`, plus
|
||||
a server call and eight oracle tests) was written, wired and measured, then
|
||||
removed; three server tests and one factored refusal sentence
|
||||
(`extract::does_not_parse`) were kept.
|
||||
- **Workload:** `aes_wrap.sv` 66:2, `sites.REFACTOR_SITES`'s `inline-module`
|
||||
row — the review's own site. `aes.sv` 220:0–222:53 is the successful-capture
|
||||
control. Corpus unchanged after every invocation.
|
||||
- **Machine / load / commands / ordering:** as R3a. `extractrefuse` run once
|
||||
per label, candidate first; `execute` run once per label, candidate first.
|
||||
- **Raw evidence:** `~/.cache/lucisv-perf/take5r-1/results.jsonl` (`execute`)
|
||||
and `results2.jsonl` (`extractrefuse`, the corrected selection).
|
||||
- **Reference / candidate medians:** extract refusal **761.1 → 767.8 ms**
|
||||
(+0.9%). Extract capture **143.5 → 143.3 ms**. Inline refusal 5.79 → 5.85.
|
||||
`extractrefuse` bad name 9.3 → 9.8 ms; partial selection 0.22 → 0.13 ms.
|
||||
- **Work counts:** unchanged. The refusal still builds the scope, because the
|
||||
refusal *is* about the scope.
|
||||
- **Result/fingerprint/refusal comparisons:** extraction fingerprint
|
||||
`090e92e7736e…` identical. Both refusal sentences identical.
|
||||
- **Peak RSS / guard:** unchanged; **zero guard kills**.
|
||||
- **Target achieved or missed:** **missed, and correctly so.** The hypothesis
|
||||
was **falsified** in two independent ways. (1) The 805 ms refusal is
|
||||
`extract/boundary.rs:196` in `Crossing::read`, the last stage of
|
||||
`Extraction::plan`; it depends on `flow::read(&scope, …)`, which needs the
|
||||
instantiated modules' port directions from other files. It is scope-dependent
|
||||
at depth, not region-local. (2) The region-local checks were **already** in
|
||||
front of the scope build, by two mechanisms: `extract::execute`'s `site_at`
|
||||
gate is `extract_site_in`, whose first two statements are the
|
||||
parse-diagnostic check and `Region::read`, so neither can reach the engine;
|
||||
and `plain_identifier` and the occupied check are `extract_module`'s own
|
||||
first two statements, ahead of `Extraction::plan`. The two `extractrefuse`
|
||||
rows measure exactly this: both refusals are already pre-scope in the
|
||||
**reference**.
|
||||
- **Interpretation, tradeoffs, rejected alternatives:** the preflight was
|
||||
rejected rather than shipped because it would have been a new public API and
|
||||
a second copy of two checks in exchange for zero measured work, which is the
|
||||
abstraction CLAUDE.md's "simplicity first" forbids. The reason is recorded as
|
||||
a comment at the call site in `lucisv_server/src/extract.rs` so the next round
|
||||
does not rediscover it, and the `extractrefuse` phase is kept so the claim
|
||||
stays a measurement. The lever that *would* move the 805 ms is named but not
|
||||
attempted: `flow` wants port directions the workspace index already holds, so
|
||||
it belongs to §61.5's scope-reuse work, not to a preflight. The review's own
|
||||
instruction — instrument first, "do not implement beyond the region-local
|
||||
checks without the evidence" — is what this record answers.
|
||||
- **Decision:** **reject** the extract preflight; **defer** the 805 ms refusal
|
||||
to §61.5 (R3b/R3c scope reuse) with its stage identified.
|
||||
- **QA result and lead review link:** pending —
|
||||
`docs/features/perf5r-preflight/README.md`.
|
||||
|
||||
## Experiment record — R4-2026-09-08 (stage R4)
|
||||
|
||||
- **Experiment ID / stage / date / owner:** `R4-2026-09-08` / R4 (TODO §61.4)
|
||||
/ 2026-09-08, America/Chicago / dev agent (Opus).
|
||||
- **Hypothesis and exact expected work reduction:** the review's §4 — "first
|
||||
add a fixed-arrival-rate probe and record publication/overlay costs alongside
|
||||
queue latency and scan completion", then "test incremental table construction
|
||||
or reduced duplicate publication work, preserving the coherent-prefix
|
||||
contract". No number was expected of the probe; the *reductions* the work
|
||||
order named were the candidates rebuild, a selective overlay refresh and a
|
||||
bounded publish cadence, in that order.
|
||||
- **Reference commit, candidate commit or diff hash, binary hashes:** reference
|
||||
trunk `eb54042`, sha256 `f7a5a27eec773eca…` (`REF`). Candidate `CAND` = that
|
||||
tree + the whole §61.4 diff, sha256 `4af863c145dc4d4b…`. Release,
|
||||
`cargo build --release --locked`.
|
||||
- **Files changed / API contracts amended / topology references:**
|
||||
`tools/perf/phases_r4.py` (new — `scanload`, `scanloadcold`, `scanloadcross`,
|
||||
`scanloadprobe`), `tools/perf/lspclient.py` (two additive hunks: an arrival
|
||||
stamp in the reader thread and `Session.poll_answers`), `bench.py`
|
||||
(registration), `tools/perf/README.md`;
|
||||
`crates/lucisv_server/src/state/scan.rs` (`PUBLISH_EVERY`,
|
||||
`Scan::publish_is_due`, additive), `state/discover.rs` and `state/mod.rs`
|
||||
(visibility only; no production line added to `state/mod.rs`),
|
||||
`server/index.rs` (the drain's publish decision, `answer_what_was_deferred`),
|
||||
`server/mod.rs` (`Server::deferred` and the rule's call site),
|
||||
`server/dispatch.rs` (`NAVIGATION`, `names_nowhere`, `ask_again_if_empty`,
|
||||
`say_deferred`), `server/startup.rs` (one field), `server/tests/startup.rs`.
|
||||
**`candidates.rs` and `includes.rs` are unchanged** — see the decision.
|
||||
No cross-crate contract amended; `WorkspaceIndex::absorb` is called with the
|
||||
same arguments, fewer times. Amended in their own READMEs, rules unchanged:
|
||||
`scan-interleave` (a dated entry for the cadence and the empty-answer rule),
|
||||
`perf5r-first-answer` (its cross-folder `[]` is now answered here).
|
||||
- **Workload, corpus/input hashes, open files, cursor, capabilities:**
|
||||
OpenTitan `0098135264` with its three known modified files,
|
||||
`git status --porcelain` checked after every phase.
|
||||
`lucisv.index.scope: "workspace"`, `--verbose`, the `aes #(` cursor in
|
||||
`sites.TB` for `scanload`/`scanserve` and the cross-folder `tl_if` cursor for
|
||||
`scanloadcross`. 1 / 2 / 11 / 101 open buffers.
|
||||
- **Machine, profile, load, competing activity:** M1 Max, macOS 27.0, release,
|
||||
default worker count. One-minute load 2.0–3.6 across the timed phases (13.1
|
||||
at session start, before any measurement; the first probe run was taken after
|
||||
it fell). No cargo command during a timed run.
|
||||
- **Commands, cache state, trial ordering, fresh sessions:**
|
||||
`tools/guard.sh -m 8 -t 1800 -- python3 tools/perf/bench.py <phase> …
|
||||
--tries 3`; `scanload`/`scanloadcold` REF then CAND, the remaining phases
|
||||
CAND then REF (the alternation the protocol asks for). Three fresh processes
|
||||
per cell; the store deleted before every cold session.
|
||||
- **Results:** in `docs/features/perf5r-publication/README.md` — the R4
|
||||
baseline split, the paired warm and cold tables, `scanserve`, the quiet
|
||||
matrix, the scope cells, RSS and the cross-folder cell. Headline: warm one
|
||||
buffer at 100 ms, publication **3 105 → 588 ms** and the traced scan
|
||||
**4 206 → 2 188**; cold **7 973 → 922** and **10 675 → 3 686**; median wait
|
||||
**112.3 → 1.9 ms** warm and **137.7 → 1.5** cold; publishes **34 → 4.7** warm
|
||||
and **88 → 7** cold.
|
||||
- **Two metrics that must not be read as one:** `scan ms` is the server's own
|
||||
traced scan wall time and is the honest completion figure. The probe's
|
||||
`settled_ms` is floored by the fixed request window whenever the session
|
||||
finishes inside it, so it *understates* the gain (warm one buffer:
|
||||
4 215 → 3 417, −19 %, against the scan's −48 %); `mid_scan_*` misclassifies
|
||||
post-settle answers for the same reason and is not quoted. Neither is needed:
|
||||
both binaries are offered the identical request count over the identical
|
||||
window and answer all of them.
|
||||
- **Result parity:** requests offered and requests answered equal in **every**
|
||||
paired cell; `mismatched_answers` 0 and `unsettled_answers` 0 on `scanload`,
|
||||
`scanloadcold` and `scanserve` for both binaries, cold and warm.
|
||||
- **Guard outcome:** no kill. The first paired `scanload` attempt was **stopped
|
||||
by hand** when its projected wall time approached the 1 800-second limit, and
|
||||
the phase was split into a warm and a cold half rather than the limit raised;
|
||||
its partial output is kept as `paired-partial-firstattempt.jsonl` and no
|
||||
number is taken from it.
|
||||
- **Decision:** **retain** the cadence and the empty-answer rule. **Reject**
|
||||
the selective overlay refresh — 0.08 % of publication at one open buffer, and
|
||||
the intersection it needs would cost more than it saves. **Defer** an
|
||||
incremental candidates rebuild and a targeted `WorkspaceIndex::absorb`: the
|
||||
cadence takes both down with it, and the second is a `vlog_semantic` change
|
||||
this lane's file list excludes. `absorb`'s whole-index merge is named as the
|
||||
next lever for whoever owns that crate next.
|
||||
- **QA result and lead review link:** pending —
|
||||
`docs/features/perf5r-publication/README.md`.
|
||||
|
||||
## Experiment record — R3c-2026-09-08 (stage R3c, measurement half)
|
||||
|
||||
- **Experiment ID / stage / date / owner:** `R3c-2026-09-08` / R3c, the
|
||||
fallback-and-warning-stage half (TODO §61.5) / 2026-09-08,
|
||||
America/Chicago / dev agent (Opus). The refused-extraction half is
|
||||
`R3c-x-2026-09-08` above and is unaffected.
|
||||
- **Hypothesis and exact expected work reduction:** none — this half is
|
||||
**measurement only**, and its output is a number the lead's go/defer ruling
|
||||
is a function of: if parse-and-analysis of the files a rename does *not*
|
||||
keep is ≥ 30 % of the scope stage on the tail rename, R3b proceeds.
|
||||
- **Reference commit / candidate / binary hashes:** measured on the tree at
|
||||
`07ef771a3513e4deb1ca42f88428eb2799f4efad` plus this lane's trace additions;
|
||||
candidate-only, so no reference binary is involved. The intra-analysis split
|
||||
came from a further **trace-only** build (`FileFacts::analyzed` expanded over
|
||||
the public API inside `Scope`), run once and removed — nothing of it shipped.
|
||||
- **Files changed / API contracts amended:** `vlog_refactor/src/trace.rs`
|
||||
(`IndexTrace`, `WarnTrace`, two new `name{…}` groups on the trace line),
|
||||
`scope.rs` and `rename/{mod,warnings}.rs` (the trace threaded through
|
||||
`build_keeping` and `warnings`). No contract amended; the harness needed no
|
||||
change, because `phases_p2.parse_trace` already flattens `name{…}` groups.
|
||||
- **Machine / load / commands / ordering:** `renametrace`, `--tries 3`, one
|
||||
`--verbose` session per row, repeat median of three; load 4.1–5.1; guard
|
||||
`-m 8 -t 1800`, no kill; corpus `git status --porcelain` = the three known
|
||||
files after the phase.
|
||||
- **Result — the scope stage (tail rename, 242.4 ms):** `lead` 0.4, `kept`
|
||||
133.5 (134 files, 2.89 MB), **`other` 83.1 (103 files, 1.65 MB) = 34.3 %**,
|
||||
`merge` 23.4. Broad fallbacks: `clk_i` 35.8 %, new-name-many-uses 36.0 %,
|
||||
**duplicate module 87.8 %** (1 740.5 of 1 982.9 ms — 3 962 of 3 976 files are
|
||||
the unread class). The two rows at 0 % / 25 % are the small ones.
|
||||
- **Result — inside one analysis:** lex + `define` table 34 %, parse 32 %,
|
||||
semantic analysis 20 %, record read-off 13 % (tail; 37/35/16/12 on both
|
||||
3 976-file rows). The review's "parser versus index" question therefore
|
||||
resolves to *parser* — and to not running it at all, since no part of the
|
||||
parse is separately optimizable here.
|
||||
- **Result — the warning pass (49.7 ms):** `define` 1.9, **macro arguments
|
||||
41.7**, SVA 2.6, unfinished 0.4, unaccounted 0.0; 135 files lexed. The
|
||||
macro scan is billed the shared per-file lex because it asks first; §P2d
|
||||
already shares that lex across all five scans, so **no duplicated work
|
||||
remains in the pass**. Retaining the scope build's tokens instead would
|
||||
remove it, and is refused on memory (`clk_i` lexes 1 249 files at a 1.9 GiB
|
||||
peak).
|
||||
- **Allocation:** no per-stage byte counter exists and none was added — one
|
||||
requires a `GlobalAlloc` wrapper, which is `unsafe`. Reported instead as the
|
||||
harness's 50 ms peak-RSS sample per row plus the per-class byte counts now
|
||||
in the trace.
|
||||
- **Decision: retain / revise / reject / defer:** **retain** the shipped
|
||||
splits; **go** on R3b at **34.3 %**.
|
||||
- **QA result and lead review link:** pending —
|
||||
`docs/features/perf5r-scope-reuse/README.md`.
|
||||
|
||||
## Independent 0.52.0 review — 2026-09-09
|
||||
|
||||
Reviewed `3ceba21bb2ef4404a188b076301b170af862075b` against a freshly built
|
||||
0.51.0 reference (`126a6bc`) using the same current harness. See
|
||||
[the findings and performance assessment](../performance_052_review.md) and
|
||||
[preserved evidence](review-052-20260909/README.md). No implementation changes
|
||||
were made by this review. The completed lane records above remain historical
|
||||
records; the open findings below are follow-up work.
|
||||
|
||||
**Confirmed gains:** unchanged pinmux menu 24.3 → 0.32 ms; queued definition
|
||||
24.4 → 0.29 ms; no-symbol refusal 2,205 → 0.22 ms / zero parses; tail rename
|
||||
391.8 → 324.6 ms / 240 → 137 parses; duplicate-module refusal 2,206 → 754 ms.
|
||||
First useful definition 278.6 → 84.4 ms cold and 294.5 → 118.5 ms warm in the
|
||||
one-buffer fixture. Properly warmed fixed-load comparison, two open buffers:
|
||||
server scan 4,247 → 1,771 ms, publishes 34 → 4, 105/105 requests answered on
|
||||
both versions. Cross-folder candidate answers match the settled target in
|
||||
750/750 cases.
|
||||
|
||||
**Targets still open:** paired tail rename improvement is 17.1%, below 20%;
|
||||
warm quiet scan 1,065 ms does not reproduce <1 s; cold remains 2.89 s;
|
||||
first-after-edit pinmux is 114 ms; common-port rename 2.88 s at about 1.8 GiB
|
||||
peak process RSS. Refused extraction still costs about 807 ms. Whole-window
|
||||
request latency is valid; the harness's `mid_scan_*` and `settled_ms` fields
|
||||
have finding F3 below and must not be used as scan-only acceptance metrics.
|
||||
|
||||
### Follow-up findings — implementation agent to fill
|
||||
|
||||
Use one full experiment record per fix, including commands, hashes, cache
|
||||
setup, all samples, result parity, guard outcome and correctness tests.
|
||||
|
||||
| ID | Finding / cause | 0.52.0 baseline | Required acceptance | Owner / fix commit | Result / evidence | Status |
|
||||
|---|---|---|---|---|---|---|
|
||||
| F1 (P2) | Separate head/root directory walks lose shared identity; path-only `seen` admits two spellings of one module | Symlink fixture: 2 definitions and false ambiguous prepareRename at startup; 1 definition and accepted prepareRename after unchanged rescan | Startup/rescan/restart agree; alias-before/after-target, multiple aliases, cycle, ignores, unsaved buffer covered; real duplicate modules still ambiguous | dev | `lucisv_core::walk::DirectoryTracker` shared by the neighbourhood walk and the remaining walk (one directory identity entered once between them); `first_scope` falls back to the single canonical walk when an alias precedes the open folder or one of its ancestors, and the `HEAD_WALK_MAX` fallback now **discards** the head instead of unioning it; an alias the pre-check cannot see (`other/link -> z_real`) is met by the remaining walk, refused entry, and answered with one ordinary rescan — the canonical walk — with `conflict=1 rescan_requested=1` on the trace; an open buffer's own file is recognised under an alias by `(dev, ino)` in `overlay_buffers` alone, gated on the file **name** so an ordinary workspace stats nothing. Measured on opentitan: `stats` **0** at 0 and 1 open buffers cold and warm (58 in the 2-buffer cell, = its same-named candidates); pre-check **0.17 ms**/session; `discovery` 179.2 → 162.2 ms; warm scan 1 044 → 1 040 ms, cold 2 879 → 2 886 ms, first useful answer 82.0 → 81.9 cold / 115.6 → 117.5 warm; 100-buffer settle 1 251 → 1 218 ms; warm idle RSS 427 856 → 426 048 KiB. Nine `#[cfg(unix)]` fixtures behind one startup/rescan/restart helper in `crates/lucisv_server/src/server/tests/startup.rs`, including the sibling alias (rescan asserted once) and the genuine duplicate (still refused, same sentence). | Closed |
|
||||
| F2 (P2) | Warm `scanload` does not prime fresh storage | First nominally warm trial: 0 hits / 3,974 misses / 1,684 ms parsing; second: 3,974 hits / 0 misses | Explicit untimed prime or validated complete store; per-trial cache counters; brand-new storage test | dev | `tools/perf/phases_r4.py::prime` runs one untimed session over the same scope and buffers before a warm cell's first timed trial; `cache_hits`/`cache_misses` are recorded **per trial** and `cell_status` fails a warm cell whose trial found nothing in the store. Verified with a brand-new `--storage`, 2 tries: **3 975 / 3 975 hits, 0 / 0 misses** (0.52.0's first nominally warm trial was 0 / 3 974); a second run over the now-populated store: 3 975 / 3 974 hits, 0 misses. | Closed |
|
||||
| F3 (P2) | `settled_at` treats `wait_quiet`'s positive entry delta/request chatter as scan completion | Actual scan about 1.77 s, reported settle about 3.41 s; 105 responses labeled mid-scan, zero after-settle | Timestamp actual scan completion; retain response arrival stamps; correctly partition post-scan responses; extending an already-long request window does not move completed scan time | dev | `tools/perf/lspclient.py` stamps `scan_completed_at` in the reader thread on the indexing bar's own `$/progress` `end` (`timing: scan finished:` for a client with no bar) and keeps every end in `progress_ends`, so a row can show there was exactly one; `settled_at` reads it and its fallback asks "did a notification arrive?" by counting them rather than by testing a clock delta for zero; `summary` partitions responses on it and keeps each answer's arrival offset. Verified warm, 1 extra buffer: `scan_completed_ms` **1 774.7 / 1 507.2 ms** against the server's own trace `total` 1 767.8 / 1 499.9 (was ~3 406 for a 1 770 ms scan), `scan_ends` 1 per session, 32 mid-scan / 38 after-settle out of 70 (was 105 / 0). Widening the window 3 500 → 5 000 ms: completion unmoved at 1 781 / 1 791 ms, mid-scan 36, after-settle 38 → 64. | Closed |
|
||||
|
||||
### Remaining performance experiments — conditional, not implemented
|
||||
|
||||
| ID | Next work to measure | Fixed 0.52.0 review baseline | Candidate commit | Candidate result / memory / parity | Decision |
|
||||
|---|---|---|---|---|---|
|
||||
| N1 | Lexer/parser and dirty-buffer analysis on first action after edit | 113.6 ms first-after-edit, 0.23 ms unchanged repeat in that session | — | — | Pending |
|
||||
| N2 | Retained-analysis parse work and scope decode/merge costs | Tail 324.6 ms; scope 163 ms including 31 ms reuse decode; common port 2,883.7 ms / 1,251 parses | — | — | Pending |
|
||||
| N3 | Quiet scan decode/merge and cost per publication, after F2/F3 | Warm quiet 1,064.7 ms; cold quiet 2,886.6 ms; warmed loaded scan 1,771 ms | — | — | Pending |
|
||||
|
||||
Keep the engine as the refusal authority, content-tied KnownFacts, shared
|
||||
fence rules, lint invalidation and coherent publication contracts. No speed
|
||||
gain justifies weakening `check/` or removing necessary selected sources.
|
||||
|
||||
**Independent gates:** fmt and clippy clean; full default workspace suite
|
||||
**4,385 passed / 0 failed / 45 ignored** — 4,374 at 0.52.0 plus two
|
||||
`DirectoryTracker` unit tests in `lucisv_core` and nine alias fixtures in
|
||||
`lucisv_server`. Recorded outcomes match in 84 paired non-load rows. Corpus
|
||||
(`0098135`, its three known modified files) and release-binary hashes
|
||||
unchanged; no guard kill; load 4.1–6.8 across the timed phases. F1–F3 closed
|
||||
with regression tests and harness fixes in place; the F1 rows are in
|
||||
`~/.cache/lucisv-perf/f1/results.jsonl`, paired against a 0.52.0 server built
|
||||
from `v0.52.0` for this comparison.
|
||||
|
||||
## Experiment record — R3b-2026-09-08 (stage R3b)
|
||||
|
||||
- **Experiment ID / stage / date / owner:** `R3b-2026-09-08` / R3b (TODO
|
||||
§61.5) / 2026-09-08, America/Chicago / dev agent (Opus).
|
||||
- **Hypothesis and exact expected work reduction:** the 103 files a tail
|
||||
rename selects but never analyses are parsed only to produce their index
|
||||
record, and the server already holds that record for those exact bytes.
|
||||
Handing it back should remove 103 parses (83.1 ms) and the record read-off
|
||||
of the 134 kept files (~32 ms), against the cost of reading the records.
|
||||
- **Reference commit / candidate / binary hashes:** reference = the clean tree
|
||||
at `07ef771a3513e4deb1ca42f88428eb2799f4efad`, built **before any edit of
|
||||
this lane**, binary
|
||||
`50d8315a738103f006a28e1f6ea46c476a776fff1d880b860fc1bbcd83b315e9`.
|
||||
Candidate = that tree plus the §61.5 diff, binary
|
||||
`a041b5f3272ca8ff39d9d62e4ab46c896e82b43d0f4e37e11d96b27635f7d491`. Both
|
||||
`--release --locked`.
|
||||
- **Files changed / API contracts amended / topology references:**
|
||||
`vlog_refactor/src/{scope.rs,trace.rs,lib.rs,rename/mod.rs}` (the
|
||||
`KnownFacts` trait, `Building`, `rename_traced_with`),
|
||||
`lucisv_server/src/{index_cache.rs,state/mod.rs,rename.rs}`
|
||||
(`entry_for`/`facts_now`, `Workspace::known_facts`, `Known`),
|
||||
`tools/perf/{phases_r3b.py,bench.py,README.md}`. **One new topology edge**
|
||||
(`lucisv_server ──▶ vlog_refactor`: `rename_traced_with` + `KnownFacts`),
|
||||
additive; `vlog_semantic` unchanged; `check/` no diff.
|
||||
- **Machine / load / commands / ordering:** six phases (`renametrace`,
|
||||
`tailrename`, `rename`, `refactor`, `execute`, `blockers`), each run
|
||||
**twice per binary with the order alternated** (head, r3b, r3b, head) and
|
||||
the two repeat medians taken; `--tries 3`; load 3.9–5.1; no `cargo` during
|
||||
any timed phase; guard `-m 8 -t 1800` on every command, no kill; corpus
|
||||
`git status --porcelain` checked after every phase, always the three known
|
||||
files.
|
||||
- **Result — first try / repeat / range:** tail rename repeat median
|
||||
**380.2 → 314.0 ms (−17.4 %)**; the four medians behind it are 380.2/380.0
|
||||
(head) and 314.0/314.0 (r3b), so the improvement is larger than the
|
||||
between-run spread. Fallback `clk_i` 3 346.5 → 2 762.5 (−17.4 %); conflict
|
||||
320.5 → 260.1 (−18.8 %); new-name-many-uses 2 689.0 → 2 191.5 (−18.5 %);
|
||||
duplicate-module refusal **2 053.1 → 695.2 (−66.1 %)**; `aes` 89.4 → 88.9
|
||||
(−0.5 %), 90.8 → 92.0 on the `rename` phase and 115.1 → 114.9 on `blockers`;
|
||||
extract refusal 800.2 → 794.7; extract edit 147.7 → 148.3; resolves 131.1 →
|
||||
130.5 and 54.1 → 54.9 and 8.1 → 8.0; no-symbol preflight 0.17 → 0.19.
|
||||
- **Work counts:** tail parses **240 → 137**, which is `(K − 103) + E` with
|
||||
238 records reused; fallback 3 977 → 1 251; duplicate-module refusal
|
||||
**3 975 → 14**. Stage split of the tail's 66 ms: `other` 83.1 → 0.0, `kept`
|
||||
133.5 → 101.6, reuse **+31.1**, `merge` 22.7 level, everything outside the
|
||||
scope build level (`verify` 71.6 → 71.6, `warnings` 50.1 → 50.2).
|
||||
- **Result parity:** 36 paired rows compared on `fingerprint`, `message`,
|
||||
`status`, `result_count`, `edits`, `files`, `created` and `titles` — **0
|
||||
mismatches**. Because a rename's warnings travel as `window/logMessage` and
|
||||
are in **no** phase's fingerprint, a new `renamewarn` phase dumps them
|
||||
verbatim: **1 750 sentences across four renames (434 / 12 / 0 / 1 304),
|
||||
compared line by line, all identical.**
|
||||
- **Peak and idle memory:** peak RSS lower or level on every row — tail 615 →
|
||||
596 MiB, fallback 1 881 → 1 787, duplicate-module refusal 887 → 718, `aes`
|
||||
448 → 448. The one rise is +16 MiB on a 1.6 GiB refusal, inside the 50 ms
|
||||
sampler's spread. Nothing is retained past the request: no persistent
|
||||
decoded-analysis cache was added, so there is no memory budget to state.
|
||||
- **Correctness checks:** `cargo test --workspace` **4 374 passed, 0 failed**
|
||||
(4 366 before, +8, none removed); `cargo fmt` clean; guarded
|
||||
`cargo clippy --all-targets --workspace` clean with no new `#[allow]`. New
|
||||
proofs: index fingerprint + file ids + per-file analyses equal on an index
|
||||
**part reused and part parsed**; a stale record refused four ways and the
|
||||
scan's work counters untouched; a record filed under another path refused;
|
||||
`(K − reused) + E` asserted per stage; warm-store vs no-store server parity;
|
||||
an unsaved buffer parsed and renamed from its own text. And an `#[ignore]`d
|
||||
corpus probe: one rename over **860 files of real RTL** asked three ways —
|
||||
no records, every record, every second — **byte-identical edits and warnings
|
||||
all three times**, parses 865 → 16 → 439, index stage 1 262.4 → 201.3 →
|
||||
744.7 ms.
|
||||
- **Guard outcome:** no kill.
|
||||
- **Decision: retain / revise / reject / defer; next stage justified by
|
||||
evidence:** **retain, with the gate miss reported rather than rounded.**
|
||||
−17.4 % against the paired reference where the gate asks ≥ 20 %; −21.2 %
|
||||
against the review's own 398.3 ms baseline, and the brief's absolute form of
|
||||
the gate (≤ 318 ms) is met at 314.0. The remaining stage is named and
|
||||
measured: **31.1 ms of store decode**, the price of tying record and hash to
|
||||
one place. Taking the decoded record from `WorkspaceIndex` and only the hash
|
||||
from the cache would clear the number and is **rejected** — a record filed
|
||||
under a path is not evidence about the bytes a rename was handed. Behind it
|
||||
sit `verify.rebuild` 37 ms and `merge` 23 ms, both `WorkspaceIndex`'s
|
||||
whole-index merge, already filed by R4 as `vlog_semantic`'s. **Collateral
|
||||
for the other refactorings: not taken** — the door is engine-wide, but
|
||||
reaching `extract`/`inline`/`imports`/`ports`/`references` needs a `_with`
|
||||
entry point in five files this lane does not own, past the "same three lines
|
||||
each" condition; measured collateral today is nil (±1.4 % on all six rows).
|
||||
- **QA result and lead review link:** pending —
|
||||
`docs/features/perf5r-scope-reuse/README.md`.
|
||||
@@ -0,0 +1,134 @@
|
||||
# Independent review of 0.52.0 — performance follow-up implementation
|
||||
|
||||
Reviewed 2026-09-09 at `3ceba21bb2ef4404a188b076301b170af862075b`, against 0.51.0 at `126a6bcdac99e940534c87bce94a5269cdc53ae4`.
|
||||
|
||||
**The main performance improvements are reproducible, but this round needs a startup correctness fix and two benchmark fixes.** A split startup scan can index a symlinked directory twice and make a valid rename appear ambiguous. The new loaded-scan harness also mislabels an unprimed first trial as warm and miscomputes its scan-completion/within-scan classification. The latency gains below use properly warmed reruns and server-reported scan durations, avoiding those measurement errors.
|
||||
|
||||
**Status (2026-09-09): F1, F2 and F3 fixed in 0.53.0 (TODO §62; `docs/features/perf5r-first-answer/README.md`, `perf5r-publication/README.md`); N1–N3 deferred to loop 3.** No implementation was changed by this review itself. [The tracking file](perf/take5-tracking.md) records the findings and remaining goals. [Evidence, reproductions and commands](perf/review-052-20260909/README.md) are preserved separately from the implementation agent's results.
|
||||
|
||||
## Findings
|
||||
|
||||
### F1 · P2 · Split startup discovery duplicates modules behind directory aliases
|
||||
|
||||
**Where:** `crates/lucisv_server/src/state/discover.rs`, `first_scope` around lines 445–462 and the path-only filtering in `walked_rest`/`rest_of_scope`; `crates/lucisv_core/src/walk.rs::collect_files_below` creates an independent directory-identity set.
|
||||
|
||||
The regular walker visits each directory identity once and reports files under the first path spelling that reaches it. The new neighbourhood walk and the remaining root walk have separate visited sets. Their results are combined using `HashSet<PathBuf>`, which cannot recognize two paths to the same directory. Copying the ancestor ignore stack preserved exclusions but did not preserve the walk's alias/cycle identity contract.
|
||||
|
||||
**Reproduction**, using only a scratch fixture:
|
||||
|
||||
```text
|
||||
workspace/
|
||||
a_alias -> z_real
|
||||
z_real/
|
||||
child.sv # module child; endmodule
|
||||
tb.sv # module tb; child u(); endmodule
|
||||
```
|
||||
|
||||
Start with `index.scope = "workspace"`, `index.scopeDepth = 0`, and open `z_real/tb.sv`. After the startup scan settles, request definition and prepareRename at `child`.
|
||||
|
||||
| Observation | 0.51.0 | 0.52.0 |
|
||||
|---|---|---|
|
||||
| Definition after startup | One target: `a_alias/child.sv` | Two targets: alias and real path |
|
||||
| prepareRename after startup | Accepted | Refused: `child` is declared in more than one indexed file |
|
||||
| After a whole rescan, without changing source text | One target; rename accepted | One target; rename accepted |
|
||||
|
||||
The initial definition difference reproduced in **3/3 sessions per version**, and the complete startup/rescan lifecycle reproduced in another **3/3 per version**. A watched-file notification naming both fixture files triggered the whole rescan. The source bytes did not change. Thus startup and subsequent scans disagree about the same project, and the effect is user-visible beyond duplicate navigation entries: rename is blocked until a rescan.
|
||||
|
||||
**Required fix:** preserve the root walk's directory identity and path-selection policy across split discovery. Simply keeping a separate path set for each half, or deduplicating declarations by module name, is insufficient. A bounded fallback is acceptable where equivalent discovery cannot yet be guaranteed. The `HEAD_WALK_MAX` fallback also unions the independently discovered head, so increasing or lowering that limit alone does not repair the contract.
|
||||
|
||||
**Acceptance:** compare the actual index paths, definitions, prepareRename results and diagnostics after startup, a whole rescan, and restart. Cover an alias sorting before/after its target, multiple aliases, an ancestor cycle, ignore rules and an open unsaved buffer. Keep legitimate duplicate declarations ambiguous. Record the amended walker/server handshake in [topo.md](topo.md). Add this fixture to the shipped regression tests; the existing successful corpus probes do not cover it.
|
||||
|
||||
### F2 · P2 · A fresh “warm” scanload run includes a cold trial
|
||||
|
||||
**Where:** `tools/perf/phases_r4.py::load_cell`, around lines 239–249.
|
||||
|
||||
The function sets `cold=False` for a warm cell but never primes its storage. `Session.__enter__` creates a missing directory; it does not populate an index cache. Consequently a standalone `scanload` or `scanloadprobe` command with a new `--storage` directory measures a cold first trial and warm later trials under one warm label.
|
||||
|
||||
This happened in the initial paired `scanloadprobe` invocation in this review. A separate two-session proof on 0.52.0, with `cold=False` both times, recorded:
|
||||
|
||||
| Trial | Directory existed beforehand | Index cache hits / misses | Scan parse time |
|
||||
|---|---|---:|---:|
|
||||
| First | No | **0 / 3,974** | **1,684 ms** |
|
||||
| Second | Yes | **3,974 / 0** | **0 ms** |
|
||||
|
||||
The two open buffers account for the rest of the 3,976-file workspace. The initial load-probe rows remain in the evidence but are **excluded from warm comparisons**. `load-retest.jsonl` contains the properly warmed paired replacement. Other cold/warm matrix phases explicitly run their cold cells first; they are not excluded on this basis. This does not establish that every historical implementation run was unprimed; it establishes that the standalone harness cannot enforce its label.
|
||||
|
||||
**Required fix:** perform an untimed prime using the same scope, buffers and corpus before a warm cell, or explicitly validate a complete pre-existing cache. Record cache hits/misses per timed trial and test the command with a brand-new storage directory. Merely creating the directory is not a prime.
|
||||
|
||||
### F3 · P2 · scanload completion and mid-scan fields include the request window
|
||||
|
||||
**Where:** `tools/perf/phases_r4.py::settled_at`, lines 136–139; consumed by `summary` around lines 179–200.
|
||||
|
||||
The candidate's corrected warm runs report actual server scan durations of **1,778 / 1,771 / 1,765 ms**, yet `settled_ms` is **3,406 / 3,407 / 3,407 ms** and all **105** responses are classified as mid-scan, with zero after-settle answers. The fixed request window sends its last request near 3,400 ms, well after these scans end.
|
||||
|
||||
`settled_at` calls `wait_quiet` after the request window and substitutes that call's entry time whenever the returned value is positive. `wait_quiet` initializes `last` with a separate clock read after `started`, so even no new notification usually yields a tiny positive value. It also counts all notifications, including verbose request timing messages. The previously captured scan-only `quiet_at` therefore gets replaced with approximately the end of the offered-load window. This makes the faster server's completion and mid-scan classification wrong.
|
||||
|
||||
**Required fix:** timestamp scan-completion events independently of client request/timing traffic. Distinguish “no new scan event” explicitly rather than testing a clock delta for exact zero. Classify each response using that same completion boundary; retain response arrival timestamps in the raw evidence. Test a scan that finishes well before the fixed window ends, and a longer offered window with the same initial load: scan completion should remain stable while the after-settle count grows.
|
||||
|
||||
**Treatment in this review:** use `publication[].scan_total` for scan duration and ordinary wire latencies over the **entire fixed window** for request wait. Do not use `settled_ms`, `mid_scan_median_ms` or `after_settle_answers` as reliable scan-only metrics. The offered/answered counts and settled-target comparisons remain useful.
|
||||
|
||||
## Paired performance results
|
||||
|
||||
All times are milliseconds unless marked otherwise. Ordinary request cells use the median of three repeats following a first request. Startup/RSS cells use three processes. Rename rows run verbose on both versions so their parse counts and work attribution can be compared. The original 0.51.0 review's numbers are historical context; the comparison below is freshly paired.
|
||||
|
||||
The first-useful-answer target is measured with the one-buffer AES fixture. It is not a bound on every opening set or on the loaded two-buffer case below.
|
||||
|
||||
| Workload | 0.51.0 | 0.52.0 | Assessment |
|
||||
|---|---:|---:|---|
|
||||
| Pinmux comment, unchanged all-family menu | 24.3 | **0.32** | Repeated lint work removed; ≤16 ms goal met |
|
||||
| Definition queued behind that menu | 24.4 | **0.29** | Menu blocking largely removed |
|
||||
| Pinmux first menu after didChange | 137.8 | **113.6** | Improved; substantial dirty-buffer work remains |
|
||||
| Tail `state_q` rename | 391.8 | **324.6** | **17.1% lower**, 240 → 137 parses |
|
||||
| Ordinary `aes` rename | 92.0 | **93.0** | Essentially unchanged |
|
||||
| Common-port `clk_i` rename | 3,482.9 | **2,883.7** | 17.2% lower; still a long blocking command |
|
||||
| Duplicate-module refusal | 2,206.5 | **754.0** | 66% lower; 3,975 → 14 parses |
|
||||
| No-symbol refusal | 2,204.6 | **0.22** | Preflight succeeds; 3,975 → 0 parses |
|
||||
| First useful definition, cold | 278.6 | **84.4** | ≤200 ms goal met at this cursor |
|
||||
| First useful definition, warm | 294.5 | **118.5** | ≤200 ms goal met at this cursor |
|
||||
| Quiet workspace scan, cold | 2,884.9 | **2,886.6** | Unchanged; 2.3 s aspiration remains unmet |
|
||||
| Quiet workspace scan, warm | 1,074.0 | **1,064.7** | Essentially unchanged; sub-second result not reproduced |
|
||||
| Warm idle RSS, MiB | 419.8 | **418.0** | Prior memory gain retained |
|
||||
| Connect-missing-ports resolve | 132.9 | **130.2** | Similar; no broad refactor speedup claimed |
|
||||
| Successful extract edit computation | 148.5 | **146.7** | Similar; captured edit matches |
|
||||
| Refused extraction at inline-site selection | 790.1 | **806.6** | Still about 0.8 s; no demonstrated improvement |
|
||||
|
||||
The initial tail rename on 0.52.0 was 359 ms before the 325 ms repeat median. Common-port peak process RSS remained about **1.8 GiB** (1.79 → 1.78 GiB in these samples). Some refusal peaks rose in this run; for example, the heavily used new-name collision rose about 5%, while no-symbol and duplicate-module refusal peaks fell substantially. These sampled peaks do not establish a leak or statistically significant regression, but they do not support an unconditional claim that every request's peak memory always decreases.
|
||||
|
||||
The implementation ledger already acknowledges the ≥20% **paired** tail-rename goal was missed at 17.4%. This rerun agrees at 17.1%. Comparing against the older 398 ms report to obtain a larger percentage does not replace a paired comparison. The work reduction is useful and worth retaining; label the target honestly.
|
||||
|
||||
### Fixed offered load, with cache warmth corrected
|
||||
|
||||
For the normal definition cursor, **two open buffers**, one request every 100 ms, 35 requests per process, three processes per version:
|
||||
|
||||
| Metric | 0.51.0 | 0.52.0 |
|
||||
|---|---:|---:|
|
||||
| Median request wait, entire fixed window | 1,947 ms | **2.03 ms** |
|
||||
| Worst sampled request wait | 3,675 ms | **722 ms** |
|
||||
| Median server-reported scan duration | 4,247 ms | **1,771 ms** |
|
||||
| Publishes per process | 34 / 34 / 34 | **4 / 4 / 4** |
|
||||
| Requests answered | 105 / 105 offered | **105 / 105 offered** |
|
||||
| Answers differing from settled target | 0 | **0** |
|
||||
|
||||
These support the publication-cadence optimization. The request median includes answers after the candidate has completed its scan; it is not a “median while indexing” claim. The separately measured scan duration and unchanged offered load show why the complete fixed-window experience improves.
|
||||
|
||||
The cross-folder cursor was tested cold and warm with one and eleven open buffers. The candidate answered **750/750** requests and all matched the settled target; the reference produced **399 premature empty answers** among its 750 responses. Non-empty mismatches were zero on both. This confirms the empty-answer retry behavior on the sampled workload.
|
||||
|
||||
Some cross-folder maxima are higher: with one buffer, **277 → 482 ms cold** and **306 → 380 ms warm**. With eleven buffers, the cold maximum instead fell from **9,261 → 1,863 ms**. Correctness and tail delay must be reported together; a fast empty response is not a fast useful definition. The implementation's accepted single-buffer cadence tradeoff remains relevant.
|
||||
|
||||
## Implementation assessment and next actions
|
||||
|
||||
1. **Fix F1 before treating the round as fully closed.** It violates startup/rescan scope equivalence and blocks a valid rename. Preserve the performance work while repairing directory identity and adding the alias regression matrix.
|
||||
2. **Fix F2 and F3 before using scanload to accept the next optimization.** Keep explicit cold/warm setup, true scan completion, full-window latency, within-scan latency and result quality as separate measurements. Recheck any earlier cells whose cache provenance or completion metric is unclear; do not assume all historical numbers are wrong.
|
||||
3. **Keep the lint snapshot.** Its key includes the effective rules/options, line length, tab width, oracle presence and waiver contents; the slot belongs to a document revision and is cleared on overlay refresh after index mutations. The source implements the dependency contract requested in the prior plan. The remaining 114 ms first-edit cost needs buffer parse/analysis work reduction; another unchanged-result cache cannot eliminate it.
|
||||
4. **Keep the engine-owned preflight and content-tied facts reuse.** Preflight avoids index-derived early refusals, preserving the fresh-source authority of the full rename. KnownFacts comes from a store entry tied to the handed source bytes; `check/` is unchanged. The tail trace now attributes about **163 ms to initial scope construction**, including **31 ms of facts decoding**. The common-port command still parses 1,251 files and takes 2.88 s; lexer/parser work on retained analyses is the next significant target. Preserve warning/refusal/output parity and measure peak memory rather than retaining all token streams indiscriminately.
|
||||
5. **Keep startup ordering and publication cadence, subject to F1.** First-answer latency now meets the proposed target. Quiet warm throughput remains around one second, and cold throughput remains 2.9 s. Whole-index absorb/decode/candidate construction are still follow-ups, not completed gains in this review. Reduce publication cost itself before tightening cadence in a way that restores the old merge-per-burst cost.
|
||||
|
||||
## Scope and evidence
|
||||
|
||||
Both release servers were built before timing, using the same compiler and the current harness for both versions. The reference was exported to a scratch directory with `git archive`; no checkout, branch or remote was changed. All benchmark phases ran sequentially under the repository's 8 GiB / 1,800-second guard, with no build/test overlap. OpenTitan stayed at `00981352642fb65ef2b6c47143a0f6bb31fd4a97` with its same three pre-existing modified files; their hashes match the prior review. Edits were captured/discarded, and all caches were outside the corpus.
|
||||
|
||||
This review covers menu filters, queued navigation, first-after-edit requests, eight rename shapes, startup scope/cache cells, RSS, two fixed-load probes, resolved actions and command execution. CLI throughput, the eager non-resolving client and the full 101-buffer load matrix were not remeasured. Three process trials establish practical direction and reproductions, not population tail percentiles or statistical significance.
|
||||
|
||||
**Independent validation:** `cargo fmt --all -- --check` and `cargo clippy --workspace --all-targets --locked -- -D warnings` passed. The default full workspace suite (`cargo test --workspace --locked`) finished with **4,374 passed, 0 failed, 45 ignored**, including doc-test result blocks. The ignored tests were not forced on. No guard limit was hit. All **84 comparable non-load outcome rows** matched on their recorded status, fingerprint, message, titles/shapes, edit/file/create/result counts and warnings where present. This is not a new full rename-warning oracle run; the implementation's wider warning checks remain in its own QA evidence.
|
||||
|
||||
The new alias reproduction fails startup equivalence despite the existing suite passing, demonstrating a coverage gap. Final corpus status/hashes and both release-binary hashes were unchanged. One-minute load samples during the initial paired phases were approximately 3.87–5.98; small timing movements are not treated as established regressions.
|
||||
@@ -0,0 +1,134 @@
|
||||
# Performance take 5 — independent implementation review
|
||||
|
||||
Reviewed 2026-09-08 at **0.51.0, `126a6bcdac99e940534c87bce94a5269cdc53ae4`** against release 0.50.0. The implementation delivers the major menu, rename, CLI and warm-memory improvements. Retain those changes. The original performance targets are only partly met: large-file lint work, startup's first useful answer, and broad refactor analysis remain material costs.
|
||||
|
||||
**Status (2026-09-09): implemented as TODO §61 — R3a (§61.1), R1a/R1b (§61.2), R2a/R2b (§61.3), R4 (§61.4), R3b/R3c (§61.5); results in `docs/perf/README.md`'s 2026-09-08 review-round entry and the tracker's follow-up queue.** This is a measurement and planning review as written; no production code was changed by it. The [completed implementation ledger](perf/take5-tracking.md) remains intact; its new independent-review section tracks follow-up experiments. [Raw evidence and reproduction instructions](perf/take5-review-20260908/README.md) accompany this report. The original rationale is in [the take 5 plan](performance_take5.md).
|
||||
|
||||
## Measurement basis
|
||||
|
||||
- Both release servers were checked with guarded `cargo build --release --locked` before timing. The reference is a preserved clean checkout at `3bd55acb983776bef0bf035d7ec7bc894d4bbd04`; its `crates/` source is identical to the original report's `bbdbfe9`. Latest means this local checkout, with no remote fetch.
|
||||
- Both binaries ran through the **same current schema-2 harness**, sequentially, with phase order alternating which binary went first. No Cargo build or other review benchmark overlapped timed runs. Every corpus run used the 8 GiB / 1,800-second guard.
|
||||
- OpenTitan is `00981352642fb65ef2b6c47143a0f6bb31fd4a97`, with the same three pre-existing modifications. LSP edits were captured/discarded; CLI used checks. Corpus status and the three modified-file hashes were checked around the LSP phases. CLI diagnostic stdout is compared byte for byte.
|
||||
- Request cells normally contain one first request plus three repeats; the table uses the **median of those three repeats**. Scan, RSS, didOpen and first-after-change cells use three trials; queue cells use three pipelines. Cold/warm means persistent index cache, not OS page-cache eviction. Three samples do not establish p95/p99 or statistical significance.
|
||||
- Fresh trace runs are attribution evidence, separate from the paired non-verbose latency comparison. Scan stage fields describe the first traced session; rename stage fields describe the last traced request. Neither is a median stage profile.
|
||||
|
||||
## Paired results
|
||||
|
||||
Milliseconds unless another unit is shown. Lower is better. Action requests use resolving clients; execution requests advertise applyEdit/create-file support but reject the write after capturing it.
|
||||
|
||||
| Workload | 0.50.0 reference | 0.51.0 review | Assessment |
|
||||
|---|---:|---:|---|
|
||||
| Pinmux comment, all action families, unchanged | 300.4 | **25.0** | 12.0× faster; still above the original 16 ms aspiration |
|
||||
| Definition queued behind that action | 311.7 | **24.2** | Blocking is greatly reduced |
|
||||
| Pinmux comment, quickfix only | 81.5 | **23.1** | Explains almost all remaining all-family cost |
|
||||
| Pinmux comment, empty family filter | 82.4 | **0.06** | Unrequested work is gated out |
|
||||
| Pinmux comment, first action after change | 413.9 | **135.9** | 3.0× faster; still a visible edit-time pause |
|
||||
| Lazy action at aes_reg_top instance | 25.5 | **5.1** | Roughly 5× faster |
|
||||
| Organize-imports offer | 13.5 | **4.1** | Discovery improved |
|
||||
| Large `state_q` rename | 795.1 | **398.3** | Approximately 2× faster; two edited files |
|
||||
| Ordinary `aes` rename | 144.1 | **92.4** | 1.56× faster; nine edited files |
|
||||
| Resolve connect-missing-ports | 170.4 | **134.3** | Expensive click remains, with some reuse benefit |
|
||||
| Resolve expand wildcard | 72.7 | **55.4** | Same output fingerprint |
|
||||
| Extract-module edit computation | 249.5 | **150.3** | Same captured edit; two files, one creation |
|
||||
| Extract from inline-site selection, refused | 811.7 | **804.9** | Essentially unchanged; not a successful extraction |
|
||||
| Inline generate-containing module, refused | 6.1 | **6.4** | Same refusal, already cheap |
|
||||
| Whole-workspace scan, cold cache | 2,908.6 | **2,907.3** | No material change; 2.3 s target remains unmet |
|
||||
| Whole-workspace scan, warm cache | 1,381.4 | **1,117.9** | 19% lower; still above 1.0 s |
|
||||
| First useful definition, cold cache | 85.6 | **286.8** | **201 ms slower** in this comparison |
|
||||
| First useful definition, warm cache | 214.7 | **328.2** | **113 ms slower** in this comparison |
|
||||
| Idle RSS, warm workspace (MiB) | 574.4 | **419.0** | 27% lower |
|
||||
| Idle RSS, cold workspace (MiB) | 531.2 | **496.9** | Modest median reduction; candidate range 491–539 MiB |
|
||||
| didOpen pinmux → definition | 119.8 | **118.1** | Large-file open cost persists, without a clear regression |
|
||||
| CLI `hw/ip` default check | 430 | **440** | Similar |
|
||||
| CLI `hw/ip` error/warning/style check | 660 | **490** | 26% lower; identical diagnostic bytes |
|
||||
| Same CLI style check, ignoring unused-import | 480 | **510** | Small wall-time movement; no demonstrated improvement |
|
||||
|
||||
The fresh paired numbers support the implementation ledger's principal claims. Small differences from its 24 ms menu / 388 ms rename / 1.04–1.10 s warm scan numbers are not new code changes: this is another measurement of the released implementation. The startup latency target was already recorded as missed in P4b3; it should remain a visible follow-up, even though the implementation stages are closed.
|
||||
|
||||
### Startup throughput and responsiveness must be judged separately
|
||||
|
||||
The scanserve probe sends another definition 200 ms **after the preceding response**. The worst observed wait fell from **2,594 to 337 ms cold**, and **933 to 328 ms warm**. Non-empty mid-scan answers matched the settled answer in both versions.
|
||||
|
||||
The candidate served 13 requests per cold session rather than 3, and 5 per warm session rather than 3. Its harness-observed session completion time was about **4.93 s cold / 2.02 s warm**, versus **3.31 s / 1.77 s** for the reference. These are request-perturbed session measurements, including the probe's sleeps and completion detection. They are **not** a controlled fixed-request-count scan regression: the responsive server is doing more request/publication work. They identify a follow-up measurement: fixed offered load, publication count/time, request latency, and scan completion together.
|
||||
|
||||
### CLI and format-cache interpretation
|
||||
|
||||
CLI style user CPU fell from a median **3.48 to 2.44 seconds**, while the control without unused-import stayed around 2.4 seconds. Diagnostic counts stayed **445 default**, **7,751 style**, and **7,734 style without unused-import**, with matching stdout hashes across versions. This supports removing duplicated package-census work. The candidate's style-vs-no-unused-import wall difference is smaller than run variability; do not call a negative difference a negative-cost rule or claim an exact 5 ms contribution from this rerun.
|
||||
|
||||
A candidate-only formatter sanity check took **0.67 s cold / 0.68 s warm**. This raw corpus has 1,772 files that would change, 30 unchanged files, and four safe-format failures. Only the 30 unchanged files hit the warm check cache. That is a low-hit-rate workload, not evidence that the successful unchanged-file cache stopped working. No old/new formatter speed claim is made from it.
|
||||
|
||||
## Causes and next implementation plan
|
||||
|
||||
### 1. Reduce large-file action and edit-time work
|
||||
|
||||
**Measured cause:** refactor-only filters are now effectively transport-bound, while quickfix still costs 23 ms out of a 25 ms all-family menu. `lucisv_server/src/lint.rs::fixable` still calls `lint_with` on every request. The fence memo and parsed selector reuse work as intended; they do not memoize lint results. The first action after a change costs 136 ms versus roughly 24 ms on repeats. That additional latency includes dirty-buffer work; subtracting the cells is an attribution clue, not an isolated parse measurement.
|
||||
|
||||
**Plan:**
|
||||
|
||||
1. Trace configuration/waiver loading, dirty-buffer flush, lint execution, fence filtering and action serialization separately on the pinmux case. Include first request, unchanged repeat, first request after one-character edit, and navigation queued behind each.
|
||||
2. Define a reusable lint-result snapshot through the existing diagnostics/server-lint contract in [topo.md](topo.md), keyed by every dependency that affects the result: document content/revision, effective rules/configuration, external waiver state, tab width and project/index inputs. The previous agent deliberately deferred this because invalidation is not just document version. Write the dependency/invalidation table before implementing a cache.
|
||||
3. Let diagnostics and quickfix discovery consume a matching result; recompute when the snapshot does not match. Bound retained data and avoid adding a second unbounded analysis cache. Preserve the shared fence authority and execute-time validation.
|
||||
4. Profile the dirty-buffer stage independently. If it dominates the 136 ms edit case, a lint cache alone cannot fix it. Reuse work only when it matches the current text, and preserve didChange-before-request ordering. Consider parser/semantic work reuse only after stage measurements justify it.
|
||||
|
||||
**Gate:** proposed follow-up target ≤16 ms unchanged pinmux menu and queued definition; first-after-edit should improve from 136 ms without stale diagnostics, stale edits, or higher retained memory. A changed buffer, configuration, waiver, dependency file, close/reopen, and UTF-16 range tests must force the correct fresh result. Do not claim the first-edit target achieved from repeat-only samples.
|
||||
|
||||
### 2. Recover first-answer latency without restoring duplicate startup scans
|
||||
|
||||
**Measured cause:** the fresh warm first-answer trace returned a definition in **325.4 ms**. It spent **205.0 ms discovering the workspace** and **92.3 ms opening the cache**. Together those stages account for about 91% of that latency. The configuration reply arrived in 0.73 ms, so the two-second fallback timeout is not the cause of this normal-case delay.
|
||||
|
||||
`Workspace::begin_scan` in `state/mod.rs` obtains the full path list before stepping it. The first step opens the persistent store, and requests wait for the open buffer's raised-folder head to be published. The reference could answer from its earlier 124-file folder scan; the candidate avoids that extra scan but pays whole-workspace discovery first. The new ordering also prevents the empty initial answers observed during implementation. Keep that correctness improvement.
|
||||
|
||||
**Plan:**
|
||||
|
||||
1. Measure walk/config-ignore handling, repeated metadata calls for the size cap, path sorting, cache container load, and local-folder indexing independently. First experiment: reuse metadata already obtained by the core walker for the cap instead of querying it again, if that preserves walk semantics. This crosses `lucisv_core::walk` and server scope discovery; record the handshake before changing its interface.
|
||||
2. Explore handing the raised-folder work to the scan before remaining workspace discovery finishes. Deduplicate paths and facts, preserve configured scope, exclusions, filelists and size caps, and publish index/candidates/includes/overlays coherently. This must not become two complete scans or answer from only the open file.
|
||||
3. If cache opening remains a first-answer barrier, measure a bounded local-record loading design before proposing a persistent-format change. Compare the memory and total-start cost; an extra cache format is not justified by latency alone.
|
||||
4. Use the existing startup and scan-interleave contracts in [topo.md](topo.md), including `staging`, `head_owed`, rescan ordering, and the large-neighbourhood fallback. Test configuration replies arriving before/after didOpen, late/no reply, unsaved buffers, multiple folders, a root-level file, and dependencies outside the first folder.
|
||||
|
||||
**Gate:** all first-definition results must match the settled target, not merely be non-empty. Proposed next milestone: ≤200 ms warm and cold for this cursor, then work toward the reference's 86/215 ms cold/warm behavior; warm total scan ≤1.0 s, with no loss of the RSS reduction. Report cold and warm independently.
|
||||
|
||||
### 3. Reduce analysis cost in large rename and slow refusals
|
||||
|
||||
**Measured cause:** the latest traced `state_q` rename selects **238 files / 4.55 MB**, edits two, and performs **240 whole-file parses**: 238 for the initial scope and two for the edited after-index. One repeated trace attributes **229.2 ms to scope indexing**, **74.3 ms to verification**, **50.9 ms to warnings**, **14.1 ms to selection**, and **12.4 ms to edit collection**. Before/after verification no longer reparses unchanged watched sources. That is the implemented win; the initial scope is now the largest cost.
|
||||
|
||||
The broader **candidate-only, verbose** probe exposes worse tails. These are current costs, not a paired regression claim:
|
||||
|
||||
| Rename request | Repeat median | Result | Selected files |
|
||||
|---|---:|---|---:|
|
||||
| Common port `clk_i` → `clk_ix` | **3,455 ms** | Edit returned | 3,976 |
|
||||
| `cipher_alert` → heavily used `clk_i` | **2,884 ms** | Refused, meaning would change | 3,976 |
|
||||
| Duplicate module `rstmgr_por` | **2,200 ms** | Refused, ambiguous declaration | 3,976 |
|
||||
| Comment cursor with no symbol | **2,192 ms** | Refused, no symbol here | 3,976 |
|
||||
|
||||
The no-symbol trace performs **3,975 whole-file parses** and spends **1,904 ms** in scope indexing before a 0.1 ms locate refusal. `server/rename.rs` calls `ws.sources()` when it finds no old name, and `vlog_refactor::rename::renaming` builds the scope before `locate`. This is a concrete avoidable-work candidate. Normal clients often issue the already-cheap prepareRename first, so frequency should be tracked separately from severity.
|
||||
|
||||
The whole-process RSS sampled during these requests also matters: the common-port rename peaks at **1.76 GiB**, versus **572 MiB** for the smaller tail rename. The no-symbol refusal reaches **894 MiB**. These are 50 ms sampled peaks, not allocation totals or paired memory regressions. The lower idle RSS does not eliminate transient analysis memory.
|
||||
|
||||
**Plan:**
|
||||
|
||||
1. Measure parsing, semantic analysis, index assembly, and allocation within the 229 ms initial scope stage. The current aggregate is not enough to select a parser versus index optimization.
|
||||
2. Evaluate a request-local path that accepts already analyzed, content-matching facts for open documents and immutable cached facts for closed files. Reuse must be tied to the selected source bytes, retain unsaved-buffer precedence, and rebuild cross-file resolution for the candidate workspace. A persistent decoded analysis cache needs a memory budget before it is justified.
|
||||
3. Profile the remaining 51 ms warning pass separately. Preserve warning meaning, order and deduplication; optimize scanning/allocation rather than dropping warnings to meet the number.
|
||||
4. Keep the existing source-selection set as the correctness reference. The implementation found **133 indirect files among the 238 selected**. A file without the target declaration may still provide a container needed for hierarchical resolution. Two edited files do not justify selecting two input files. Any narrower selector must reproduce whole-scope edits, refusals, warnings and resolution on the hierarchy/bind/macro adversarial cases, including handshake 33's token-census coverage.
|
||||
5. Instrument the still-**805 ms refused extraction** at the `aes_wrap` inline-site selection. `extract::Plan::plan` builds a scope before computing the selection's safety checks; determine which prerequisite work is avoidable for a proven refusal. Put any cheap preflight in the refactor engine so the server does not become a second authority on what is safe. Preserve the exact refusal, not an optimistic edit.
|
||||
6. As a small first experiment in this lane, add an engine-owned preflight for a provably empty cursor before workspace source materialization. Preserve error precedence (invalid new name, out-of-scope/unavailable file, then cursor refusal), current-buffer semantics and the exact engine message. Do not treat all prepareRename failures or unresolved references as the same cheap case. Extend to duplicate-module refusals only with evidence that the index used is current and authoritative. Proposed no-symbol gate: ≤16 ms and zero closed-workspace parses, with identical refusals on the scoped test matrix.
|
||||
|
||||
**Gate:** use 398 ms large rename and 805 ms refused extraction as the current baselines. A useful first rename experiment should materially reduce scope work (proposed ≥20% wire-time improvement) at bounded peak RSS; the original <200 ms rename aspiration remains a stretch target. Compare ordinary, common-port, collision, macro/bind, hierarchical-tail and fallback cases, not only the successful two-file edit. Never widen verifier forgiveness for speed.
|
||||
|
||||
### 4. Optimize scan work after separating quiet and busy cases
|
||||
|
||||
**Measured cause:** a traced quiet warm scan spends about **217 ms in final index absorb**, **200 ms decoding facts**, **114 ms constructing candidates**, **110 ms reading source text**, and **48 ms in lookup**, in addition to discovery/cache opening. It writes zero new bytes and performs zero compactions, so another unconditional-compaction fix is no longer the next lever. Cold parsing is **1.70 s of a 2.88 s traced scan**.
|
||||
|
||||
While requests arrive, `server/index.rs::answer_what_is_waiting` publishes a staged prefix per burst; `state/mod.rs::publish_scan` merges the index and candidates, updates includes and refreshes open overlays. More responsiveness means paying this work more frequently. Publication cost is a source-backed hypothesis for the busier session; this review does not have a CPU breakdown of those busy publications.
|
||||
|
||||
**Plan:** first add a fixed-arrival-rate probe and record publication/overlay costs alongside queue latency and scan completion. Then test incremental table construction or reduced duplicate publication work, preserving the coherent-prefix contract. Benchmark one, ten and many open buffers. Optimize quiet-scan decode/merge allocations only after an allocation profile identifies duplication. Pursue cold parser throughput separately if the 2.3 s target still matters after interactive stalls are addressed.
|
||||
|
||||
**Gate:** retain correct mid-scan answers and the current memory reduction; improve request waits and completion under the same offered load. Do not improve scan throughput by withholding useful answers until completion, or report fewer served requests as a speedup.
|
||||
|
||||
## Verification and limits
|
||||
|
||||
All paired sampled edit fingerprints, action titles/shapes, result statuses, refusal messages and warnings matched, apart from scanserve intentionally collecting more responses from the more responsive candidate. Both sampled renames and three resolved edits match the reference. Extract execution produced the same captured edit. Inline execution in this corpus case refused in both versions; successful inline execution was not independently established by that timing row.
|
||||
|
||||
Both releases returned one definition in all six paired first-answer trials. The candidate returned one in six additional traced trials. Scanserve found zero non-empty-answer mismatches. Its check permits empty interim answers, so it is not a complete proof that every possible startup request is useful. This is a performance review of representative workloads, not exhaustive correctness certification or a full allocation/leak study. The eager non-resolving high-fan-out client path was not remeasured; its previous non-hot classification is retained.
|
||||
|
||||
Independent focused correctness checks passed: **8 startup tests, 7 scan-order tests, and 3 after-index tests**. The first startup test invocation incorrectly requested a library target for the binary-only server crate; the corrected invocation passed. No guard limit was hit. A full workspace test/clippy run was not repeated for this documentation-only review. LSP-phase one-minute load samples ranged from 2.82 to 6.00, so small differences should not be treated as statistically established regressions. Original-baseline and final corpus modified-file hashes match.
|
||||
+6
-6
@@ -136,13 +136,13 @@ what a change on the pointed-to side must not silently break.
|
||||
| `lucisv ──▶ vlog_linter` | depends | The public linter API for `lucisv check` — `lint` + `LintContext`/`ParsedSource`, `apply_fixes`, `select_rules` (the CLI does not call `run` itself). Relies on: rule names stable, linting never panics/writes, findings sorted by `(span.start, span.end, rule)`. `package_exports_in(path, file, tokens, src)` (perf5-p3: the CLI census hands the linter its one `ParsedSource` for the package half as it already did for `module_interfaces`; the text form is a wrapper; an AST gate spares files that declare no package from the one-file index). |
|
||||
| `lucisv ──▶ vlog_parser` | depends | `LineIndex` / `TextRange` for lint report coordinates, plus `PARSE_STACK_SIZE` for both the named `lucisv` thread and rayon workers. (The CLI otherwise reaches the parser through the formatter and linter.) |
|
||||
| `lucisv ──▶ rayon` | depends | The worker pool. Pinned exactly; pool must keep `stack_size(vlog_parser::PARSE_STACK_SIZE)` (currently 16 MiB; recursion-limit handshake) or the parser's depth guarantee regresses to a stack overflow. |
|
||||
| `lucisv_server ──▶ lucisv_core` | depends | Same config discovery and walk as the CLI (that sameness is the point — format-on-save must agree with `lucisv --check`), `filelist::read` (index scope rung 1, `+incdir+` for the include graph), `cache::content_hash` (re-used by the persistent index cache — one FNV-1a, not two). |
|
||||
| `lucisv_server ──▶ lucisv_core` | depends | Same config discovery and walk as the CLI (that sameness is the point — format-on-save must agree with `lucisv --check`), `filelist::read` (index scope rung 1, `+incdir+` for the include graph), `cache::content_hash` (re-used by the persistent index cache — one FNV-1a, not two). `walk::collect_files_with` (each walked file with the length the walk's own `metadata` call already holds; `None` for an input named rather than walked) and `walk::collect_files_below(root, input, …)` (a subtree walk that carries the ancestor `.gitignore`/`--exclude` stack down and yields nothing when an ancestor the root walk would not enter blocks it) — perf5r-first-answer, 2026-09-08; `collect_files` is unchanged and a wrapper. Amended for F1 (2026-09-09): `walk::DirectoryTracker`, `walk::DirId`, `walk::dir_id`, `walk::collect_files_tracked` and `walk::collect_files_below_tracked` preserve directory identity, precedence ordering, and cycle detection across split discovery phases and deduplicate open buffers against aliased disk paths in `overlay_buffers`. **The tracker's promise (F1, 2026-09-09):** the two walks of one scan enter each directory identity once *between* them, so no file is discovered under two spellings and their union is the set one root walk yields — a `lucisv_core` change that gave `DirectoryTracker::enter` a different answer for a second spelling would silently un-fix F1 (pinned by the nine alias fixtures in `server/tests/startup.rs`). **`has_conflict` is server-visible:** when the remaining walk reaches an identity by a path the root walk would have preferred, `state/mod.rs::land_discovery` reads it, `Scan::wants_rescan` reports it and `server/index.rs` turns it into one ordinary rescan after the scan settles, so startup and rescan converge on the canonical spelling; the CLI still calls `collect_files` and sees none of this. |
|
||||
| `lucisv_server ──▶ vlog_parser` | depends | `tokenize`, `parse_source_tolerant`/`parse_tolerant`, `ParseDiagnostic`, `LineIndex`, `TextRange`, tokens + trivia, `defines`, `KEYWORDS` (completion keyword tier; also the source the hand-maintained VS Code grammar is test-locked to), `PARSE_STACK_SIZE` for the named `lucisv-main` thread, and `stats::parses()` (perf5-p1: a per-thread whole-file parse count, asserted by the code-action tests — a repeated offer on an unchanged buffer parses nothing). |
|
||||
| `lucisv_server ──▶ vlog_semantic` | depends | `analyze`/`Semantics` (every navigation answer), `WorkspaceIndex` (build/incremental update, units/members/defines, `instantiations_of`/`subclasses_of` edge tables, `FileFacts` codec for the persistent cache), `resolve_external` overlay, `index_order`/`IndexBuilder` (watched builds), and `files_mentioning` as a refactoring selector rung (perf5-p2, handshake 33: `module_select::hierarchical_users` — previously the semantic lints' oracle only), and `WorkspaceIndex::table_sizes() -> IndexTableSizes` (perf5-p4: a read-only walk over the tables for the scan trace's memory line — end of scan only, never on a request path; no codec change). |
|
||||
| `lucisv_server ◀──▶ vlog_semantic` | handshake | Two negotiated additions, both 2026-08-28 and both additive: **`Symbol::detail_span` / `Def::detail_span`** (where a non-ANSI port's body declaration completes the header that names it — the server's hover card and `nav::definition` both read it, and they show/jump to it in the same order), and **`Semantics::symbols_named`** (name → declarations, built in `analyze`, in declaration order — the server replaced two scan-every-symbol loops with it and the *first-match tie-break must stay declaration order* or hover's choice between two live declarations of one name changes). `docs/features/port-detail-spans/README.md`. |
|
||||
| `lucisv_server ◀──▶ vlog_semantic` | handshake | Three later additive performance surfaces: **`DeclLines` / `Def::lines`** record declaration and detail lines at index time (`FACTS_FORMAT` 3 → 4); **`WorkspaceIndex::absorb`** folds a scan batch with one merge rather than one merge per file; and **`WorkspaceIndex::files_spelling`** finds external uses by spelling, resolved or not, for rename's dangling-use refusal. The first feeds hover-line-index, the second scan-interleave, and the third refactor-rename's six-rung fan-out. Changing the facts codec, reference-fact census or merge semantics breaks those consumers. |
|
||||
| `lucisv_server ──▶ vlog_refactor` | depends | `prepare_rename`/`rename`, `find_references`, the port refactorings, `organize_imports`, `extract_module`, `inline_module`, `RefactorEdit::{edits,warnings,created}`, `rename_traced` + `RenameTrace`/`VerifyTrace`/`Stage` (perf5-p2: the rename with its stage timings and parse counts as an out parameter; `rename` is the same call with a trace nobody reads; the server logs one `timing: rename trace …` line under `--verbose` only), the parsed-input selectors `port_action_modules_in`/`imported_packages_in`/`extract_site_in`/`inline_site_in` (perf5-p1: the offer paths hand the document's own tolerant parse and diagnostics; the text forms are thin wrappers kept for standalone consumers and the every-offset parity test; a large-file buffer still takes the text form), `instantiation_plan`/`render_with`/`module_definition` (the inline instantiation ghost, signature help, inlay hints — the completion popup stopped consuming them 2026-08-30, names-only tier). Promise consumed: never a partial edit — `Ok` verified whole, `Err` is a sentence. |
|
||||
| `lucisv_server ◀──▶ vlog_refactor` | handshake | Request-scope selectors added for the performance wave: `prepare_rename_here` must produce the same answer/refusal text as whole-scope `prepare_rename`; `rename_name_at` must name the target that the rename engine acts on; `port_action_modules` and `enclosing_module` must name every module the corresponding port action/command can edit. The server uses those names to choose an index-derived file set; `extract_site`, `inline_site` and `imported_packages` also name source requirements. The engine remains the authority, and every selector must supply a superset of files needed for edits and refusals (inline gap: §2.9-33). |
|
||||
| `lucisv_server ──▶ vlog_refactor` | depends | `prepare_rename`/`rename`, `find_references`, the port refactorings, `organize_imports`, `extract_module`, `inline_module`, `RefactorEdit::{edits,warnings,created}`, `rename_traced_with(files, known: &dyn KnownFacts, …)` (perf5r-scope-reuse, 2026-09-09: the engine may build its index from a caller's record for a file **only** when `known.facts_for(path, text)` answers for exactly these bytes — the server answers from the index cache's store entry, record and FNV-1a content hash read from one place, never from the workspace index's record; a reused file is parsed anyway if a later stage reads its `Semantics`; `rename_traced` is the door with nothing known), `rename_traced` + `RenameTrace`/`VerifyTrace`/`Stage` (perf5-p2: the rename with its stage timings and parse counts as an out parameter; `rename` is the same call with a trace nobody reads; the server logs one `timing: rename trace …` line under `--verbose` only), the parsed-input selectors `port_action_modules_in`/`imported_packages_in`/`extract_site_in`/`inline_site_in` (perf5-p1: the offer paths hand the document's own tolerant parse and diagnostics; the text forms are thin wrappers kept for standalone consumers and the every-offset parity test; a large-file buffer still takes the text form), `instantiation_plan`/`render_with`/`module_definition` (the inline instantiation ghost, signature help, inlay hints — the completion popup stopped consuming them 2026-08-30, names-only tier). Promise consumed: never a partial edit — `Ok` verified whole, `Err` is a sentence. |
|
||||
| `lucisv_server ◀──▶ vlog_refactor` | handshake | Request-scope selectors added for the performance wave: `prepare_rename_here` must produce the same answer/refusal text as whole-scope `prepare_rename`; `rename_name_at` must name the target that the rename engine acts on; `port_action_modules` and `enclosing_module` must name every module the corresponding port action/command can edit. The server uses those names to choose an index-derived file set; `extract_site`, `inline_site` and `imported_packages` also name source requirements. **`rename_preflight(semantics, offset, new_name)` (perf5r-preflight, 2026-09-08)** owes whole-scope `rename` the same *refusal* text one-directionally — it may always stand aside with `Ok(())` and never invents a refusal — and deliberately reads no workspace index (unlike `prepare_rename_here`): only refusals that are a pure function of the request buffer's own text (the new-name check, no symbol here, an unresolved or inherited-candidate reference, an unspelled declaration, the same name at a non-file-scope declaration); every index-answered refusal stays on the slow road. The engine remains the authority, and every selector must supply a superset of files needed for edits and refusals (inline gap: §2.9-33). |
|
||||
| `lucisv_server ──▶ vlog_formatter` | depends | `format_source`, `format_range`/`LineRanges` (range, ranges, on-type formatting), `Config`, `fence::protected_regions` (quick-fix filter). |
|
||||
| `lucisv_server ──▶ vlog_linter` | depends | `run`, `lint` + `LintContext::from_parse` (lints from the `Document`'s own parse — one-parse), `default_rules`, `apply_fixes`, `rule_by_name`. Same three promises the CLI relies on. |
|
||||
| `lucisv_server ──▶ lsp-server / lsp-types` | depends | The transport (synchronous, no async runtime) and the protocol data model. Both pinned exactly. cancel-request additionally relies on `lsp-server 0.10.0`'s stdio transport being a **rendezvous channel** (its own forwarder queue exists because of it) — a version bump must re-read that crate's `stdio.rs`. |
|
||||
@@ -289,7 +289,7 @@ spans two layers — the include graph *and* the `documentLink` handler;
|
||||
| loop | `server/` (since 2026-09-02: `mod` = the loop; `dispatch`, `client`, `index`, `notification`, `progress`, `diagnostics`, `batch`, `formatting`, `large_file`, `semantic_tokens`; tests in `server/tests/`) | the message loop + queue/burst (cancel-request), dispatch, `Pending` map for server-initiated requests, stepped startup scans with mid-scan request drains, held-request ordering for rescans, reindex/widen orchestration, progress/log senders, optional `timing:` instrumentation |
|
||||
| state | `state.rs` | `Workspace` (roots, scope ladder, index, include graph, candidates, index cache, open `Document`s with overlay, bounded closed-file `FileView` cache), `Scan` (whole or additive widen), fan-out source selectors (`module_sources`, `rename_sources`, `include_sources`), and `Document` (text, tokens, tree, semantics, diagnostics, `large` flag) |
|
||||
| substrate | `convert.rs`, `uri.rs`, `locate.rs`, `pairs.rs`, `includes.rs`, `candidates.rs`, `index_cache.rs`, `watch.rs`, `settings.rs`, `templates.rs`, `sync.rs` | position math, URI↔path, location building, the begin/end scope matcher, the include graph, completion word/module tables and their scan-batch forms, the persistent index store, watcher registration, `lucisv.*` settings parsing, snippet registry, incremental text sync |
|
||||
| handlers | one file per capability: `format.rs`, `diagnostics.rs`, `lint.rs` (with `fences.rs`: the formatter's text-only fence answer memoized once per `Document` — perf5-p1; the shared-fence-filter contract is unamended), `rename_trace.rs` (perf5-p2: `Rung`/`Wanted`/`SelectionTrace` — the path set the rename fan-out ladder fills, remembering which rung asked for each file; `Workspace::rename_sources_traced` is the ladder with that sink), `hover.rs`, `expand.rs`, `nav.rs`, `type_def.rs`, `type_hierarchy.rs`, `hierarchy.rs`, `design_hierarchy.rs`, `symbols.rs`, `tokens.rs`, `completion/` (`mod`, `member`, `module`, `tiers`, `word`, `site`; test harness in `harness`), `signature.rs`, `inlay.rs`, `inline.rs`, `lens.rs`, `code_action.rs`, `rename.rs`, `ports.rs`, `imports.rs`, `extract.rs`, `inline_module.rs`, `folding.rs`, `selection.rs`, `linked.rs`, `on_type.rs`, `includes.rs` (links), `file_ops.rs`, `instantiate.rs`, `large.rs` | each is a mostly-pure function over `Document`/`Workspace`; protocol only, no language analysis of its own (anything that looks like analysis in here is a bug or a Handshake request — lucisv-server README) |
|
||||
| handlers | one file per capability: `format.rs`, `diagnostics.rs`, `lint.rs` (with `fences.rs`: the formatter's text-only fence answer memoized once per `Document` — perf5-p1; the shared-fence-filter contract is unamended; and `lint_snapshot.rs` + `lint_trace.rs` — perf5r-lint-snapshot, 2026-09-08: one `lint_with` pass per document revision shared by the diagnostics publish and quick-fix discovery, keyed by value on every input of that call — rule names, merged options, line width, tab width, oracle presence, external waiver *contents* — held in a `Slot` on the `Document` and cleared by `Document::refresh_overlay`, which every index mutation ends in; a `timing: codeaction … key=value` line under `--verbose`, parsed by `tools/perf/phases_r1.py`), `rename_trace.rs` (perf5-p2: `Rung`/`Wanted`/`SelectionTrace` — the path set the rename fan-out ladder fills, remembering which rung asked for each file; `Workspace::rename_sources_traced` is the ladder with that sink), `hover.rs`, `expand.rs`, `nav.rs`, `type_def.rs`, `type_hierarchy.rs`, `hierarchy.rs`, `design_hierarchy.rs`, `symbols.rs`, `tokens.rs`, `completion/` (`mod`, `member`, `module`, `tiers`, `word`, `site`; test harness in `harness`), `signature.rs`, `inlay.rs`, `inline.rs`, `lens.rs`, `code_action.rs`, `rename.rs`, `ports.rs`, `imports.rs`, `extract.rs`, `inline_module.rs`, `folding.rs`, `selection.rs`, `linked.rs`, `on_type.rs`, `includes.rs` (links), `file_ops.rs`, `instantiate.rs`, `large.rs` | each is a mostly-pure function over `Document`/`Workspace`; protocol only, no language analysis of its own (anything that looks like analysis in here is a bug or a Handshake request — lucisv-server README) |
|
||||
|
||||
**`editors/vscode`** — `extension.js` (spawn + rainbow decorations + storage
|
||||
path; ~everything else is `vscode-languageclient` driven off advertised
|
||||
@@ -555,7 +555,7 @@ promise:
|
||||
| `dut-hierarchy ──▶ vscode-hierarchy-sidebar` | depends | TODO §56 (2026-09-06): `hierarchySections.js` consumes the sidebar's model (`rootNode`, the reverse instance index memoised on the model) and its webview renderer's row menu; no edge to any Rust crate — the server is untouched. |
|
||||
| `coverage-gaps-l` (TODO §54, 0.49.0) | lane | Touches `vlog_parser` (ast + parser + the `randsequence` keyword in the token table), `vlog_formatter` (arms, `[format] uvm-utils-indent`), `vlog_semantic` (bind arms), `vlog_linter`, `vlog_refactor` (match arms), `lucisv_core` (the config key), `lucisv_server` (settings, format) and `editors/vscode` (the setting, the regenerated grammar). New AST: `StmtKind::{EventTrigger, Let, RandSequence}`, `ExprKind::StreamWith`, `DataDecl::strength`, `ClockingSkew`; `size_pins` unmoved. |
|
||||
| `hover-line-index ──▶ port-detail-spans / index-persistence` | depends + handshake | `DeclLines { name, detail }` rides each indexed `Decl`, so ordinary and split-port hover headings do not reread a file just to compute a line. The record grew again and **`FACTS_FORMAT` went 3 → 4**; the server's bounded `FileView` cache supplies the text/`LineIndex` only when a snippet or a non-indexed position still needs it. Its four invalidation points are `set_document`, `close_document`, `update_one`, and a whole rebuild. |
|
||||
| `scan-interleave ◀──▶ workspace-index` | handshake | A scan is a stepped `Scan` value; staged `FileFacts` land through `WorkspaceIndex::absorb`, one whole-index merge per queue drain rather than per file. `Candidates::absorb` and (until perf5-p4, `IncludeGraph::absorb`; since 2026-09-08 the graph is rebuilt from each file's staged include list, `IncludeGraph::from_includes`, read in the file's own step) publish their tables in the same drain, so “the workspace as far as scanned” cannot mean three different prefixes. **Amended by perf5-p4 (2026-09-08):** the startup is staged behind the `workspace/configuration` answer with a 2 s bound (`server/startup.rs`), so there is one startup scan at the answered scope and no empty default-scope scan; the scan reads each file's text in its own step (`Scan::take_text`, never the whole corpus up front) and orders the work list open buffers → their raised folders → the rest (`scan_order.rs`); `must_wait` gains `staging` and `head_owed` — a held opening request is answered inside the startup scan once the buffers' folder head is published, never off a one-file prefix; the store is opened at the first step that needs it and not rewritten when it was loaded canonical and nothing was appended (`index_cache.rs::already_compact`); `state.rs` is now `state/mod.rs` + `state/scan.rs` (a pure move). The rescan order contract (decision 2) is unchanged. |
|
||||
| `scan-interleave ◀──▶ workspace-index` | handshake | A scan is a stepped `Scan` value; staged `FileFacts` land through `WorkspaceIndex::absorb`, one whole-index merge per queue drain rather than per file. `Candidates::absorb` and (until perf5-p4, `IncludeGraph::absorb`; since 2026-09-08 the graph is rebuilt from each file's staged include list, `IncludeGraph::from_includes`, read in the file's own step) publish their tables in the same drain, so “the workspace as far as scanned” cannot mean three different prefixes. **Amended by perf5-p4 (2026-09-08):** the startup is staged behind the `workspace/configuration` answer with a 2 s bound (`server/startup.rs`), so there is one startup scan at the answered scope and no empty default-scope scan (perf5r-first-answer, 2026-09-08: plus `OPENING_FILE_WAIT`, 25 ms inside that window, spent only by a workspace session whose opening burst holds no `didOpen`; and the scan is discovered in two phases when it pays — the open buffers' raised folders walked, stepped and published first, the rest of the scope walked as a zero-file step afterwards, `state/discover.rs::first_scope` + `PendingDiscovery`; bounded to rung 2, a raised folder that is a strict descendant of a root, at most `HEAD_WALK_MAX` = 512 files, and the session's first scan — otherwise today's single walk); the scan reads each file's text in its own step (`Scan::take_text`, never the whole corpus up front) and orders the work list open buffers → their raised folders → the rest (`scan_order.rs`); `must_wait` gains `staging` and `head_owed` — a held opening request is answered inside the startup scan once the buffers' folder head is published, never off a one-file prefix; **perf5r-publication (2026-09-08):** a scan publishes at most once per `PUBLISH_EVERY` = 512 staged files (the drain with something waiting exempt, so the first useful answer never moves) — a request between publishes reads a coherent prefix at most that far behind; an empty navigation answer (definition, typeDefinition, references) computed while a scan runs is put in `Server::deferred` and asked again at the next publish and at the latest at scan end (`deferred` is not in `must_wait`, so hover is unaffected), and a `$/cancelRequest` naming a deferred request answers it cancelled where the cancel lands (`cancel_deferred`); `HEAD_WALK_MAX` pinned by test; the store is opened at the first step that needs it and not rewritten when it was loaded canonical and nothing was appended (`index_cache.rs::already_compact`); `state.rs` is now `state/mod.rs` + `state/scan.rs` (a pure move). The rescan order contract (decision 2) is unchanged. |
|
||||
| `scan-interleave ──▶ hover-line-index` | depends | Delivers hover-line-index's measured startup-wait request: a startup scan above 64 files drains queued messages between files. A rescan deliberately still holds requests; what an answer sees never depends on elapsed wall time. |
|
||||
| `index-scope ──▶ scan-interleave` | depends | A scope widen is the second `Scan` shape (`begin_widen`) and shares `scan_step`/`finish_scan`; it folds only newly reached folders plus open-buffer analyses, never masquerades as a whole scan, and never interleaves. Folder scope now ships at depth 2; rootless sessions do not climb an unnamed tree. |
|
||||
| `index-scope ──▶ one-parse / completion-core` | depends | Whole scans and widens reuse each open `Document`'s existing `FileFacts` and completion words rather than reparse its text. `IndexEvent::Analyzed` keeps this distinct from a persistent-cache hit. |
|
||||
@@ -716,7 +716,7 @@ untouched, reusing existing arms.
|
||||
| `vlog_refactor` | refactor (plan), refactor-rename (including `prepare_rename_here` / `rename_name_at` selector half), refactor-ports (including module-target selectors), refactor-instantiate, references-nav (whole-scope equivalence oracle), and the refactor half of decomposition-semantic; expand-wildcard and convert-to-ansi (`ports/`), organize-imports (`imports.rs`), extract-inline-module (`extract/`, `inline/`, `check/ledger.rs`) |
|
||||
| `lucisv_core` | lucisv-core-lift (`config.rs`, `walk.rs`), filelist (`filelist.rs`), format-cache (`cache.rs`) |
|
||||
| `lucisv` (CLI) | cli-polish, config-discovery (wiring), parallel-files, cli-filelist, linter-core (CLI half in `lint.rs`), one-parse (`lint.rs` parses once via `ParsedSource`), format-cache (wiring), release-prep (`--version` contract) |
|
||||
| `lucisv_server` | lucisv-server (trunk), decomposition-server (`server/`, `completion/`), and one or two modules per capability feature: editor-scopes→`pairs.rs`, filelist→scope ladder in `state.rs`, include-nav→`includes.rs`, completion-core/fuzzy-completion/member-completion→`completion/`+`candidates.rs`, completion-templates→`templates.rs`, inline-templates→`inline.rs`, inline-instantiation→`inline.rs`+`completion/`+`candidates.rs` (+`settings.rs` key), bind-semantics→`instantiate.rs`, macro-expansion→`expand.rs`, hierarchy→`hierarchy.rs`, vscode-hierarchy-sidebar→`design_hierarchy.rs`, type-hierarchy→`type_hierarchy.rs`, type-definition→`type_def.rs`, code-lens→`lens.rs`, inlay-hints→`inlay.rs`, server-lint→`lint.rs`+`lint/project.rs`+`code_action.rs`, one-parse→`lint.rs`+`state.rs` (`Document.tree`), refactor wiring/performance fan-outs→`rename.rs`/`ports.rs`+`state.rs`, apply-edit+folders-and-config+cancel-request+work-done-progress→`server/`, editor-settings+indexing-ux+index-scope+index-persistence→`settings.rs`+`state.rs`(+`index_cache.rs`), incremental-sync→`sync.rs`, file-watching→`watch.rs`, file-operations→`file_ops.rs` (+`include_sources` in `state.rs`), pull-diagnostics→`diagnostics.rs`+`server/`, semantic-tokens-delta→`tokens.rs`+`server/semantic_tokens.rs`, on-type-formatting→`on_type.rs`, will-save-wait-until→`format.rs` (+`settings.rs`/`main.rs`), selection-range→`selection.rs`, linked-editing→`linked.rs`, references-nav (server half)→`folding.rs`+`nav.rs`, large-file-mode→`large.rs`+`server/large_file.rs`, lsp-318-extras→`format.rs` (+`main.rs` capability), hover-declarations→`hover.rs`(+`nav.rs`), port-detail-spans (server half)→`hover.rs`+`nav.rs`, hover-line-index→`hover.rs`+`locate.rs`+`state.rs`, scan-interleave/change-debounce/verbose-timing→`server/`+`state.rs`, perf5-p1→`fences.rs` (+ the `_at` helpers in `ports.rs`/`imports.rs`/`extract.rs`/`inline_module.rs`), perf5-p2→`rename_trace.rs`+`module_select.rs`, perf5-p4→`scan_trace.rs`+`scan_order.rs`+`server/startup.rs`+`state/scan.rs` (+ counters and the compaction skip in `index_cache.rs`), perf measurements→`src/perf.rs` (`docs/perf/README.md`, not a feature README), interactive-latency→`state.rs` (the two token searches) + `selection.rs`/`on_type.rs`/`completion/`/`inline.rs` (their callers) + `src/perf.rs`/`tests/e2e.rs` (its measurements), editor-packaging (grammar test)→`tests/grammar.rs` |
|
||||
| `lucisv_server` | lucisv-server (trunk), decomposition-server (`server/`, `completion/`), and one or two modules per capability feature: editor-scopes→`pairs.rs`, filelist→scope ladder in `state.rs`, include-nav→`includes.rs`, completion-core/fuzzy-completion/member-completion→`completion/`+`candidates.rs`, completion-templates→`templates.rs`, inline-templates→`inline.rs`, inline-instantiation→`inline.rs`+`completion/`+`candidates.rs` (+`settings.rs` key), bind-semantics→`instantiate.rs`, macro-expansion→`expand.rs`, hierarchy→`hierarchy.rs`, vscode-hierarchy-sidebar→`design_hierarchy.rs`, type-hierarchy→`type_hierarchy.rs`, type-definition→`type_def.rs`, code-lens→`lens.rs`, inlay-hints→`inlay.rs`, server-lint→`lint.rs`+`lint/project.rs`+`code_action.rs`, one-parse→`lint.rs`+`state.rs` (`Document.tree`), refactor wiring/performance fan-outs→`rename.rs`/`ports.rs`+`state.rs`, apply-edit+folders-and-config+cancel-request+work-done-progress→`server/`, editor-settings+indexing-ux+index-scope+index-persistence→`settings.rs`+`state.rs`(+`index_cache.rs`), incremental-sync→`sync.rs`, file-watching→`watch.rs`, file-operations→`file_ops.rs` (+`include_sources` in `state.rs`), pull-diagnostics→`diagnostics.rs`+`server/`, semantic-tokens-delta→`tokens.rs`+`server/semantic_tokens.rs`, on-type-formatting→`on_type.rs`, will-save-wait-until→`format.rs` (+`settings.rs`/`main.rs`), selection-range→`selection.rs`, linked-editing→`linked.rs`, references-nav (server half)→`folding.rs`+`nav.rs`, large-file-mode→`large.rs`+`server/large_file.rs`, lsp-318-extras→`format.rs` (+`main.rs` capability), hover-declarations→`hover.rs`(+`nav.rs`), port-detail-spans (server half)→`hover.rs`+`nav.rs`, hover-line-index→`hover.rs`+`locate.rs`+`state.rs`, scan-interleave/change-debounce/verbose-timing→`server/`+`state.rs`, perf5-p1→`fences.rs` (+ the `_at` helpers in `ports.rs`/`imports.rs`/`extract.rs`/`inline_module.rs`), perf5-p2→`rename_trace.rs`+`module_select.rs`, perf5-p4→`scan_trace.rs`+`scan_order.rs`+`server/startup.rs`+`state/scan.rs`, perf5r-first-answer→`state/discover.rs` (+ counters and the compaction skip in `index_cache.rs`), perf measurements→`src/perf.rs` (`docs/perf/README.md`, not a feature README), interactive-latency→`state.rs` (the two token searches) + `selection.rs`/`on_type.rs`/`completion/`/`inline.rs` (their callers) + `src/perf.rs`/`tests/e2e.rs` (its measurements), editor-packaging (grammar test)→`tests/grammar.rs` |
|
||||
| `editors/vscode` | editor-packaging, editor-snippets, editor-settings (manifest half), editor-scopes (rainbow half), vscode-hierarchy-sidebar (`hierarchyView.js`/`hierarchyModel.js`), dut-hierarchy (`hierarchySections.js`), extract-inline-module (`extract.js`), editor-platform-vsix, editor-marketplace-page, index-persistence (`storagePath` line), verbose-timing (`lucisv.verbose`, spawn args and restart in `extension.js`) |
|
||||
| `tools/` + CI | corpus-check, release-prep, ci-release, editor-platform-vsix (staging), range-formatting (`lucisv-changed.sh`) |
|
||||
|
||||
|
||||
@@ -5,6 +5,23 @@ for you. The extension and its bundled language server share one version
|
||||
number; the full engineering notes live in the
|
||||
[project changelog](https://git.luci.ooo/lucio/lucisv/src/branch/master/CHANGELOG.md).
|
||||
|
||||
## 0.53.0 — 2026-09-09
|
||||
|
||||
- A workspace with a symlinked directory alias no longer shows two
|
||||
definition targets, or refuses a valid rename as ambiguous, right after
|
||||
opening a file; startup and rescan now agree.
|
||||
|
||||
## 0.52.0 — 2026-09-09
|
||||
|
||||
- **Quicker where it counts:** a cursor move on a huge generated file
|
||||
costs 1 ms instead of 23; go-to-definition right after opening a file
|
||||
answers in about 100 ms, correctly, every time; a rename that is going
|
||||
to be refused says so in a millisecond instead of scanning the
|
||||
workspace; and the server stays responsive while it indexes, finishing
|
||||
about twice as fast under a stream of requests.
|
||||
- Cancelling a navigation request during the startup scan is honoured
|
||||
immediately.
|
||||
|
||||
## 0.51.0 — 2026-09-08
|
||||
|
||||
- **Faster everywhere the cursor goes.** The lightbulb no longer re-parses
|
||||
|
||||
@@ -30,7 +30,7 @@ Install **lucisv — Verilog/SystemVerilog** from the VS Code Extensions view,
|
||||
then open a Verilog or SystemVerilog file. There is no separate server or CLI
|
||||
setup.
|
||||
|
||||
The current release is **0.51.0**. Its platform packages include both
|
||||
The current release is **0.53.0**. Its platform packages include both
|
||||
`lucisv-server` and the `lucisv` command-line tool:
|
||||
|
||||
| Package target | Machines |
|
||||
@@ -374,6 +374,17 @@ Every nesting color is a proper VS Code theme color:
|
||||
}
|
||||
```
|
||||
|
||||
## Release 0.53.0 highlights
|
||||
|
||||
Version 0.53.0 fixes the startup scan indexing a symlink-aliased
|
||||
directory twice.
|
||||
|
||||
## Release 0.52.0 highlights
|
||||
|
||||
Version 0.52.0 is the take-5 review round: cheaper refusals, one lint
|
||||
pass per revision, a fast first answer after opening a file, and scans
|
||||
that stay responsive under load.
|
||||
|
||||
## Release 0.51.0 highlights
|
||||
|
||||
Version 0.51.0 is performance take 5: code actions, rename, the CLI
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "lucisv",
|
||||
"displayName": "lucisv — Verilog/SystemVerilog",
|
||||
"description": "Fast Verilog/SystemVerilog formatting, linting, navigation, refactoring, semantic highlighting and RTL design intelligence.",
|
||||
"version": "0.51.0",
|
||||
"version": "0.53.0",
|
||||
"publisher": "guoliangchen",
|
||||
"author": "Guoliang Chen",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -21,7 +21,10 @@ and take 5 §P0 (TODO §60.0) corrected what some rows *meant*: see
|
||||
| `phases_p0.py` | take 5 §P0's phases: `execute` (what an extract/inline command really costs), `offerkinds` (the `context.only` families), `offerqueue` (leader/follower), and `scan`'s first-useful-answer half |
|
||||
| `phases_p1.py` | take 5 §P1's phase: `offeredit` — the first offer after a `didChange` beside the repeated offer on the unchanged buffer, at the same cursor in the same session |
|
||||
| `phases_p2.py` | take 5 §P2's phase: `renametrace` — eight renames, each with the server's own `timing: rename trace …` line read back off `window/logMessage` and written out as row fields (which rung selected each file, per-stage ms, per-stage **whole-file parse counts**) beside the wire time and the peak RSS |
|
||||
| `phases_r1.py` | the review round's §R1 phases: `actionprofile` (the `timing: codeaction …` stage split at three cursors × four request shapes), `ruleablation` (one row per default-on rule, `lucisv.lint.select` pushed between rows) and `snapshotrss` (idle RSS at 1 / 10 / 100 buffers, each asked for quick fixes so every one holds a lint snapshot) |
|
||||
| `phases_p4.py` | take 5 §P4a's phases: `scanprofile` (the startup breakdown, one row per traced scan), `scanwait` (the first useful answer with that session's own trace beside it) and `scanserve` (a definition every 200 ms for as long as the scan runs, with the mid-scan/settled answer coherence check) |
|
||||
| `phases_r3b.py` | the review round's §R3b phase: `renamewarn` — four renames' **warning sentences**, read off `window/logMessage` verbatim, because a rename's warnings never travel in the `WorkspaceEdit` and so are in no phase's fingerprint |
|
||||
| `phases_r4.py` | the review round's §R4 phases: `scanload` / `scanloadcold` (a definition every 100 or 250 ms of **wall clock**, a fixed number of them, with the server's own publication split in the row), `scanloadcross` (the same load at a cursor the open buffer's folder cannot answer) and `scanloadprobe` (one cell, for checking the probe itself) |
|
||||
| `sweep.sh` | the timed CLI sweeps (`format --check`, `check`) over five trees, `/usr/bin/time -l` |
|
||||
| `sweeptable.py` | those logs → the document's §7 Markdown table, plus the format-cache hits each try reported |
|
||||
| `outcomes.sh` | the untimed per-file outcome runs, for the release-to-release outcome diff |
|
||||
@@ -85,6 +88,13 @@ apart in `results.jsonl`; run each phase once per binary.
|
||||
| `scanprofile` | §P4a | the startup breakdown, from the server's own `timing: scan <n> stages/counts/memory` lines: workspace cold and warm, the default scope, `scopeDepth 0`, and 1 / 10 / 100 open buffers. **One row per traced scan** — a session at a configured scope pays two (the startup scan runs at the default settings and the pulled scope asks for another), and adding them together would be wrong |
|
||||
| `scanwait` | §P4a | §P0's first-useful-answer rows, re-run under `--verbose`, so the trace of the very session that answered sits in the row: when the first publish landed, how many publishes there were, how long the config round trip took |
|
||||
| `scanserve` | §P4a | a `textDocument/definition` every 200 ms for as long as the scan is still saying anything: the mid-scan latency distribution, and `mismatched_answers` — non-empty answers that named somewhere the settled index does not, which must be 0 (the coherence contract of `docs/features/index-scope/README.md`) |
|
||||
| `actionprofile` | §R1b | one `--verbose` session per cursor, four request shapes each — the first menu of the session, three repeats on the unchanged buffer, a definition queued behind it, and the first menu after each of three `didChange`s — with the server's own `timing: codeaction …` line parsed into `trace_*` fields. Two groups per line: `flush{…}` is the debounced `Document` rebuild and the diagnostics publish inside it, `action{…}` is the handler. A request that lints nothing logs no line, which is why the queued rows say how many the follower logged |
|
||||
| `ruleablation` | §R1b | *which* rules the pinmux quickfix menu's milliseconds are in: one warm session, `lucisv.lint.select` pushed to a single rule per row by `didChangeConfiguration` (a selection change rescans nothing), the unrestricted control taken first **and** last so session drift is visible rather than blamed on a rule |
|
||||
| `snapshotrss` | §R1a | idle and peak RSS with 1 / 10 / 100 open buffers, each sent one quickfix-only `codeAction` so that every open document holds a lint snapshot — the memory bound of `docs/features/perf5r-lint-snapshot/README.md`. `rss_kib` / `peak_rss_kib`, never `ms` |
|
||||
| `renamewarn` | §R3b | every `lucisv: ` warning sentence four renames say, in order, written into the row as `titles` and compared **line by line** between labels. `renametrace` hashes a rename's edits; its warnings are `window/logMessage` notifications and are in no fingerprint, so a reuse that kept every edit and dropped a sentence would otherwise pass |
|
||||
| `scanload` | §R4 | **the controlled form of `scanserve`.** A `textDocument/definition` every 100 and every 250 ms of wall clock, counted from the session's start and **independent of the responses** — a fixed number of them, so both binaries are offered exactly the same load and a faster one shows it as answers arriving *after* settle rather than as requests never sent. Warm cache, 1 / 2 / 11 / 101 open buffers, three fresh sessions a cell, plus a **quiet control** (the same cell, no requests) so a settle time that moved because of the load can be told from one that moved anyway. Each row carries every request's own wait (median and max, and the same two over the mid-scan subset), how many were answered before settle, `mismatched_answers` and `unsettled_answers`, the settle time, `tick_jitter_ms` (how a reader checks the arrival discipline the row claims) and, from the session's own `--verbose` trace, `publishes`, `published` and the four `publish_*` stages |
|
||||
| `scanloadcold` | §R4 | `scanload` with the index store deleted before every session. A separate phase because a cold cell under this load is a ten-second session, and eight of them do not fit inside the 1 800-second guard — splitting the run is the answer to that, raising the guard is not |
|
||||
| `scanloadcross` | §R4 | `scanload` at a cursor whose target is **outside** the open buffer's own folder (`tl_if`, declared in `hw/dv/sv/tl_agent`), which is the case the empty-answer rule of `docs/features/perf5r-publication/README.md` is for: in a server without that rule it is answered `[]` at the head publish, and the row says what the rule costs those requests and what it buys |
|
||||
| `probe` | — | ad-hoc: `--probe FILE:LINE:CHAR` (0-based) prints what a cursor offers. This is how `sites.REFACTOR_SITES` was found |
|
||||
|
||||
## The CLI sweeps
|
||||
|
||||
@@ -37,6 +37,10 @@ import phases_p0 # noqa: E402,F401 — registers take 5 §P0's phases
|
||||
import phases_p1 # noqa: E402,F401 — registers take 5 §P1's phases
|
||||
import phases_p2 # noqa: E402,F401 — registers take 5 §P2's phases
|
||||
import phases_p4 # noqa: E402,F401 — registers take 5 §P4's phases
|
||||
import phases_r1 # noqa: E402,F401 — registers the review round's R1 phases
|
||||
import phases_r3 # noqa: E402,F401 — registers the review round's R3 phase
|
||||
import phases_r3b # noqa: E402,F401 — registers the review round's R3b phase
|
||||
import phases_r4 # noqa: E402,F401 — registers the review round's R4 phases
|
||||
|
||||
|
||||
# =========================================================================
|
||||
|
||||
+59
-1
@@ -85,6 +85,25 @@ class Session:
|
||||
self.server_requests = [] # every server->client request, answered
|
||||
self.applied = [] # captured workspace/applyEdit pushes, in order
|
||||
self.pending = {} # id -> (method, sent_at) for in-flight requests
|
||||
#: The `perf_counter` instant each indexing bar came *down*, stamped by
|
||||
#: the reader thread where the bytes land. One entry per scan: the
|
||||
#: server puts one bar up per scan and takes it down when that scan
|
||||
#: lands (`server/progress.rs`), and a mid-scan publish sends no `end`.
|
||||
#: A probe reads `scan_completed_at` — the first of them — and checks
|
||||
#: this list's length to prove that first `end` was the scan's.
|
||||
self.progress_ends = []
|
||||
#: When the session's **scan** finished, independent of anything the
|
||||
#: client sent. Review finding F3: a request window's own chatter is
|
||||
#: not a scan event, so the settle instant is taken from the server's
|
||||
#: own end-of-scan message and never from "the last thing we heard".
|
||||
self.scan_completed_at = None
|
||||
#: id -> the `perf_counter` instant the reader thread parsed the
|
||||
#: response. Stamped where the bytes land rather than where a caller
|
||||
#: gets round to looking, so a probe holding many requests in flight
|
||||
#: at once measures each one's own wait and not its own poll interval
|
||||
#: (`phases_r4.py`). Entries are consumed by [`Session.poll_answers`];
|
||||
#: `await_id` neither reads nor needs them.
|
||||
self._arrived = {}
|
||||
self.proc = None
|
||||
self._reader = None
|
||||
self._lock = threading.Lock()
|
||||
@@ -172,6 +191,8 @@ class Session:
|
||||
|
||||
def _dispatch(self, message):
|
||||
with self._cond:
|
||||
if "method" not in message and message.get("id") is not None:
|
||||
self._arrived[message["id"]] = time.perf_counter()
|
||||
self._inbox.append(message)
|
||||
self._cond.notify_all()
|
||||
# Server->client requests must be answered from the reader thread, or
|
||||
@@ -253,6 +274,7 @@ class Session:
|
||||
self._inbox.pop(i)
|
||||
done = time.perf_counter()
|
||||
_, sent = self.pending.pop(rid)
|
||||
self._arrived.pop(rid, None)
|
||||
self._drain_locked()
|
||||
return (done - sent) * 1000.0, message
|
||||
self._drain_locked()
|
||||
@@ -269,6 +291,31 @@ class Session:
|
||||
"""Just the round trip in milliseconds."""
|
||||
return self.request(method, params, timeout)[0]
|
||||
|
||||
def poll_answers(self):
|
||||
"""Take every response that has arrived, without waiting for any.
|
||||
|
||||
The pipelining half of [`Session.await_id`]: a probe that sends on a
|
||||
clock rather than after the previous answer holds many requests in
|
||||
flight at once and must not block on the oldest of them. Each entry is
|
||||
`(rid, method, elapsed_ms, arrived)` plus the message, with `elapsed`
|
||||
measured from the write to the instant the **reader thread** parsed the
|
||||
response, so the caller's poll interval is not in the number.
|
||||
"""
|
||||
out = []
|
||||
with self._cond:
|
||||
kept = []
|
||||
for message in self._inbox:
|
||||
rid = message.get("id")
|
||||
if "method" in message or rid not in self.pending:
|
||||
kept.append(message)
|
||||
continue
|
||||
method, sent = self.pending.pop(rid)
|
||||
arrived = self._arrived.pop(rid, None) or time.perf_counter()
|
||||
out.append((rid, method, (arrived - sent) * 1000.0, arrived, message))
|
||||
self._inbox[:] = kept
|
||||
self._drain_locked()
|
||||
return out
|
||||
|
||||
# -- notification bookkeeping -----------------------------------------
|
||||
|
||||
def _drain_locked(self):
|
||||
@@ -282,9 +329,20 @@ class Session:
|
||||
self.server_requests.append(message["method"])
|
||||
elif "method" in message and "id" not in message:
|
||||
self.notifications.append(message)
|
||||
if message["method"] == "window/logMessage":
|
||||
if message["method"] == "$/progress":
|
||||
params = message.get("params") or {}
|
||||
value = params.get("value") or {}
|
||||
if value.get("kind") == "end":
|
||||
self.progress_ends.append(time.perf_counter())
|
||||
if self.scan_completed_at is None:
|
||||
self.scan_completed_at = self.progress_ends[-1]
|
||||
elif message["method"] == "window/logMessage":
|
||||
text = message.get("params", {}).get("message", "")
|
||||
self.log_messages.append(text)
|
||||
# The `--verbose` line the bar's own `end` is followed by —
|
||||
# the fallback for a client that showed no bar at all.
|
||||
if text.startswith("timing: scan finished:") and self.scan_completed_at is None:
|
||||
self.scan_completed_at = time.perf_counter()
|
||||
found = TIMING_LINE.search(text)
|
||||
if found:
|
||||
self.timings.append((found.group(1), float(found.group(2))))
|
||||
|
||||
+18
-7
@@ -230,14 +230,22 @@ def scan_chatter(s):
|
||||
def phase_scanserve():
|
||||
"""A definition every 200 ms for as long as the scan runs.
|
||||
|
||||
Two questions: what those requests cost while the index is being built,
|
||||
and whether any of them saw a table the finished index disagrees with. The
|
||||
coherence check is what a client can actually observe — a mid-scan answer
|
||||
may be *empty* (the file it would name has not been reached), but it may
|
||||
never name somewhere else than the settled index does.
|
||||
Three questions: what those requests cost while the index is being built,
|
||||
whether any of them saw a table the finished index disagrees with, and how
|
||||
many were not yet the settled answer at all.
|
||||
|
||||
**Two counters, because they are two contracts.** `mismatched_answers` is
|
||||
the coherence contract of `docs/features/index-scope/README.md`: a mid-scan
|
||||
answer may be *empty* — the file it would name has not been reached — but
|
||||
it may never name somewhere else than the settled index does. That is the
|
||||
number the 0.51.0 baseline cells were taken with and the one they stay
|
||||
comparable against. `unsettled_answers` is the review §2 gate (TODO §61.3):
|
||||
every answer, empty ones included, equal to the settled one. An empty
|
||||
interim answer is coherent and useless, and the gate is about useful.
|
||||
"""
|
||||
for cache in ("cold", "warm"):
|
||||
during, results, mismatched, settled = [], [], 0, []
|
||||
unsettled = 0
|
||||
for _ in range(ARGS.tries):
|
||||
with session("workspace", cold=(cache == "cold"), verbose=True,
|
||||
storage_name="p4-serve") as s:
|
||||
@@ -266,15 +274,18 @@ def phase_scanserve():
|
||||
results.append(len(seen))
|
||||
mismatched += sum(1 for answer in seen
|
||||
if answer and answer != settled_answer)
|
||||
unsettled += sum(1 for answer in seen if answer != settled_answer)
|
||||
during.sort()
|
||||
record(phase="scanserve", row="definition every 200 ms during a %s scan" % cache,
|
||||
ms=during, fresh_process=True, result_count=len(during),
|
||||
requests_per_session=results, mismatched_answers=mismatched,
|
||||
settled_ms=settled,
|
||||
unsettled_answers=unsettled, settled_ms=settled,
|
||||
status="ok" if mismatched == 0 else "error",
|
||||
message=None if mismatched == 0 else
|
||||
"%d mid-scan answers disagreed with the settled index" % mismatched,
|
||||
note="ms is every mid-scan definition, sorted, across all tries; "
|
||||
"`mismatched_answers` counts non-empty answers that named "
|
||||
"somewhere the settled index does not — the coherence "
|
||||
"contract of docs/features/index-scope/README.md")
|
||||
"contract of docs/features/index-scope/README.md; "
|
||||
"`unsettled_answers` counts every answer that was not the "
|
||||
"settled one, empty ones included — the review §2 gate")
|
||||
@@ -0,0 +1,319 @@
|
||||
#!/usr/bin/env python3
|
||||
"""The take-5 **review** round's phases for R1a/R1b: `actionprofile`,
|
||||
`ruleablation`.
|
||||
|
||||
`offerkinds` and `offeredit` say what a code-action menu *costs*; neither says
|
||||
where the milliseconds went. The review's §1 item 1 asks for exactly that
|
||||
split — "trace configuration/waiver loading, dirty-buffer flush, lint
|
||||
execution, fence filtering and action serialization separately on the pinmux
|
||||
case, [for the] first request, unchanged repeat, first request after
|
||||
one-character edit, and navigation queued behind each" — and `--verbose` now
|
||||
logs one `timing: codeaction …` line per request carrying it
|
||||
(`crates/lucisv_server/src/lint_trace.rs`).
|
||||
|
||||
`actionprofile` issues those four shapes at three cursors and writes every
|
||||
field of that line as a `trace_*` row field, so the tracker quotes numbers and
|
||||
not prose. `ms` remains the wire latency and nothing else (schema 2).
|
||||
|
||||
`ruleablation` answers the other half of the same question — *which* rules the
|
||||
lint pass spends its milliseconds in on a 42 192-line generated buffer. One
|
||||
`workspace/didChangeConfiguration` per row sets `lucisv.lint.select` to a
|
||||
single rule and the same quickfix-only menu is timed under it. A selection
|
||||
change rescans nothing (`notification.rs::apply_settings`), so the rows are
|
||||
comparable within one warm session.
|
||||
|
||||
The corpus is not written: a `didChange` is a notification about an in-memory
|
||||
buffer and never reaches disk.
|
||||
"""
|
||||
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
import phases_new
|
||||
import phases_p2
|
||||
import phases_p4
|
||||
import schema
|
||||
import sites
|
||||
from harness import (
|
||||
ARGS, at, code_action_params, phase, record, samples, session, settled, uri as lspclient_uri,
|
||||
)
|
||||
|
||||
#: `timing: codeaction <fields>` — the whole line the server logs per request
|
||||
#: that linted anything.
|
||||
TRACE_LINE = re.compile(r"timing: codeaction (.*)$")
|
||||
|
||||
#: The cursors R1b is profiled at. The first is the review's own headline (a
|
||||
#: no-offer comment in a 42 192-line generated file); the second is the small
|
||||
#: no-offer control; the third the one small-file offer site. Same three
|
||||
#: `phases_p1.EDIT_CURSORS` measures, so the profile rows sit beside the
|
||||
#: latency rows they explain.
|
||||
PROFILE_CURSORS = [
|
||||
("pinmux-comment", sites.PINMUX_REG_TOP, "// ", 2),
|
||||
("tb-comment", sites.TB, "// ", 2),
|
||||
("aes-reg-instance", sites.AES, "aes_reg_top u_reg (", 0),
|
||||
]
|
||||
|
||||
#: The request queued behind each menu — `phases_p0.phase_offerqueue`'s own
|
||||
#: follower, so the queued-definition rows are directly comparable.
|
||||
FOLLOWER = (sites.TB, " aes #(", 1, 2)
|
||||
|
||||
|
||||
def traces(s):
|
||||
"""Every `codeaction` trace line since the last drain, flattened.
|
||||
|
||||
`phases_p2.parse_trace` is the parser: `key=value` pairs with `group{…}`
|
||||
flattened under the group's name, which is the shape `lint_trace::Trace`
|
||||
prints. A row whose trace is empty is a row whose server was not
|
||||
`--verbose` or which never linted — the phase says so rather than
|
||||
inventing fields.
|
||||
"""
|
||||
s.drain()
|
||||
found = [m for text in s.log_messages for m in TRACE_LINE.findall(text)]
|
||||
s.log_messages = []
|
||||
return [phases_p2.parse_trace(one) for one in found]
|
||||
|
||||
|
||||
def last_trace(s):
|
||||
"""The last traced request of this session, or `{}`."""
|
||||
found = traces(s)
|
||||
return found[-1] if found else {}
|
||||
|
||||
|
||||
def open_verbose(s, relative, quiet=0.8):
|
||||
"""Settle the scan, open the file, and start with an empty log."""
|
||||
settled(s)
|
||||
s.did_open(sites.path(relative))
|
||||
s.wait_quiet(quiet)
|
||||
s.take_notifications()
|
||||
s.log_messages = []
|
||||
|
||||
|
||||
def profile_row(s, row, relative, params, got, trace, note):
|
||||
"""One schema-2 row carrying a request's wire time and its stage split."""
|
||||
record(phase="actionprofile", row=row, client=s.client_shape(),
|
||||
file=relative, position=params["range"]["start"],
|
||||
load=os.getloadavg(), note=note,
|
||||
**dict(got.row(), **phases_p2.prefixed(trace)))
|
||||
|
||||
|
||||
@phase("actionprofile")
|
||||
def phase_actionprofile():
|
||||
"""§R1b — the code-action stage trace, four request shapes per cursor."""
|
||||
for label, relative, needle, offset in PROFILE_CURSORS:
|
||||
with session("workspace", resolve_support=True, verbose=True,
|
||||
storage_name="actionprofile") as s:
|
||||
open_verbose(s, relative)
|
||||
params = code_action_params(relative, needle, offset=offset)
|
||||
settled_rows(s, label, relative, params)
|
||||
edited_rows(s, label, relative, params)
|
||||
|
||||
|
||||
def settled_rows(s, label, relative, params):
|
||||
"""The two rows a settled buffer answers: the first menu, then repeats."""
|
||||
got = samples(s, "textDocument/codeAction", params, 1)
|
||||
profile_row(s, "%s, first codeAction on the settled buffer" % label,
|
||||
relative, params, got, last_trace(s),
|
||||
"the first request of the session at this cursor")
|
||||
got = samples(s, "textDocument/codeAction", params, ARGS.tries)
|
||||
profile_row(s, "%s, repeated codeAction on the unchanged buffer" % label,
|
||||
relative, params, got, last_trace(s),
|
||||
"no didChange between the tries; the trace is the last one")
|
||||
queued_row(s, "%s, definition queued behind the unchanged menu" % label,
|
||||
relative, params)
|
||||
|
||||
|
||||
def edited_rows(s, label, relative, params):
|
||||
"""The first menu after each `didChange`, and one queued behind it."""
|
||||
with open(sites.path(relative), encoding="utf-8", errors="replace") as handle:
|
||||
text = handle.read()
|
||||
ms, statuses, counts, trace = [], [], [], {}
|
||||
for version in range(2, 2 + ARGS.tries):
|
||||
s.did_change(sites.path(relative),
|
||||
text + "\n// take5r r1 %d\n" % version, version)
|
||||
got = samples(s, "textDocument/codeAction", params, 1)
|
||||
ms.append(got.ms[0])
|
||||
statuses.append((got.status, got.message))
|
||||
counts.append(got.result_count)
|
||||
trace = last_trace(s) or trace
|
||||
status = schema.worst([one for one, _ in statuses])
|
||||
record(phase="actionprofile",
|
||||
row="%s, first codeAction after a didChange" % label,
|
||||
ms=ms, status=status,
|
||||
message=next((m for one, m in statuses if one != "ok"), None),
|
||||
result_count=counts[-1], result_counts=counts,
|
||||
client=s.client_shape(), file=relative,
|
||||
position=params["range"]["start"],
|
||||
load=os.getloadavg(),
|
||||
note="each try is the first codeAction after its own didChange, so "
|
||||
"the flush group of the trace is that request's Document "
|
||||
"rebuild; the same edit shape phases_p1.offeredit uses",
|
||||
**phases_p2.prefixed(trace))
|
||||
# The queued case on a buffer that has just changed: the review asks for
|
||||
# navigation queued behind *each* menu, and only this one pays the flush.
|
||||
def edit(pipeline):
|
||||
s.did_change(sites.path(relative),
|
||||
text + "\n// take5r r1 queued %d\n" % pipeline,
|
||||
10 + pipeline)
|
||||
|
||||
queued_row(s, "%s, definition queued behind the menu after a didChange"
|
||||
% label, relative, params, change=edit)
|
||||
|
||||
|
||||
def queued_row(s, row, relative, params, change=None):
|
||||
"""A `codeAction` and a `definition` sent back to back, both traced.
|
||||
|
||||
`change` is called before every pipeline when the row is about a buffer
|
||||
that has *just* changed: only the first request after an edit pays the
|
||||
flush, so a repeat inside the row would measure the other case.
|
||||
"""
|
||||
follower = at(*FOLLOWER)
|
||||
s.log_messages = []
|
||||
leaders, followers = [], []
|
||||
lead_status, follow_status = ("ok", None), ("ok", None)
|
||||
for pipeline in range(ARGS.tries):
|
||||
if change:
|
||||
change(pipeline)
|
||||
s.log_messages = []
|
||||
lead = s.send("textDocument/codeAction", params)
|
||||
follow = s.send("textDocument/definition", follower)
|
||||
leader_ms, leader_message = s.await_id(lead)
|
||||
follower_ms, follower_message = s.await_id(follow)
|
||||
leaders.append(leader_ms)
|
||||
followers.append(follower_ms)
|
||||
lead_status = schema.status_of(leader_message)
|
||||
follow_status = schema.status_of(follower_message)
|
||||
# Attributed by the line's own `method` field, not by position: a request
|
||||
# that lints nothing logs no line at all, so a definition behind an
|
||||
# already-flushed menu contributes none and the last line in the log is
|
||||
# another `codeAction`. Counting by position made two leaders look like a
|
||||
# leader and a follower.
|
||||
found = traces(s)
|
||||
lead = [one for one in found if one.get("method", "").endswith("codeAction")]
|
||||
follow = [one for one in found if one.get("method", "").endswith("definition")]
|
||||
record(phase="actionprofile", row=row,
|
||||
ms=[leaders[-1], followers[-1]], leader_ms=leaders,
|
||||
follower_ms=followers,
|
||||
status=schema.worst([lead_status[0], follow_status[0]]),
|
||||
message=lead_status[1] or follow_status[1],
|
||||
result_count=len(follow), client=s.client_shape(), file=relative,
|
||||
position=params["range"]["start"], load=os.getloadavg(),
|
||||
note="ms is [leader, follower], not repeats; trace_* is the "
|
||||
"leader's own stage split and follower_trace_* the "
|
||||
"definition's — a definition that linted nothing logs no "
|
||||
"line, and result_count says how many it logged",
|
||||
**dict(phases_p2.prefixed(lead[-1] if lead else {}),
|
||||
**{"follower_%s" % key: value
|
||||
for key, value in
|
||||
phases_p2.prefixed(follow[-1] if follow else {}).items()}))
|
||||
|
||||
|
||||
def enabled_rules():
|
||||
"""Every rule the server runs by default over a project, by name.
|
||||
|
||||
Read from `lucisv check --rules-doc` beside the server under test rather
|
||||
than hard-coded, so the list cannot drift from the registry. `**on**` is a
|
||||
rule a plain check runs; `**on (project)**` is one that also needs a
|
||||
workspace, which the server has.
|
||||
"""
|
||||
binary = os.path.join(os.path.dirname(os.path.abspath(ARGS.server)), "lucisv")
|
||||
out = subprocess.run([binary, "check", "--rules-doc"], check=True,
|
||||
capture_output=True, text=True).stdout
|
||||
rows = re.findall(r"^\| \[`([a-z0-9-]+)`\]\S* \| \w+ \| (\*\*on[^|]*|off) \|",
|
||||
out, re.M)
|
||||
return [name for name, default in rows if default.startswith("**on")]
|
||||
|
||||
|
||||
@phase("ruleablation")
|
||||
def phase_ruleablation():
|
||||
"""§R1b — which rules the pinmux quickfix menu's milliseconds are in.
|
||||
|
||||
One row per default-on rule: `lucisv.lint.select` is set to that rule
|
||||
alone and the same quickfix-only menu is timed. The control row is the
|
||||
unrestricted selection, taken first and last so a drift in the session is
|
||||
visible rather than attributed to a rule.
|
||||
"""
|
||||
rules = enabled_rules()
|
||||
with session("workspace", resolve_support=True, verbose=True,
|
||||
storage_name="ruleablation") as s:
|
||||
open_verbose(s, sites.PINMUX_REG_TOP)
|
||||
params = code_action_params(sites.PINMUX_REG_TOP, "// ", offset=2)
|
||||
params["context"]["only"] = ["quickfix"]
|
||||
ablation_row(s, "control: every default rule (before)", None, params)
|
||||
for name in rules:
|
||||
ablation_row(s, "select %s" % name, [name], params)
|
||||
ablation_row(s, "control: every default rule (after)", None, params)
|
||||
|
||||
|
||||
def ablation_row(s, row, select, params):
|
||||
"""Push one `lucisv.lint.select`, then time the menu under it."""
|
||||
lint = {"select": select} if select else {"select": []}
|
||||
s.notify("workspace/didChangeConfiguration",
|
||||
{"settings": {"lucisv": {"lint": lint}}})
|
||||
s.wait_quiet(0.4)
|
||||
s.take_notifications()
|
||||
s.log_messages = []
|
||||
got = samples(s, "textDocument/codeAction", params, ARGS.tries)
|
||||
record(phase="ruleablation", row=row, client=s.client_shape(),
|
||||
file=sites.PINMUX_REG_TOP, position=params["range"]["start"],
|
||||
only=params["context"]["only"], load=os.getloadavg(),
|
||||
note="quickfix only, one warm session, selection pushed by "
|
||||
"didChangeConfiguration; a selection change rescans nothing",
|
||||
**dict(got.row(), **phases_p2.prefixed(last_trace(s))))
|
||||
|
||||
|
||||
@phase("snapshotrss")
|
||||
def phase_snapshotrss():
|
||||
"""§R1a — what the lint snapshots cost in memory, at 1, 10 and 100 buffers.
|
||||
|
||||
The snapshot is one field per open `Document`, holding that document's own
|
||||
violations, so the memory question is "how much does a session with many
|
||||
buffers grow when every one of them has been asked for a quick fix?".
|
||||
Each cell opens `n` RTL files, sends one quickfix-only `codeAction` into
|
||||
every one of them — which is what fills the slot on the reference binary
|
||||
too, minus the keeping — and reads idle RSS a second later.
|
||||
|
||||
`phases_p4.rtl_files` is the same buffer list the P4 startup cells use, so
|
||||
the 100-buffer row is comparable with the startup memory cell beside it.
|
||||
"""
|
||||
for buffers in (1, 10, 100):
|
||||
idle, peaks, asked = [], [], 0
|
||||
for _ in range(ARGS.tries):
|
||||
with session("workspace", resolve_support=True,
|
||||
storage_name="snapshotrss") as s:
|
||||
sampler = phases_new.Sampler(s.proc.pid)
|
||||
sampler.start()
|
||||
settled(s)
|
||||
asked = ask_everywhere(s, phases_p4.rtl_files(buffers))
|
||||
s.wait_quiet(1.0)
|
||||
time.sleep(1.0)
|
||||
idle.append(phases_new.rss_kib(s.proc.pid))
|
||||
peaks.append(sampler.stop())
|
||||
shape = s.client_shape()
|
||||
record(phase="snapshotrss",
|
||||
row="idle RSS, %d open buffer(s), each asked for quick fixes"
|
||||
% buffers,
|
||||
units="KiB", rss_kib=idle, peak_rss_kib=peaks,
|
||||
fresh_process=True, result_count=asked, client=shape,
|
||||
load=os.getloadavg(),
|
||||
note="one quickfix-only codeAction per open buffer, so every "
|
||||
"one of them holds a lint snapshot; idle RSS a second "
|
||||
"after the session went quiet, no latency in this row")
|
||||
|
||||
|
||||
def ask_everywhere(s, paths):
|
||||
"""Open each path and ask it for quick fixes; returns how many answered."""
|
||||
answered = 0
|
||||
for path in paths:
|
||||
s.did_open(path)
|
||||
s.wait_quiet(1.0)
|
||||
s.take_notifications()
|
||||
for path in paths:
|
||||
where = {"line": 0, "character": 0}
|
||||
params = {"textDocument": {"uri": lspclient_uri(path)},
|
||||
"range": {"start": where, "end": where},
|
||||
"context": {"diagnostics": [], "only": ["quickfix"]}}
|
||||
_, message = s.request("textDocument/codeAction", params)
|
||||
answered += 1 if schema.status_of(message)[0] == "ok" else 0
|
||||
return answered
|
||||
Loaded 100 of 103 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user