mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
refactor: add max func to maxTimestamp
Signed-off-by: komisan19 <18901496+komisan19@users.noreply.github.com>
This commit is contained in:
parent
8cd7e04fd2
commit
5ab24a06d0
|
@ -442,10 +442,8 @@ func mostRecentTimestampInMetric(metric pmetric.Metric) pcommon.Timestamp {
|
||||||
}
|
}
|
||||||
|
|
||||||
func maxTimestamp(a, b pcommon.Timestamp) pcommon.Timestamp {
|
func maxTimestamp(a, b pcommon.Timestamp) pcommon.Timestamp {
|
||||||
if a > b {
|
resultTimestamp := max(a, b)
|
||||||
return a
|
return resultTimestamp
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// addSingleSummaryDataPoint converts pt to len(QuantileValues) + 2 samples.
|
// addSingleSummaryDataPoint converts pt to len(QuantileValues) + 2 samples.
|
||||||
|
|
Loading…
Reference in a new issue