Files
data_table_bench/app.md
T
2026-05-26 19:40:00 +02:00

3.9 KiB

name, lang, domain, version, description, tags, uses_functions, uses_types, framework, entry_point, dir_path, repo_url, icon, e2e_checks
name lang domain version description tags uses_functions uses_types framework entry_point dir_path repo_url icon e2e_checks
data_table_bench cpp tools 0.1.0 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.
imgui
bench
headless
data-table
perf
data_table_cpp_viz
imgui main.cpp apps/data_table_bench https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com/dataforge/data_table_bench
phosphor accent
gauge #22d3ee
id cmd timeout_s
build cd cpp/build/linux && cmake --build . --target data_table_bench -j 4 300
id cmd timeout_s expect_stdout_contains severity
smoke_100k 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 120 "overall_pass": 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

# 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

{
  "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

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.