detached 36fe4a5

test(perf): align benchmark lifecycle

commit
36fe4a5b1de40bde549b04f64db7a7a13616c30f
author
brice · · 2026-07-11 07:14 UTC
parent
8c140ad
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
3 files · +6 -2
M internal/usecase/copy/snapshot_test.go +3 -0
@@ -47,6 +47,9 @@ func TestNewSnapshotFromRowsOwnsCallerRows(t *testing.T) {
4747 // absolute budget, which varies between Go releases. A full history-row clone
4848 // grows with row width; the immutable HistoryView allocation does not.
4949 func TestNewSnapshotAllocationIsWidthIndependent(t *testing.T) {
50+ if testing.Short() {
51+ t.Skip("skipping benchmark-driven allocation gate in short mode")
52+ }
5053 narrow := benchmarkNewSnapshotBytes(16)
5154 wide := benchmarkNewSnapshotBytes(512)
5255 assertWidthIndependentAllocations(t, "NewSnapshot", narrow, wide)
@@ -47,6 +47,9 @@ func TestNewSnapshotFromRowsOwnsCallerRows(t *testing.T) {
47 // absolute budget, which varies between Go releases. A full history-row clone47 // absolute budget, which varies between Go releases. A full history-row clone
48 // grows with row width; the immutable HistoryView allocation does not.48 // grows with row width; the immutable HistoryView allocation does not.
49 func TestNewSnapshotAllocationIsWidthIndependent(t *testing.T) {49 func TestNewSnapshotAllocationIsWidthIndependent(t *testing.T) {
50+ if testing.Short() {
51+ t.Skip("skipping benchmark-driven allocation gate in short mode")
52+ }
50 narrow := benchmarkNewSnapshotBytes(16)53 narrow := benchmarkNewSnapshotBytes(16)
51 wide := benchmarkNewSnapshotBytes(512)54 wide := benchmarkNewSnapshotBytes(512)
52 assertWidthIndependentAllocations(t, "NewSnapshot", narrow, wide)55 assertWidthIndependentAllocations(t, "NewSnapshot", narrow, wide)
M internal/usecase/daemon/performance_benchmark_test.go +0 -2
@@ -123,12 +123,10 @@ func benchmarkDaemonLargeHistory(b *testing.B, workload string, run func(*perfor
123123 }
124124 b.ReportAllocs()
125125 fixture.resetMetrics()
126- b.ResetTimer()
127126 for b.Loop() {
128127 run(fixture)
129128 fixture.ac.ackOutputState(fixture.ac.output.next)
130129 }
131- b.StopTimer()
132130 metrics := fixture.metrics()
133131 if payload := fixture.output.lastPayload(); payload != nil {
134132 if _, err := ports.UnmarshalOutput(payload); err != nil {
@@ -123,12 +123,10 @@ func benchmarkDaemonLargeHistory(b *testing.B, workload string, run func(*perfor
123 }123 }
124 b.ReportAllocs()124 b.ReportAllocs()
125 fixture.resetMetrics()125 fixture.resetMetrics()
126- b.ResetTimer()
127 for b.Loop() {126 for b.Loop() {
128 run(fixture)127 run(fixture)
129 fixture.ac.ackOutputState(fixture.ac.output.next)128 fixture.ac.ackOutputState(fixture.ac.output.next)
130 }129 }
131- b.StopTimer()
132 metrics := fixture.metrics()130 metrics := fixture.metrics()
133 if payload := fixture.output.lastPayload(); payload != nil {131 if payload := fixture.output.lastPayload(); payload != nil {
134 if _, err := ports.UnmarshalOutput(payload); err != nil {132 if _, err := ports.UnmarshalOutput(payload); err != nil {
M internal/usecase/visualsearch/model_test.go +3 -0
@@ -108,6 +108,9 @@ func TestVisualSearchRenderShowsInputAndLineResults(t *testing.T) {
108108 }
109109
110110 func TestVisualSearchCloneAllocationIsWidthIndependent(t *testing.T) {
111+ if testing.Short() {
112+ t.Skip("skipping benchmark-driven allocation gate in short mode")
113+ }
111114 narrow := benchmarkVisualSearchCloneBytes(16)
112115 wide := benchmarkVisualSearchCloneBytes(512)
113116 assertWidthIndependentCloneAllocations(t, narrow, wide)
@@ -108,6 +108,9 @@ func TestVisualSearchRenderShowsInputAndLineResults(t *testing.T) {
108 }108 }
109 109
110 func TestVisualSearchCloneAllocationIsWidthIndependent(t *testing.T) {110 func TestVisualSearchCloneAllocationIsWidthIndependent(t *testing.T) {
111+ if testing.Short() {
112+ t.Skip("skipping benchmark-driven allocation gate in short mode")
113+ }
111 narrow := benchmarkVisualSearchCloneBytes(16)114 narrow := benchmarkVisualSearchCloneBytes(16)
112 wide := benchmarkVisualSearchCloneBytes(512)115 wide := benchmarkVisualSearchCloneBytes(512)
113 assertWidthIndependentCloneAllocations(t, narrow, wide)116 assertWidthIndependentCloneAllocations(t, narrow, wide)

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 12

Tags 11

↑↓ moveenter openesc close