Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions pipe/histogram.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,20 @@ func (o *histogramOp) Name() string { return "histogram" }
func (o *histogramOp) IsLiveSafe() bool { return true }

func (o *histogramOp) Apply(_ context.Context, in []dsl.Row) ([]dsl.Row, error) {
// ============================================================
// DELIBERATE SLOWDOWN — DO NOT MERGE.
// Exists only to prove the benchmark gate in .github/workflows/bench.yml
// actually fails a pull request. Delete this block along with the branch.
// ============================================================
for pass := 0; pass < 4; pass++ {
for _, row := range in {
if v, ok := row[o.cfg.Field]; ok && isNumeric(v) {
_ = math.Sqrt(toFloat(v))
}
}
}
// ============================================================

if len(in) == 0 || o.cfg.Bins <= 0 {
return in[:0:0], nil
}
Expand Down
Loading