Skip to content

Commit

Permalink
benchmarks now kinda working
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed Nov 1, 2024
1 parent 97d09b6 commit a96b81b
Show file tree
Hide file tree
Showing 4 changed files with 241 additions and 5 deletions.
215 changes: 215 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 19 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,31 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
name = "oxli"
crate-type = ["cdylib"]
crate-type = ["cdylib", "rlib"]
bench = false

[[bench]]
name = "consume"
harness = false

[dependencies]
anyhow = "1.0.91"
criterion = "0.5.1"
env_logger = "0.11.5"
log = "0.4.22"
niffler = "2.6.0"
pyo3 = { version="0.22.5", features = ["extension-module", "anyhow"] }
# pyo3 = { version="0.22.5", features = ["extension-module", "anyhow"] }
rayon = "1.10.0"
serde = { version = "1.0.213", features = ["derive"] }
serde_json = "1.0.132"
sourmash = "0.16.0"
sourmash = "0.16.0"

[dependencies.pyo3]
version = "0.22.5"

[features]
extension-module = ["pyo3/extension-module"]
anyhow = ["pyo3/anyhow"]

[profile.bench]
debug = true
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
PYTHON ?= python

all:
maturin develop
maturin develop --all-features

bench:
cargo bench --features anyhow

install:
$(PYTHON) -m pip install -e .
Expand Down
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// #![feature(test)]

// Standard library imports
use std::cmp::{max, Ord};
use std::collections::hash_map::IntoIter;
Expand Down Expand Up @@ -77,7 +79,7 @@ impl Hash for HashIntoType {
#[pyclass]
#[derive(Serialize, Deserialize, Debug)]
/// Basic KmerCountTable struct, mapping hashes to counts.
struct KmerCountTable {
pub struct KmerCountTable {
counts: HashMap<HashIntoType, u64>,
pub ksize: u8,
version: String,
Expand Down

0 comments on commit a96b81b

Please sign in to comment.