fix: remove fn_log from bench to keep JSON-only on stdout

This commit is contained in:
agent_A
2026-05-22 23:41:06 +02:00
parent 37492c1935
commit 8868b36736
3 changed files with 22 additions and 8 deletions
-7
View File
@@ -11,7 +11,6 @@
#include "bench_runner.h" #include "bench_runner.h"
#include "data_table/data_table.h" #include "data_table/data_table.h"
#include "core/logger.h"
#include <imgui.h> #include <imgui.h>
@@ -279,12 +278,6 @@ void Runner::finish_scenario() {
} }
res.pass = (res.fps_p1 >= cfg_.fps_threshold); res.pass = (res.fps_p1 >= cfg_.fps_threshold);
fn_log::log_info("bench: scenario=%s frames=%zu fps_p50=%.1f fps_p1=%.1f "
"mem=%.1fMB cpu=%.1f%% %s",
scenario_name(s), frame_fps_.size(),
res.fps_p50, res.fps_p1, res.mem_rss_mb, res.cpu_pct,
res.pass ? "PASS" : "FAIL");
fprintf(stderr, "[bench] %s: fps_p50=%.1f fps_p1=%.1f mem=%.1fMB %s\n", fprintf(stderr, "[bench] %s: fps_p50=%.1f fps_p1=%.1f mem=%.1fMB %s\n",
scenario_name(s), res.fps_p50, res.fps_p1, res.mem_rss_mb, scenario_name(s), res.fps_p50, res.fps_p1, res.mem_rss_mb,
res.pass ? "PASS" : "FAIL"); res.pass ? "PASS" : "FAIL");
+21
View File
@@ -4,3 +4,24 @@
[2026-05-22 23:37:40.654] [INFO] bench: scenario=sort_numeric frames=273 fps_p50=54.9 fps_p1=48.6 mem=125.1MB cpu=452.1% FAIL [2026-05-22 23:37:40.654] [INFO] bench: scenario=sort_numeric frames=273 fps_p50=54.9 fps_p1=48.6 mem=125.1MB cpu=452.1% FAIL
[2026-05-22 23:37:45.662] [INFO] bench: scenario=color_rule frames=522 fps_p50=105.3 fps_p1=93.0 mem=125.1MB cpu=787.5% PASS [2026-05-22 23:37:45.662] [INFO] bench: scenario=color_rule frames=522 fps_p50=105.3 fps_p1=93.0 mem=125.1MB cpu=787.5% PASS
[2026-05-22 23:37:45.667] [INFO] app exit [2026-05-22 23:37:45.667] [INFO] app exit
[2026-05-22 23:38:26.476] [INFO] app start: data_table_bench
[2026-05-22 23:38:31.560] [INFO] bench: scenario=linear_scroll frames=79 fps_p50=16.0 fps_p1=12.0 mem=202.3MB cpu=196.8% FAIL
[2026-05-22 23:38:36.576] [INFO] bench: scenario=filter_like frames=297 fps_p50=60.2 fps_p1=50.8 mem=202.3MB cpu=485.7% FAIL
[2026-05-22 23:38:41.716] [INFO] bench: scenario=sort_numeric frames=18 fps_p50=3.7 fps_p1=3.5 mem=212.7MB cpu=118.3% FAIL
[2026-05-22 23:38:46.746] [INFO] bench: scenario=color_rule frames=74 fps_p50=15.0 fps_p1=14.1 mem=212.7MB cpu=192.5% FAIL
[2026-05-22 23:38:46.751] [INFO] app exit
[2026-05-22 23:38:54.458] [INFO] app start: data_table_bench
[2026-05-22 23:38:57.520] [INFO] bench: scenario=linear_scroll frames=301 fps_p50=102.8 fps_p1=64.1 mem=125.5MB cpu=750.3% PASS
[2026-05-22 23:39:00.533] [INFO] bench: scenario=filter_like frames=450 fps_p50=151.2 fps_p1=123.8 mem=125.5MB cpu=1091.8% PASS
[2026-05-22 23:39:03.551] [INFO] bench: scenario=sort_numeric frames=159 fps_p50=53.3 fps_p1=46.8 mem=126.0MB cpu=441.3% FAIL
[2026-05-22 23:39:06.566] [INFO] bench: scenario=color_rule frames=307 fps_p50=103.0 fps_p1=84.8 mem=126.0MB cpu=776.5% PASS
[2026-05-22 23:39:06.571] [INFO] app exit
[2026-05-22 23:39:09.848] [INFO] app start: data_table_bench
[2026-05-22 23:39:12.903] [INFO] bench: scenario=linear_scroll frames=318 fps_p50=106.7 fps_p1=93.4 mem=125.3MB cpu=788.2% PASS
[2026-05-22 23:39:15.908] [INFO] bench: scenario=filter_like frames=451 fps_p50=152.4 fps_p1=110.2 mem=125.3MB cpu=1092.3% PASS
[2026-05-22 23:39:21.820] [INFO] app start: data_table_bench
[2026-05-22 23:39:24.873] [INFO] bench: scenario=linear_scroll frames=314 fps_p50=106.3 fps_p1=87.0 mem=125.8MB cpu=778.5% PASS
[2026-05-22 23:39:27.884] [INFO] bench: scenario=filter_like frames=448 fps_p50=150.3 fps_p1=125.4 mem=125.8MB cpu=1083.8% PASS
[2026-05-22 23:39:30.904] [INFO] bench: scenario=sort_numeric frames=159 fps_p50=53.8 fps_p1=39.0 mem=126.1MB cpu=441.3% FAIL
[2026-05-22 23:39:33.917] [INFO] bench: scenario=color_rule frames=309 fps_p50=103.5 fps_p1=92.0 mem=126.1MB cpu=778.8% PASS
[2026-05-22 23:39:33.922] [INFO] app exit
+1 -1
View File
@@ -118,7 +118,7 @@ int main(int argc, char** argv) {
app_cfg.about.name = "data_table_bench"; app_cfg.about.name = "data_table_bench";
app_cfg.about.version = "0.1.0"; app_cfg.about.version = "0.1.0";
app_cfg.about.description = "Headless 10M-row bench for data_table (issue 0133)"; app_cfg.about.description = "Headless 10M-row bench for data_table (issue 0133)";
app_cfg.log = {"data_table_bench.log", 1}; // Do NOT set app_cfg.log — logger prints to stdout, polluting JSON output.
app_cfg.header_badge.enabled = false; // headless — no badge app_cfg.header_badge.enabled = false; // headless — no badge
static GLFWwindow* g_window = nullptr; static GLFWwindow* g_window = nullptr;