Skip to content
This repository was archived by the owner on Jul 17, 2025. It is now read-only.

Commit 671e1b3

Browse files
committed
tests: adding missing match function to sharded memcached test
Signed-off-by: Reto Achermann <[email protected]>
1 parent 67d5fed commit 671e1b3

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

kernel/tests/s11_rackscale_benchmarks.rs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -984,6 +984,37 @@ fn rackscale_memcached_benchmark_sharded(is_shmem: bool) {
984984
spawn_loadbalancer(config, timeout_ms)
985985
}
986986

987+
fn controller_match_fn(
988+
proc: &mut PtySession,
989+
output: &mut String,
990+
cores_per_client: usize,
991+
num_clients: usize,
992+
file_name: &str,
993+
is_baseline: bool,
994+
arg: Option<MemcachedShardedConfig>,
995+
) -> Result<()> {
996+
let mut csv_file = OpenOptions::new()
997+
.append(true)
998+
.create(true)
999+
.open(file_name)
1000+
.expect("Can't open file");
1001+
1002+
let mut output = String::new();
1003+
let res = parse_memcached_output(proc, &mut output);
1004+
1005+
let r = csv_file.write(format!("{},", env!("GIT_HASH")).as_bytes());
1006+
assert!(r.is_ok());
1007+
let out = format!(
1008+
"memcached_sharded,nros,{},{},{},{},{},{}\n",
1009+
res.b_threads, "tcp", res.b_mem, res.b_queries, res.b_time, res.b_thpt,
1010+
);
1011+
let r = csv_file.write(out.as_bytes());
1012+
assert!(r.is_ok());
1013+
1014+
println!("{:?}", res);
1015+
Ok(())
1016+
}
1017+
9871018
// fn client_match_fn(
9881019
// proc: &mut PtySession,
9891020
// output: &mut String,

0 commit comments

Comments
 (0)