Skip to content

Conversation

@stefanosiano
Copy link
Member

📜 Description

Cpu usage in benchmark has now been converted by reading the /proc/self/stat/ file.
Updated devices used in Saucelabs for benchmarking.
Decreased acceptance threshold from 5.5% to 5%

#skip-changelog

💡 Motivation and Context

Previous approach was reading global cpu time to make comparisons.
New approach reads /proc/self/stat/ file, which returns the cpu time spent by the application only, giving more accurate results.
Also, the sustainedPerformanceMode has been enabled in the benchmarks, which prevents thermal throttling, increasing accuracy even more.

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • I updated the docs if needed
  • No breaking changes

🔮 Next steps

added sustained performance mode on profiling benchmarks, but not on sdk init
changed cpu time reading from Process.getElapsedCpuTime() to reading /proc/self/stat file
reverted threshold from 5.5% to 5%
@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2023

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 348.43 ms 398.37 ms 49.94 ms
Size 1.73 MiB 2.33 MiB 619.46 KiB

Previous results on branch: test/update-benchmark-device

Startup times

Revision Plain With Sentry Diff
2b4a65c 359.07 ms 399.76 ms 40.69 ms
faa106a 427.66 ms 432.25 ms 4.59 ms
b5825ba 332.64 ms 390.43 ms 57.79 ms

App size

Revision Plain With Sentry Diff
2b4a65c 1.73 MiB 2.33 MiB 619.47 KiB
faa106a 1.73 MiB 2.33 MiB 619.47 KiB
b5825ba 1.73 MiB 2.33 MiB 619.46 KiB

@codecov
Copy link

codecov bot commented Jan 16, 2023

Codecov Report

Base: 80.14% // Head: 80.14% // No change to project coverage 👍

Coverage data is based on head (1c9e0d1) compared to base (68dfbfd).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2473   +/-   ##
=========================================
  Coverage     80.14%   80.14%           
  Complexity     3872     3872           
=========================================
  Files           312      312           
  Lines         14669    14669           
  Branches       1941     1941           
=========================================
  Hits          11756    11756           
  Misses         2153     2153           
  Partials        760      760           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@romtsn romtsn left a comment

Choose a reason for hiding this comment

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

Great stuff, especially the sustainedPerformanceMode flag 🚀

…rk/src/androidTest/java/io/sentry/uitest/android/benchmark/util/BenchmarkComparisonResult.kt

Co-authored-by: Roman Zavarnitsyn <rom4ek93@gmail.com>
@stefanosiano stefanosiano merged commit 734e4a5 into main Jan 17, 2023
@stefanosiano stefanosiano deleted the test/update-benchmark-device branch January 17, 2023 09:00
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.

4 participants