Crates.io | bitbelay-suites |
lib.rs | bitbelay-suites |
version | 0.1.0 |
source | src |
created_at | 2024-01-25 00:22:08.718728 |
updated_at | 2024-01-25 00:22:08.718728 |
description | Test suites for the `bitbelay` package ecosystem |
homepage | |
repository | https://github.com/claymcleod/bitbelay |
max_upload_size | |
id | 1113175 |
size | 83,893 |
A performance evaluation harness for non-cryptographic hash functions.
Request Feature
·
Report Bug
·
⭐ Consider starring the repo! ⭐
Bitbelay is a framework for testing the performance and desirable characteristics of non-cryptographic hashing functions. The project was given this name because (a) it is concerned with evaluating the characteristics of bits output from hash functions and (b) "belaying" evokes imagery of a (test) harness.
Bitbelay is designed somewhat differently than other popular hash testing frameworks [1]. For example, it does not a ship a single binary that is used to benchmark performance across multiple hash functions. Instead, it (a) is comprised of a family of crates that provide high-quality facilities for testing hash functions and (b) enables hash developers to easily wrap their hash functions in a command line tool for performance testing.
Command line tools are generally written and published containing the facilities for
characterizing an individual hash function. When publishing these on
crates.io or elsewhere, the convention is to name the crate and/or
associated command line tool as bitbelay-[HASHNAME]
(e.g., bitbelay-ahash
for
ahash
) so that it can be easily identified.
You can add bitbelay
as a dependency via the Github repository.
cargo add bitbelay
Next, you can use the bitbelay::cli::wrapper()
function to quickly wrap a hash
function of interest and produce a command-line tool for evaluating it. For this
example, we simply pull in Rust's d
use std::hash::RandomState;
pub fn main() -> anyhow::Result<()> {
bitbelay::cli::wrapper(RandomState::default())
}
You can also take a look at the examples to get a sense of the various ways you can use the crate.
To bootstrap a development environment, please use the following commands.
# Clone the repository
git clone git@github.com:claymcleod/bitbelay.git
cd bitbelay
# Build the crate in release mode
cargo build --release
# List out the examples
cargo run --release --example
Before submitting any pull requests, please make sure the code passes the following checks.
# Run the project's tests.
cargo test --all-features
# Ensure the project doesn't have any linting warnings.
cargo clippy --all-features
# Ensure the project passes `cargo fmt`.
cargo fmt --check
# Ensure the docs build successfully.
cargo doc
As bitbelay is pre-1.0, no MSRV is yet asserted.
Contributions, issues and feature requests are welcome! Feel free to check issues page.
This project is licensed as either Apache 2.0 or MIT at your discretion.
Copyright © 2024-Present Clay McLeod.