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: Make it possible to build and run without jemalloc available #127

Merged
merged 1 commit into from
Mar 22, 2023

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
3 participants