Skip to content

Commit

Permalink
rename p99/p95/p90 etc so its clear that we are talking about legends
Browse files Browse the repository at this point in the history
  • Loading branch information
brenol committed Oct 12, 2020
1 parent 15054ed commit f03a0b2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions gui/drawer.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,22 @@ L:

valuesP50 = appendValue(valuesP50, res.P50)
d.widgets.percentilesChart.Series("p50", valuesP50,
linechart.SeriesCellOpts(d.widgets.p50.cellOpts...),
linechart.SeriesCellOpts(d.widgets.p50Legend.cellOpts...),
)

valuesP90 = appendValue(valuesP90, res.P90)
d.widgets.percentilesChart.Series("p90", valuesP90,
linechart.SeriesCellOpts(d.widgets.p90.cellOpts...),
linechart.SeriesCellOpts(d.widgets.p90Legend.cellOpts...),
)

valuesP95 = appendValue(valuesP95, res.P95)
d.widgets.percentilesChart.Series("p95", valuesP95,
linechart.SeriesCellOpts(d.widgets.p95.cellOpts...),
linechart.SeriesCellOpts(d.widgets.p95Legend.cellOpts...),
)

valuesP99 = appendValue(valuesP99, res.P99)
d.widgets.percentilesChart.Series("p99", valuesP99,
linechart.SeriesCellOpts(d.widgets.p99.cellOpts...),
linechart.SeriesCellOpts(d.widgets.p99Legend.cellOpts...),
)
}
}
Expand Down
2 changes: 1 addition & 1 deletion gui/gui.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func gridLayout(w *widgets) (*gridOpts, error) {
container.Border(linestyle.Light),
container.ID(chartID),
container.BorderTitle("Percentiles (ms)"),
}, w.p99.text, w.p90.text, w.p95.text, w.p50.text)
}, w.p99Legend.text, w.p90Legend.text, w.p95Legend.text, w.p50Legend.text)

return &gridOpts{
latency: latencyOpts,
Expand Down
16 changes: 8 additions & 8 deletions gui/widgets.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ type widgets struct {
othersText Text

percentilesChart LineChart
p99 chartLegend
p95 chartLegend
p90 chartLegend
p50 chartLegend
p99Legend chartLegend
p95Legend chartLegend
p90Legend chartLegend
p50Legend chartLegend

progressGauge Gauge
navi Text
Expand Down Expand Up @@ -128,10 +128,10 @@ func newWidgets(targetURL string, opts *attacker.Options) (*widgets, error) {
othersText: othersText,
progressGauge: progressGauge,
percentilesChart: percentilesChart,
p99: chartLegend{p99Text, []cell.Option{p99Color}},
p95: chartLegend{p95Text, []cell.Option{p95Color}},
p90: chartLegend{p90Text, []cell.Option{p90Color}},
p50: chartLegend{p50Text, []cell.Option{p50Color}},
p99Legend: chartLegend{p99Text, []cell.Option{p99Color}},
p95Legend: chartLegend{p95Text, []cell.Option{p95Color}},
p90Legend: chartLegend{p90Text, []cell.Option{p90Color}},
p50Legend: chartLegend{p50Text, []cell.Option{p50Color}},
navi: navi,
}, nil
}
Expand Down

0 comments on commit f03a0b2

Please sign in to comment.