update scripts

This commit is contained in:
abbycin 2025-08-27 15:32:15 +08:00
parent ba6af2402e
commit 82f454d7ca
Signed by: abby
GPG Key ID: B636E0F0307EF8EB
5 changed files with 10 additions and 6 deletions

View File

@ -217,7 +217,7 @@ impl Logger {
self.abort_on_error.load(Relaxed)
}
fn lock(&self) -> MutexGuard<()> {
fn lock(&'_ self) -> MutexGuard<'_, ()> {
self.mtx_shard[get_tid() as usize & (self.mtx_shard.len() - 1)]
.lock()
.unwrap()

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
python3 -m venv .
./bin/pip3 install pandas matplotlib
./bin/pip3 install pandas matplotlib adjustText

View File

@ -34,7 +34,7 @@ function samples() {
done
}
echo mode,threads,key_size,value_size,insert_ratio,ops > scripts/mace.csv
echo mode,threads,key_size,value_size,insert_ratio,ops,elasped > scripts/mace.csv
samples 2>> scripts/mace.csv
popd
./bin/python plot.py mace.csv

View File

@ -35,7 +35,7 @@ function samples() {
done
}
echo mode,threads,key_size,value_size,insert_ratio,ops > ../scripts/rocksdb.csv
echo mode,threads,key_size,value_size,insert_ratio,ops,elapsed > ../scripts/rocksdb.csv
samples 1>> ../scripts/rocksdb.csv
popd
./bin/python plot.py rocksdb.csv

View File

@ -1,4 +1,5 @@
use clap::Parser;
#[cfg(target_os = "linux")]
use logger::Logger;
use mace::{Mace, Options};
use rand::prelude::*;
@ -36,8 +37,11 @@ struct Args {
}
fn main() {
Logger::init().add_file("/tmp/x.log", true);
log::set_max_level(log::LevelFilter::Debug);
#[cfg(target_os = "linux")]
{
Logger::init().add_file("/tmp/x.log", true);
log::set_max_level(log::LevelFilter::Info);
}
let args = Args::parse();
let path = Path::new(&args.path);