Skip to content

Commit c3e2042

Browse files
committed
perf: benchmark complete table layout
1 parent d50a38b commit c3e2042

5 files changed

Lines changed: 418 additions & 0 deletions

File tree

.github/workflows/ensure-labels.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
{ name: "performance-display-spawn", color: "bfdadc", description: "Use the display entity spawn performance profile" },
3030
{ name: "performance-region-queue", color: "bfdadc", description: "Use the region update queue performance profile" },
3131
{ name: "performance-region-keys", color: "bfdadc", description: "Use the region key plan performance profile" },
32+
{ name: "performance-layout", color: "bfdadc", description: "Use the all-variant table layout performance profile" },
3233
{ name: "performance-scheduler-reflection", color: "bfdadc", description: "Use the scheduler reflection performance profile" },
3334
{ name: "performance-ray-proxy", color: "bfdadc", description: "Use the client ray-proxy performance profile" }
3435
];

.github/workflows/performance-ab.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ on:
3737
- display-spawn
3838
- region-queue
3939
- region-keys
40+
- layout
4041
- scheduler-reflection
4142
- ray-proxy
4243
- infra
@@ -166,6 +167,7 @@ jobs:
166167
"performance-display-spawn": "display-spawn",
167168
"performance-region-queue": "region-queue",
168169
"performance-region-keys": "region-keys",
170+
"performance-layout": "layout",
169171
"performance-scheduler-reflection": "scheduler-reflection",
170172
"performance-ray-proxy": "ray-proxy",
171173
}

docs/performance-testing.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ and exactly one profile label to a pure performance PR:
5757
slots;
5858
- `performance-region-keys` - all 452 dynamic keys requested while planning one complete
5959
table refresh, with exact text, order, uniqueness and checksum sentinels outside timing;
60+
- `performance-layout` - complete RIICHI, GB and SICHUAN started-table
61+
`TableRenderLayout.precompute` calls covering four occupied seats, hands, discards, melds,
62+
sticks, each variant's full wall capacity and RIICHI dora;
6063
- `performance-scheduler-reflection` - representative global, region and entity scheduling
6164
bursts through both Folia-style reflective capabilities and standard Paper fallbacks;
6265
- `performance-ray-proxy` - 1, 4 and 32-viewer coordinator lifecycle and unchanged-geometry

perf/ab/gate-config.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,26 @@
152152
"top/ellan/mahjong/table/render/TableRegionDisplayCoordinator.class"
153153
]
154154
},
155+
"layout": {
156+
"include": "^top\\.ellan\\.mahjong\\.perf\\.TableRenderLayoutBenchmark\\.precomputeComplete(?:Riichi|Gb|Sichuan)Table$",
157+
"benchmark_ids": [
158+
"layout.riichi.time",
159+
"layout.riichi.alloc",
160+
"layout.gb.time",
161+
"layout.gb.alloc",
162+
"layout.sichuan.time",
163+
"layout.sichuan.alloc"
164+
],
165+
"minimum_passes": 3,
166+
"must_pass": [
167+
"layout.riichi.time",
168+
"layout.gb.time",
169+
"layout.sichuan.time"
170+
],
171+
"required_classes": [
172+
"top/ellan/mahjong/render/layout/TableRenderLayout.class"
173+
]
174+
},
155175
"scheduler-reflection": {
156176
"include": "^top\\.ellan\\.mahjong\\.perf\\.ServerSchedulerReflectionBenchmark\\.schedule(?:Folia|Paper)Burst$",
157177
"benchmark_ids": [
@@ -334,6 +354,42 @@
334354
"metric": "gc.alloc.rate.norm",
335355
"direction": "lower"
336356
},
357+
{
358+
"id": "layout.riichi.time",
359+
"benchmark": "top.ellan.mahjong.perf.TableRenderLayoutBenchmark.precomputeCompleteRiichiTable",
360+
"metric": "primary",
361+
"direction": "lower"
362+
},
363+
{
364+
"id": "layout.riichi.alloc",
365+
"benchmark": "top.ellan.mahjong.perf.TableRenderLayoutBenchmark.precomputeCompleteRiichiTable",
366+
"metric": "gc.alloc.rate.norm",
367+
"direction": "lower"
368+
},
369+
{
370+
"id": "layout.gb.time",
371+
"benchmark": "top.ellan.mahjong.perf.TableRenderLayoutBenchmark.precomputeCompleteGbTable",
372+
"metric": "primary",
373+
"direction": "lower"
374+
},
375+
{
376+
"id": "layout.gb.alloc",
377+
"benchmark": "top.ellan.mahjong.perf.TableRenderLayoutBenchmark.precomputeCompleteGbTable",
378+
"metric": "gc.alloc.rate.norm",
379+
"direction": "lower"
380+
},
381+
{
382+
"id": "layout.sichuan.time",
383+
"benchmark": "top.ellan.mahjong.perf.TableRenderLayoutBenchmark.precomputeCompleteSichuanTable",
384+
"metric": "primary",
385+
"direction": "lower"
386+
},
387+
{
388+
"id": "layout.sichuan.alloc",
389+
"benchmark": "top.ellan.mahjong.perf.TableRenderLayoutBenchmark.precomputeCompleteSichuanTable",
390+
"metric": "gc.alloc.rate.norm",
391+
"direction": "lower"
392+
},
337393
{
338394
"id": "scheduler.folia.time",
339395
"benchmark": "top.ellan.mahjong.perf.ServerSchedulerReflectionBenchmark.scheduleFoliaBurst",

0 commit comments

Comments
 (0)