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

feat(minor): Add support for CI detection of absolute threshold improvements + signposts for Instruments #182

Merged
merged 19 commits into from
Sep 13, 2023

Conversation

hassila
Copy link
Contributor

@hassila hassila commented Sep 9, 2023

Description

Its desirable to be able to signal from CI if a threshold has been improved too and not only regressed, so we now return exit code 0 only for exact equal checks and 2 for regressions and 4 for improvements.

Added support for signposts (#183):

Added new objectAllocCount ARC stat counter and fixed the delta calculation to take initial refcount into account.

Also added support for returning setupState from the benchmark setup hooks, to allow access to state that can be reused per benchmark iteration.

image

How Has This Been Tested?

Manually tested + added unit test.

Minimal checklist:

  • I have performed a self-review of my own code
  • I have added DocC code-level documentation for any public interfaces exported by the package
  • I have added unit and/or integration tests that prove my fix is effective or that my feature works

@codecov
Copy link

codecov bot commented Sep 9, 2023

Codecov Report

Merging #182 (4277f37) into main (a1d88c6) will decrease coverage by 0.56%.
Report is 1 commits behind head on main.
The diff coverage is 77.47%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #182      +/-   ##
==========================================
- Coverage   71.70%   71.14%   -0.56%     
==========================================
  Files          27       29       +2     
  Lines        3551     3652     +101     
==========================================
+ Hits         2546     2598      +52     
- Misses       1005     1054      +49     
Files Changed Coverage Δ
.../Benchmark/Benchmark+ConvenienceInitializers.swift 0.00% <0.00%> (ø)
Sources/Benchmark/MallocStats/MallocStats.swift 100.00% <ø> (ø)
...rk/OperatingSystemStats/OperatingSystemStats.swift 100.00% <ø> (ø)
Sources/Benchmark/BenchmarkMetric+Defaults.swift 39.18% <33.33%> (+0.23%) ⬆️
Sources/Benchmark/NIOLock.swift 74.19% <60.00%> (ø)
Sources/Benchmark/ARCStats/ARCStatsProducer.swift 68.75% <62.50%> (+2.08%) ⬆️
Sources/Benchmark/Benchmark.swift 73.05% <71.43%> (ø)
Sources/Benchmark/BenchmarkMetric.swift 71.24% <75.00%> (-0.12%) ⬇️
Sources/Benchmark/BenchmarkRunner.swift 58.99% <75.00%> (-1.01%) ⬇️
...ark/MallocStats/MallocStatsProducer+jemalloc.swift 52.22% <83.33%> (-7.59%) ⬇️
... and 10 more
Files Changed Coverage Δ
.../Benchmark/Benchmark+ConvenienceInitializers.swift 0.00% <0.00%> (ø)
Sources/Benchmark/MallocStats/MallocStats.swift 100.00% <ø> (ø)
...rk/OperatingSystemStats/OperatingSystemStats.swift 100.00% <ø> (ø)
Sources/Benchmark/BenchmarkMetric+Defaults.swift 39.18% <33.33%> (+0.23%) ⬆️
Sources/Benchmark/NIOLock.swift 74.19% <60.00%> (ø)
Sources/Benchmark/ARCStats/ARCStatsProducer.swift 68.75% <62.50%> (+2.08%) ⬆️
Sources/Benchmark/Benchmark.swift 73.05% <71.43%> (ø)
Sources/Benchmark/BenchmarkMetric.swift 71.24% <75.00%> (-0.12%) ⬇️
Sources/Benchmark/BenchmarkRunner.swift 58.99% <75.00%> (-1.01%) ⬇️
...ark/MallocStats/MallocStatsProducer+jemalloc.swift 52.22% <83.33%> (-7.59%) ⬇️
... and 10 more

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 a1d88c6...4277f37. Read the comment docs.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2023

@hassila hassila changed the title feat(minor): Add support for CI detection of absolute threshold improvements feat(minor): Add support for CI detection of absolute threshold improvements + signposts for Instruments Sep 9, 2023
## Description

Delta for retain/release was misleading as initial retain count from alloc wasn't included, added new objectAllocCount metric.
Other refactoring/cleanup.

## How Has This Been Tested?

Manual testing + test suite.

## Minimal checklist:

- [x] I have performed a self-review of my own code 
- [ ] I have added `DocC` code-level documentation for any public
interfaces exported by the package
- [ ] I have added unit and/or integration tests that prove my fix is
effective or that my feature works
@hassila hassila requested a review from dimlio September 13, 2023 10:25
hassila and others added 4 commits September 13, 2023 19:52
Co-authored-by: dimlio <122263440+dimlio@users.noreply.github.com>
Co-authored-by: dimlio <122263440+dimlio@users.noreply.github.com>
@hassila hassila merged commit 1e3568b into main Sep 13, 2023
@hassila hassila deleted the support-failure-on-improvement branch December 20, 2023 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants