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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXP: energy monitoring #3187

Closed
wants to merge 50 commits into from
Closed

EXP: energy monitoring #3187

wants to merge 50 commits into from

Conversation

armcknight
Copy link
Member

Add more metric gathering in SentryBenchmarking. This is a combination of several disparate branches i had locally from various work in the past for metric profiling, benchmarking and now for the energy measurement investigation. I found it easiest to combine it all in a common pattern; we can leave measurements in SentryBenchmarking (which only compiles into the iOS-Swift sample app) unless/until we decide to release them to customers, then we can move them into the SDK.

Add a new tab to iOS-Swift for Profiling specific stuff. This allows manual starting/stopping of benchmarking, and test scenarios. The old benchmarking setup was removed in favor of this: it used to only run for a set duration on a VC load, which was a more fragile and finicky approach.

This branch contains some commits that will not be merged (enabling automatic codesigning to help on-device testing).

#skip-changelog

… thread each block runs on and the current cpu core usage breakdown during each
…k stats, also including cpu usage percentages per core
…ats as possible, deferring calculating diffs/results until later
@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

Merging #3187 (01df1ec) into main (ed68562) will increase coverage by 0.006%.
Report is 12 commits behind head on main.
The diff coverage is n/a.

❗ Current head 01df1ec differs from pull request most recent head 13abc18. Consider uploading reports for the commit 13abc18 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #3187       +/-   ##
=============================================
+ Coverage   89.191%   89.197%   +0.006%     
=============================================
  Files          502       502               
  Lines        54040     54053       +13     
  Branches     19395     19404        +9     
=============================================
+ Hits         48199     48214       +15     
+ Misses        4989      4987        -2     
  Partials       852       852               

see 8 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 ed68562...13abc18. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Jul 25, 2023

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1240.86 ms 1254.08 ms 13.22 ms
Size 22.84 KiB 403.24 KiB 380.40 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
7cd187e 1239.39 ms 1258.02 ms 18.63 ms
7fb7afb 1235.00 ms 1256.81 ms 21.81 ms
9d61bea 1243.88 ms 1254.36 ms 10.48 ms
4afae53 1217.65 ms 1229.27 ms 11.62 ms
630ddf4 1216.50 ms 1235.94 ms 19.44 ms
0dedab7 1221.26 ms 1235.34 ms 14.08 ms
fc163f5 1224.17 ms 1248.24 ms 24.08 ms
06548c0 1226.71 ms 1252.37 ms 25.66 ms
4d68229 1233.50 ms 1262.92 ms 29.42 ms
31208ed 1258.36 ms 1263.86 ms 5.50 ms

App size

Revision Plain With Sentry Diff
7cd187e 20.76 KiB 401.65 KiB 380.89 KiB
7fb7afb 20.76 KiB 419.69 KiB 398.94 KiB
9d61bea 20.76 KiB 436.29 KiB 415.53 KiB
4afae53 22.84 KiB 402.08 KiB 379.24 KiB
630ddf4 20.76 KiB 432.37 KiB 411.61 KiB
0dedab7 20.76 KiB 420.00 KiB 399.24 KiB
fc163f5 20.76 KiB 436.30 KiB 415.54 KiB
06548c0 20.76 KiB 427.36 KiB 406.59 KiB
4d68229 20.76 KiB 432.34 KiB 411.58 KiB
31208ed 20.76 KiB 435.26 KiB 414.50 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.

First look. For now I have one comment.
I don't like the idea of increasing the size of our samples with resources.
This PR adds some images and JSONs, and every user that uses Cocoapod or SPM will be getting all of that.

@armcknight
Copy link
Member Author

The huge diff is from some test fixtures i can remove, as they aren't needed anymore.

@armcknight
Copy link
Member Author

Closing this and will open a couple separate PRs with relevant things from it.

@armcknight armcknight closed this Aug 10, 2023
@armcknight armcknight deleted the armcknight/exp/energy-usage branch August 19, 2023 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants