Skip to content

Latest commit

 

History

History
60 lines (44 loc) · 2.94 KB

File metadata and controls

60 lines (44 loc) · 2.94 KB

Dashboard Report

The CLI writes analyze-flow-dashboard.html by default. It is a self-contained offline UI, so it works without a server or internet access.

Dashboard Sections

  • Summary cards: files, methods, findings, estimated saved latency, detected languages.
  • Before vs after latency chart.
  • Severity distribution chart.
  • Highest impact suggestion list.
  • Endpoint workflow cards for Spring controllers.
  • Searchable finding cards.
  • Existing-code and improved-shape blocks for each finding. Existing-code snippets are hidden by default unless exposeSourceSnippets=true.
  • Evidence, locations, recommendation, and estimated impact.
  • Query/API problem cards.
  • Loop hotspot cards.
  • Unused code and memory-waste cards.
  • Folder/package structure cards.
  • MCP/AI assist status card.
  • Analytics API endpoint card.
  • API security status: localhost/token/CORS/snippet mode.
  • Analysis time card from timingsMs.totalAnalysisMs.

How Improvement Is Calculated

For repeated DB/API calls:

current = observed_operations * configured_backend_latency
optimized = first_backend_call + duplicate_operations * configured_cache_latency
improvementPercent = (current - optimized) / current * 100

The value is a heuristic until dynamic telemetry is connected. It is intentionally visible in the UI as an estimate, not a guaranteed benchmark result.

Better UI Option For SaaS

For the SaaS version, keep this HTML report as an export format, but build the main UI as:

  • React or Next.js dashboard.
  • Server-side API backed by persisted AnalysisReport records.
  • Interactive source viewer with line-level annotations.
  • Trend charts by branch, service, team, and release.
  • Finding lifecycle: new, acknowledged, fixed, ignored, false positive.

Card Meanings

  • Query/API Problems: repeated DB calls, query calls, and external API calls that are candidates for cache, batching, gateway extraction, or Redis.
  • Loop Hotspots: nested loops and large loop-heavy methods where CPU and IO work can grow quickly with input size.
  • Unused Code: private methods, local variables, parameters, and unreachable statements that are likely removable after validation.
  • Folder Structure: package and layering issues such as controllers calling repositories directly or missing test folders.
  • MCP/AI Assist: status of the optional enterprise MCP integration. Disabled by default.

Fast Report Generation

The dashboard is generated from the already-built in-memory AnalysisReport. The local server caches serialized /api/* responses by default, so integrations can repeatedly read analytics without re-running the analyzer.

Safe Sharing

The dashboard embeds the report JSON so it can work offline. For safer sharing, the default configuration redacts common secrets, hides source snippets, and replaces absolute project paths with a project display name. Keep those defaults for CI artifacts and enterprise uploads. Enable source snippets only for trusted local review sessions.