Repository navigation
Run the cases with only the environment variables the configuration keeps - #6
Merged
Merged
Conversation
…eeps The environment is on the stack of the counted process, so variables that differ from run to run, such as the branch name in CI, moved its memory layout and the counts of benchmarks whose allocations depend on it: 3,000 more bytes of environment moved phpstan-src's FileCacheStorageBench::benchSave@entries-10000 by 1 % of instructions and 8 % of cycles. withEnvironmentVariables() lists the variables the workers keep, PATH, HOME, TMPDIR, LANG, LC_ALL, PHPRC, and PHP_INI_SCAN_DIR by default. Amp-Thread-ID: https://ampcode.com/threads/T-01a1d73a-bab0-7223-9245-50c2c00f22c7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The environment is on the stack of the counted process, so variables that differ from run to run, such as
GITHUB_HEAD_REFin CI, moved its memory layout and with it the counts of benchmarks whose allocations depend on it. In phpstan-src, 3,000 more bytes of environment movedFileCacheStorageBench::benchSave@entries-10000from 18.69M to 18.88M instructions and from 30.0M to 32.5M cycles.Configuration::withEnvironmentVariables(list<string>)lists the variables the workers keep;tally runleaves out the others and addsVALGRIND_LIB. The default isPATH,HOME,TMPDIR,LANG,LC_ALL,PHPRC, andPHP_INI_SCAN_DIR.With this branch installed in phpstan-src, the same benchmark counts 18,474,371 instructions with 0, 3,000, and 9,000 bytes of extra environment.