Skip to content

feat(inspector): show the whole log on the Database tab - #932

Merged
lcottercertinia merged 1 commit into
certinia:mainfrom
lukecotter:feat-inspector-database-overview
Aug 14, 2026
Merged

feat(inspector): show the whole log on the Database tab #932
lcottercertinia merged 1 commit into
certinia:mainfrom
lukecotter:feat-inspector-database-overview

Conversation

@lukecotter

@lukecotter lukecotter commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

related #373

With nothing selected, the Database tab read as an empty panel. It now reads the whole log, in three sections that each answer something the grids beside cannot.

Namespace duration

Called from namespace — the namespace that issued the statement — and, only when they differ, Ran in namespace, the namespaces of whatever ran beneath it. A package trigger firing on your DML shows up as your time asked for, their time spent. One colour per namespace, stable across both bars.

Call tree

Every call path that ends in a query, DML or search, as a Tabulator tree with no depth cap. Total Time is the database time at or below the row; Self Time is the row's own code. A row with all total and no self is waiting on the database; the reverse is the Apex around it. Each column is a share of its own footer.

Database duration

2 of 7 statements · 96.0% of DB time · 68.1% of log, then the statements themselves with cost per row, how often each ran, and the self/descendant split — so a DML that is cheap in itself but fires seven seconds of triggers reads as one. A final row accounts for everything outside the top eight.

Counting

Every statement counts, a trigger's query under a DML included: the DML's total holds the query, its net time does not, and the query owns its own time. Net times therefore sum to the database total, so shares of it hold whatever the nesting is. SOQL, DML and SOSL throughout; SOSL renders as a tint of the query colour and its rows are per-query only, since the log carries no SOSL row total.

Also

CategoryTimeBar's stacked bar is extracted as the shared StackedTimeBar, so time by category and the namespace bars are one component. .reveal-row--no-swatch joins the shared row grid for sections whose rows carry no category swatch.

Testing

  • New suites for the service and the components; 1680 tests pass.
  • tsc -b --force and eslint clean.
  • Checked in the dev host on a log with trigger DML, in a light and a dark theme: bar and figure alignment at every dock width, the sub-line shedding parts as it narrows, reveal and locate marking the grids, and Escape clearing a picked row.

With nothing selected the Database tab reads the log rather than sitting
empty. Three sections, each answering what the grids beside cannot:

- Namespace duration: who asked for the database time, and, when it
  differs, whose code burned it — a package trigger firing on your DML.
- Call tree: every call path that ends in a query, DML or search, with
  total database time beside the row's own code, so waiting on the
  database reads differently from the Apex around it.
- Database duration: how few statements hold the time, with cost per
  row, repeat count and the self/descendant split.

Every statement counts, a trigger's query under a DML included: the
DML's total holds it, its net time does not, so shares of the database
total hold whatever the nesting is.

CategoryTimeBar's stacked bar becomes the shared StackedTimeBar, so the
namespace bars and time by category are one component.
@lcottercertinia
lcottercertinia merged commit 6ea1a2a into certinia:main Aug 14, 2026
7 checks passed
@lcottercertinia lcottercertinia changed the title feat(inspector): show the whole log on the Database tab (#61) feat(inspector): show the whole log on the Database tab Aug 14, 2026
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