Skip to content

Commit

Permalink
Merge branch 'master' into mz/fix-secret-auth
Browse files Browse the repository at this point in the history
  • Loading branch information
michellewzhang authored Jan 7, 2025
2 parents 40255ef + eb0a390 commit 63fd30e
Show file tree
Hide file tree
Showing 500 changed files with 11,229 additions and 9,526 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
/src/sentry/snuba/metrics/query.py @getsentry/owners-snuba @getsentry/telemetry-experience
/src/sentry/snuba/metrics_layer/ @getsentry/owners-snuba
/src/sentry/search/events/datasets/metrics_layer.py @getsentry/owners-snuba
/tests/snuba/test_snql_snuba.py @getsentry/owners-snuba
/tests/snuba/test_snuba.py @getsentry/owners-snuba

## Event Ingestion
/src/sentry/attachments/ @getsentry/ingest
Expand Down Expand Up @@ -66,6 +68,7 @@

## Dev
/devenv/ @getsentry/owners-sentry-dev @getsentry/dev-infra
/devservices/ @getsentry/owners-sentry-dev @getsentry/dev-infra
/.github/ @getsentry/owners-sentry-dev
/config/hooks/ @getsentry/owners-sentry-dev
/scripts/ @getsentry/owners-sentry-dev
Expand Down
51 changes: 51 additions & 0 deletions bin/benchmark_detectors
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env python
# isort: skip_file

"""
This script benchmarks the performance of issue detectors in Sentry.
NOTE: This currently only supports FileIOMainThreadDetector.
Usage: python benchmark_detectors
"""
from sentry.runner import configure

configure()
import time
import sentry_sdk
from sentry.testutils.performance_issues.event_generators import get_event # noqa: S007
from sentry.utils.performance_issues.detectors import FileIOMainThreadDetector
from sentry.utils.performance_issues.performance_detection import (
get_detection_settings,
run_detector_on_data,
)

sentry_sdk.init(None)


def main():
settings = get_detection_settings()

# 10 events: 1 ignored, 1 matching, and 8 ignored
events = [get_event("file-io-on-main-thread") for _ in range(0, 10)]
events[0]["spans"][0]["data"]["file.path"] = "somethins/stuff/blah/yup/KBLayout_iPhone.dat"
for i in range(2, 10):
events[i]["spans"][0]["data"]["blocked_main_thread"] = False

count = 100_000

start = time.perf_counter()
for _ in range(0, count):
for event in events:
detector = FileIOMainThreadDetector(settings, event)
run_detector_on_data(detector, event)
elapsed = time.perf_counter() - start

ops = count * len(events)
print(f"{ops:,} ops") # noqa
print(f"{elapsed:.3f} s") # noqa
print(f"{ops/elapsed:,.2f} ops/s") # noqa


if __name__ == "__main__":
main()
1 change: 1 addition & 0 deletions config/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noUncheckedIndexedAccess": true,
"strict": true,
"strictBindCallApply": false,
"useUnknownInCatchVariables": false,
Expand Down
6 changes: 0 additions & 6 deletions devservices/clickhouse/config.xml

This file was deleted.

282 changes: 0 additions & 282 deletions devservices/docker-compose-testing.yml

This file was deleted.

11 changes: 0 additions & 11 deletions devservices/symbolicator/config.yml

This file was deleted.

Loading

0 comments on commit 63fd30e

Please sign in to comment.