Skip to content

Comparing two reports

echolot analyze answers where the time went in one set of traces. The question people actually arrive with has two halves — it was 3 s, now it is 7 s, where did that go — and the second half needs two sets.

echolot compare takes two Marker Reports and returns one table, sorted by how far each row moved, with the main thread's own moves that hold first and the moves the runs do not back last (the order). The top row is usually the answer.

echolot compare                       # the open investigation: previous round vs latest
echolot compare --hunt 3              # investigation 3: its first report vs its last
echolot compare old.json              # that report vs the latest of its scenario
echolot compare old.json new.json     # exactly those two

With no arguments, inside an open investigation, the two sides are its last two rounds among the reports filed there: every analyze --hunt <n> files one, and an analyze without the flag runs outside the investigation and files nothing. A round is a set of recordings the investigation reads for the first time, with the config's thresholds. Anything else filed there is a look and is left out: the same recordings again, part of them, some of them among new ones, or any analyze with --set or --defaults. A single-run look at one trace of round 2 would otherwise be the after side, with no spread to judge a move by.

analyze decides which it is as it files the report, by the recordings' bytes rather than their paths — collect --hunt records every round under the same names, <scenario>_iter000… — and says so on stderr, [i] filed as round 3: … or [i] filed as a look, not a round: …; the investigation's record keeps it. The line compare prints names the two reports it took and their rounds, and each look after the older one with why it is one. With fewer than two rounds it takes the last two reports, and says what each is. A report filed before analyze kept that mark is told from the report itself: a look when it ran with --set or --defaults, or when its first recording's window opened at the moment an earlier round's did, in the same process. The line says so when it went by that, since a look at part of a round that leaves the round's first recording out passes for a round there. Name two paths for any other pair.

It writes comparison.md and comparison.json next to the report, by the same rule analyze uses. Not with two reports named and no -o: those two are not the scenario's latest, and comparison.* there is what the start page shows under "After the fix". Then the comparison is printed and nothing is written, and stderr says so. Where -o names a folder: a relative -o is taken from the config's directory, so running it from a build folder full of traces still lands the output in the project. The config is echolot.yml in the working directory, or else the nearest one up the tree within the checkout, so compare run from a build folder finds the project and its open investigation; -c names another, although --help does not list the flag. With one report named, the newer side is .echolot/out/report.json next to the config, whatever -o says: -o is where the comparison goes. For a config with several scenarios it is the latest report of the scenario the named report measured, in .echolot/out/<scenario>/, and --scenario names another. Two reports of different scenarios are refused: a cold start against a feed scroll moves every row and means nothing. A report from before reports named their scenario is compared as it is. Two reports whose windows were not defined the same way are refused too, under Two windows below. Run from a folder with no config, or with one that does not load, it writes to -o when one is given, taken from the working directory; with neither it prints the comparison, writes nothing, and says so on stderr, with the reason when the config is there and does not load.

What the table says

Where Evidence Detector Before After Δ N Holds
SyncAdapterThre — uninstrumented_cpu — 1402.0 ±61 new — → 0 —
TeamRepository.loadAll com.example.app main_thread_block 12.1 ±2 883.4 ±40 +871.3 ×73.01 1 → 1 yes, +831.3 … +911.3
inflate com.example.app main_thread_block 47.3 ±31 121.9 ±88 +74.6 ×2.58 12 → 31 no, -13.4 … +162.6 · ~8 runs a side

One table, not one section per detector. The Marker Report is grouped by detector because each answers a different question. A comparison has one question, so the detector moves into a column and the rows are sorted across all of them.

The measure is each detector's own. Self time where a detector reports it, total time otherwise — the same rule the report itself sorts by, so the number in the Δ column is the number the report ranked on.

N is not decoration. inflate doubling at 12 → 31 occurrences means it is being called more often. TeamRepository.loadAll growing 73× at one occurrence means it became slower inside. Those are different bugs in different places, and the millisecond column alone cannot tell them apart.

± is the furthest a repeat strayed from the median, not a standard deviation. Exact bounds and the per-run values are in comparison.json.

Evidence appears where it tells two rows apart. It is filled only for a detector that names its rows by detail as well as by location. main_thread_block groups by thread, and its evidence is the main thread's name as the kernel keeps it — com.example.app here. Everywhere else the cell is —: evidence that differs between the rounds would be a coin toss to show. Thread names are cut the same way wherever they appear: uninstrumented_cpu names threads, and SyncAdapterThread-1 reaches the trace as SyncAdapterThre, fifteen characters. The main thread's row of uninstrumented_cpu, runnable_starvation and monitor_contention is main; a report written before it was has the kernel's name for it there, and that row is read as main, so it is paired rather than gone on one side and new on the other.

The order

Rows are sorted by how far they moved, in three parts:

  1. a move of the main thread's own time, or of the frames, that holds and is a twentieth of the window or more: time the scenario itself spent;
  2. every other row;
  3. a move the runs do not back: Holds is no.

By size alone a sum over a pool of threads led the table above the cause it followed from. Faults injected into one app, five cold starts of 5.5 s against eighteen: a 400 ms sleep on the main thread inside an initializer moved main_thread_block by +419 ms, and it was ninth, under monitor_contention summed over the coroutine workers, −4.0 s and holding — with the main thread held longer the workers contended less — and under pool rows that did not hold. A 300 ms wait of the main thread on a monitor was thirteenth. Both are first now. A sum over a pool is not time the scenario spent; the main thread's is, and a frame's, by the rule the plain reading of a report uses to decide what can need attention (see A plain reading).

The main thread does not go first whatever moved there. A cause off it, such as threads that burn the CPU, reaches the main thread as small waits that hold, and those would bury it: under a twentieth of the window they stay where their size puts them. In the same set the burning threads came fifth rather than seventh. With too few runs for Holds nothing holds, and the order is by size alone. Each row says whose time it is in comparison.json (on_main).

Markers

The report's markers table — the domains the config lists and the temporary markers, each measured every run whatever fired — is compared too, in a section of its own under the table:

Where Before After Δ N Holds Calls
loadCollection 2079.4 ±19 4158.8 ±39 +2079.4 ×2.0 1 → 2 yes, +2040.6 … +2100.6 1 → 2, yes, +1 … +1

Its rows are paired by name and judged by self time as a detector's rows are. They matter most for an async section (Trace.beginAsyncSection): no detector reads one, since it has no thread to answer for, so the markers table is the only place it is measured. Calls judges the calls per run on their own: a load that ran twice per run instead of once is work done twice, and is listed when the medians are a whole call apart and more than the relative floor, with its range read from each run's count. The section lists the markers that moved by time or by calls; the header counts them as markers moved. A report written before the table existed is compared without it.

Names on one side only

A slice no detector reads never reaches the table, however clearly it tells the two builds apart. A busy loop of 200 ms planted on the main thread with no section of its own grew the window by 277 ms and gave no row on either side; the one slice name in all ten traces after and in none of the ten before was the JIT compilation of the method the loop is in, which is where the code is. So analyze keeps the window's slice names, thread and async, and compare lists the names that are in every run of one side and in no run of the other:

Where Only Runs Total, ms Longest, ms Thread
JIT compiling void com.example.app.feature.ListViewModel.prepare() (kind=Baseline) from /data/app/~~#/com.example.app-#/base.apk after 3/3 against 0/3 6 6 Jit thread pool

Every number in a name is folded, as in the same thing under a new name, and so is the directory Android installs the APK in, which it picks anew at every install: without that, every compilation of the app's code would be new in a comparison of two builds. An object's identity hash is folded whole, letters and all. ViewRootImpl names a window's slices and its buffer queue after the window and its hash, VRI[MainActivity]@5c1f3e2, which every process picks anew: a scroll recorded in one process against one in another read as nineteen names of the same window's buffer queue, half on each side. The project's own markers keep theirs. A name is listed when it takes a millisecond or more a run, by the median, and the other side holds it in no run at all, for however short a time; a name the other side ran under a millisecond grew and is not new. Total is that median, Longest the longest single occurrence. Names a row of the tables above already has as new or gone are left out, and so is every name with the temporary prefix: the markers table pairs those, and the instrumentation warning names the ones a round added or took out.

How many runs a side it takes: two halves of ten cold starts of one build of a busy app, set against each other, had about a hundred such names with one run a side, five to seventeen with two, three or four with three, and one at most from four on, a method the JIT compiled in one half only. So nothing is listed with fewer than three runs on either side, and a line says so; from five runs a name may be missing from one of them. The comparison shows ten names a side and counts the rest; echolot compare … --names prints every one in place of the comparison, and comparison.json has them under names. A report written before the names were kept is compared without the section.

Inside what moved

A blind spot that grew says which thread, and nothing about what it ran. When both sides were recorded with runner.sampling (Callstack sampling), their stacks say it, and compare sets them against each other. Under each row that moved and has samples on both sides — uninstrumented_cpu's blind spots — and under a window that moved, for its main thread, it lists the functions whose share of the stacks moved:

## Inside what moved

**`DefaultDispatcher-worker-#` · uninstrumented_cpu** · stacks a run 28 before, 28 after

- `Store.save` (inclusive) 36% → 71%, +35.7 points · holds: yes, +28.6 … +42.9
- `GzipSink.write` (self and inclusive) 54% → 71%, +17.8 points · holds: yes, +10.8 … +21.4
- **new** `Store.compact` (self and inclusive) 0% → 7%, +7.1 points · holds: yes, +7.1 … +7.1
- `ReadBarrier::Mark` (self) 21% → 16%, -5.3 points · holds: no, -7.1 … +0.0

Self is what ran: the first method from the top of a stack, by the rule the row's evidence uses (Analysing). Inclusive is every method anywhere on the stack, once a stack, so a caller whose callees grew grows with them; only methods of Kotlin and Java are inclusive. Names are whole, after the build's mapping. A function whose self and inclusive shares moved alike is one line.

A share rather than a count, because the number of samples a row gets varies from run to run with its length and with how the sampler kept up; a share of the stacks does not. A row that grew evenly, all through, keeps every share and says that no function's share moved. Each function has a share in every run, and the two sides' runs are set against each other as a row's are (the Holds column): listed when the medians move by more than 5 points, holding when the range clears those 5 points, in the order of the rows — those that hold first, the largest move first. A function no run of one side listed is new or gone, as a row is. The Markdown shows five lines a row; comparison.json has all of them.

analyze reads the shares for every blind spot it measured, under the bar too, since compare sets a row against the other side's under its bar: a blind spot that grew past the bar has its functions on both sides only so.

What report.json keeps is bounded: 25 functions a list a row, those from 1% of the stacks up, in a set the 25 with the largest share any run gave them. Twenty-five is where self can hide nothing the floor would show: past the 25th function on top of the stacks none can hold more than 100/26, 3.8%, of them, under the 5 points. Each run says the most a function it left out had (under_pct), and a run that did not list a function counts it at that, so a move away from it reads no larger than it was. An inclusive list can be cut higher, by a chain of frames that always run together; where 25 falls among equal shares, all of them go, so that which frame of a chain stays is never the alphabet's choice.

Two cases give no stack comparison. The sampler ran on one side only: the sampling warning says why the two differ, and there are no stacks to hold the other side's against. Or a side's methods still carry the names R8 gave them: two builds give the same letters to unrelated methods, so pairing by name would pair those, and the stacks-minified warning says to point project.mapping at each build's mapping.txt.

The Holds column

