Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(metrics): Add timing API #3812

Merged
merged 5 commits into from Apr 4, 2024
Merged

feat(metrics): Add timing API #3812

merged 5 commits into from Apr 4, 2024

Conversation

philipphofmann
Copy link
Member

馃摐 Description

Add the timing API to measure the duration of a closure.

馃挕 Motivation and Context

Part of #3790.

馃挌 How did you test it?

Unit tests and with a simulator. Here is an example in Sentry https://sentry-sdks.sentry.io/performance/sentry-cocoa:94a719e3ebbe444fac10279e60795f3c/#span-0af24f27f2674bef.

馃摑 Checklist

You have to check all boxes before merging:

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

馃敭 Next steps

Add the timing API to measure the duration of a closure.
Copy link

github-actions bot commented Apr 2, 2024

Messages
馃摉 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 馃毇 dangerJS against 7e691d7

Copy link

codecov bot commented Apr 2, 2024

Codecov Report

Attention: Patch coverage is 96.63866% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 90.890%. Comparing base (5e769dd) to head (7e691d7).

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #3812       +/-   ##
=============================================
- Coverage   90.947%   90.890%   -0.058%     
=============================================
  Files          560       560               
  Lines        44186     44281       +95     
  Branches     15764     15812       +48     
=============================================
+ Hits         40186     40247       +61     
+ Misses        3930      3854       -76     
- Partials        70       180      +110     
Files Coverage 螖
Sources/Swift/Metrics/SentryMetricsAPI.swift 100.000% <100.000%> (酶)
Sources/Sentry/SentryHub.m 98.516% <75.000%> (-0.297%) 猬囷笍
...tryTests/Swift/Metrics/SentryMetricsAPITests.swift 97.385% <96.739%> (-2.615%) 猬囷笍

... and 32 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update 5e769dd...7e691d7. Read the comment docs.

Copy link

github-actions bot commented Apr 2, 2024

Performance metrics 馃殌

Plain With Sentry Diff
Startup time 1221.38 ms 1246.28 ms 24.90 ms
Size 21.58 KiB 573.16 KiB 551.58 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
e84bc3f 1257.08 ms 1267.41 ms 10.33 ms
e1cd9e9 1203.93 ms 1239.12 ms 35.19 ms
32e64d1 1224.45 ms 1238.94 ms 14.49 ms
be2977c 1202.51 ms 1221.32 ms 18.81 ms
8c8654d 1214.43 ms 1223.88 ms 9.45 ms
db533ee 1228.96 ms 1248.23 ms 19.28 ms
3f366ee 1242.28 ms 1260.80 ms 18.52 ms
4654f66 1247.16 ms 1263.96 ms 16.80 ms
189b629 1250.64 ms 1261.02 ms 10.38 ms
d10ae0c 1250.02 ms 1253.74 ms 3.72 ms

App size

Revision Plain With Sentry Diff
e84bc3f 20.76 KiB 434.72 KiB 413.96 KiB
e1cd9e9 22.85 KiB 412.95 KiB 390.10 KiB
32e64d1 20.76 KiB 433.18 KiB 412.42 KiB
be2977c 22.85 KiB 407.67 KiB 384.83 KiB
8c8654d 22.84 KiB 403.18 KiB 380.33 KiB
db533ee 21.58 KiB 547.02 KiB 525.44 KiB
3f366ee 20.76 KiB 427.84 KiB 407.08 KiB
4654f66 20.76 KiB 432.17 KiB 411.41 KiB
189b629 20.76 KiB 399.69 KiB 378.93 KiB
d10ae0c 20.76 KiB 419.86 KiB 399.10 KiB

Previous results on branch: feat/metrics-timing

Startup times

Revision Plain With Sentry Diff
7b94ee8 1337.94 ms 1362.88 ms 24.94 ms

App size

Revision Plain With Sentry Diff
7b94ee8 21.58 KiB 574.29 KiB 552.71 KiB

Copy link
Contributor

@brustolin brustolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@philipphofmann philipphofmann merged commit c83ffd9 into main Apr 4, 2024
68 of 70 checks passed
@philipphofmann philipphofmann deleted the feat/metrics-timing branch April 4, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants