[RNDSTROPPY-92]: pick/weighted, ENV(...) api, steps#51
Merged
Conversation
Closes RNDSTROPPY-92
Closes RNDSTROPPY-92
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.
Description of Changes
ENV()— typed environment variable accessorReplaces raw
__ENVaccess withENV(name, default, description). Supports aliases (array of names), typed defaults (string/number), and descriptions. Metadata is captured by probe for the new--envssection.NewPicker(seed)— weighted random selectionProvides
picker.pick(items)for uniform andpicker.pickWeighted(items, weights)for weighted selection. Used in newtpcc-pick.tsworkload for TPC-C transaction mix (44/43/4/4/4):--steps/--no-steps— step filteringSelect or exclude steps at run time without editing the script:
Step names are validated against probed steps; unknown names produce an error.
Probe section flags
probenow supports--config,--options,--sql,--steps,--envsto show individual sections. Examplestroppy probe tpcc --envs:Other changes
__ENVtoENV()drop_schemasplit into its own step in tpcb/tpccdefaultexporttpcc-pick.tsworkload (picker-based transaction mix)run-tpcc-pick-testMakefile targetMotivation and Context
Scripts needed a structured way to declare environment variables with defaults and documentation. Weighted random selection was needed for realistic TPC-C transaction mix. Step filtering allows partial re-runs (e.g. skip schema creation during development).
How Has This Been Tested?
make run-tpcc-pick-test,make run-tpcb-test,make run-simple-testType of Changes
Checklist