promql/functions.go
func funcQuantileOverTime(vals []Value, args Expressions, enh *EvalNodeHelper) Vector {
	q := vals[0].(Vector)[0].V
	mat := vals[1].(Matrix)

	for _, el := range mat {
		if len(el.Points) == 0 {
			continue
		}

		values := make(vectorByValueHeap, 0, len(el.Points))
		for _, v := range el.Points {
			values = append(values, Sample{Point: Point{V: v.V}})
		}
		enh.out = append(enh.out, Sample{
			Point: Point{V: quantile(q, values)},
		})
	}
	return enh.out
}
func funcQuantileOverTime(vals []Value, args Expressions, enh *EvalNodeHelper) Vector {
	q := vals[0].(Vector)[0].V
	mat := vals[1].(Matrix)

	for _, el := range mat {
		if len(el.Points) == 0 {
			continue
		}

		values := make(vectorByValueHeap, 0, len(el.Points))
		for _, v := range el.Points {
			values = append(values, Sample{Point: Point{V: v.V}})
		}
		enh.out = append(enh.out, Sample{
			Point: Point{V: quantile(q, values)},
		})
	}
	return enh.out
}
func funcQuantileOverTime ( vals [ ] Value , args Expressions , enh * EvalNodeHelper ) Vector { q := vals [ 0 ] . ( Vector ) [ 0 ] . V mat := vals [ 1 ] . ( Matrix ) for _ , el := range mat { if len ( el . Points ) == 0 { continue } values := make ( vectorByValueHeap , 0 , len ( el . Points ) ) for _ , v := range el . Points { values = append ( values , Sample { Point : Point { V : v . V } } ) } enh . out = append ( enh . out , Sample { Point : Point { V : quantile ( q , values ) } , } ) } return enh . out }
// === quantile_over_time(Matrix ValueTypeMatrix) Vector ===
=== quantile_over_time ( Matrix ValueTypeMatrix ) Vector ===