This commit re-implements the benchmark tool, doing a lot of refactoring and
speeding up things, while reducing memory usage. Some notes:
1. The `testkey` subcommand was removed. This was needed because it makes no
sense to have it with data types like lists. I'll leave support for creating
test data for another PR (if at all needed)
2. The bench tool now uses lesser memory "in a go." Previously, all the get,
set and update packets were generated in one single step. This is no longer
done. Instead, we generate the packets for one type, run its corresponding
tests and completely deallocate and cleanup once we're done with that test.
This helps alleviate memory usage.
3. Instead of going in the sequence (GET, SET, UPDATE, ...) and running that
set some n times, we now run each test n times, and repeat that for the other
tests. The advantage of this is code clarity.
4. Finally, more validation checks were added ensuring that the benchmark tool
very closely resembles a "real-life" scenario wherein a connection is picked up
from a pool by a thread, a task run-on and evaluated.
5. Better logging and error reporting: instead of vaguely crashing, the
benchmark tool provides more clarity on errors. However, panics in worker
threads are yet to be improved in terms of reporting.
For some spurious reason, the tree test is failing on the M1
builder; so we'll hack around by ignoring the test when run
on the M1 CI. Note to self: the test runs successfully on
a physical M1 machine so it is likely that this is a problem
with the runner.
All deps except for `clap` has been upgraded. Due to the removal of
the `args` field in `ArgMatches` in v3, and our dependence on the
field, we cannot upgrade to the latest version.
A PR has been created and once it is merged or a workaround
suggested, we can upgrade. (see clap-rs/clap#3265)