This is the column that decides whether a row is worth acting on. It gives the range the move lies in, 95% sure, and a verdict read off that range: yes when the whole range is past the floor that listed the row, on one side — 5 ms or 10%, whichever is larger.

value meaning
yes, +831.3 … +911.3 the whole range is past the floor: the move survives a re-record, and the end nearer zero is the least it moved
no, +6.0 … +27.0 · floor 10.0 · ~13 runs a side the range clears zero but not the floor: it moved, by how much the runs cannot yet tell from the floor. On one build set against itself, most of the ranges that clear zero are this kind
no, -13.4 … +162.6 · ~8 runs a side the range runs through zero: the runs disagree among themselves by more than the row moved, and about eight runs a side would settle a move this size
no, … · ~1 more after the same, with fifteen runs before and four after: one more run after does it
no, … · more runs will not settle it it would take more than a hundred runs a side
— nothing to test: the row is on one side only — it appeared or went — or there are too few runs to be 95% sure of anything

no does not mean the row is uninteresting. It means the honest next step is another round of collect rather than a conclusion, and the range says how open the question still is: -13.4 … +162.6 is anything from no move at all to more than a doubling. The count after it says how big that round is.

A line under the header says what the column asked for and what that left out: Holds asks each range to clear the floor, not zero: 3 of 61 row(s) with a verdict do, and 5 more that clear zero alone read no.

How the range is made. Every run after is paired with every run before, and each pair gives a difference. The median of those differences is the move. The range is what is left of them once as many as possible come off each end while the chance of the true move lying outside stays at 5% or less (the Hodges–Lehmann estimate and its Moses interval, for anyone checking the arithmetic). Nothing is assumed about the shape of the runs, which on a cold start is anything but a bell curve, and nothing is drawn at random: the same two reports give the same range every time.

Why not the ranges of the runs. This column used to be Ranges: apart when every run after fell outside everything seen before, overlap otherwise. That is the same range with nothing taken off, and so a test whose bar rose with every run recorded: 90% sure at three runs a side, 99.2% at five, and at fifteen a side all but certain, which a single slow run among the thirty is enough to deny. It was checked on fifteen runs of one build of a real app, split at random into a before and an after, with every run after made a fifth slower. Seven against eight, the old test caught the move in 15 comparisons of a hundred and this range in 51; five against five, in 27 and 36. More runs made the old test see less; they make this one see more.

Why the floor and not zero. At 95%, up to one row in twenty that did not move lands on one side of zero by chance, and a comparison judges every row both sides have — about two hundred on a cold start of a large app. Three sets of fifteen cold starts of one build, each split at random seven against eight a hundred ways, held 4.0 rows a split against zero, 3.0 of them past the floor and listed as moved: rows that look like findings in a build set against itself. Against the floor they held 0.5 a split; five against five, 1.3 rather than 5.8; four against four, 1.3 rather than 4.9.

What it costs is a little of what a real move shows. With one row of the same splits made slower on the after side, seven against eight:

made slower by held against zero held against the floor
a fifth 31 of 100 19
half 63 54
twice 91 88
three times 100 100

Correcting the 95% for the number of rows judged at once instead (Benjamini–Hochberg at 5%, over the rows listed as moved) left 0.1 rows a split, and a row made twice as slow held in 59 splits of a hundred seven against eight, and in none five against five: there the smallest chance a row can reach, 0.008, is more than sixty rows at once ask for. The floor is the bar the table already lists a row by, so the column now asks the same question of the range.

What is left is mostly two kinds of row: one whose runs stray by far more than its floor, such as a sum over a pool of threads, and a set that drifts from its first run to its last, which Runs that drift is about. A yes that stands alone, with nothing around it in the table to explain it, is still worth a second round before a conclusion.

These numbers are one app's on one phone. How many rows your own scenario holds with nothing changed, and the floor that quiets them, analyze --noise measures on a set you recorded: see This scenario's own noise.

How many runs. Four a side is enough. With fewer on one side, the other has to make up for it: three need five against them, two need eight, one needs thirty-nine. Below that the column stays empty and the few warning at the top says why. The count is the row's own: a row found in 2/5 runs has two values, and against five it gets — while the rest of the table has a verdict.

What the runs can resolve. A run after minus a run before is the move of the medians plus what the two runs strayed from their own medians. So the range is the strays' own range moved along by the move, exactly, and a row holds when its medians moved further than the floor and the strays' reach on the far side together. That reach is shift.resolves_ms: inflate above moved 74.6 ms, its floor is 5 ms, and these runs resolve nothing under 88.0. The reach shrinks with the square root of the runs, so a no carries about how many runs a side would bring it under the 69.6 ms the move leaves above the floor — eight here, a round of collect away. Past a hundred a side the cell says more runs will not settle it: either the spread comes down first — a settled device, a quieter scenario — or the move is below what this scenario can resolve.

With sides of unequal size the count goes where it is cheapest. Fifteen runs before and four after stray as six and a third a side, and a move that needs seven a side needs one more run after, not three; the cell says ~1 more after. Adding to the smaller side stops paying as it nears twice the larger one, and then the count is for both sides, ~20 runs a side. shift.more_runs has the numbers for each side.

The count is an order of magnitude, not a promise. It assumes the next runs stray as much as these did, and from four or five runs a side the range moves in whole steps, so the square root it scales by is rough there: read 8 as somewhere from 4 to 12.

The report carries the same number for a single set, per row, under spread — see below — so what a comparison could see is known before there is a second set.

This works because analyze keeps the per-run values when it merges repeats — see spread below. With one trace on each side the column is empty for every row, and the comparison is a difference of two single measurements.

The window and the startup

The two lines above the table are tested the way a row is: the same change against the same floor, the same range and the same Holds verdict, read from each run's window (and startup) that analyze keeps (below).

Scenario window: **1012.0 → 1313.5 ms**  (+301.5, ×1.3) · holds: yes, +225.0 … +374.0
Startup (platform): **1072.0 → 1373.5 ms**  (+301.5, ×1.28) · holds: yes, +225.0 … +374.0

That pair is the fixture's own runs, four a side, with the after side made 300 ms slower; doctor holds it to this. The same eight runs split four against four with nothing changed are 1.5 ms apart, and their range, -75.0 … +74.0, runs through zero: holds: no. The demo app's planted lock moves the launch 24 ms, and its window reads holds: no, -54.0 … +105.7 while the lock's own two rows hold — the change is real and smaller than what five launches can see in the whole window.

The window was the one number compare did not test. Fifteen cold starts against four of a later build read 5700.0 → 5310.0 ms (−390.0, ×0.93) and nothing more; whether 390 ms is more than the runs' own scatter was left to whoever read it. The platform's startup was not compared at all, and in that pair it was the largest relative change, 35%.

On real runs. One app's cold start to its first screen, about 4.9 s, recorded as six control sets of ten launches and as four sets with a sleep planted on the main thread at startup, 50, 100, 200 and 400 ms. The controls against each other: the window held in 1 pair of 15, and in 24 of the 756 ways to split each control five against five (3.2%). The planted sleep against each control, ten a side: 50 and 100 ms held in no pair, 200 ms in 4 of 6, 400 ms in 6 of 6; five a side, 400 ms in 2 of 6. The startup, about 1.2 s and without the menu after it, saw more: 100 ms and up held in 6 of 6, 50 ms in 3; the controls held in 3 of 15, moves of 27 to 41 ms between sets recorded at different times — real, and not the app's, which is what the rows' floor is for and why the startup's reasons are read under it.

Against zero, not the floor. The window and the startup hold when their range clears zero, and keep that whatever the rows ask. They are one number tested once, where a row is one of two hundred tested at once, and a floor of a tenth of a 4.9 s window is 490 ms: against it the 400 ms sleep above held in no pair instead of all six. The startup's reasons are a dozen judged at once, and follow the rows' rule.

The startup line is there when both sides have a startup, Perfetto's own measure of the launch, from the intent to the first frame. Two kinds of startup are named on it, (cold → warm). With a startup on one side only there is nothing to set it against, and neither the line nor comparison.json's startup is there.

Its reasons — bind_application, io, binder, the time before the process ran, and the rest of the split Perfetto makes — are judged as rows too, in a table of their own under the main one, which lists those that moved past the floor:

Reason Before After Δ Holds
monitor_contention 61.6 86.24 +24.6 yes, +15.5 … +35.0

That is the demo's lock, in the platform's words. They are not rows of the detectors' table: the time they split is time the detectors' rows already count — io the disk waits, binder the calls — and the table's counts and the plain reading's sums would count it twice.

A report that keeps no per-run windows, written before they were kept, is compared as it always was: the two medians and their difference, and the line says the move is untested rather than leaving the reader to guess:

Scenario window: **2027.5 → 2435.0 ms**  (+407.5, ×1.2) · untested: the before report keeps no per-run values; `analyze` the traces again to test the move

Too few runs a side, two reports that are not of one thing, or one side that does not say which echolot wrote it leave the window without a verdict, as they leave every row: the warnings at the top say which.

What is a move at all

A row is listed when it moves by more than 5 ms or 10 %, whichever is larger. Both halves earn their place: the absolute floor stops a 4 ms wobble on a 6 ms slice reading as "×1.7 slower", and the relative floor stops a 40 ms move on a 900 ms slice reading as a finding.

echolot compare --floor-ms 20 --floor-pct 25    # only the large moves

Everything below the floor is counted in the summary and listed on one line under Steady. Nothing is dropped silently.

The relative floor is a tenth of the before value, so the same two reports compared the other way round have slightly different floors, and a few rows near them cross: one pair listed 93 rows as moved one way and 91 the other. That is expected, and so is a row's Holds following its floor.

How often a row was found is part of the move. A merged row's median covers the repeats it was found in, and Before and After print that share when it is short of all of them: 120.0 (1/5). Where the two shares differ, each side's repeats without the row count as zero, and the move, Holds and the runs it would take are read from those. A row found in 1 of 5 repeats before and in all 5 after, at the same milliseconds, now happens on every run, and is listed as grew rather than steady.

"Found" means the thing happened, over the detector's threshold or under it. A detector measures every row, and its thresholds only mark which rows to show (#832). So a row that cleared the bar in 3 of 8 repeats and was there below it in the other 5 is 8/8, over the bar in 3, its median covers all 8, and no zero is put in for it. A zero stands only for a repeat where the row was not there at all, or took under 1 ms.

