Skip to content

feat(inspector): list the statements behind each Analysis finding - #933

Merged
lcottercertinia merged 4 commits into
certinia:mainfrom
lukecotter:feat-analysis-bulkification
Aug 14, 2026
Merged

feat(inspector): list the statements behind each Analysis finding#933
lcottercertinia merged 4 commits into
certinia:mainfrom
lukecotter:feat-analysis-bulkification

Conversation

@lukecotter

Copy link
Copy Markdown
Collaborator

What

Two changes to the whole-log Analysis findings, plus a correction to every governor readout.

Findings list the statements behind them

A finding now lists up to five of the statements it grouped, most repeated first, each with how
many times it ran, headed by how many there are in all. A query renders through the SOQL
formatter, fitted to the pane's measured width, so its FROM and WHERE stay readable however
long the field list is. Clicking a statement reveals its row in the Analysis grid.

A row-at-a-time finding

One query built per record and run a row at a time spreads a single call site over as many
statement texts as there were records, so repetition rules never see it. The new rule groups by
call site instead of by text and names it.

Repetition findings now name the enclosing frame rather than the line alone: a line number reads
the same for every class that happens to query at that line, so several loops in different
classes were indistinguishable.

Governor figures at their peak

Every whole-log readout — the overview gauges, the governor trends, the Database overview and the
findings — reported the metric's final level, which under-reports any metric that falls back
before the log ends. They now all read the peak, the level the governor charges the
transaction at, from one shared memoised total. The timeline governor strip still plots the log as
recorded.

Testing

  • pnpm test — 128 suites, 1712 tests pass
  • pnpm lint — clean
  • Production build — clean
  • Checked in the dev host on a FINEST log, light and dark themes

Whole-log governor readouts read a metric's peak across the metric-strip
series, not its final level. No metric is monotonic — heap falls on a
deallocation and a log's cumulative report can fall too — and a governor
charges the transaction at its highest point.

limitTotals() is the one shared source, memoised per series, so the
overview gauges, the trend charts and the Database overview agree. The
Database overview also hides a limit the log never reported, instead of
showing the platform default as if the log had said it.
A finding lists up to five of the statements it grouped, most repeated
first, each with how many times it ran, headed by how many there are in
all. A query renders through the SOQL formatter, fitted to the pane, so
its FROM and WHERE stay readable. Clicking one reveals its row in the
grid.

Adds a row-at-a-time finding: one query built per record, spreading one
call site over as many texts as there were records. Repetition findings
name the enclosing frame, since a line number alone reads the same for
every class that queries at that line.
…fication

# Conflicts:
#	lana-docs/docs/docs/features/inspector.md
One line over the print width, from the peak-figure change.
@lcottercertinia
lcottercertinia merged commit 1a9ed7f into certinia:main Aug 14, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants