Skip to content

Commit

Permalink
refactor: add max func to maxTimestamp
Browse files Browse the repository at this point in the history
Signed-off-by: komisan19 <18901496+komisan19@users.noreply.github.com>
  • Loading branch information
komisan19 committed Apr 21, 2024
1 parent 8cd7e04 commit 5ab24a0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions storage/remote/otlptranslator/prometheusremotewrite/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,8 @@ func mostRecentTimestampInMetric(metric pmetric.Metric) pcommon.Timestamp {
}

func maxTimestamp(a, b pcommon.Timestamp) pcommon.Timestamp {
if a > b {
return a
}
return b
resultTimestamp := max(a, b)
return resultTimestamp
}

// addSingleSummaryDataPoint converts pt to len(QuantileValues) + 2 samples.
Expand Down

0 comments on commit 5ab24a0

Please sign in to comment.