--- name: data_table_bench lang: cpp domain: tools version: 0.1.0 description: "Headless 10M-row performance gate for data_table::render() (issue 0133). Mide fps_p50/fps_p1/mem/cpu en 4 escenarios: scroll lineal, filter LIKE, sort numerico y color rule." tags: [imgui, bench, headless, data-table, perf] uses_functions: - data_table_cpp_viz uses_types: [] framework: "imgui" entry_point: "main.cpp" dir_path: "apps/data_table_bench" repo_url: "https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com/dataforge/data_table_bench" icon: phosphor: "gauge" accent: "#22d3ee" e2e_checks: - id: build cmd: "cd cpp/build/linux && cmake --build . --target data_table_bench -j 4" timeout_s: 300 - id: smoke_100k cmd: "cd apps/data_table_bench && xvfb-run -a -s \"-screen 0 1920x1080x24\" env LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=llvmpipe ../../cpp/build/linux/apps/data_table_bench/data_table_bench --rows 100000 --duration 5 --no-db" timeout_s: 120 expect_stdout_contains: "\"overall_pass\":" severity: warning --- # data_table_bench Headless benchmark app para el modulo `data_table` (issue 0133). Gate de performance entre cada cambio del refactor 10M-row. ## Uso ```bash # CI smoke (rapido, 100k filas, 5s por escenario) cd apps/data_table_bench xvfb-run -a -s "-screen 0 1920x1080x24" \ env LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=llvmpipe \ ../../cpp/build/linux/apps/data_table_bench/data_table_bench \ --rows 100000 --duration 5 --no-db # Full bench (10M filas, 30s por escenario) xvfb-run -a -s "-screen 0 1920x1080x24" \ env LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=llvmpipe \ ../../cpp/build/linux/apps/data_table_bench/data_table_bench \ --rows 10000000 --duration 30 # Con persistencia SQLite ./data_table_bench --rows 10000000 --duration 30 --db operations.db --sha $(git rev-parse HEAD) ``` ## Output ejemplo ```json { "rows": 100000, "fps_threshold": 60.0, "scenarios": [ { "scenario": "linear_scroll", "fps_p50": 320.5, "fps_p1": 125.3, "mem_rss_mb": 450.2, "cpu_pct": 85.1, "duration_s": 5.0, "pass": true }, { "scenario": "filter_like", "fps_p50": 210.1, "fps_p1": 95.2, "mem_rss_mb": 450.5, "cpu_pct": 92.3, "duration_s": 5.0, "pass": true }, { "scenario": "sort_numeric", "fps_p50": 180.3, "fps_p1": 70.1, "mem_rss_mb": 451.0, "cpu_pct": 88.7, "duration_s": 5.0, "pass": true }, { "scenario": "color_rule", "fps_p50": 290.7, "fps_p1": 98.4, "mem_rss_mb": 451.2, "cpu_pct": 86.2, "duration_s": 5.0, "pass": true } ], "overall_pass": true } ``` ## Assertion DoD `fps_p1 >= 60` en cada escenario con 10M filas a 30s. ## Escenarios | ID | Patron | Lo que estresan | |---|---|---| | `linear_scroll` | Avanza el scroll 1 fila/frame | Clipper virtual scroll en O(1) | | `filter_like` | Contains("foo") sobre col name | Scan de 10M strings por frame | | `sort_numeric` | Sort score DESC | Reordenacion del stage pipeline | | `color_rule` | NumericRange gradient en col value | Pintado condicional de 10M celdas | ## Build ```bash cd cpp/build/linux cmake --build . --target data_table_bench -j 4 ``` ## Dataset Sintetico y determinista (mismo seed => mismas filas). 20 columnas: - Cols 0-4: int (id, count, score, rank, flags) - Cols 5-9: float (ratio, pct, value, rate, weight) - Cols 10-14: string (name, status, category, tag, label) - Cols 15-19: timestamp como int string (created_at, updated_at, closed_at, due_at, ts) ## Gotchas - Requiere xvfb + llvmpipe en CI Linux (sin GPU real). Instalar: `sudo apt-get install xvfb libgles2-mesa`. - El seed de 10M filas puede tardar 10-15s antes de arrancar el GL context. - `vsync = false` en AppConfig para que el bench no este limitado por el refresh rate del display virtual. - La ventana se oculta con `glfwHideWindow()` en el primer frame — nunca aparece en pantalla. - Windows: sin cross-compile habilitado el bench es solo Linux. El DoD del issue 0133 es Linux. ## Capability growth log - v0.1.0 (2026-05-22) — baseline para issue 0133.