Issue #12: Complete Performance Benchmark Integration - #26
Merged
Conversation
Adds a Performance overlay toggle and metric selector (latency, queries/sec, hotspot score, load score) to the main vis-network graph view. When enabled, it fetches /api/performance/data/graph and maps node/edge performance metrics onto the existing vis-network dataset: node size/color and hotspot border highlighting driven by the selected metric, edge thickness by query_frequency and edge color by latency/ performance_rank. Original node/edge visuals are captured up front and restored exactly when the overlay is disabled. Matching between the domain graph (/api/graph, Neo4j ids) and the performance graph (table/label-derived ids) is best-effort (explicit id property, then table_name, then unique label) and gracefully no-ops for any node/edge that can't be confidently matched, with no thrown JS errors. The fetch also falls back across ports since in local development the visualization server and the API server (which hosts /api/performance/*) listen on different ports; in single-port deployments the relative path is used directly. Only internal/interfaces/web/templates/visualization.html and internal/interfaces/web/static/js/visualization.js were touched; no Go files were modified. Co-Authored-By: Oz <oz-agent@warp.dev>
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
Completes issue #12 (Performance Benchmark Integration) by building on existing work in
main.What has been added
ParseDurationfallbacks (realtime/graph mapper config), exampleperformance:section inconfig/config.yml.BenchmarkResultStorePort+ JSONL file implementation, connected toBenchmarkService;/api/performance/data/historyreturns actual history.performance.benchmarks.custom_queries), newCustomQueryAdapter(safely restricted to SELECT/INSERT/UPDATE), registered as acustomtool./) to display performance metrics (node size/colour, edge thickness/colour, hotspot highlighting) over/api/performance/data/graph./api/performance/data/graphandinclude_graph=truealways returned an empty/503 status becausebaseGraphwas never populated with real data from Neo4j – fixed.GET /api/performance/reports/summaryandGET /api/performance/export?format=json|csv.PerformanceSchemaAdapter(gatedINTEGRATION_TESTS=true),docs/performance/README.md.Verification
make build✅make test✅go vet ./...✅