Skip to content

Conversation

@hassila
Copy link
Contributor

@hassila hassila commented Mar 22, 2023

Description

Some platforms doesn't have jemalloc available and it'd be nice to be able to use benchmark without the malloc counters there.

Fixes #15
and
Fixes #60 (sort of)

To run test suite on macOS without crash you can now use:
BENCHMARK_DISABLE_JEMALLOC=1 swift test

To run benchmarks without jemalloc installed:

BENCHMARK_DISABLE_JEMALLOC=1 swift package benchmark

How Has This Been Tested?

Manually tested with jemalloc installed/uninstalled.

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

@github-actions
Copy link
Contributor

@hassila hassila merged commit 93b8ae9 into main Mar 22, 2023
@hassila hassila deleted the optional-jemalloc branch March 22, 2023 16:45
@github-actions
Copy link
Contributor

🎉 This PR is included in version 1.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀


if let disableJemalloc, disableJemalloc != "false", disableJemalloc != "0" {
package.targets += [
.target(
Copy link
Contributor

Choose a reason for hiding this comment

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

Factor out common parts of this target?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will file issue for it and fix next time around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

swift test failing locally due to (FB12061292) Evaluate if we can add an additional target that allows for benchmarking without installing jemalloc

4 participants