Skip to content

Commit

Permalink
windsock: Fix cloud metrics for kafka+redis (#1461)
Browse files Browse the repository at this point in the history
Co-authored-by: Conor <conor.brosnan@instaclustr.com>
  • Loading branch information
rukai and conorbros authored Feb 8, 2024
1 parent 5bea9e9 commit 8142031
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
11 changes: 10 additions & 1 deletion shotover-proxy/benches/windsock/kafka/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,21 @@ impl Bench for KafkaBench {
let shotover_ip = shotover_instance
.as_ref()
.map(|x| x.instance.private_ip().to_string());
let shotover_connect_ip = match self.topology {
KafkaTopology::Single => kafka_instances
.first()
.as_ref()
.map(|x| x.instance.connect_ip().to_string()),
KafkaTopology::Cluster1 | KafkaTopology::Cluster3 => shotover_instance
.as_ref()
.map(|x| x.instance.connect_ip().to_string()),
};

let mut profiler = CloudProfilerRunner::new(
self.name(),
profiling,
profiler_instances,
&Some(kafka_ip.clone()),
&shotover_connect_ip,
)
.await;

Expand Down
15 changes: 11 additions & 4 deletions shotover-proxy/benches/windsock/redis/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,17 @@ impl Bench for RedisBench {
let shotover_ip = shotover_instance
.as_ref()
.map(|x| x.instance.private_ip().to_string());

let mut profiler =
CloudProfilerRunner::new(self.name(), profiling, profiler_instances, &shotover_ip)
.await;
let shotover_connect_ip = shotover_instance
.as_ref()
.map(|x| x.instance.connect_ip().to_string());

let mut profiler = CloudProfilerRunner::new(
self.name(),
profiling,
profiler_instances,
&shotover_connect_ip,
)
.await;

let (_, running_shotover) = futures::join!(
redis_instances.run(self.encryption),
Expand Down

0 comments on commit 8142031

Please sign in to comment.