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

Rust based benchmarks & Tests #8

Open
koraa opened this issue Mar 1, 2020 · 0 comments
Open

Rust based benchmarks & Tests #8

koraa opened this issue Mar 1, 2020 · 0 comments

Comments

@koraa
Copy link
Owner

koraa commented Mar 1, 2020

Requirments

  • The benchmarks should be entirely written in rust.

  • The benchmarks should be portable and not rely on the presence of platform defined dictionary files.

  • The benchmarks should have the ability to be run with specific parameters

    1. Number of input lines
    2. Fraction of duplicates
    3. Distribution of input line length
    4. Char set (binary/text)
  • The benchmarks should still be able to run against all the preexisting commands (sort|uniq).

Design

A CLI application should be written that produces a set of random tokens according to the parameters specified on the CLI:

genbench --charset ascii/binary --delim CHAR --number NUM --duplicates PERCENTAGE --short LEN --long LEN

The short/long parameters each indicate the 90% percentile of string lengths, using a gaussian distribution.

For the actual benchmark we should write a benchmark executor that runs each of the implementations with a variety of parameters handed to genbench.

Tests

We can reuse the same strategy for testing by generating test data with genbench and then comparing the output of the full huniq and a super naive, unoptimized huniq implementation. We should specifically make sure, that buffer growing is tested (supply some very long, >20kb strings).

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

No branches or pull requests

1 participant