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

Allow benchmark shm-directory to use env-var #28

Merged
merged 1 commit into from
Dec 25, 2024

Conversation

mwsis
Copy link
Contributor

@mwsis mwsis commented Dec 19, 2024

Added derive_shm_path() in benches/synchronizer.rs to allow override of default shared-mem directory (for platforms where that doesn't work out of the box)

Cloned onto a macOS box - actually two: one AMD and one Intel , with different versions of OS - and both experience same issue, which I drilled down to not having access into /dev/shm (under user account). This change allows a user to define environment variable "MMAPSYNC_BM_ROOTDIR" to specify a custom benchmark root directory.

Attempted to keep as succinct as surrounding code, while prompting if custom dir is wrong. Feel free to rip apart as you see fit. (Or, possibly, explain my misapprehension in the case where this change is not solving a real problem.)

HTH

Added `derive_shm_path()` in benches/synchronizer.rs to allow
override of default shared-mem directory (for platforms where
that doesn't work out of the box)
@bocharov
Copy link
Contributor

LGTM.

cc @austinhartzheim for review.

@austinhartzheim austinhartzheim merged commit e6911ea into cloudflare:main Dec 25, 2024
3 of 4 checks passed
@austinhartzheim
Copy link
Collaborator

Merged. Thanks for the contribution.

We use cargo fmt for code formatting. I'll apply these style changes in a separate commit.

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.

3 participants