Skip to content

Conversation

wenyihu6
Copy link
Contributor

@wenyihu6 wenyihu6 commented Sep 12, 2025

Rebased on top of #152959.
Epic: https://cockroachlabs.atlassian.net/browse/CRDB-49117
Release note: none


Added comprehensive SHA comparison capability to the ASIM viewer tool, enabling
side-by-side comparison of test results between different Git commits.

Major additions:

  • New -sha-compare flag to enable SHA comparison mode
  • sha_compare.go: Core logic for managing Git operations, test generation, and file comparison
  • sha_compare.html: Interactive web interface for SHA comparison with Plotly charts
  • File-by-file comparison with visual indicators for identical, different, or SHA-specific files

The tool now supports two modes:

  1. Regular file viewer (existing functionality)
  2. SHA comparison mode (new) - allows users to select two commits, automatically
    generates test data for both, and provides side-by-side chart comparison

Updated BUILD.bazel and .gitignore to support the new comparison workflow and temporary file storage.

🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]

tbg and others added 2 commits September 4, 2025 10:13
This adds asimview, a Go tool that serves an interactive web viewer
for ASIM test JSON output files, replacing the previous static HTML
approach with significant improvements.

Key features:
- Auto-discovery of test files with fuzzy search and multi-select
- Instant file loading with persistent file selections across sessions
- Metric filtering with persistent preferences (localStorage)
- Default metrics: cpu, qps, write_bytes_per_second, replicas, leases
- Synchronized zoom across all charts with reliable undo functionality
- Copy timeseries data as JSON
- Performance optimizations for (relatively) snappy rendering

Usage:
  - go run pkg/kv/kvserver/asim/tests/cmd/asimview
  - open browser at http://localhost:8080

The tool automatically finds the repo root and serves files from
testdata/generated/. The old static viewer.html has been replaced
with a README pointing to the new tool.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

Cost: $48.59

Epic: CRDB-49117
Added comprehensive SHA comparison capability to the ASIM viewer tool, enabling
side-by-side comparison of test results between different Git commits.

Major additions:
- New `-sha-compare` flag to enable SHA comparison mode
- `sha_compare.go`: Core logic for managing Git operations, test generation, and file comparison
- `sha_compare.html`: Interactive web interface for SHA comparison with Plotly charts
- File-by-file comparison with visual indicators for identical, different, or SHA-specific files

The tool now supports two modes:
1. Regular file viewer (existing functionality)
2. SHA comparison mode (new) - allows users to select two commits, automatically
   generates test data for both, and provides side-by-side chart comparison

Updated BUILD.bazel and .gitignore to support the new comparison workflow and temporary file storage.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
@wenyihu6 wenyihu6 requested review from a team as code owners September 12, 2025 01:30
Copy link

blathers-crl bot commented Sep 12, 2025

Your pull request contains more than 1000 changes. It is strongly encouraged to split big PRs into smaller chunks.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@wenyihu6 wenyihu6 changed the title asimview: add interactive web viewer for asim test results asimview: add sha comparison functionality Sep 12, 2025
@wenyihu6
Copy link
Contributor Author

wenyihu6 commented Sep 12, 2025

The discussion this morning was really helpful. I ended up copying the generated data to a temp folder under .gitignore with the sha as the folder name so that it won’t be affected when switching SHAs. Then it switches to another SHA, does the same, and compares the results under the temp directory. It felt somewhat similar to benchdiff. The folder might just keep growing, so I’m relying on users to delete it once they’re done with the tool.

Screenshot 2025-09-11 at 9 44 12 PM

@wenyihu6 wenyihu6 requested a review from tbg September 12, 2025 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants