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

Commit fa5a6e9

Browse files
committed
tests: adding missing match function to sharded memcached test
Signed-off-by: Reto Achermann <achreto@gmail.com>
1 parent bf21ea1 commit fa5a6e9

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
@@ -985,6 +985,37 @@ fn rackscale_memcached_benchmark_sharded(is_shmem: bool) {
985985
spawn_loadbalancer(config, timeout_ms)
986986
}
987987

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

0 commit comments

Comments
 (0)