update
This commit is contained in:
+4
-2
@@ -62,6 +62,8 @@ fn main() {
|
||||
let mut opt = Options::new(path);
|
||||
opt.sync_on_write = false;
|
||||
opt.tmp_store = true;
|
||||
// currently we don't have prefix encode, so enlarge the inline size to avoid indirection
|
||||
opt.max_inline_size = 4096;
|
||||
let db = Mace::new(opt.validate().unwrap()).unwrap();
|
||||
|
||||
let value = Arc::new(vec![b'0'; args.value_size]);
|
||||
@@ -70,7 +72,7 @@ fn main() {
|
||||
for i in 0..args.iterations {
|
||||
let key = format!("key_{tid}_{i}");
|
||||
let mut tmp = key.into_bytes();
|
||||
tmp.resize(args.key_size, 0);
|
||||
tmp.resize(args.key_size, b'x');
|
||||
let pre_tx = db.begin().unwrap();
|
||||
pre_tx.put(&tmp, &*value).unwrap();
|
||||
pre_tx.commit().unwrap();
|
||||
@@ -97,7 +99,7 @@ fn main() {
|
||||
for i in 0..args.iterations {
|
||||
let key = format!("key_{tid}_{i}");
|
||||
let mut tmp = key.into_bytes();
|
||||
tmp.resize(args.key_size, 0);
|
||||
tmp.resize(args.key_size, b'x');
|
||||
keys.push(tmp);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user