Skip to content

Commit 02d3781

Browse files
debug: log SUT metrics snapshots before export (#178)
1 parent 93e964a commit 02d3781

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/run_spicebench.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ jobs:
335335
--concurrency "${NUM_QUERY_CLIENTS}" \
336336
--scenario "${SCENARIO}" \
337337
--executor-instance-type "${EXECUTOR_INSTANCE_TYPE}" \
338+
--scrape-sut-metrics \
338339
${ETL_ARGS} \
339340
${ETL_SINK_ARGS} \
340341
${VALIDATION_ARGS} \

src/commands/load/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ fn run_metric_attributes(common_args: &CommonArgs) -> Vec<KeyValue> {
6060
)]
6161
}
6262

63+
fn log_sut_metrics_snapshot(response: &MetricsResponse) {
64+
tracing::debug!(
65+
resource = ?response.resource,
66+
ingestion = ?response.ingestion,
67+
"SUT metrics snapshot retrieved before export"
68+
);
69+
}
70+
6371
/// Record the latest SUT metrics snapshot on the given streaming instruments.
6472
#[expect(clippy::too_many_arguments)]
6573
fn record_sut_metrics(
@@ -155,6 +163,7 @@ fn spawn_sut_metrics_scraper(
155163
let metrics_result = adapter.lock().await.metrics(run_id).await;
156164
match metrics_result {
157165
Ok(resp) => {
166+
log_sut_metrics_snapshot(&resp);
158167
record_sut_metrics(
159168
&resp,
160169
&instruments,
@@ -175,6 +184,7 @@ fn spawn_sut_metrics_scraper(
175184
() = token.cancelled() => {
176185
// Final scrape before exiting
177186
if let Ok(resp) = adapter.lock().await.metrics(run_id).await {
187+
log_sut_metrics_snapshot(&resp);
178188
record_sut_metrics(
179189
&resp,
180190
&instruments,

0 commit comments

Comments
 (0)