sentry icon indicating copy to clipboard operation
sentry copied to clipboard

nit(rollup): Use reverse instead of sorting

Open schew2381 opened this issue 1 year ago • 1 comments

We're creating the list of buckets in the series by appending going backwards in time, meaning the largest timestamp will be at the front of the list and the last item will be the smallest.

We can avoid sorting by just reversing the list.

schew2381 avatar Jun 28 '24 02:06 schew2381

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.01%. Comparing base (c1a4aa0) to head (435fe88).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #73486   +/-   ##
=======================================
  Coverage   78.01%   78.01%           
=======================================
  Files        6634     6634           
  Lines      296739   296739           
  Branches    51108    51108           
=======================================
  Hits       231491   231491           
- Misses      58861    58862    +1     
+ Partials     6387     6386    -1     
Files Coverage Δ
src/sentry/tsdb/base.py 92.61% <100.00%> (ø)

... and 5 files with indirect coverage changes

codecov[bot] avatar Jun 28 '24 02:06 codecov[bot]