mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-31 15:06:26 +00:00
wip
This commit is contained in:
parent
a62b0ab12b
commit
a2878feb1e
2 changed files with 11 additions and 12 deletions
|
@ -4,7 +4,6 @@ import (
|
||||||
"math"
|
"math"
|
||||||
"strconv"
|
"strconv"
|
||||||
"sync"
|
"sync"
|
||||||
"unicode/utf8"
|
|
||||||
|
|
||||||
"github.com/VictoriaMetrics/VictoriaMetrics/lib/bytesutil"
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/bytesutil"
|
||||||
"github.com/VictoriaMetrics/VictoriaMetrics/lib/encoding"
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/encoding"
|
||||||
|
@ -67,17 +66,6 @@ func (fs *streamFilter) apply(bs *blockSearch, bm *bitmap) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func getTokensSkipLast(s string) []string {
|
|
||||||
for {
|
|
||||||
r, runeSize := utf8.DecodeLastRuneInString(s)
|
|
||||||
if !isTokenRune(r) {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
s = s[:len(s)-runeSize]
|
|
||||||
}
|
|
||||||
return tokenizeStrings(nil, []string{s})
|
|
||||||
}
|
|
||||||
|
|
||||||
func toUint64Range(minValue, maxValue float64) (uint64, uint64) {
|
func toUint64Range(minValue, maxValue float64) (uint64, uint64) {
|
||||||
minValue = math.Ceil(minValue)
|
minValue = math.Ceil(minValue)
|
||||||
maxValue = math.Floor(maxValue)
|
maxValue = math.Floor(maxValue)
|
||||||
|
|
|
@ -303,3 +303,14 @@ func matchPrefix(s, prefix string) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getTokensSkipLast(s string) []string {
|
||||||
|
for {
|
||||||
|
r, runeSize := utf8.DecodeLastRuneInString(s)
|
||||||
|
if !isTokenRune(r) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
s = s[:len(s)-runeSize]
|
||||||
|
}
|
||||||
|
return tokenizeStrings(nil, []string{s})
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue