Add file based data generation options to db_bench #10395
Closed
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.
Currently, db_bench populates a data store's values with randomly generated strings. This change adds two new options for generating data:
In the case of File Random, the actual compression ratio will have a larger delta from the target compression ratio compared to the delta achieved in the original randomization scheme. This is because any window of characters in a file will likely be more repeatable than a randomly generated string of the same size. In the case of "File Direct", the target compression ratio be ignored entirely because of the need to remain as close the original file contents as possible.
In addition to the two new options mentioned above, a third option called Pure Random is provided. This option is nothing but the original randomization scheme. It is set as the default option.