VBBKM6HE733RJEQ62OGEAOJEYOR3JOG53MCEQJLARBPTKTHJIGPQC
5JXDREUOXZRCIBYRD6225USUZRFYR2JDBTBTQUTRDMQTFEMSXZQQC
XJJ6HCY4AYXPWPAGUQEKY2XNPEDV36H6OJKYRPKXC2BIASCLCSMAC
VEN5WJYRT23IT77JAAZ5CJRSW3GUTTNMAECT3WVTHQA34HI4646AC
F2QYIRKBFYFWSTB7Z5CNGSZVYI6XQO3MHPUHJLBHPGLIOG7UNVNQC
IA2CJ4HDSST6MPDLX2FVE2ZZR7EP5O6AIAUFGZIMWJ6NODVMKOKAC
S4ZGOQWXROCH5YEQSTPDBHBZINIBIYSEIXD2YOB2N3QORQUD746AC
AIF5IVL7B5S2X3N4RLS6GNKUCASQZPOH6NCVGECUFHQ5ZUJVDU6QC
VCTIMI5CEMFTOMDWYI7S2ZKSFN5XYUXH4GBAIKSEZ2N3SBLSH26QC
#!/bin/sh
export RUN_DIR="/tmp/tmp.4y3mPdtiZB-tmpdir"
./target/release/histdb-rs server -c "${RUN_DIR}/cache" -d "${RUN_DIR}/datadir" -s "${RUN_DIR}/socket"
pub fn bench(socket_path: PathBuf) -> Result<(), Error> {
let client = client::new(socket_path);
let mut start = CommandStart {
command: "test".to_string(),
hostname: "test_hostname".to_string(),
pwd: PathBuf::from("/tmp/test_pwd"),
session_id: Uuid::new_v4(),
time_stamp: Utc::now(),
user: "test_user".to_string(),
};
let mut finished = CommandFinished {
session_id: start.session_id.clone(),
time_stamp: Utc::now(),
result: 0,
};
loop {
start.time_stamp = Utc::now();
let message = Message::CommandStart(start.clone());
client.send(&message).expect("ignore");
finished.time_stamp = Utc::now();
let message = Message::CommandFinished(finished.clone());
client.send(&message).expect("ignore");
}
}