Skip to content

Commit

Permalink
feat: Store load test run
Browse files Browse the repository at this point in the history
Allows the monitor to wait until the run starts and share the run id with the load test script.
  • Loading branch information
bmtcril committed Mar 25, 2024
1 parent 60368ec commit a996385
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ def get_kafka_bus_stats(self):
"partitions": [],
}

total_lag = 0

for partition in committed:
# Get the partitions low and high watermark offsets.
low, high = consumer.get_watermark_offsets(
Expand All @@ -311,6 +313,7 @@ def get_kafka_bus_stats(self):
lag = high - partition.offset

log.info(f"{partition.topic} [{partition.partition}] Lag: {lag}")
total_lag += lag

consumer_stats["partitions"].append(
{
Expand All @@ -320,6 +323,7 @@ def get_kafka_bus_stats(self):
)

consumer.close()
consumer_stats["lag"] = total_lag
return consumer_stats

def _call_vector_graphql(self):
Expand Down Expand Up @@ -375,6 +379,7 @@ def get_vector_stats(self):
)
return rtn


class Command(BaseCommand):
"""
Dump objects to a ClickHouse instance.
Expand Down

0 comments on commit a996385

Please sign in to comment.