ordo-one / package-benchmark

Swift benchmark runner with many performance metrics and great CI support
Apache License 2.0
326 stars 25 forks source link

feat: Adding support for absolute thresholds #116

Closed hassila closed 1 year ago

hassila commented 1 year ago

Description

More API cleanup for release and a new feature:

Fixes #105

Fixes #107

Fixes #112

This is a source-breaking change as BenchmarkResult.PercentileThresholds have been refactored into BenchmarkThresholds with easier on the eyes usage sites.

How Has This Been Tested?

Manual testing

Minimal checklist:

github-actions[bot] commented 1 year ago

Pull request benchmark comparison [ubuntu-latest] with 'main' run at 2023-03-21T10:35:55+00:00 Pull request had performance regressions

codecov[bot] commented 1 year ago

Codecov Report

Merging #116 (d2e0de8) into main (f7d347b) will decrease coverage by 1.20%. The diff coverage is 30.86%.

Additional details and impacted files [![Impacted file tree graph](https://codecov.io/gh/ordo-one/package-benchmark/pull/116/graphs/tree.svg?width=650&height=150&src=pr&token=hXHmhEG1iF&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one)](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one) ```diff @@ Coverage Diff @@ ## main #116 +/- ## ========================================== - Coverage 77.63% 76.43% -1.20% ========================================== Files 20 22 +2 Lines 2392 2431 +39 ========================================== + Hits 1857 1858 +1 - Misses 535 573 +38 ``` | [Impacted Files](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one) | Coverage Δ | | |---|---|---| | [Sources/Benchmark/BenchmarkExecutor.swift](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one#diff-U291cmNlcy9CZW5jaG1hcmsvQmVuY2htYXJrRXhlY3V0b3Iuc3dpZnQ=) | `97.36% <ø> (-0.03%)` | :arrow_down: | | [Sources/Benchmark/Blackhole.swift](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one#diff-U291cmNlcy9CZW5jaG1hcmsvQmxhY2tob2xlLnN3aWZ0) | `100.00% <ø> (ø)` | | | [...ark/MallocStats/MallocStatsProducer+jemalloc.swift](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one#diff-U291cmNlcy9CZW5jaG1hcmsvTWFsbG9jU3RhdHMvTWFsbG9jU3RhdHNQcm9kdWNlcitqZW1hbGxvYy5zd2lmdA==) | `59.81% <ø> (ø)` | | | [Sources/BenchmarkSupport/Benchmark.swift](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one#diff-U291cmNlcy9CZW5jaG1hcmtTdXBwb3J0L0JlbmNobWFyay5zd2lmdA==) | `71.32% <ø> (ø)` | | | [Sources/BenchmarkSupport/Int+Extensions.swift](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one#diff-U291cmNlcy9CZW5jaG1hcmtTdXBwb3J0L0ludCtFeHRlbnNpb25zLnN3aWZ0) | `0.00% <0.00%> (ø)` | | | [Sources/BenchmarkSupport/BenchmarkResult.swift](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one#diff-U291cmNlcy9CZW5jaG1hcmtTdXBwb3J0L0JlbmNobWFya1Jlc3VsdC5zd2lmdA==) | `65.19% <2.38%> (-7.34%)` | :arrow_down: | | [...enchmarkSupport/BenchmarkThresholds+Defaults.swift](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one#diff-U291cmNlcy9CZW5jaG1hcmtTdXBwb3J0L0JlbmNobWFya1RocmVzaG9sZHMrRGVmYXVsdHMuc3dpZnQ=) | `32.14% <32.14%> (ø)` | | | [Sources/Benchmark/BenchmarkRunner.swift](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one#diff-U291cmNlcy9CZW5jaG1hcmsvQmVuY2htYXJrUnVubmVyLnN3aWZ0) | `58.59% <33.33%> (+2.34%)` | :arrow_up: | | [Sources/BenchmarkSupport/BenchmarkThresholds.swift](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one#diff-U291cmNlcy9CZW5jaG1hcmtTdXBwb3J0L0JlbmNobWFya1RocmVzaG9sZHMuc3dpZnQ=) | `100.00% <100.00%> (ø)` | | | [Tests/BenchmarkTests/BenchmarkResultTests.swift](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one#diff-VGVzdHMvQmVuY2htYXJrVGVzdHMvQmVuY2htYXJrUmVzdWx0VGVzdHMuc3dpZnQ=) | `100.00% <100.00%> (ø)` | | | [Impacted Files](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one) | Coverage Δ | | |---|---|---| | [Sources/Benchmark/BenchmarkExecutor.swift](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one#diff-U291cmNlcy9CZW5jaG1hcmsvQmVuY2htYXJrRXhlY3V0b3Iuc3dpZnQ=) | `97.36% <ø> (-0.03%)` | :arrow_down: | | [Sources/Benchmark/Blackhole.swift](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one#diff-U291cmNlcy9CZW5jaG1hcmsvQmxhY2tob2xlLnN3aWZ0) | `100.00% <ø> (ø)` | | | [...ark/MallocStats/MallocStatsProducer+jemalloc.swift](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one#diff-U291cmNlcy9CZW5jaG1hcmsvTWFsbG9jU3RhdHMvTWFsbG9jU3RhdHNQcm9kdWNlcitqZW1hbGxvYy5zd2lmdA==) | `59.81% <ø> (ø)` | | | [Sources/BenchmarkSupport/Benchmark.swift](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one#diff-U291cmNlcy9CZW5jaG1hcmtTdXBwb3J0L0JlbmNobWFyay5zd2lmdA==) | `71.32% <ø> (ø)` | | | [Sources/BenchmarkSupport/Int+Extensions.swift](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one#diff-U291cmNlcy9CZW5jaG1hcmtTdXBwb3J0L0ludCtFeHRlbnNpb25zLnN3aWZ0) | `0.00% <0.00%> (ø)` | | | [Sources/BenchmarkSupport/BenchmarkResult.swift](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one#diff-U291cmNlcy9CZW5jaG1hcmtTdXBwb3J0L0JlbmNobWFya1Jlc3VsdC5zd2lmdA==) | `65.19% <2.38%> (-7.34%)` | :arrow_down: | | [...enchmarkSupport/BenchmarkThresholds+Defaults.swift](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one#diff-U291cmNlcy9CZW5jaG1hcmtTdXBwb3J0L0JlbmNobWFya1RocmVzaG9sZHMrRGVmYXVsdHMuc3dpZnQ=) | `32.14% <32.14%> (ø)` | | | [Sources/Benchmark/BenchmarkRunner.swift](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one#diff-U291cmNlcy9CZW5jaG1hcmsvQmVuY2htYXJrUnVubmVyLnN3aWZ0) | `58.59% <33.33%> (+2.34%)` | :arrow_up: | | [Sources/BenchmarkSupport/BenchmarkThresholds.swift](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one#diff-U291cmNlcy9CZW5jaG1hcmtTdXBwb3J0L0JlbmNobWFya1RocmVzaG9sZHMuc3dpZnQ=) | `100.00% <100.00%> (ø)` | | | [Tests/BenchmarkTests/BenchmarkResultTests.swift](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one#diff-VGVzdHMvQmVuY2htYXJrVGVzdHMvQmVuY2htYXJrUmVzdWx0VGVzdHMuc3dpZnQ=) | `100.00% <100.00%> (ø)` | | ------ [Continue to review full report in Codecov by Sentry](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one). Last update [f7d347b...d2e0de8](https://codecov.io/gh/ordo-one/package-benchmark/pull/116?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ordo-one).