Skip to content

Commit

Permalink
Support reporting heap allocation counts
Browse files Browse the repository at this point in the history
Also bump the version to v0.8.0.
  • Loading branch information
tatsuya6502 committed Sep 5, 2022
1 parent 8fa1a31 commit bec3976
Show file tree
Hide file tree
Showing 8 changed files with 189 additions and 28 deletions.
11 changes: 9 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,26 @@
"CARGO_TARGET_DIR": "target/ra"
},
"cSpell.words": [
"actix",
"clippy",
"Dharmendra",
"Hasher",
"hashlink",
"itertools",
"jemalloc",
"jemallocator",
"Modha",
"moka",
"mokabench",
"msvc",
"oltp",
"thiserror",
"tikv",
"Toolchain",
"unsync"
"unsync",
"xxhash"
],
"files.watcherExclude": {
"**/target": true
}
}
}
65 changes: 56 additions & 9 deletions Cargo.lock

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

17 changes: 10 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mokabench"
version = "0.7.0"
version = "0.8.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand All @@ -20,6 +20,7 @@ async-io = "1.6.0"
async-trait = "0.1.53"
clap = "3.1.8"
crossbeam-channel = "0.5.5"
crossbeam-epoch = "0.9.10"
futures-util = "0.3.2"
itertools = "0.10.3"
parking_lot = "0.12.0"
Expand All @@ -28,17 +29,15 @@ xxhash-rust = { version = "0.8.5", features = ["xxh3"] }

hashlink = { optional = true, version = "0.8" }
quick_cache = { optional = true, version = "0.1" }
stretto = { optional = true, version = "0.6" }
stretto = { optional = true, version = "0.7" }

# actix-rt = "2"
# actix-rt = "1"
# async-std = "1"
tokio = { version = "1.17.0", features = ["rt-multi-thread", "macros" ] }
# Async Runtime
tokio = { version = "1.17.0", features = ["rt-multi-thread", "macros"] }

[dependencies.moka09]
package = "moka"
optional = true
# version = "0.9.3"
# version = "0.9"
git = "https://github.com/moka-rs/moka"
branch = "master"
features = ["future", "dash"]
Expand All @@ -49,6 +48,10 @@ optional = true
version = "0.8.6"
features = ["future", "dash"]

[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = "0.5.0"
tikv-jemalloc-ctl = "0.5.0"

[profile.release]
debug=true
# debug-assertions=true
Expand Down
2 changes: 2 additions & 0 deletions src/cache/hashlink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ use std::sync::Arc;
#[derive(Clone)]
pub struct HashLink {
config: Config,
// https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
#[allow(clippy::type_complexity)]
cache: Arc<Mutex<hashlink::LruCache<usize, (u32, Arc<[u8]>), DefaultHasher>>>,
}

Expand Down
2 changes: 2 additions & 0 deletions src/cache/quick_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ use std::sync::Arc;
#[derive(Clone)]
pub struct QuickCache {
config: Config,
// https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
#[allow(clippy::type_complexity)]
cache: Arc<::quick_cache::sync::Cache<usize, (u32, Arc<[u8]>), DefaultHasher>>,
}

Expand Down
2 changes: 2 additions & 0 deletions src/cache/stretto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ use std::sync::Arc;
#[derive(Clone)]
pub struct StrettoCache {
config: Config,
// https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
#[allow(clippy::type_complexity)]
cache: ::stretto::Cache<
usize,
(u32, Arc<[u8]>),
Expand Down
Loading

0 comments on commit bec3976

Please sign in to comment.