Skip to content

Commit

Permalink
updated memcached hashes to updated version, updated parse_memcached_…
Browse files Browse the repository at this point in the history
…output to fit new version
  • Loading branch information
zmckevitt committed Mar 12, 2024
1 parent a486aec commit 481ead0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 51 deletions.
51 changes: 2 additions & 49 deletions kernel/testutils/src/memcached.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,56 +61,9 @@ pub fn parse_memcached_output(p: &mut PtySession, num_threads: usize, output: &
*output += prev.as_str();
*output += matched.as_str();


// number of keys: 131072
let (prev, matched) = p.exp_regex(r#"Prefilling slabs"#)?;
println!("> {}", matched);

*output += prev.as_str();
*output += matched.as_str();


// number of keys: 131072
let (prev, matched) = p.exp_regex(r#"Prefilling slabs took (\d+) ms"#)?;
println!("> {}", matched);

*output += prev.as_str();
*output += matched.as_str();

// there could be some reordering happening here with the prints, so we account for all of them.
for i in 0..(2* num_threads + 1) {
let (prev, matched) = p.exp_regex(r#"(thread.(\d+) start running|starting all (\d+) threads|starting thread (\d+) / (\d+))"#)?;
println!("> {}", matched);

*output += prev.as_str();
*output += matched.as_str();
}

for i in 0..num_threads {
let (prev, matched) = p.exp_regex(r#"populate: thread.(\d+) done. added (\d+) elements, (\d+) not added of which (\d+) already existed"#)?;
println!("> {}", matched);
*output += prev.as_str();
*output += matched.as_str();
}

let (prev, matched) = p.exp_regex(r#"Executing (\d+) queries with (\d+) threads."#)?;
println!("> {}", matched);

for i in 0..num_threads {
let (prev, matched) = p.exp_regex(r#"execute: thread.(\d+) startes executing with connection "#)?;
println!("> {}", matched);
*output += prev.as_str();
*output += matched.as_str();
}

for i in 0..num_threads {
let (prev, matched) = p.exp_regex(r#"execute: thread.(\d+) done. executed (\d+) found (\d+), missed (\d+)"#)?;
println!("> {}", matched);
*output += prev.as_str();
*output += matched.as_str();
}


// benchmark took 129 seconds
let (prev, matched) = p.exp_regex(r#"benchmark took (\d+) ms"#)?;
println!("> {}", matched);
Expand Down Expand Up @@ -192,12 +145,12 @@ pub fn rackscale_memcached_checkout(tmpdir: &str) {
}

println!(
"CHECKOUT 2c521ec573da7cad604670dde3c9c369dba01f75 {:?}",
"CHECKOUT 0a4f217105d994d2ce438464041546ab4f4c4b2c {:?}",
out_dir
);

let res = Command::new("git")
.args(&["checkout", "2c521ec573da7cad604670dde3c9c369dba01f75"])
.args(&["checkout", "0a4f217105d994d2ce438464041546ab4f4c4b2c"])
.current_dir(out_dir_path.as_path())
.output()
.expect("git checkout failed");
Expand Down
4 changes: 2 additions & 2 deletions usr/rkapps/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ fn main() {
.unwrap();

println!(
"CHECKOUT 1386c46c25d74eabc255c76184aaccd1eb985768 {:?}",
"CHECKOUT 161e05606915fb9a29c8387db8702e16f85b8806 {:?}",
out_dir
);
Command::new("git")
.args(&["checkout", "1386c46c25d74eabc255c76184aaccd1eb985768"])
.args(&["checkout", "161e05606915fb9a29c8387db8702e16f85b8806"])
.current_dir(&Path::new(&out_dir))
.status()
.unwrap();
Expand Down

0 comments on commit 481ead0

Please sign in to comment.