feat(benchmarks): performance benchmarking for regression detection#377
Merged
Conversation
Implements comprehensive benchmark suite with 12 benchmarks covering: - Model loading (JSONC parsing): 474μs (100 elems), 2.6ms (500 elems) - Model validation: 214μs (100 elems), 1.4ms (500 elems) - Hierarchy flattening: 29.5μs - Diagram export: 45.9μs per view - Table export (Markdown/AsciiDoc): 60μs - JSON roundtrip: 764μs - File I/O: 476μs write, 1.8ms read - Combined operations: 263μs Changes: - internal/benchmarks/benchmarks_test.go: 12 benchmark functions with synthetic model generation - .github/workflows/benchmarks.yml: CI pipeline with regression detection and baseline comparison - BENCHMARKS.md: Interpretation guide, SLO targets, optimization opportunities - benchmarks/main.txt: Baseline metrics for regression detection CI Integration: - Run on every push to main (update baseline) - Run on every PR (compare vs baseline, flag >5% regressions) - Uses benchstat for automated comparison Fixes #351 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Suppress json.Unmarshal errors (lines 68, 80) - Suppress model.FlattenElements error (line 110) - Suppress diagram.FormatView and table.Format errors (lines 128, 141+) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Line 187 was missing error handling for model.Save call. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
raifdmueller
approved these changes
May 26, 2026
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements comprehensive performance benchmarking suite for regression detection with 12 benchmarks covering critical code paths.
Changes:
Metrics (Linux 2.9GHz baseline):
CI Integration:
Fixes #351
🤖 Generated with Claude Code