test(daemon): rebaseline byte-stream allocations
- commit
- ea70803ccfc303a0cade163ee96bd99aa23f7aae
- author
- brice · · 2026-08-04 03:50 UTC
- parent
- 0b11e7b
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
1 file · +9 -9
M internal/usecase/daemon/performance_benchmark_test.go +9 -9
| @@ -976,19 +976,19 @@ func TestLivePaintAllocationBudget(t *testing.T) { | |||
| 976 | 976 | } | |
| 977 | 977 | } | |
| 978 | 978 | ||
| 979 | - | // TestCopyEnterAllocationBudget protects the attachment-aware baseline plus | |
| 980 | - | // 10%. Copy rendering borrows sealed VT history rows; allocating a copy per | |
| 981 | - | // viewport row is a production regression even though capture is immutable. | |
| 979 | + | // TestCopyEnterAllocationBudget protects the byte-stream attachment baseline | |
| 980 | + | // plus 10%. Copy rendering borrows sealed VT history rows; allocating a copy | |
| 981 | + | // per viewport row is a production regression even though capture is immutable. | |
| 982 | 982 | func TestCopyEnterAllocationBudget(t *testing.T) { | |
| 983 | 983 | for _, tt := range []struct { | |
| 984 | 984 | name string | |
| 985 | 985 | tabs, panes, max int | |
| 986 | 986 | }{ | |
| 987 | - | {name: "1tab-1pane", tabs: 1, panes: 1, max: 55}, | |
| 988 | - | {name: "1tab-4panes", tabs: 1, panes: 4, max: 55}, | |
| 989 | - | {name: "4tabs-1pane", tabs: 4, panes: 1, max: 60}, | |
| 990 | - | {name: "4tabs-4panes", tabs: 4, panes: 4, max: 60}, | |
| 991 | - | {name: "8tabs-1pane", tabs: 8, panes: 1, max: 68}, | |
| 987 | + | {name: "1tab-1pane", tabs: 1, panes: 1, max: 66}, | |
| 988 | + | {name: "1tab-4panes", tabs: 1, panes: 4, max: 85}, | |
| 989 | + | {name: "4tabs-1pane", tabs: 4, panes: 1, max: 71}, | |
| 990 | + | {name: "4tabs-4panes", tabs: 4, panes: 4, max: 90}, | |
| 991 | + | {name: "8tabs-1pane", tabs: 8, panes: 1, max: 79}, | |
| 992 | 992 | } { | |
| 993 | 993 | t.Run(tt.name, func(t *testing.T) { | |
| 994 | 994 | fixture := newPerformanceFixture(t, performanceConfig{size: domain.Size{Cols: 120, Rows: 40}, tabs: tt.tabs, panes: tt.panes, historyRows: 10_000}) | |
| @@ -1007,7 +1007,7 @@ func TestCopyEnterAllocationBudget(t *testing.T) { | |||
| 1007 | 1007 | } | |
| 1008 | 1008 | ||
| 1009 | 1009 | allocs := testing.AllocsPerRun(20, run) | |
| 1010 | - | require.LessOrEqual(t, allocs, float64(tt.max), "copy enter must stay within 10% of the attachment-aware allocation baseline") | |
| 1010 | + | require.LessOrEqual(t, allocs, float64(tt.max), "copy enter must stay within 10% of the byte-stream attachment allocation baseline") | |
| 1011 | 1011 | }) | |
| 1012 | 1012 | } | |
| 1013 | 1013 | } | |
| @@ -976,19 +976,19 @@ func TestLivePaintAllocationBudget(t *testing.T) { | |||||
| 976 | } | 976 | } | ||
| 977 | } | 977 | } | ||
| 978 | 978 | ||||
| 979 | - | // TestCopyEnterAllocationBudget protects the attachment-aware baseline plus | 979 | + | // TestCopyEnterAllocationBudget protects the byte-stream attachment baseline |
| 980 | - | // 10%. Copy rendering borrows sealed VT history rows; allocating a copy per | 980 | + | // plus 10%. Copy rendering borrows sealed VT history rows; allocating a copy |
| 981 | - | // viewport row is a production regression even though capture is immutable. | 981 | + | // per viewport row is a production regression even though capture is immutable. |
| 982 | func TestCopyEnterAllocationBudget(t *testing.T) { | 982 | func TestCopyEnterAllocationBudget(t *testing.T) { | ||
| 983 | for _, tt := range []struct { | 983 | for _, tt := range []struct { | ||
| 984 | name string | 984 | name string | ||
| 985 | tabs, panes, max int | 985 | tabs, panes, max int | ||
| 986 | }{ | 986 | }{ | ||
| 987 | - | {name: "1tab-1pane", tabs: 1, panes: 1, max: 55}, | 987 | + | {name: "1tab-1pane", tabs: 1, panes: 1, max: 66}, |
| 988 | - | {name: "1tab-4panes", tabs: 1, panes: 4, max: 55}, | 988 | + | {name: "1tab-4panes", tabs: 1, panes: 4, max: 85}, |
| 989 | - | {name: "4tabs-1pane", tabs: 4, panes: 1, max: 60}, | 989 | + | {name: "4tabs-1pane", tabs: 4, panes: 1, max: 71}, |
| 990 | - | {name: "4tabs-4panes", tabs: 4, panes: 4, max: 60}, | 990 | + | {name: "4tabs-4panes", tabs: 4, panes: 4, max: 90}, |
| 991 | - | {name: "8tabs-1pane", tabs: 8, panes: 1, max: 68}, | 991 | + | {name: "8tabs-1pane", tabs: 8, panes: 1, max: 79}, |
| 992 | } { | 992 | } { | ||
| 993 | t.Run(tt.name, func(t *testing.T) { | 993 | t.Run(tt.name, func(t *testing.T) { | ||
| 994 | fixture := newPerformanceFixture(t, performanceConfig{size: domain.Size{Cols: 120, Rows: 40}, tabs: tt.tabs, panes: tt.panes, historyRows: 10_000}) | 994 | fixture := newPerformanceFixture(t, performanceConfig{size: domain.Size{Cols: 120, Rows: 40}, tabs: tt.tabs, panes: tt.panes, historyRows: 10_000}) | ||
| @@ -1007,7 +1007,7 @@ func TestCopyEnterAllocationBudget(t *testing.T) { | |||||
| 1007 | } | 1007 | } | ||
| 1008 | 1008 | ||||
| 1009 | allocs := testing.AllocsPerRun(20, run) | 1009 | allocs := testing.AllocsPerRun(20, run) | ||
| 1010 | - | require.LessOrEqual(t, allocs, float64(tt.max), "copy enter must stay within 10% of the attachment-aware allocation baseline") | 1010 | + | require.LessOrEqual(t, allocs, float64(tt.max), "copy enter must stay within 10% of the byte-stream attachment allocation baseline") |
| 1011 | }) | 1011 | }) | ||
| 1012 | } | 1012 | } | ||
| 1013 | } | 1013 | } | ||