A row that one report shows and the other does not is looked up in what the other side measured and did not show: below in report.json, every row of at least floor_ms, 1 ms, that no repeat showed, without evidence. Found there, the row is compared with what it measured, and the table marks that side (under the bar): 86 calls to the system of 83 ms together after a fix that took each under the 14.4 ms bar are a row that shrank from 111 ms, not one that went with all of its 111 ms. Not found, it took under 1 ms there. A row one side has and the other lacks, that is itself no larger than the floor of a move, is steady rather than gone or new: it could not have moved by more (#843). A report written by echolot 0.18 or earlier keeps what it found under its bar only from 5 ms, at most 200 rows, and reads as before.

The same thing under a new name

Thread pools hand work to whichever worker is free, so arch_disk_io_0 in one set and arch_disk_io_3 in the next is one phenomenon under two names. (A pool whose workers differ only past the fifteenth character never reaches this pass — Linux has already cut them to one shared name.) Matching on the literal name reports a large row gone and an unrelated large row appeared — twice wrong, in the two places it matters most.

So rows are paired in two passes: exact name first, then by name family, which collapses digits and hex the way echolot names does when it builds its inventory.

A name the cut reached inside a number is named as the name whole before either pass. The binder thread of a process with a five-digit pid arrives as HwBinder:12345_, and the twelfth pool's worker as pool-12-thread-; both rows are HwBinder:#_# and pool-#-thread-#, as under a four-digit pid and the third pool. One build against itself, started on a day its pid was under 10000 and on one it was over, read those rows as gone on one side and new on the other, and as moves that hold (#1077).

A name carrying the config's instrumentation.temp_prefix keeps its digits: AGENTTMP_fill_v4 and AGENTTMP_fill_v6 are two markers somebody wrote to tell two things apart, not one marker renamed. Without the key, or without a config, the prefix is AGENTTMP_, as for analyze and mark.

The second pass only fires when the family is unambiguous — exactly one unmatched row on each side. With two workers before and three after there is no honest way to say which became which, and they stay listed as appeared and gone. A row paired this way is marked *(family)* in the table and "matched_by": "family" in the JSON.

Markers added between rounds

A marker placed directly under a slice becomes its child, and self time is a slice less its direct children. So the round that adds a marker under Compose:recompose reads, by self time, as Compose:recompose getting cheaper by exactly the marker's time — on a real pair 3714 → 105 ms, the largest move in the table, while its total did not move. analyze records for each temporary marker the slices it sits directly in and how long it spent there (parents on its row of the markers table). A slice whose self time went into markers one side added, or came back from markers one side took out, is judged on its total instead: the row says so in the table, *(by total)*, and in comparison.json with metric: "total_ms" and into_markers (ms, the markers, and the side that has them). The instrumentation and instrumentation-removed warnings name these slices.

A marker around the whole of a slice's own work leaves the slice next to nothing: on a real cold start, a marker around onCreate left performCreate 0.16 ms of self time out of a total of 171 ms. A report keeps a row under its detector's bar from 1 ms up, so that slice, the one that held the regression, had no row on the side with the marker and read as gone. The row of every slice a temporary marker sits directly in is kept under the bar whatever it measured, and compare finds it there (*(under the bar)*) and judges it on its total like the rest. Added up in --plain, it counts its self time as every row does: the markers' own rows hold the rest. parents names a slice the way its row does, with the runtime's numbers folded, so a marker drawn in every frame sits in one Choreographer#doFrame #.

Every temporary marker one side has and the other does not is named in the warning, however little time it took: a marker of 3 ms is under the floor that lists a row as new, and it is still a marker, not new work.

A set whose repeats carry a temporary marker in some runs and not others is two rounds merged as repeats — analyze of a round with markers and one without, to get more runs a side. The report's markers section says so and names the slices the markers sit in: their self-time medians mix two measures. Analyze the two rounds apart.

Frame-paced scenarios

A scripted scroll or drag, recorded for a fixed time, lasts as long as the gesture whatever the app does, and a build that janks draws fewer frames in that time. Every row of work done once a frame — the main thread's per-frame slices, RenderThread, the GPU driver's threads — then shrinks with the frame count. On one screen five times fewer frames turned postAndWait from 894 into 400 ms, a shrink that held, while each occurrence went from 1.33 to 2.48 ms; the fix, the other way round, read as a list of regressions.

analyze keeps the frames drawn in the window (window.frames). When the two sides differ by the relative floor or more, the comparison opens with the frames warning. A row whose count moved the way the frames did, by more than the floor, gets its time per occurrence beside its count — 670 → 161.5 · 1.33 → 2.48 ms each — and no verdict on its total (per_occurrence in the JSON, holds: null). The rows that moved against the frames lead the table: work that grew while the frames fell, such as the frames the app itself made late, is what the frame count does not explain. A row without a count on both sides keeps its verdict, so read rows like uninstrumented_cpu with the warning in mind. Inside each half the rows keep the order.

analyze also keeps how many of those frames the app made late (window.frames.late, each run's in late_values): the frames frame_jank's rows tag Self Jank, by its own floors. The window of such a scenario does not move, and the share of late frames does: the plain reading judges it by that, see A window that runs to the end of the recording.

When two reports may not be compared

Subtraction always produces a number, including for two reports that have nothing to do with each other. Nothing here refuses to subtract — a table with a reason above it is more useful than an error — but every reason is stated at the top, the way the Marker Report already states an anchor that never matched.

warning why it matters
process two different apps. comparable: false; nothing below is a comparison, and the Holds column stays empty
window the windows were not defined the same way. comparable: false. echolot compare refuses such a pair outright, see Two windows; the warning is for a caller that builds the comparison itself
thresholds detector parameters differ. appeared and gone mean "the bar moved", so they say nothing about the app. Named parameter by parameter, with both values
defaults one side ran with --defaults and the other did not, and that changed a threshold or which checks ran. A config with no detectors: section has the built-in thresholds, so --defaults changes nothing there and gets no warning
config the config's hash changed between the two. What the reports themselves show changed is named — an anchor's glob (end anchor list_shown_mark → list_shown), the config's path — and the hash alone where nothing visible moved: anchors, process mask and thresholds all live there
anchor-before / anchor-after that side's start or end anchor never matched in any repeat, so its window runs to the edge of the trace rather than the scenario's: comparable: false, and the Holds column stays empty. With no launch in that side's traces either, the warning points at the runner (runner.reset_policy) rather than the config. An anchor missed in some repeats only — not found in 1 of 15 after repeats — keeps the pair comparable and names those repeats, the warm ones when the set mixes cold and warm starts, as the ones to leave out
frames one side drew fewer frames in the window than the other, by the relative floor or more — see Frame-paced scenarios
runs different numbers of repeats. Holds allows for it; the ± beside each median does not, and the narrower side is the smaller sample
left-out-before / left-out-after that side's report left recordings out of its medians: starts that were not cold, launches that ended elsewhere or had not ended, traces that gave no window. Each is named with why, and the side's runs is what was kept (see A trace that gives no window)
single one trace on a side: no spread, so the Holds column is empty throughout
few too few repeats to be 95% sure of any move, so the Holds column is empty throughout. How many are enough is under the Holds column
detectors the two runs did not use the same set of detectors
detector-failed a detector failed on that side, with its error. It did not look there, so its rows on the other side are left out of the table rather than listed as gone or new, its params stay out of thresholds, and "Detectors that changed state" says failed
not-checked-before / not-checked-after detectors that could not run on that side, because its recording or its window does not hold what they read, named with their reasons (see When a detector could not look). Their rows are left out of the table on both sides rather than listed as gone or new, and "Detectors that changed state" says not checked
not-checked-both the same detectors could not run on either side, for the same reasons: one warning in place of the two above. They are left out of the comparison
instrumentation markers that appeared, each named once, carry the config's instrumentation.temp_prefix: markers added between the rounds, a breakdown of what was already there rather than new work. Every one the after side has and the before side does not, under the floor too. The slices they sit in directly are named too: their self time went into the markers, so those rows are judged on their total — see Markers added between rounds. Only with that key in the config — without it they are ordinary appeared rows
instrumentation-removed the same in the other direction: temporary markers that are gone were taken out between the rounds, not work that went away, and the slices they sat in, whose self time came back, are judged on their total
environment the clock the two rounds ran at differs by the floor or more, 10% unless --floor-pct says otherwise, either way, or a side carries no clock at all, or a side read its clock or thermal state in only some of its repeats. Two rounds that recorded no platform state get no warning — see below
environment-thermal the kernel throttled the device during one round and not the other. Only when both sides recorded thermal state
environment-thermal-one-side the kernel throttled the device during one round, and the other has no thermal record at all. The sentence says how many repeats throttled and that it cannot be ruled out on the other side, never that the other side ran cool
environment-load other processes took 40% or more of the CPUs' time in one round's window, 15 points or more above the other round. That round ran on a busy device. The processes that draw the app and record it — SurfaceFlinger, the composer HAL, system_server, SystemUI, the home screen — are not counted: a launch keeps them busy on a quiet phone. Both reports have to carry the share (window.crowding.outside), counted the same way: a report from before they were left out gets no warning against one after
environment-cores 20 points or more of the app's CPU time ran on another kind of core — little, medium or big — on the two sides, counted as half the sum of each kind's change. The clock is weighted by where the threads ran, and a fast core at a low clock reads like a slow one at its own, so the clock can hold while the work moved. The scheduler moves threads with the device's load and heat and with what the app asks of it. Only when both sides say which cores were which (environment.cores)
sampling a callstack sampler ran during one round and not the other, or at another rate, or in only some repeats of one — see below
stacks-minified both rounds were sampled, but a side's methods carry the names R8 gave them, so the stacks are not set against each other function by function — see Inside what moved
compose_names one round was recorded with composable names and the other not, or only some of its repeats were. The names come with the app's Perfetto SDK loaded at its start, which cost a cold start 67 ms on the device it was measured on
compile the app was compiled differently in the two rounds, or in the repeats of one, or — where the traces could not say how — the JIT compiled several times more methods on one side — see below
recording the two sides were not recorded the same way: another runner or reset policy, a force-stop that found the app running on one side and already stopped on the other, the phone charging on one side and on battery on the other or in battery saver on one side only, another trace config — data sources, atrace categories and ftrace events, each named on the side that had it — or a device set otherwise: other animation scales, or "Don't keep activities" on one side only. The detectors that read what one side recorded and the other did not are named — see How the two were recorded
recording-mixed one side's own repeats were not recorded alike, by runner, reset policy, power, battery saver, trace config or the device's settings, so its medians mix two ways of recording
recording-unknown one side cannot say how it was recorded while the other can: a report from before reports kept it, traces recorded before collect wrote its account beside them or by something else, traces with no config of their own, or a collect from before it read the device's settings
version the two reports were written by different versions of echolot, or one does not say which wrote it. A side that does not say leaves every row without a verdict — see Which echolot wrote each
detector-changed a detector read the trace with different code on the two sides. Its rows stay, without a verdict
trace-processor the two sides were read by different builds of trace_processor — two pins, two binaries of your own that report different versions, or the pin on one side and your own binary on the other — named in the warning. Every row stays, without a verdict — see Which echolot wrote each
trace-processor-unknown one side or both cannot say which build read them, so whether one did cannot be checked. The verdicts stand
same-traces both sides are the same recordings — the same trace names, pid and window to the hundredth of a millisecond — so whatever moved is the tool's or the config's, and no row carries a verdict
drift the runs of one side, or of both, drift from the first to the last: the rows found in every run follow the order of the runs more closely than chance would, so that side's medians are no one state of the device, and a row that drifts with it can hold with nothing changed. Named with each side's p and the rows that follow the order closest; the verdicts stand — see Runs that drift

Two windows

A report says how its window was defined when the scenario's window is the launch (scenario.window: launch): window.defined_by is launch for a window that closed at the launch's end, launch+reportFullyDrawn for one that ran on to the app's reportFullyDrawn() call, and launch+handover for one that ran on through the launches the app went on to by itself after its first frame, a splash's hand-over to the main activity (see A start the app hands over). A window cut by the config's anchors carries no such key.

These are different stretches of the same launch. Against anchors from bindApplication, a launch window starts earlier, at the intent. A launch that ran on to reportFullyDrawn() is longer than one closed at its end, by a median 56 ms on the launches this was measured on, and held a runnable_starvation row the shorter window did not in 15 traces of 35. Every row moves for that reason alone. Nothing else in the two reports says so: the scenario's name is the same, and a changed config only warns.

So echolot compare refuses the pair, the way it refuses two scenarios, with exit code 2 and no table:

error: these two reports cannot be compared: the windows were defined differently: as the launch, closed at its end before, as the launch, closed on `reportFullyDrawn` after (…)

It refuses a merged report whose own repeats did not close the same way against anything, itself included: its medians mix two windows.

To compare the two sides, analyze both sets of traces with one config. When the change under test adds or removes the reportFullyDrawn() call, or the splash activity that hands the start over, a launch window cannot be the same on both sides: name start and end in the scenario for that comparison. A report written before echolot followed the hand-over says launch for a start it closed at the splash's frame; analyze its traces again before comparing it with a newer one.

A report of the whole trace (analyze --whole-trace, or window: whole; window.defined_by: "whole") is refused against any other window for the larger reason: one side is about the scenario, the other about everything the app did while its recording ran, as long as somebody let it run. Its scenario is whole-trace, which no config's scenario is called, so the window is what the refusal names, with what to do:

error: these two reports cannot be compared: the windows were defined differently: by the config's start and end anchors before, as the whole trace (`--whole-trace` or `window: whole`) after (…). To compare them, analyze both sets the same way: both with `--whole-trace`, or both with the scenario's window

Two whole-trace reports are compared as any two reports are.

The one to read first is environment, because it is the only one that can make the whole table say the opposite of what it looks like. A duration is the work done divided by the speed the machine was doing it at. Drop the clock by a third between rounds and every row grows by half: the table reads as a regression, and nothing in the app moved.

The bar is the relative floor, 10% unless --floor-pct sets another: the number a row has to clear to be called moved at all, so a clock that differs by as much can produce every row on the page. The drift is the faster clock over the slower, less one, which is how much a row bound by the CPU moves: from 2200 to 2000 MHz is 10%, and such a row grows by 10%. The clock is weighted by the time this app's own threads held a core, so a device whose little cores idled through the scenario is not reported as a slow device.

The clock and the throttle are checked separately because they do not move together. The same scenario on an SM-A515F, once at 76 °C with the big cluster throttled in two runs of three and again at 55 °C with none, came back at 2220 MHz against 2209 MHz — half a percent apart. Throttling takes away the headroom rather than the frequency the app was actually using, so the clock check alone would have passed that pair without a word. The same pair is why temperature on its own earns no warning: 21 °C of difference, and the speed did not move.

Silence here means checked and steady. A side recorded without the platform-state sources — an older echolot, or runner.environment: false — says so instead, and two such reports say nothing at all rather than repeating a config problem on every comparison.

sampling is the same kind of warning about a cause the recording brought along. A callstack sampler interrupts the app on every tick and copies its stack out, so a round recorded with runner.sampling runs slower than a plain one on the same code: on the SM-A515F, a cold start of 1.36 s sampled at 100 Hz took 186 ms longer than the same start without it, 95% sure between 68 and 263 ms. Whether a sampler ran is read from each trace, so a round recorded some other way is judged the same. A round that asked for one on a device whose sampler never started ran like a plain one and counts as plain, and a report written before the field existed gets no warning, since nobody can say how it was recorded.

compile is about the app rather than the recording. ART runs the same code at another speed compiled ahead of time from a profile (speed-profile) than verified only (verify) or straight from the APK (run-from-apk), when the interpreter and the JIT carry it. A large app's launch on the SM-A515F took ~1.4 s on its benchmark build and ~8.8 s on a debuggable build of it that nothing had compiled: a comparison of the two calls every row a regression, and the clock check above passes it, since the clock did not move. The state is ART's own slice for the app's dex, read from each trace, so a build that changed under the same config is caught. For a profile's filter the reason is part of it: the same speed-profile from a profile background dexopt widened (bg-dexopt) is not the build the install brought (install-dm). For any other filter it is not: verify after an install and verify after cmd package compile are the same code, and get no warning. A side whose traces held no state — the process was already running when the recording began, as in every scroll or drag recorded with the app up — says nothing about its filter, so the JIT's work in the window speaks instead: when the two sides' JIT-compiled methods are three times apart or more, and at least 50 methods apart, the warning names both counts. On an SM-A515F one scroll JIT-compiled 64 methods on its profile, 328 after cmd package compile -m verify and 2 after -m speed. A report from before the field gets no warning.

How the two were recorded

recording is about the recording rather than the device. Every report carries a recording block: what the trace's own config asked the device for — its data sources, atrace categories and ftrace events, which the tracing service writes into every trace — and what collect knew of how it drove each repeat, which it keeps beside the trace as <trace>.recording.json: the runner, the reset policy, and whether the force-stop before the repeat found the app still running. A set from a Macrobenchmark's own trace config against one collect recorded with echolot's gave 44 rows that held and 185 that were gone, the main thread's io_wait among them, with nothing to say which of them moved because the recording changed. The warning names what each side had alone and the detectors that read it.

One source does not count: linux.system_info, the packet that says which cores are which (see collecting). The tracing service writes it at the head of the trace, before the scenario starts, and it moves no time, so a set recorded before collect asked for it and one recorded after are recorded alike here, in a side's own repeats too. What it adds is environment.cores, and a side without it has none to set against the other's. The aidl atrace category, which collect records since the same release, does count: it writes slices inside the scenario, in the app's threads too, and a native client's slice takes the self time of the slice its call sits in. The warning names binder_txn, whose detail names the method with it, and main_thread_block, where such a slice can make a row of its own (see collecting).

The stop is there because of a pair that differed in nothing else anyone could see. The same APK on an SM-A515F, recorded on two days with the same config, every start cold and both sides throttled alike: one day a plain collect, whose force-stop found the app still running from the repeat before in 14 of 15 repeats, so each start followed a kill by half a second; the other day a script stopped the app first and ran collect -n 1 fifteen times. The window came out 0.68 s shorter on the second, and the comparison listed 60 rows that held, with no warning. No cooling wait came between the stop and the start on either day; a repeat that waits now begins long after its stop, since collect stops the app before the device cools. Whether the stop found the app running is kept, and a difference in it is said; what most of a side's repeats did is that side's, since the first repeat of every collect finds the app as the last session left it.

The account also says how the phone was powered before each repeat: power, charging or not charging, and battery_saver, on or off (see Power). A side recorded on battery against one recorded charging, or in battery saver against one without it, is said; a side whose phone lost its cable halfway is recording-mixed. A side that does not say, recorded before collect kept it, is unknown there, and gets no sentence of its own.

The device's settings are there for the same reason: the trace carries neither. collect reads the animation scales of Developer options and "Don't keep activities" once a round (see collecting). A list scroll on the SM-A515F with all three scales at 5 on one side and 1 on the other gave 5 to 17 rows that held — Compose's animation work, the GPU thread — with nothing to say that every animation on one side ran five times as long. "Don't keep activities" destroys an activity as soon as it leaves the screen, so a scenario that returns to the app measures a warm start where the other side measured a hot one. Either is named with both sides' values, and the verdicts stand, as for every recording difference.

A side that cannot say — traces recorded before collect kept its account, by another tool, or a report from before the block — gets recording-unknown rather than silence, and two sides that both cannot say get nothing. A set from a collect that kept its account but did not yet read the device's settings says how it was driven and not those, and gets its own recording-unknown: the settings cannot be checked, which is not the same as their being the same. A Macrobenchmark's round never reads them, and is not called unknown for it.

Which echolot wrote each

version and detector-changed are about the tool. Every report says which echolot wrote it (toolchain.echolot), and every detector what it read the trace with (sha: its queries, its @identity and its stdlib modules, comment lines aside). Two versions that differ in a detector read one trace differently: two reports of the very same fifteen traces, written by 0.7.0 and 0.17.0, gave 11 rows that held, monitor_contention −3.1 s among them, from a double count fixed in between. A detector whose sha differs keeps its rows and loses their verdict. A side that does not say which echolot wrote it — a report from before the stamp — leaves every row without a verdict, since which of its detectors read the trace the way the other side's did cannot be known; analyze its traces again, which the traces kept beside every round allow. Two reports that both predate the stamp are compared as they always were.

trace-processor is about the tool underneath. trace_processor turns the trace into the rows every detector, the window and the startup read (see Why the trace_processor version is pinned), and every report says which build read it: toolchain.trace_processor, with toolchain.source for where the binary came from. The same five cold starts of the demo, read by one echolot with the pinned v59.1 and with a build of Perfetto's main, gave the startup's inflate +19 to +21 ms and its activity_start as much less in every run, from a stdlib module rewritten in between; two sets of pan and zoom on Android 15 lost up to five stretches of runnable_starvation, a detector with SQL of its own, from how events of one nanosecond are ordered. Which rows a build moves cannot be told from the reports, so two builds leave every row, the window and the startup without a verdict, whichever echolot wrote them, and the warning names both:

Read by different builds of trace_processor: the pinned v59.1 before, `Perfetto v59.1-54c5635dc` from `--tp-binary` after. Whether that binary is the pinned build cannot be told from the reports, so they are taken for two. …

Two pinned sides are one build when they name one version; two binaries of your own, when they report one version line, which carries the commit, wherever each was named from. The pin against a binary of your own is two: the pin names itself v59.1 and a binary by its whole line, and a build of main between two releases says v59.1 too. The cure is the one detector-changed gives: analyze both sides' traces with one trace_processor. When the pin moves, every baseline written before it — a teammate's report, the Action's baseline from the last run on the main branch — is such a pair, for one round.

A side that cannot say which build read it — a report put together by hand, a binary that did not answer --version against another binary — gets trace-processor-unknown and keeps its verdicts: nothing in it says the build moved. Two reports that say nothing of it get no warning.

same-traces needs nothing new in a report, so it works on old ones too: the same trace names, the same pid and the same window — median, shortest and longest — to the hundredth of a millisecond is one set of recordings read twice, and nothing in the app can have moved between them.

not-checked-before and not-checked-after are about a detector rather than a number. io_wait reads why the kernel put a thread to sleep, and a round recorded with runner.environment: false has none of it, so io_wait is silent there for a reason that has nothing to do with the app. Against a round that recorded it, its rows would read as gone. A detector whose report says checked: false is left out of the table on both sides, and the warning names it with the reason from each side that could not look. One that could not run is not silent in both either, and a report written before checked existed is unknown and is compared as it always was. A detector that failed keeps its own warning, detector-failed, and a set that failed in some repeats is still compared on the rest.

Then thresholds. After echolot calibrate the numbers in echolot.yml are derived from particular runs, and comparing a calibrated report against a default one produces a page of rows that appeared and vanished without anything in the app changing. Re-run both sides with --defaults when that happens.

Runs that drift

The Holds column treats the runs of a side as alike: any one could have come first. A side recorded on a device that warmed up, heated or settled from its first run to its last is a slope instead, and the halves of one such set, compared with each other, held 12 and 7 rows past the floor where a random split of the same runs held 3 and 1. A before and an after are recorded one after the other, so a comparison gets the slope in full, on top of whatever the device did between the two sittings.

Each report says whether its runs drift (see Runs that drift), and drift repeats it here for either side:

> ⚠️ The runs before drift from the first to the last (before, p = 0.026 — closest: `io_wait` com.example.app · main 610.3 → 687.1 ms (ρ +0.74); …). A median over such runs is no one state of the device: rows that drift with them can read as moved, and hold, with nothing changed in the app. Before acting on a row that holds, record the two sides back to back and compare again.

A report written before the check is read on the spot from the per-run values it already keeps, so an old pair gets the warning too. The verdicts stand, as for every condition above. The check sees a slope inside a side, not a step between two sittings that are each steady in themselves, which no report of one side can show. Recording the two sides back to back narrows that: one APK against itself on the launch runner held 3 rows of 205 back to back, and 31 of 203 an hour later.

This scenario's own noise

How many rows hold with nothing changed was measured above on one app and one phone. In another scenario it is another number: it depends on how far its runs stray, how many rows it has and the device it runs on. A reader of holds: yes in their own comparison needs theirs, and analyze --noise measures it on a set already recorded:

echolot analyze .echolot/traces/cold_start-20261120-101245 --noise

After the report it splits the set's runs in two, many times over, merges each half the way analyze merges a set and compares the two the way compare does, floor included. Nothing changed between the halves, so every row that holds is noise:

# Noise: the set against itself

15 runs split in two with nothing changed between the halves, so every row that holds is noise. Each pair of halves is merged as `analyze` merges a set and compared as `compare` compares two, at a floor of 5 ms or 10%.

| Split | Runs | With a verdict | Hold | Hold, of those with a verdict | Window held |
|---|---|---|---|---|---|
| at random: 200 of 6435 splits, seed 569 | 7 against 8 | 201 | 3.5, 9 | 1.7%, 4.5% | 4 of 200 |
| the first runs against the last | 7 against 8 | 198 | 11 | 5.6% | no |

At random: the median over the splits, then the 95th percentile, a split as bad as one in twenty.

- A row held in 187 of the 200 random splits (94%): in a comparison of 7 against 8 runs of this scenario, a `yes` on its own is what nothing at all gives that often. Read it with the rows around it.
- `compare --floor-ms 78` leaves the median split with no row that holds; the floor here is 5 ms. A move under that is within what this scenario does by itself.
- The first runs against the last held 11, as many as 4 of 200 random splits did: the runs change from the first to the last, and a comparison reads that as a move: see the report's drift line.

Held the first runs against the last:

| Detector | Where | Δ | Holds past |
|---|---|---|---|
| `io_wait` | com.example.app · main | +64.2 ms | 31.7 ms |
| … | | | |

At random. Two hundred splits drawn from a fixed seed, no split twice, the half with fewer runs as the before; a set with no more splits than that gets every one (eight runs split 35 ways, fifteen 6435). Over the splits, the median and the 95th percentile, a split as bad as one in twenty: of the rows with a verdict, of the rows that hold, and of the second as a share of the first. Then how many splits held any row at all, which is the number that says whether a lone yes means something: on real sets most splits hold a few, and a comparison with none is the exception. The window is held against zero, as compare holds it, so about one split in twenty holds it by chance.

First against last. The set cut in order instead. A set from one directory is cut at its middle: the drift of the report, in a comparison's units. A set whose traces come from several directories, the way collect sets each round aside, is cut where one directory ends, the one nearest the middle:

echolot analyze .echolot/traces/cold_start-20261120-101245 .echolot/traces/cold_start-20261120-114012 --noise

That is two sittings of one build against each other, which is what a before and an after recorded apart get with nothing changed, and random halves, which mix the two sittings, cannot show it. Beside the count, how many random splits held as many rows or more: at one in twenty or fewer, the cut in order is not chance, and the line says what to do about it — read the drift, or record the two sides back to back.

The floor. The smallest --floor-ms at which the median random split holds no row. For each row that held, noise.json keeps how far past zero its range stayed, clears_ms: the absolute floor it would need before it held no more. So one run answers for any floor above the one it was made at, without splitting again. Only the absolute part: --floor-pct stays as it is, and a row's floor is still the larger of the two.

What it measures at. Halves: seven against eight for a set of fifteen. A comparison of fifteen against fifteen resolves smaller moves, and holds a little less by chance, so the halves read a little high for it. The table names the sizes. A set needs eight runs or more, four a side being the fewest a row is judged at; analyze refuses --noise with fewer traces before reading any.

What it costs. No trace is read again. A split is two merges and a comparison of the repeats' reports analyze already holds: about a sixth of a second for a set of fifteen with three hundred rows a run, so two hundred splits add about half a minute to the analysis. --splits N asks for more or fewer, --seed N for another draw; the same set, splits and seed give the same numbers every time. The slice names on one side only are not counted: they are a list beside the table, and no row of it has a verdict.

Why analyze and not compare. A split has to be merged from the repeats. A merged report keeps each row's per-run values, but not which run each came from where some runs did not find the row, so it cannot be cut into halves again; the repeats' own reports are what analyze holds just before it merges them.

It is written beside the report, noise.md as printed and noise.json:

{ "runs": 15, "traces": ["…/cold_start_iter000.perfetto-trace", "…"],
  "floor": { "abs_ms": 5.0, "ratio": 0.1 },
  "random": { "splits": 200, "of": 6435, "seed": 569, "sizes": [7, 8],
              "tested": { "median": 201, "p95": 207, "max": 210 },
              "holds": { "median": 3.5, "p95": 9, "max": 17 },
              "holds_pct": { "median": 1.72, "p95": 4.46, "max": 8.1 },
              "with_any": 187, "window_held": 4, "window_tested": 200,
              "floor_ms": 78 },
  "in_order": { "at": "middle", "sizes": [7, 8], "tested": 198, "holds": 11,
                "holds_pct": 5.56, "window": false, "as_many": 4,
                "rows": [ { "detector": "io_wait", "location": "com.example.app",
                            "detail": "main", "delta_ms": 64.2, "clears_ms": 31.7 }, … ] },
  "splits": [ { "before": [0, 3, 4, 6, 9, 11, 14], "tested": 203, "holds": 3,
                "clears_ms": [41.2, 12.9, 6.3], "window": false }, … ] }

floor_ms is null when the median split holds no row at the floor given; window_held is null when no split's window had a verdict; at is middle or sittings; before is by place in traces, which are in the set's order.

What analyze keeps for it

Merging repeats used to reduce every row to a median, and a median cannot say whether a number is steady: 120 ms from (118, 119, 121) and 120 ms from (12, 120, 890) read identically, and only the second one means the next run will say something else.

So analyze now keeps the per-run values of three columns — self_ms, total_ms and max_ms, whichever of them a row carries — under spread:

{ "location": "draw", "runs": "5/5", "self_ms": 125.4, "total_ms": 130.1,
  "max_ms": 61.2,
  "spread": { "self_ms":  { "min": 118.2, "max": 340.1,
                            "values": [118.2, 121.0, 125.4, 133.7, 340.1],
                            "resolves_ms": 214.7, "resolves_pct": 171.2 },
              "total_ms": { "…": "the same shape" },
              "max_ms":   { "…": "the same shape" } } }

Three of the five rather than all of them, because the report staying small is the point of it. self_ms and total_ms because one of the two is the detector's ranking metric — self time where it measures one, total otherwise — and every conclusion is drawn from it. max_ms because that is where a single slow occurrence shows up at all, and a median over maxima across repeats is exactly what hides one. count and covered_ms stay medians alone.

values holds one entry per repeat the row was found in, which is what the runs column counts: a row with 3/5 has three values, not five. report.md is unchanged — this lives in the JSON, where the readers that need it are. compare reads every value, not only the two ends: the Holds column pairs each one after with each one before.

resolves_ms is how far this row's strays reach against as many runs spread the same way: a comparison calls a move of it real when it is larger than the floor and this together. resolves_pct is the same against the median — see What the runs can resolve. Here it is 214.7 ms on a 125.4 ms row, and the reason is the one slow run: five a side leaves two of the pairs with it at each end, and the next comparison of this row will not see less than that unless there are more runs or the slow one goes away. Absent below four runs.

The window is kept the same way as a row: window.values holds each run's window, in the order of traces, beside the median and its two ends. The startup's values holds each run's startup, and reason_values each reason's, a run without that reason as 0, the way the median counts it. That is what the window's line is tested with. The demo app's five runs, as its report keeps them:

"window": { "duration_ms": 1136.05, "duration_ms_min": 1084.25,
            "duration_ms_max": 1214.18,
            "values": [1084.25, 1093.16, 1160.03, 1136.05, 1214.18],
            "startup": { "type": "cold", "dur_ms": 1174.05,
                         "values": [1122.25, 1131.16, 1198.03, 1174.05, 1252.18],
                         "reasons": { "S": 492.0, … },
                         "reason_values": { "S": [492.0, 462.48, 526.44, 482.16, 551.04],
                                            … } } }

slice_names is what names on one side only is read from: every slice name of the window, folded, from every run.

{ "runs": 10, "floor_ms": 1.0, "names": 17753, "kept": 946,
  "rows_gz": "H4sIAAAAAAAC/…", "hash": "sha1:4", "seen": "AAGk…" }

rows_gz holds the kept names that are in all runs but one or more and take floor_ms or more a run, each with its runs, total_ms (the median), max_ms and threads; seen every one of the names any run held, whatever it took, as the first four bytes of its SHA-1, sorted. A name of the other side that is not in seen was in no run; two names share four bytes about once in four billion, and then a name is missed rather than made up. Both are packed, the rows as gzipped JSON, both in base64: ten cold starts of a busy app held 17,753 names, and as JSON the 946 rows alone were 228 KB beside the 285 KB of the rest of the report. Packed, the two are 133 KB. What one trace holds is what echolot names prints.

A plain reading

echolot compare --plain says the same comparison to someone who has just changed their code: did it get better, is it enough, and which checks moved.

echolot compare old.json new.json --plain
BETTER        Faster by 0.7 s. The launch went from 2.1 s to 1.4 s, 33% less. Measured on 3
              launches before and 3 after.

 !  Still over the limit. The launch takes 1.42 s. You allowed 0.52 s, so it takes 2.7 times as
    long.
 ~  Not certain check by check yet. 3 launches before and 3 after are too few to say which
    single changes hold. It takes four a side, or three against five.

 GONE       The screen waits for background work
            This check finds nothing now. Before: The main thread waited 0.7 s for
            `worker_pool_#`, in all 3 launches. That is 33% of the launch.
 NO CHANGE  Heavy work on the main thread
            Added up, what this check found was 0.5 s before and 0.5 s after.

 ok 1 check is fine both times     -  1 could not be checked on one side or both

No model writes any of it: the same two reports give the same words. The verdict is by the scenario's window, by its first frame as well in a launch that runs past it (below), or by the frames the app made late when the window runs to the end of the recording (below). A window that did not move clearly while checks below it did says so: "No clear change in the launch, but 2 checks moved", and the sentence names each with its two sums. A 500 ms wait added to a library's onCreate grew a launch that ended on reportFullyDrawn by 7%, under the fifth, while two checks went 0.9 s to 1.3 s and 0.3 s to 0.7 s; the headline said only "No clear change", and now says the launch is slower to its first frame. A window that runs to the end of the recording names the findings that moved for sure inside checks that did not, too: "No clear change in the run, but one finding moved" (below). Up to four notes follow it: whether the launch is within scenario.budget_ms, in the sentence the report's own plain reading has for it; that the repeats are too few for the Holds column, or, with fewer than three a side, for anything to be called a change, and then that note comes first; that the two sides were not recorded alike, which is the warnings of When two reports may not be compared said for a person; and the work only one side has, up to three of the names on one side only a side, which no check reads and so none moves for. The note says in how many runs of their side the names were, as the table's Runs column does: "In every run after", "In 4 of 5 runs after" when each missed one, and "In every run after, or all but one" when the two mix, with in 4 of 5 beside each name said that missed one. Then one item per check, with a sentence of what changed in the words that reading uses for the check.

A movement is not a level. On a report a check has a level of attention: how much it needs you. Here it has a movement: which way it went.

movement when
better, worse what the check found, added up, clearly moved
gone it found something before and finds nothing now, and what it found was more than a small or occasional thing
new the same the other way round
no change it found something on a side, and no move can be called: the sentence says why, and in a window that runs to the end of the recording names the findings in it that moved for sure (below)
not compared it looked both times, but not by one measure: its thresholds changed between the two (named, from what to what), the echolot that read it did (version, detector-changed), or the trace_processor (trace-processor), or both sides are the same recordings (same-traces). Whatever moved is the config's or the tool's, so it is called neither better nor worse. With the same recordings the verdict at the top says that too, as not_compared. So does a pair whose app was compiled differently (compile: another filter, or a profile from another reason): every check is not compared, and the verdict is "Can't tell: the app was compiled differently", since the same code runs a cold launch 30% or more faster or slower compiled another way
fine both times it looked both times and found nothing
not checked it could not look on one side or on both, or one of the reports is too old to say (it says why); compare leaves such a check out of its table too

A check is judged by the sum of its rows, not by its largest row. A fix can put five rows under one section: the largest row grows while the check as a whole shrinks, and judged by its largest row a fix reads as a regression. The sum is of a typical launch: each row's median over every launch of its side, a launch without the row counted as nothing. A row seen in one launch of three adds nothing, so one slow launch does not read as a move.

A check with rows on the main thread and on other threads — monitor_contention, runnable_starvation, uninstrumented_cpu and others that name a thread — is judged by its main thread's rows alone when those moved and the sum did not move their way. A 300 ms wait of the main thread on a monitor came with 4.3 s less waiting among the coroutine workers, and the check's sum read as better. Now it reads as worse, in a sentence that gives both: on the main thread from 20 ms to 0.4 s, on the other threads, added up, from 8.6 s to 4.3 s.

When a move is called, for the window and for a check's sum alike:

  • there are at least three launches a side;
  • the two differ by a fifth of the larger one or more, and a check's sum also by a twentieth of the launch;
  • the launches agree. For the window: more than half of the faster side's launches beat the fastest launch of the slower side, so one slow launch does not hide a change. For a check: the most its sum can have been in any launch of the lower side is under the least it can have been in any launch of the higher side;
  • for the window, where the two reports keep each launch's window, its move also holds (the window's line). A move whose range runs through zero is no clear change however far the medians are, with the range in the sentence, so the verdict does not say what the Holds beside the window denies. Four to six launches a side, one launch as slow as the other side's is enough to keep the range across zero; from seven a side it no longer is. A move that holds is not called a change by that alone: the two days below were apart by a move that holds, which is what the fifth is for. Without a range — fewer than four launches a side, or a report that keeps no per-run windows — the three conditions above decide alone.

This is a coarser rule than the Holds column, on purpose: it has to give an answer at three launches a side, where no row can be 95% sure, and it must not call the same app better or worse. It was measured on 190 recordings of one app on one phone, each analysed on its own and merged the way analyze merges repeats. Pairs of sets with nothing changed between them, three to seven launches a side:

the two sets pairs the verdict moved a check moved
drawn from one session 1,300 0 0.1 to 0.2% of the checks that found something
from sessions of one day 139 0 0.2 to 0.4%
from two days 40 0 0.7 to 0.8%

A real fix that took a launch from 2.1 s to 1.4 s reads as better, and the checks it emptied read as gone. A fifth, because the same build recorded on two days differed by up to 18% with every launch of one day slower than every launch of the other: at 10%, the floor a row has, half of those pairs read as a change. A change smaller than a fifth is said with its two times and called no clear change, unless its move holds past a twentieth of the launch (below). All of this is one app on one phone; the numbers are SHARE, LAUNCH_SHARE and LEAST_RUNS in echolot/moves.py, with the reasoning beside them.

A move that holds, short of a change

A move of the window that holds and is not called a change is not called no change either. 150 ms planted in the Application.onCreate of the DuckDuckGo browser made its cold start 158 ms longer, 1.16 s to 1.32 s: 14%, every one of the ten launches after slower than every one of the fifteen before, and the window's line said holds: yes, +139.6 … +182.4. The verdict said "No clear change … a change under 20% is not counted". Such a move is slower or faster now, with its range and the reason it is not a change:

SLOWER        Slower by 158 ms, under 20%. The launch went from 1.2 s to 1.3 s, 14% more, and the
              move holds: 95% sure, it lies between +140 ms and +182 ms, more than 5% of the launch.
              A move under 20% is not called a change: the same build recorded on two days was up to
              18% apart, every launch of one day slower than every launch of the other. Two sets of
              the build before, compared, show how far it moves by itself. This check moved with it,
              every launch of one side past every launch of the other: What runs before the first
              screen is created, worse: 0.2 s to 0.4 s. Measured on 15 launches before and 10 after.

Holds alone is not the bar. The window is held against zero, so about one pair in twenty of an unchanged app holds it, and the same build's next ten launches held too: −37 ms, −59 to −9 ms. The bar is the one a check's sum clears to be news: the range stays past a twentieth of the larger window. The 25 cold starts of that one build, split at random 1,500 times at each size, as they are and with every launch after made longer:

the two sides 15 against 10 7 against 8 5 against 5 4 against 4
as they are, held 4.5% 4.1% 3.5% 3.1%
as they are, named 0 0 0 0
8% longer, named 53% 29% 18% 13%
10% longer, named 98% 73% 45% 35%
14% longer, named 100% 100% 83% 69%

Asking for every launch past every launch of the other side instead named fewer moves the more launches a side had: 61% of the 14% at 15 against 10, 95% at 4 against 4. The fifth stays what a change is: better and worse mean what they meant, and the pairs above are theirs. A move that holds past a fifth while single launches of the two sides overlap is slower or faster too, with that reason. Nothing is named this way without a range — fewer than four launches a side, or a report that keeps no per-run windows — nor for a window that runs to the end of the recording, which its late frames judge (below). On the page the verdict's pill is grey, with the arrow of its direction. The bar is HELD_SHARE in echolot/moves.py.

A launch that runs past its first frame

A launch whose window closes on the app's reportFullyDrawn holds the work after the first frame, and that work can hide a move before it. A browser app called reportFullyDrawn about 1.3 s after its first frame. A library's onCreate that joined, on the main thread, a worker sleeping 500 ms made the main thread wait 534 ms longer, and the platform's startup, the second line above the table, took most of it:

Scenario window: **4425.5 → 4590.82 ms**  (+165.3, ×1.04) · holds: yes, +80.8 … +349.8
Startup (platform): **2847.28 → 3345.48 ms**  (+498.2, ×1.17) · holds: yes, +406.0 … +547.9

Every launch of the 19 after reached its first frame later than every launch of the 19 before. The whole launch moved 4%: the time from the first frame to reportFullyDrawn went from 1.58 s to 1.25 s, the work it waits for having gone on beside the wait. Its range stopped short of a twentieth of the launch, and the verdict read "No clear change"; so did the revert, whose startup moved −396 ms and held.

So such a launch is read twice, by the same rule: as a whole, and to its first frame, the line compare already tests. The line that reached further is the verdict, a change before a move short of one, and the whole launch where the two reach as far. Two lines that moved opposite ways, the first frame sooner and the whole launch later, are no change, and the headline names both: "Faster to the first frame, slower as a whole", as late frames against the window are. When the first frame decided, the whole launch is said after it, with the time after the first frame, and the note on the time limit says that the limit is on the whole launch, not on its first frame:

SLOWER        Slower to the first frame by 498 ms, under 20%. The time to the first frame went from
              2.8 s to 3.3 s, 17% more, and the move holds: 95% sure, it lies between +406 ms and
              +548 ms, more than 5% of the time to the first frame. A move under 20% is not called a
              change: the same build recorded on two days was up to 18% apart, every launch of one
              day slower than every launch of the other. Two sets of the build before, compared,
              show how far it moves by itself. The whole launch, to the app's reportFullyDrawn,
              moved less, from 4.4 s to 4.6 s, 4% more: the time after the first frame went from 1.6
              s to 1.2 s. These checks moved with it, every launch of one side past every launch of
              the other: The screen waits for background work, worse: 0.1 s to 0.6 s; What runs
              before the first screen is created, worse: 0.7 s to 1.2 s. Measured on 19 launches
              before and 19 after.

The 19 cold starts of the build, the 20 of its revert recorded 25 minutes later, and the 19 with the wait, drawn at random 1,500 times at each size; moved is better, worse, slower or faster:

the two sides 15 against 10 7 against 8 5 against 5 4 against 4
one build split at random, the whole launch moved 0 0 0 0.1%
one build split at random, the first frame moved 0 0 0 0
one sitting against the other, the whole launch 0 0.1% 0.3% 0.3%
one sitting against the other, the first frame 0 0 0 0
the wait against the build, the whole launch 0 0.3% 0.1% 0.1%
the wait against the build, the first frame 100% 100% 99.6% 88%
the revert against the wait, the whole launch 0 0 0 0
the revert against the wait, the first frame 100% 99% 72% 57%

Five cold starts a side of the same three builds, recorded on another day, read alike: the wait slower to the first frame by 504 ms while the whole launch read no clear change, and the revert, and two sets of one build, no clear change on both lines. Nothing else is read twice: a launch that closes on its first frame is one line, a window cut by anchors is the scenario's own measure, where the startup may lie partly outside it, and the startup is not read where its two sides are of two kinds, cold and warm, or where a side keeps no startup per launch. On the page the chart draws the first frame under the whole launch, with the time limit's line across the whole launch alone. All of it is one app on one phone; the reasoning is beside HELD_SHARE in echolot/moves.py.

A window that runs to the end of the recording

A scenario with no end anchor, or one whose end anchor missed, has a window as long as the recording, and a scripted scroll or drag is recorded for a fixed time: the window does not move whatever the app does. Five pairs of sets of one drag — a build that recomposed a list on every move of a panel, against the build before it and the fix after it — all read "No clear change. The run took 14.9 s before and 14.9 s after", the window 8.6 ms apart at most, while the share of frames the app itself made late went 3% → 21% → 10%. Only the end anchor decides this: a start anchor missed in some repeats moves those repeats' start back, and a window that still closed on its end anchor in every repeat is judged by its time, with the missed start in a note.

Such a window is judged by that share instead: in each run the frames the app made late out of the frames it drew (see Frame-paced scenarios), by the window's own rule — a fifth of the larger share, more than half of the better side's runs under the worse side's best one — and by one frame in a hundred at least, so that 0.4% against 0.6% is not news:

WORSE         More frames came late. The app made 3.2% of its frames late before and 21% after: 21
              of 650 frames in the middle run, then 128 of 612. The run took 14.9 s before and 14.9
              s after: the window runs to the end of the recording, so its length is the recording's
              and not the app's. Measured on 3 runs before and 3 after.

The share a side says is the median of its runs' shares, and the counts beside it are those of the run in the middle by that share — with an even number of runs, of the two in the middle, and the share is halfway between them: "22% … 3 of 15 and 4 of 16 frames in the two middle runs". Not the median late frames over the median frames drawn: those are two other runs, and late 4, 3, 4, 3, 3 of 16, 15, 15, 16, 16 frames read "20% … 3 of 16", which is 19%.

A window that does move — a UI test that waits for the app takes longer when the app does — keeps its verdict, with the late frames in its sentence, and when the two disagree neither is called a change. Without a frame timeline, or with a report written before the late frames were counted, the verdict says why the window says nothing and what to do. A window that ends where the scenario does, on an end anchor or a launch, is judged by its length as before. The floor is FRAMES_FLOOR in echolot/moves.py.

A finding that moved, in a window of the recording

Such a window cannot move, and a check's sum over it carries seconds of other work. A 400 ms block planted in the first composition of one screen of a journey, recorded for 15 s with a start anchor and no end, grew that screen's row, Compose:insertMovableContent, from 137 ms to 509 ms, and the move held: +173 … +560. The check it is in went from 3.5 s to 3.9 s, under a fifth, and the late frames from 24% to 22%. The regression and its fix both read "No clear change". A twentieth of the window, the bar a move clears to be news in a launch, is here a twentieth of the recording: 713 ms of 14.3 s, more than any one screen takes.

So under a verdict of no clear change, the reading names the findings that moved for sure inside checks that did not:

NO CHANGE     No clear change in the run, but one finding moved. The app made 24% of its frames late
              before and 22% after: 71 of 293 frames in the middle run, then 63 of 283. A change
              under 20%, or under one frame in a hundred, is not counted. The run took 14.3 s before
              and 14.3 s after: the window runs to the end of the recording, so its length is the
              recording's and not the app's. But one finding moved for sure, in a check that did
              not: `Compose:insertMovableContent` (Heavy work on the main thread) went from 137 ms
              to 509 ms, a move that holds: 95% sure, between +173 ms and +560 ms. Measured on 5
              runs before and 5 after.

A finding is named when it is time of the main thread, as the order reads it, and either is on both sides, moved by 150 ms or more by the medians, and holds (the Holds column), or is on one side only, in every run of it, with 150 ms or more in each: "buildIndex (Heavy work on the main thread) is new, in every run after: 412 ms a run". 150 ms is what a row of the main thread needs to need attention on a report (A plain reading): time a person sees, whatever the recording's length. The check's own item says the same after its sums, and of the checks that did not move it comes first. Checks that moved are named as above, and the findings after them: "No clear change in the run, but one check and one finding moved".

The rows of two checks are never named this way, frame_jank's and main_thread_outlier's. Each sums exceptions, the frames that came late or the occurrences far longer than their name's median, and one more of them in a run moves the row by a whole one; the late frames are what the verdict of such a window is read from anyway. Fifteen runs of that journey on one build, in three sittings within an hour, and ten of the slow build in two, split at random 200 times at each size:

the two sides named
one build against itself, 4 to 8 runs a side, with those two checks' rows 31 of 1,000 splits
the same, without them 3 of 1,000
the slow build against the other, 4 or 5 runs a side, both ways the block, in 800 of 800
the same, 3 runs a side nothing: no row holds

The four pairs of that round, the regression and the fix twice each, name the block; its four pairs of one build against itself, and the cold starts recorded beside them, read as they did, word for word. Nothing is named in a window that ends where the scenario does, where a twentieth of the window stays the bar, nor for a row on both sides without a verdict in the Holds column: four runs a side, or three against five. A verdict that moved, more or fewer frames late, keeps its words, and the check's item names its finding all the same. The bar is ROW_MS in echolot/moves.py.

With the flag the reading is kept in comparison.json as well, under plain. comparison.md stays the table. Without --plain and --html compare computes, prints and writes exactly what it did before the reading existed. Nothing fails over a movement: the exit code does not depend on one.

The comparison as a page

echolot compare --html writes one more file beside the comparison, comparison.html: the plain reading as a page for a person. One file that opens from disk, nothing fetched, and the same two reports give the same bytes.

echolot compare old.json new.json -o out --html   # comparison.html beside comparison.json

Top to bottom:

  • the verdict, its notes, and one sentence on what a colour means here, in a tile beside the whole window before and after as a chart, with the time limit as a line; for a launch that runs past its first frame, that first frame before and after under it, which the limit's line does not cross (A launch that runs past its first frame);
  • the counts by movement, beside the checks: got better, did not change, got worse and not compared (when any did), fine both times, not checked, each leading to the first check it counts, with how a movement is decided under them;
  • a tile per check that found something on a side: its movement, what it found added up before and after, the after large, and what changed in a sentence. "nothing" is a side that found none, "at times" one whose findings are in a minority of the launches, and a dash a side with no figure to give;
  • Details on a check's tile opens it in place: why the check matters, what each report said of it with its level in that report in words, and its rows as bars, before above after, with a dot per launch;
  • the checks fine both times, and the ones not checked, as a tile each with a row per check that opens the same way;
  • two closed tiles: every row of the comparison on one axis, and comparison.md itself as HTML, every line of it.

A colour on this page says which way something moved: green got better, red got worse, grey was not called a change. On the report's page the same colours say how much attention a check needs. The page says so in words under the verdict, and a movement is always an icon with a shape of its own and a word, never a colour alone.

Everything the page says about a check is the reading's; it adds labels and judges nothing. --html keeps the reading in comparison.json under plain, as --plain does, so the page and the file beside it say the same. A comparison.html that already stands there is written again from the next comparison, flag or no flag, with the reading beside it: left as it was, the page of the comparison before would read as this one's. Where nothing is written to disk (no config and no -o), --html has nowhere to write and says so.

echolot ui shows the same page as its step After the fix (see The page in the browser).

What the page does not draw: a timeline of the window, and a flamegraph of the difference. A comparison holds rows, each a name and a time before and after, and, with sampled stacks on both sides, the functions inside a row whose share moved (Inside what moved), which the Markdown lists; it does not hold when a row began. A timeline needs each row's start within the window, per launch, in the report; a flamegraph needs every frame of every stack, where the report keeps the 25 largest shares a list.

The comparison JSON

{
  "schema": 2,
  "kind": "comparison",
  "comparable": true,
  "warnings": [ { "id": "thresholds", "text": "…" } ],
  "before": { "path": "…", "runs": 5, "generated_at": "…",
              "config_sha": "a3f9c21b07de", "config_path": "/…/echolot.yml",
              "defaults": false },
  "after":  { "…": "the same shape" },
  "window": { "before_ms": 1184.0, "after_ms": 2960.4,
              "delta_ms": 1776.4, "ratio": 2.5, "change": "grew",
              "shift": { "ms": 1771.2, "low_ms": 1690.5, "high_ms": 1860.0,
                         "resolves_ms": 81.4, "runs_needed": null },
              "holds": true },
  "startup": { "type": { "before": "cold", "after": "cold" },
               "before_ms": 1240.0, "after_ms": 3012.5,
               "delta_ms": 1772.5, "ratio": 2.43, "change": "grew",
               "shift": { "…": "the same shape" }, "holds": true,
               "reasons": [ { "reason": "Running",
                              "before_ms": 402.0, "after_ms": 1273.3,
                              "delta_ms": 871.3, "ratio": 3.17,
                              "change": "grew", "shift": { "…": "…" },
                              "holds": true }, … ] },
  "noise_floor": { "abs_ms": 5.0, "ratio": 0.1 },
  "confidence": 0.95,
  "holds_against": "floor",
  "summary": { "moved": 4, "appeared": 2, "vanished": 1, "steady": 17,
               "fired_before": [ … ], "fired_after": [ … ],
               "state_changed": [ { "id": "binder_txn",
                                    "before": "silent", "after": "1 row(s)" } ],
               "not_compared": [ { "id": "io_wait", "before": null,
                                   "after": "The recording does not carry the phone's own state, …" } ],
               "silent_both": [ "gc_pressure", … ] },
  "rows": [
    { "location": "TeamRepository.loadAll", "detector": "main_thread_block",
      "metric": "self_ms", "change": "grew", "matched_by": "exact",
      "before": { "self_ms": 12.1, "min": 10.4, "max": 14.0,
                  "values": [ … ], "count": 1, "runs": "5/5",
                  "detail": "com.example.app" },
      "after":  { "self_ms": 883.4, "min": 843.4, "max": 923.4,
                  "values": [ … ], "count": 1, "runs": "5/5",
                  "detail": "com.example.app" },
      "delta_ms": 871.3, "ratio": 73.01,
      "shift": { "ms": 871.3, "low_ms": 831.3, "high_ms": 911.3,
                 "floor_ms": 5.0, "resolves_ms": 40.0, "runs_needed": null,
                 "more_runs": null },
      "holds": true, "detail": "com.example.app", "on_main": true }
  ]
}

on_main says whether a row is time the main thread spent or lost, or a frame's: the rule the order puts such a row first by.

window and startup carry a row's change, shift and holds (the window and the startup). shift and holds are null where a row's would be, and absent when either side has no window. untested names a side of more than one run whose report keeps no per-run values: its move is the medians' alone. startup is null unless both sides have one; its reasons are sorted by how far they moved, and a reason on one side only is appeared or vanished.

stacks says whether the sampled stacks were set against each other (Inside what moved): compared, and where not, the reason; floor_pp, the points a share has to move by; listed_pct and top, what a list keeps. Under a row that moved, and under window for its main thread, functions holds runs and stacks, each side's runs with stacks and the stacks in each, and moved: a function a line, with frame (the name whole; frame_after beside it where the pair was matched by family), kind (self or inclusive), change, matched_by, before and after (pct, the median share; values, every run's, a run that did not list it at the most it had there; listed, in how many runs it was listed), delta_pp, shift (pp, low_pp, high_pp, floor_pp) and holds. summary.functions_held counts the functions that hold.

