[PR #581] [MERGED] feat(zig): add --json and --bench flags to benchmark runner #1416

Closed
opened 2026-03-14 09:35:29 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/581
Author: @simonklee
Created: 1/24/2026
Status: Merged
Merged: 1/25/2026
Merged by: @kommander

Base: mainHead: zig-bench-tooling


📝 Commits (2)

  • 8e95be1 feat(zig): add --json and --bench flags to benchmark runner
  • a623fc3 bench: refactor filtering logic

📊 Changes

11 files changed (+2613 additions, -2040 deletions)

View changed files

📝 packages/core/src/zig/bench-utils.zig (+36 -0)
📝 packages/core/src/zig/bench.zig (+70 -26)
📝 packages/core/src/zig/bench/buffer-draw-text-buffer_bench.zig (+311 -257)
📝 packages/core/src/zig/bench/edit-buffer_bench.zig (+319 -290)
📝 packages/core/src/zig/bench/rope-markers_bench.zig (+340 -261)
📝 packages/core/src/zig/bench/rope_bench.zig (+354 -298)
📝 packages/core/src/zig/bench/styled-text_bench.zig (+346 -313)
📝 packages/core/src/zig/bench/text-buffer-coords_bench.zig (+232 -195)
📝 packages/core/src/zig/bench/text-buffer-view_bench.zig (+146 -100)
📝 packages/core/src/zig/bench/text-chunk-graphemes_bench.zig (+78 -10)
📝 packages/core/src/zig/bench/utf8_bench.zig (+381 -290)

📄 Description

Add two new CLI options for benchmark filtering:

  • --json: Output results in machine-readable JSON format
  • --bench, -b NAME: Filter individual benchmarks by name (case-insensitive)

This allows filtering on specific benchmark names (not just categories) and is
what enables me to measure individual benchmarks for opentui-bench.fly.dev as
well as their pprof profile.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/581 **Author:** [@simonklee](https://github.com/simonklee) **Created:** 1/24/2026 **Status:** ✅ Merged **Merged:** 1/25/2026 **Merged by:** [@kommander](https://github.com/kommander) **Base:** `main` ← **Head:** `zig-bench-tooling` --- ### 📝 Commits (2) - [`8e95be1`](https://github.com/anomalyco/opentui/commit/8e95be1d2886e604092c0368105818996edcf61f) feat(zig): add --json and --bench flags to benchmark runner - [`a623fc3`](https://github.com/anomalyco/opentui/commit/a623fc3a5d608e15a15a293f3323d09b33df920b) bench: refactor filtering logic ### 📊 Changes **11 files changed** (+2613 additions, -2040 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/zig/bench-utils.zig` (+36 -0) 📝 `packages/core/src/zig/bench.zig` (+70 -26) 📝 `packages/core/src/zig/bench/buffer-draw-text-buffer_bench.zig` (+311 -257) 📝 `packages/core/src/zig/bench/edit-buffer_bench.zig` (+319 -290) 📝 `packages/core/src/zig/bench/rope-markers_bench.zig` (+340 -261) 📝 `packages/core/src/zig/bench/rope_bench.zig` (+354 -298) 📝 `packages/core/src/zig/bench/styled-text_bench.zig` (+346 -313) 📝 `packages/core/src/zig/bench/text-buffer-coords_bench.zig` (+232 -195) 📝 `packages/core/src/zig/bench/text-buffer-view_bench.zig` (+146 -100) 📝 `packages/core/src/zig/bench/text-chunk-graphemes_bench.zig` (+78 -10) 📝 `packages/core/src/zig/bench/utf8_bench.zig` (+381 -290) </details> ### 📄 Description Add two new CLI options for benchmark filtering: - `--json`: Output results in machine-readable JSON format - `--bench, -b NAME`: Filter individual benchmarks by name (case-insensitive) This allows filtering on specific benchmark names (not just categories) and is what enables me to measure individual benchmarks for opentui-bench.fly.dev as well as their pprof profile. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:35:29 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#1416
No description provided.