Merge pull request #13889 from komisan19/refactor/utilize_standard_functions_max/min

refactor: utilize standard functions max/min in promtool and tsdb
This commit is contained in:
Bryan Boreham 2024-04-06 10:23:18 +01:00 committed by GitHub
commit fc567a1df8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 0 additions and 28 deletions

View file

@ -234,17 +234,3 @@ func (m *multipleAppender) flushAndCommit(ctx context.Context) error {
}
return nil
}
func max(x, y int64) int64 {
if x > y {
return x
}
return y
}
func min(x, y int64) int64 {
if x < y {
return x
}
return y
}

View file

@ -198,13 +198,6 @@ func (h *Head) AppendableMinValidTime() (int64, bool) {
return h.appendableMinValidTime(), true
}
func max(a, b int64) int64 {
if a > b {
return a
}
return b
}
func (h *Head) getAppendBuffer() []record.RefSample {
b := h.appendPool.Get()
if b == nil {

View file

@ -327,10 +327,3 @@ func (r *LiveReader) readRecord() ([]byte, int, error) {
return rec, length + recordHeaderSize, nil
}
func min(i, j int) int {
if i < j {
return i
}
return j
}