summary.not_compared lists the detectors one side or both could not run, with each side's reason, null for a side that could. Their rows are not in rows, and silent_both does not name them.

markers holds the report's markers table paired across the two sides, each row in the shape of rows with detector: "markers", and, where both sides found it, calls: before and after (median calls per run), delta, moved, and shift (low, high) with holds, read from each run's count. summary.markers_moved counts the rows that moved by time or by calls.

names holds the names on one side only: after and before, each a list of name, runs on its side and other, the other side's (0/n), total_ms, max_ms and threads; runs, how many each side had; floor_ms and least_runs, the bars; and too_few, true when a side had fewer runs than that and nothing was looked for. summary.only_after and summary.only_before count them. names is null when either report holds no names: one written before they were kept.

change is one of appeared, grew, shrank, vanished, steady, so an agent can take the rows worth looking at without parsing any numbers. As a JMESPath filter:

rows[?change == 'appeared' || (change == 'grew' && holds)]

A bare true in JMESPath is a field name, so holds == true would keep the rows with no verdict and drop the ones that hold; the literal is `true`.

holds: true means the range in shift — low_ms to high_ms — is past shift.floor_ms on one side: above it, or below its negative. The floor is the row's, 5 ms or a tenth of the before value, whichever is larger, and holds_against: "floor" at the top says the file was written that way; a comparison without the field held its rows against zero, and low_ms > 0 || high_ms < 0 is that reading still. shift.ms is the move the range was read from: the median of every run-after-minus-run-before pair, close to delta_ms, the difference of the two medians, and not always equal to it. shift.resolves_ms is how far these runs' strays reach in this move's direction; the medians have to move further than the floor and that together. shift.runs_needed — only where the move does not hold — is about how many runs a side would settle it, and shift.more_runs the fewest more on each side, {"before": 0, "after": 1}, which with unequal sides may be the smaller one alone; null past a hundred a side, where more runs will not settle it. null in both shift and holds means there was nothing to test: the row is on one side only — every appeared and vanished row — or there were too few runs. confidence is the level the ranges are drawn at.

