Skip to content

Commit

Permalink
update benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
TenStrings committed Jul 8, 2020
1 parent 2ae71f6 commit 134ea47
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions btree/benches/benchmark.rs
Expand Up @@ -5,7 +5,6 @@ use crate::rand::rngs::StdRng;
use crate::rand::Rng as _;
use crate::rand::SeedableRng;
use byteorder::{ByteOrder, LittleEndian};
use std::convert::TryInto;

static SEED: u64 = 11;

Expand Down Expand Up @@ -41,11 +40,10 @@ fn random_blob(rng: &mut impl rand::Rng) -> Box<[u8]> {
fn single_key_insertion(c: &mut Criterion) {
// TODO: Maybe create a temp file somehow?
let dir_path = "benchmark_single_key_insertion";
let key_size = std::mem::size_of::<U64Key>();
let page_size = 4096;

let tree: BTreeStore<U64Key> =
BTreeStore::new(dir_path, key_size.try_into().unwrap(), page_size).unwrap();
BTreeStore::new(dir_path, page_size).unwrap();

let n: u64 = 200_000;

Expand Down Expand Up @@ -78,11 +76,10 @@ fn single_key_insertion(c: &mut Criterion) {

fn single_key_search(c: &mut Criterion) {
let dir_path = "benchmark_single_key_search";
let key_size = std::mem::size_of::<U64Key>();
let page_size = 4096;

let tree: BTreeStore<U64Key> =
BTreeStore::new(dir_path, key_size.try_into().unwrap(), page_size).unwrap();
BTreeStore::new(dir_path, page_size).unwrap();

let n: u64 = 200_000;

Expand Down

0 comments on commit 134ea47

Please sign in to comment.