Skip to content

Commit cdfcdb2

Browse files
committed
Refactor: move HardwareUsage to the Usage map
1 parent 0b061a3 commit cdfcdb2

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/tonic/api/points_internal_api.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,9 @@ pub async fn query_batch_internal(
375375
})
376376
.collect(),
377377
time: timing.elapsed().as_secs_f64(),
378-
usage: request_hw_data.to_grpc_api(),
378+
usage: Option::from(Usage {
379+
hardware: request_hw_data.to_grpc_api(),
380+
}),
379381
};
380382

381383
Ok(Response::new(response))
@@ -423,7 +425,9 @@ async fn facet_counts_internal(
423425
let response = FacetResponseInternal {
424426
hits: hits.into_iter().map(From::from).collect_vec(),
425427
time: timing.elapsed().as_secs_f64(),
426-
usage: request_hw_data.to_grpc_api(),
428+
usage: Option::from(Usage {
429+
hardware: request_hw_data.to_grpc_api(),
430+
}),
427431
};
428432

429433
Ok(Response::new(response))

0 commit comments

Comments
 (0)