With --plain or --html the file holds one more key, plain, after all the others: scenario and process, what the two reports are of; verdict (movement: better, worse, slower, faster, no_change or not_compared; a headline and the sentence, text; checks_moved, the ids of the checks that moved under a verdict of no clear change, slower or faster; findings_moved, the findings that moved for sure inside checks that did not, under no clear change in a window that runs to the end of the recording, each with its check, location, change, before_ms and after_ms, and for one on both sides the range, low_ms and high_ms; by, what it was read from: window, frames, startup where the first frame of a launch that runs past it decided, or window and startup where the two moved opposite ways; and frames, each side's late frames — late and count, the medians, share and its low and high over the runs, runs, and middle, the late and count of the run the share is of, or of the two it is halfway between — where the window runs to the end of the recording), window (each side's median, least and most launch, and the runs; under startup the same of the first frame, for a launch that runs past it), notes (id: budget, few_runs, unlike, names; attention, a title and a text; unlike also lists the ids of the warnings it says, under warnings) and checks, one item per detector: movement, title, why, the sentence text, how many findings went, came and stayed, and under before and after what that report said of the check: its attention, its findings added up for a typical launch (ms, null for none), and its own sentence (found); a check judged by its main thread's rows has them added up under main, and a check that did not move lists its findings that did under findings_moved, in the shape above. A movement is never under a key called level or attention: those are the reports' words for another thing.

