fix sed replace that overreached.
This commit is contained in:
parent
31d951f370
commit
07b4c6d751
|
@ -22,7 +22,7 @@ func TestAdaptivePolicy(t *testing.T) {
|
||||||
next = p.Evaluate(UtilizationSystem, limit64MiB/2)
|
next = p.Evaluate(UtilizationSystem, limit64MiB/2)
|
||||||
require.EqualValues(t, 3*(limit64MiB/4), next)
|
require.EqualValues(t, 3*(limit64MiB/4), next)
|
||||||
|
|
||||||
// at limit64MiB.
|
// at limit.
|
||||||
next = p.Evaluate(UtilizationSystem, limit64MiB)
|
next = p.Evaluate(UtilizationSystem, limit64MiB)
|
||||||
require.EqualValues(t, limit64MiB, next)
|
require.EqualValues(t, limit64MiB, next)
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ type watermarkPolicy struct {
|
||||||
var _ Policy = (*watermarkPolicy)(nil)
|
var _ Policy = (*watermarkPolicy)(nil)
|
||||||
|
|
||||||
func (w *watermarkPolicy) Evaluate(_ UtilizationType, used uint64) (next uint64) {
|
func (w *watermarkPolicy) Evaluate(_ UtilizationType, used uint64) (next uint64) {
|
||||||
Logger.Debugf("watermark policy: evaluating; utilization: %d/%d (used/limit64MiB)", used, w.limit)
|
Logger.Debugf("watermark policy: evaluating; utilization: %d/%d (used/limit)", used, w.limit)
|
||||||
var i int
|
var i int
|
||||||
for ; i < len(w.thresholds); i++ {
|
for ; i < len(w.thresholds); i++ {
|
||||||
t := w.thresholds[i]
|
t := w.thresholds[i]
|
||||||
|
|
Loading…
Reference in New Issue