Skip to content

feat: ✨ Group profile SQL steps by hash - #84

Merged
oxspan merged 1 commit into
developfrom
feature/62
Nov 12, 2026
Merged

oxspan merged 1 commit into
developfrom
feature/62

Conversation

@oxspan

@oxspan oxspan commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Why

Profiles with repeated SQL can produce hundreds of kilobytes of JSON. Add the single aggregate option retained by the issue's triage.

Refs #62

Changes

profile get --group-sql and offline inspect --group-sql return SQL hash groups with execution count, total/max elapsed milliseconds and error count. Statements still require --include-text; unresolved or conflicting dictionary text is explicit. The summary includes decoded-step counts, lossless transaction IDs and original completeness metadata. English and Korean guides explain the output and limits.

In a synthetic wire fixture with 3,000 repeated SQL steps, live output with text fell from 667,803 bytes to 501 bytes. Default individual-step output remains available.

Validation

  • Full Linux coverageCheck verifyReleaseInputs: passed; 266 executable test cases, line coverage 95.38%, branch coverage 80.95% (90%/80% minimums).
  • Native Windows JDK 21: 10 new packaged-CLI scenarios and 6 aggregate tests passed.
  • Actual CLI comparisons against the previous build: byte-identical default live/inspect output and capture files; previous strict reader accepts new captures. Verified text redaction, unchanged capture bytes after inspection, late-page corruption rejection, truncation, unavailable profiles and command-option validation.
  • Baseline and deliberate aggregation mutations demonstrated that the new tests detect missing functionality, overflow and incorrect redacted statement output.

Validation used synthetic local TCP fixtures; no external Collector/Agent deployment was tested.

Compatibility and risks

The opt-in payload declares scouterctl.profile-sql-summary/v1; existing result envelopes, default outputs, capture formats and exit/completeness semantics are preserved. Grouped output omits individual chronology and non-SQL details. Size grows with distinct SQL hashes; this does not reduce upstream transfer/decoding or prove trace completeness. Duration totals count decoded steps and are not transaction wall time.

@github-actions

Copy link
Copy Markdown
Contributor

Linux CI: success · Commit a6376fc

Test results (Linux)

Total Passed Failed Errors Skipped
267 267 0 0 0

Test coverage

Metric Covered / total Coverage Minimum Result
LINE 2231 / 2339 95.38% 90.00% PASS
BRANCH 1330 / 1643 80.95% 80.00% PASS

Includes the test JVM and CLI subprocesses. Excludes optional real-Collector smoke tests.

Workflow logs and report artifacts

Updated on each CI run. Windows checks, when required, are reported separately in the workflow.

@oxspan
oxspan merged commit b1dd2fa into develop Nov 12, 2026
6 checks passed
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.

1 participant