{"id":28906800,"url":"https://github.com/goptics/vizb","last_synced_at":"2025-12-28T17:55:14.429Z","repository":{"id":299633402,"uuid":"1003638795","full_name":"goptics/vizb","owner":"goptics","description":"A go benchmark interactive visualizer","archived":false,"fork":false,"pushed_at":"2025-06-17T14:27:23.000Z","size":1585,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-17T14:36:58.151Z","etag":null,"topics":["benchmark","benchmarking","chart","go","visualizer"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goptics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-17T12:53:37.000Z","updated_at":"2025-06-17T14:27:26.000Z","dependencies_parsed_at":"2025-06-17T14:50:03.999Z","dependency_job_id":null,"html_url":"https://github.com/goptics/vizb","commit_stats":null,"previous_names":["goptics/vizb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/goptics/vizb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goptics%2Fvizb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goptics%2Fvizb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goptics%2Fvizb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goptics%2Fvizb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goptics","download_url":"https://codeload.github.com/goptics/vizb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goptics%2Fvizb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265550385,"owners_count":23786558,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","benchmarking","chart","go","visualizer"],"created_at":"2025-06-21T15:09:55.444Z","updated_at":"2025-12-28T17:55:14.422Z","avatar_url":"https://github.com/goptics.png","language":"Go","readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"assests/logo.png\" alt=\"vizb logo\" width=\"120\" height=\"auto\" /\u003e\n  \u003ch1\u003eVizb: Visualize Go Benchmarks in 4D\u003c/h1\u003e\n\n  \u003cp\u003e\n    \u003ca href=\"https://libs.tech/project/1003638795/vizb\"\u003e\u003cimg src=\"https://libs.tech/project/1003638795/badge.svg\" alt=\"libs.tech recommends\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://vizb-demo.netlify.app\"\u003e\u003cimg src=\"https://img.shields.io/badge/Live-Demo-orange?style=for\" alt=\"Live Demo\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://pkg.go.dev/github.com/goptics/vizb\"\u003e\u003cimg src=\"https://img.shields.io/badge/go-pkg-00ADD8.svg?logo=go\" alt=\"Go Reference\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://goreportcard.com/report/github.com/goptics/vizb\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/goptics/vizb\" alt=\"Go Report Card\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/goptics/vizb/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/goptics/vizb/actions/workflows/ci.yml/badge.svg\" alt=\"CI\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/goptics/vizb\"\u003e\u003cimg src=\"https://codecov.io/gh/goptics/vizb/branch/main/graph/badge.svg\" alt=\"Codecov\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://golang.org/doc/devel/release.html\"\u003e\u003cimg src=\"https://img.shields.io/badge/Go-1.24+-00ADD8?style=for\u0026logo=go\" alt=\"Go Version\" /\u003e\u003c/a\u003e\n    \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg?style=for\" alt=\"License\" /\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\n  \u003cp\u003e\n    Vizb is a CLI tool that transforms Go benchmark raw output into interactive \u003cstrong\u003e4D visualizations\u003c/strong\u003e. It allows you to \u003ca href=\"#merging-multiple-benchmarks\"\u003emerge multiple benchmark data\u003c/a\u003e, apply \u003ca href=\"#advance-usage\"\u003eadvanced grouping logic\u003c/a\u003e, and explore performance across four dimensions: Source, Group, and two customizable axes (X and Y). All within a single and deployable HTML file.\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## Features\n\n- **Modern Interactive UI**: Robust **Vue.js** application with a smooth and responsive experience.\n- **Multi-Chart**: Supports multiple charts (`bar`, `line` and `pie`) in a single place.\n- **Sorting**: Sort data (`asc`/`desc`) for comparison through UI settings or CLI flags.\n- **Swap Axis**: Swap the `n`, `x` and `y` axes for diverse comparison through UI settings.\n- **Multi-Dimensional Grouping**: Merge multiple benchmark data for deep comparative analysis.\n- **Flexible Input**: Automatically processes raw `go test -bench` output and the standard JSON output of `go test -bench -json`.\n- **Comprehensive Metrics**: Compare time, memory, and numbers with customizable units.\n- **Smart Grouping**: Extract grouping logic from benchmark names using regex and group patterns.\n- **Filtering**: Filter benchmarks to include only those matching a regex pattern.\n- **Export Options**: Generate `single-file` HTML/JSON and options to save charts as `JPEG`.\n\n## Installation\n\n```bash\ngo install github.com/goptics/vizb\n```\n\n## Basic Usage\n\n### Using raw benchmark output\n\nRun your Go benchmarks and save the output:\n\n```bash\ngo test -bench . \u003e bench.txt\n```\n\nGenerate charts from the benchmark:\n\n```bash\nvizb bench.txt -o output.html\n```\n\n### Direct piping\n\nPipe benchmark results directly to vizb:\n\n```bash\n# Raw output\ngo test -bench . | vizb -o output.html\n\n# JSON output (automatically detected and converted)\ngo test -bench . -json | vizb -o output.html\n```\n\n### Using vizb standard JSON benchmark output\n\n```bash\nvizb bench.txt -o output.json\n```\n\nGenerate charts from the standard JSON benchmark data:\n\n```bash\nvizb output.json -o output.html\n```\n\n### Merging multiple benchmarks\n\nYou can combine multiple benchmark JSON files into a single html file using the `merge` command. This is useful for aggregating benchmark data from different runs, machines, or environments.\n\n```bash\n# Merge specific files\nvizb merge output.json output2.json -o merged_report.html\n\n# Merge all JSON files in a directory\nvizb merge ./results/ -o all_results.html\n\n# Mix and match files and directories\nvizb merge ./old_results/ output.json -o comparison.html\n```\n\nOpen the generated HTML file in your browser to view the interactive charts.\n\n\u003e [!Note]\n\u003e The `merge` command requires JSON files as input, which must be generated using `vizb bench.txt -o output.json`.\n\n## Advance Usage\n\n### How vizb groups your benchmark data\n\nVizb creates charts that make sense by putting your benchmark data into logical groupings and axes. It sees the data as `1D` (xAxis) by default, but if you have to deal with `2D` or `3D` data, you can use the `--group-pattern` and `--group-regex` flags to group your data.\n\n### Understanding Group Patterns\n\nA group pattern tells vizb how to dissect your benchmark names into three key components:\n\n1.  **Name (n)**: The family or group the benchmark belongs to. Benchmarks with the same `Name` will be grouped together in the same chart. (optional)\n2.  **XAxis (x)**: The category that goes on the X-axis (e.g., input size, concurrency level).\n3.  **YAxis (y)**: The specific test case or variation (e.g., algorithm name, sub-test).\n\n### Visualizing the Extraction\n\nImagine you have a benchmark named `BenchmarkSort/100/Ints`, which has `3D` data.\n\nIf you use the pattern `name/xAxis/yAxis` (or `n/x/y`), vizb splits the name wherever it finds a `/`:\n\n```text\nBenchmark Name:  BenchmarkSort  /  100  /  Ints\n                     │              │        │\nPattern:           [Name]        [XAxis]   [YAxis]\n                     │              │        │\nResult:            \"Sort\"         \"100\"    \"Ints\"\n```\n\n### Group Pattern Syntax (`--group-pattern`)\n\n- **Components**: Use `name`, `xAxis`, `yAxis` (or shorthands `n`, `x`, `y`).\n- **Separators**: Use `/` (slash) or `_` (underscore) to match the separators in your benchmark names.\n- **Skipping parts**: You can leave parts empty in the pattern to ignore sections of the benchmark name.\n\n#### Standard Go Benchmarks (Slash Separated)\n\nFormat: `Benchmark\u003cGroup\u003e/\u003cInputSize\u003e/\u003cVariant\u003e`\n\n**Pattern:** `n/x/y`\n\n| Benchmark Name                 | Extracted Data                                            |\n| :----------------------------- | :-------------------------------------------------------- |\n| `BenchmarkSort/1024/QuickSort` | **Name:** `Sort` **XAxis:** `1024` **YAxis:** `QuickSort` |\n| `BenchmarkSort/1024/MergeSort` | **Name:** `Sort` **XAxis:** `1024` **YAxis:** `MergeSort` |\n\n#### Underscore Separated\n\nFormat: `Benchmark\u003cGroup\u003e_\u003cVariant\u003e_\u003cInputSize\u003e`\n\n**Pattern:** `n_y_x`\n\n| Benchmark Name             | Extracted Data                                        |\n| :------------------------- | :---------------------------------------------------- |\n| `BenchmarkHash_SHA256_1KB` | **Name:** `Hash` **YAxis:** `SHA256` **XAxis:** `1KB` |\n| `BenchmarkHash_MD5_1KB`    | **Name:** `Hash` **YAxis:** `MD5` **XAxis:** `1KB`    |\n\n#### Simple Grouping (No X-Axis)\n\nFormat: `Benchmark\u003cGroup\u003e/\u003cVariant\u003e`\n\n**Pattern:** `n/y`\n\n| Benchmark Name            | Extracted Data                                               |\n| :------------------------ | :----------------------------------------------------------- |\n| `BenchmarkJSON/Marshal`   | **Name:** `JSON` **XAxis:** _(empty)_ **YAxis:** `Marshal`   |\n| `BenchmarkJSON/Unmarshal` | **Name:** `JSON` **XAxis:** _(empty)_ **YAxis:** `Unmarshal` |\n\n#### Ignoring Prefixes\n\nSometimes you might want to ignore a common prefix or a specific part of the name.\n\n**Pattern:** `/n/y` (Starts with a separator to skip the first part)\n\n| Benchmark Name               | Extracted Data                                                         |\n| :--------------------------- | :--------------------------------------------------------------------- |\n| `BenchmarkTest/JSON/Marshal` | **Name:** `JSON` **YAxis:** `Marshal` _(First part \"Test\" is ignored)_ |\n\n### Group Regex Syntax (`--group-regex`)\n\nFor more complex benchmark names where simple patterns aren't enough, you can use Regular Expressions with named groups.\n\n- **Named Groups**: Use `(?\u003cname\u003e...)`, `(?\u003cxAxis\u003e...)`, `(?\u003cyAxis\u003e...)` (or shorthands `(?\u003cn\u003e...)`, `(?\u003cx\u003e...)`, `(?\u003cy\u003e...)`) to capture parts of the benchmark name.\n- **Flexibility**: Regex allows you to match specific characters, ignore parts, and handle irregular formats.\n\n#### Examples\n\n| Benchmark Name                            | Regex                                   | Extracted Data                                            | Dimensions |\n| :---------------------------------------- | :-------------------------------------- | :-------------------------------------------------------- | :--------- |\n| `BenchmarkHashing64MD5`                   | `Hashing64(?\u003cx\u003e.*)`                     | **XAxis:** `MD5`                                          | 1D         |\n| `BenchmarkJSONByMarshal`                  | `(?\u003cx\u003e.*)By(?\u003cy\u003e.*)`                    | **XAxis:** `JSON` **YAxis:** `Marshal`                    | 2D         |\n| `BenchmarkDecode/text=digits/level=speed` | `(?\u003cn\u003e.*)/text=(?\u003cx\u003e.*)/level=(?\u003cy\u003e.*)` | **Name:** `Decode` **XAxis:** `digits` **YAxis:** `speed` | 3D         |\n\n\u003e [!Note]\n\u003e You must specify at least one of the `x` and `y` axes when you use the `--group-[pattern|regex]` command. the `n` is optional.\n\n## Development\n\nThis project uses [Task](https://taskfile.dev/) for managing development workflows.\n\n### Setup Development Environment\n\n```bash\n# Install Task runner\ngo install github.com/go-task/task/v3/cmd/task@latest\n```\n\n### Available Tasks\n\n```bash\n# List all available tasks\ntask\n\n# Run the UI in development mode\ntask dev:ui\n\n# Build The UI\ntask build:ui\n\n# Build the binary (run from ./bin/vizb)\ntask build:cli\n\n# Build everything\ntask build\n\n# Run tests\ntask test\n```\n\n## Contributing\n\nContributions are welcome! Feel free to open issues or submit pull requests.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","funding_links":[],"categories":["Benchmarks"],"sub_categories":["Other Software"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoptics%2Fvizb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoptics%2Fvizb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoptics%2Fvizb/lists"}