-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Support for Distributions in Templated Workloads (#385)
PR adds support for various Numerical Distributions in templated benchmarks - Uniform - Binomial - Zipfian - Scrambled The distributions work not only for integers, but also different types such as timestamps, long, float A table of supported combinations can be found in the templated benchmarks readme. | Type | uniform | binomial | zipfian | scrambled (zipfian) | |---|:---:|:---:|:---:|:---:| | INTEGER | X | X | X | X | | FLOAT / REAL | X | X|- | - | | BIGINT | X | X | X | X | | VARCHAR / STRING | X | -| -| -| | TIMESTAMP | X | X |X |X | | DATE | X | X| X| X| | TIME | X |X | X| X| Usage example: ```xml <templates> <template name="MyTemplate"> <query><![CDATA[SELECT * FROM MyTable WHERE id = ?]]></query> <types> <type>INTEGER</type> </types> <values> <value dist="uniform" min="0" max="1000" seed="1"/> </values> <values> <value dist="zipf" min="1" max="1000" seed="2"/> </values> </template> <!-- ... --> <templates> ``` This PR is not a breaking change - One can still use a static value in the templated queries. `<value>10</value>` In the future, I could see a breaking change that adds the datatype directly to the values so the TemplatedValue can do the type handling directly. `<value dist="uniform" type="integer">`. This would make type checking easier and remove the need to store the original min/max values as strings for all datatypes. --------- Co-authored-by: Brian Kroth <[email protected]>
- Loading branch information
1 parent
9837d67
commit cc2cfa5
Showing
15 changed files
with
971 additions
and
124 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.