Skip to content

Commit

Permalink
feat(starfish): Adds correlation value for tag p75 against transactio…
Browse files Browse the repository at this point in the history
…n p75 in events_facets_stats_performance (#49944)

Adds correlation value for tag p75 against transaction p75 in
events_facets_stats_performance
  • Loading branch information
edwardgou-sentry committed Jun 2, 2023
1 parent c2b643a commit dae651b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ def get_event_stats(
results[new_key]["count()"]["data"], events_stats["data"]
)
facet["sum_correlation"] = sum_correlation
p75_correlation = discover.corr_snuba_timeseries(
results[new_key]["p75(transaction.duration)"]["data"], events_stats["data"]
)
facet["p75_correlation"] = p75_correlation
totals[new_key] = facet

results["totals"] = totals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def setUp(self):
for i in range(5):
self.store_transaction(
tags=[["color", "blue"], ["many", "yes"]],
duration=4000,
duration=2000 * i,
lcp=3000,
timestamp=timestamps[i % 4],
)
Expand Down Expand Up @@ -108,7 +108,8 @@ def test_basic_request(self):
"count_delta": -1.0,
"count_range_1": 5,
"count_range_total": 5,
"sum_correlation": 0.9718819143525331,
"sum_correlation": 0.9532990871284259,
"p75_correlation": 0.9951357233775535,
}

assert data["color,blue"]
Expand Down

0 comments on commit dae651b

Please sign in to comment.