sentry icon indicating copy to clipboard operation
sentry copied to clipboard

fix(snuba-search): Fix how we calculate hits

Open snigdhas opened this issue 1 year ago • 1 comments

From https://github.com/getsentry/sentry/pull/68374#discussion_r1559835949, we need to add the sampled calculations when counting the number of hits for queries that required a post-filter for Postgres fields.

This PR replicates the logic used in the PostgresSnubaQueryExecutor. I've tested locally to verify the counts work as expected.

snigdhas avatar Oct 03 '24 02:10 snigdhas

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

:white_check_mark: All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/search/snuba/executors.py 87.50% 0 Missing and 1 partial :warning:
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #78545   +/-   ##
=======================================
  Coverage   78.11%   78.11%           
=======================================
  Files        7082     7082           
  Lines      312250   312259    +9     
  Branches    51010    51011    +1     
=======================================
+ Hits       243910   243923   +13     
+ Misses      61984    61981    -3     
+ Partials     6356     6355    -1     

codecov[bot] avatar Oct 03 '24 03:10 codecov[bot]