Schema 2 is this shape. Schema 1 carried overlap — whether the min–max ranges of the two sides touched — where shift and holds are now.

There is no performance gate, on purpose

An earlier plan had analyze exit non-zero against scenario.budget_ms, so a build could fail on a slow run. It is not being built, and this is the reason.

"Did it get slower" is already answered. Macrobenchmark writes percentiles per iteration right next to the traces echolot collects from it, and comparing a median against a number is a few lines of anything. An eleventh implementation of that adds nothing. Worse, detector thresholds on a shared CI runner would fire on properties of the runner — the same caution this tool already gives about runnable_starvation on a loaded machine.

Where echolot is hard to replace is the other question: where the time went. So the useful shape in CI is the opposite of a gate, and the next section is that shape.

scenario.budget_ms stays in the config. It records what a team considers acceptable, which is worth writing down whether or not anything enforces it. analyze copies it into the report, so that the plain reading can say how the launch stands against it (see "A plain reading" in the analysing guide); that is a sentence, and nothing fails over it.

CI does hold one gate, and it measures this repository rather than a device: pytest fails when statement coverage drops below the threshold in pyproject.toml. That number comes out the same on every runner, which is exactly what a trace threshold does not.

The action fails no job over what moved either. What it gives a workflow that wants a gate of its own is outputs that tell a change from noise, read from comparison.json: see A change, or noise.

