diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-24 09:45:02 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-24 09:45:02 +0200 |
| commit | f2d79f6459bbe1aa9bae2946e9773141cb184463 (patch) | |
| tree | e683b901d2432ac7e28cd6e80f468da38edc280b /internal/tui/dashboard/histogram.go | |
| parent | 7fc16d6c98feae7aaee58666dc552384ceb4895e (diff) | |
tui: wire full dashboard tabs and improve overview summaries
Diffstat (limited to 'internal/tui/dashboard/histogram.go')
| -rw-r--r-- | internal/tui/dashboard/histogram.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/tui/dashboard/histogram.go b/internal/tui/dashboard/histogram.go index a95159a..b2bb88e 100644 --- a/internal/tui/dashboard/histogram.go +++ b/internal/tui/dashboard/histogram.go @@ -3,7 +3,7 @@ package dashboard import ( "fmt" "ior/internal/statsengine" - "ior/internal/tui" + common "ior/internal/tui/common" "math" "strconv" "strings" @@ -11,28 +11,28 @@ import ( func renderLatencyTab(snap *statsengine.Snapshot, width, height int) string { if snap == nil { - return tui.PanelStyle.Render("Latency: waiting for stats...") + return common.PanelStyle.Render("Latency: waiting for stats...") } hist := renderHistogram(snap.LatencyHistogram, "Latency Histogram", width, height) - spark := tui.PanelStyle.Render("Latency sparkline: " + renderSparkline(snap.LatencySeriesNs(), sparklineWidth(width))) + spark := common.PanelStyle.Render("Latency sparkline: " + renderSparkline(snap.LatencySeriesNs(), sparklineWidth(width))) return strings.Join([]string{hist, spark}, "\n") } func renderGapsTab(snap *statsengine.Snapshot, width, height int) string { if snap == nil { - return tui.PanelStyle.Render("Gaps: waiting for stats...") + return common.PanelStyle.Render("Gaps: waiting for stats...") } hist := renderHistogram(snap.GapHistogram, "Gap Histogram", width, height) - spark := tui.PanelStyle.Render("Gap sparkline: " + renderSparkline(snap.GapSeriesNs(), sparklineWidth(width))) + spark := common.PanelStyle.Render("Gap sparkline: " + renderSparkline(snap.GapSeriesNs(), sparklineWidth(width))) return strings.Join([]string{hist, spark}, "\n") } func renderHistogram(hist statsengine.HistogramSnapshot, title string, width, height int) string { buckets := hist.Buckets() if len(buckets) == 0 { - return tui.PanelStyle.Render(title + ": no data") + return common.PanelStyle.Render(title + ": no data") } if width <= 0 { @@ -77,7 +77,7 @@ func renderHistogram(hist statsengine.HistogramSnapshot, title string, width, he } lines = append(lines, "Scale: █▓▒░") - return tui.PanelStyle.Render(strings.Join(lines, "\n")) + return common.PanelStyle.Render(strings.Join(lines, "\n")) } func renderHistogramBar(count, maxCount uint64, width int) string { |