In CI

Run echolot doctor -q as a precondition — it already answers "does this machine compute correctly" with an exit code — then analyze over the traces the benchmark has already written, compare against the last run's report.json, and keep report.json and comparison.json as build artefacts. The benchmark's output directory can be named as it stands: analyze reads one test's latest sitting out of it, the test the scenario's runner.gradle_args runs or the one --test names, and says what it left out (A directory the benchmark wrote by itself).

The exit code is 0 whatever the comparison says. This command reports; it does not stand guard.

When someone asks a day later why the nightly regressed, the answer is already sitting next to the commit — the window, the thresholds, the evidence and the delta: no device, no re-recording.

The action

action.yml at the root of this repository does all of that as one step, after the one that runs the benchmark:

permissions:
  contents: read
  actions: read            # to fetch the report the last run kept

steps:
  # … check out, start the device, run the benchmark …
  - uses: grishan0v/echolot@v0.20.0
    with:
      traces: app/benchmark/build/outputs/**/StartupBenchmark_startup_iter*.perfetto-trace

It does five things:

  1. It installs the echolot of the ref it was called at, in a virtualenv of its own, and caches trace_processor. A release tag pins the action and the tool together; @main runs both as they are on main. The virtualenv is named after the ref and the Python, so a second call in one job at another ref installs its own echolot.
  2. It runs echolot doctor -q with the config input, so it checks the trace_processor the report is computed with. A runner that fails it fails the job: nothing it computes can be trusted, and that is a fact about the runner, never about the app. A trace_processor that could not be downloaded fails it too, and the annotation says so.
  3. It runs echolot analyze over the traces. Name the repeats of one test. The benchmark's output directory holds every test it ran, and analyze merges whatever it is given as repeats of one scenario. A line that names no trace fails the step.
  4. It fetches the report.json that the last successful run of the same workflow kept on the base branch. That is the pull request's base, or the default branch for a push or a nightly. Then it runs compare against it.
  5. It writes the comparison to the job summary, with the report under it, and keeps the report, the comparison and the baseline as the artifact echolot-report.

The job fails when the runner cannot compute or the traces are missing, never over what moved. The first run on a branch has nothing to compare against and says so; the next run compares against it. A baseline the token cannot read, or a lookup that names a workflow with no runs, is a warning annotation as well as a line in the summary. The action runs on Linux and macOS runners.

input default what it is
traces — the repeats of one test: paths or globs, one per line, relative to the workspace; ** reaches into subdirectories
config echolot.yml the project's config
scenario the config's first which of the config's scenarios: the traces are, and analyze measures; a name the config lacks fails the step
baseline — a report.json to compare against, in place of the lookup
baseline-branch the base branch, or else the default branch whose last good run holds the baseline
baseline-workflow this workflow the workflow file whose runs keep the baseline, such as nightly.yml, for a pull request job that compares against a nightly
artifact-name echolot-report what the reports are kept as and looked up by; each leg of a matrix, and each scenario, needs its own
comment false true posts the comparison on the pull request and edits that one comment on every push. It needs pull-requests: write, which a pull request from a fork does not get
python python3 the Python, 3.10 or newer, echolot is installed with
token the job's token reads the earlier runs' artifacts and posts the comment

Its outputs are:

  • report: this run's report.json;
  • baseline: the report it was compared with;
  • comparison: comparison.json;
  • moved: how many rows grew or shrank past the noise floor;
  • appeared and vanished: how many rows appeared or vanished, counted apart from moved — a new block of the main thread is one that appeared;
  • held: how many of the moved rows also hold, the ones the Holds column says yes to;
  • held-rows: the first five of them, in the comparison's order, as a JSON array of detector, location, detail where the detector has one, delta_ms, the interval's low_ms and high_ms, floor_ms, the floor they cleared, and on_main;
  • verdict: the verdict of the plain reading, by the scenario's window: better, worse, slower, faster, no_change or not_compared; and headline, the same in words, such as Slower by 1.2 s. slower and faster are a move that holds and is not called a change (A move that holds, short of a change);
  • window-delta-ms: how far the window moved, after minus before, in ms;
  • window-holds: true or false, whether that move holds as a row's does (the window and the startup); empty where the runs give it no verdict — too few a side, or a report that keeps no per-run windows;
  • comparable: false when the two reports are not of one thing — two processes, two windows, or an anchor no run found;
  • warnings: the ids of the comparison's warnings, comma-separated, such as drift,runs (see When two reports may not be compared);
  • unlike: those of them that say the two sides were not recorded or read alike, the ones the plain reading lists under "Not recorded alike": the phone's speed or heat, the config, the thresholds, the recording, the compilation, the version of echolot, the build of trace_processor.

All but the first are empty when there was nothing to compare against. They are read from comparison.json, never from the table's text. .github/workflows/action.yml runs the action this way on the demo app's traces for every pull request here, on the demo's planted change, where exactly the lock's two rows have to move and hold while the launch, 2% longer, reads as no clear change and its move does not hold, and on one of two scenarios in one config, where the report has to be that scenario's.

A change, or noise

moved counts every row past the floor, and the floor is no test: one build compared with itself, two sets of 15 cold starts of a large app split 7 against 8 in several ways, moved 48 to 73 rows, with as many appeared and vanished. held on the same pairs was 1 to 12 when Holds asked only for zero, the most on splits by time, where a set's drift lands in full; against the floor it is 0 to 4 (see Why the floor and not zero). The verdict is the coarsest of the three and the steadiest: on 1,479 pairs of unchanged sets it moved in none (see "When a move is called" under A plain reading). How many rows a pair of this scenario holds by itself, with nothing changed, analyze --noise on the baseline's set measures (see This scenario's own noise).

The action still fails no job over what moved, for the reasons above. A workflow that wants to stop on a slower build has the outputs to do it with, in a step of its own:

  - uses: grishan0v/echolot@v0.20.0
    id: echolot
    with:
      traces: app/benchmark/build/outputs/**/StartupBenchmark_startup_iter*.perfetto-trace

  # This project's own rule: a slower launch between two sides recorded
  # alike, with no drift in either, stops the build.
  - name: Stop on a slower launch
    if: >-
      steps.echolot.outputs.verdict == 'worse'
      && steps.echolot.outputs.unlike == ''
      && !contains(steps.echolot.outputs.warnings, 'drift')
    env:
      HEADLINE: ${{ steps.echolot.outputs.headline }}
      HELD_ROWS: ${{ steps.echolot.outputs.held-rows }}
    run: |
      echo "::error title=echolot::$HEADLINE"
      echo "$HELD_ROWS" | jq -r '.[] | "\(.delta_ms) ms (\(.low_ms) to \(.high_ms))  \(.detector)  \(.location)"'
      exit 1

worse already means the two reports are comparable: a pair that is not gets not_compared. A verdict of no_change with rows that hold, as on the demo, is a change inside a launch that did not get a fifth longer; whether that should stop a build is the project's call, and held is there for it. So is slower: a launch longer in a move that holds, by less than a fifth, which the same build recorded on two days can be too.

Several scenarios

A config that names several scenarios, as Collecting shows, is guarded one scenario a step. The scenario input says which one the traces are, and analyze measures it, with its window. Without the input, the action measures the first, as analyze does without --scenario.

Each scenario keeps its reports under an artifact-name of its own, so each run is compared with the last report of its own scenario. A matrix gives each leg one:

jobs:
  benchmark:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        include:
          - scenario: coldStart
            test: StartupBenchmark_startup
          - scenario: feed_scroll
            test: ScrollBenchmark_feed
    steps:
      # … check out, start the device, run the benchmark's ${{ matrix.test }} …
      - uses: grishan0v/echolot@v0.20.0
        with:
          traces: app/benchmark/build/outputs/**/${{ matrix.test }}_iter*.perfetto-trace
          scenario: ${{ matrix.scenario }}
          artifact-name: echolot-${{ matrix.scenario }}

When one benchmark run writes the traces of both scenarios, call the action twice in that job instead, a step for each scenario, each with its own artifact-name. Two calls under one name fail, since a run keeps one artifact of each name. A baseline of another scenario, found under a name the two once shared, is refused by compare: the report is kept without a comparison, and the summary says so.

  • Collecting traces — why repeats, and why the sets must be repeats of one scenario
  • Calibrating — where the threshold warning comes from
  • Analysing — from a row in the table to a place in the code