Skip to content

Commit cdb4c07

Browse files
committed
except internal
1 parent b09a460 commit cdb4c07

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

lib/api/src/grpc/qdrant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9887,7 +9887,7 @@ pub struct QueryBatchResponseInternal {
98879887
#[prost(double, tag = "2")]
98889888
pub time: f64,
98899889
#[prost(message, optional, tag = "5")]
9890-
pub usage: ::core::option::Option<Usage>,
9890+
pub usage: ::core::option::Option<HardwareUsage>,
98919891
}
98929892
#[derive(serde::Serialize)]
98939893
#[derive(validator::Validate)]

lib/collection/src/shards/remote_shard.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,9 +1201,7 @@ impl ShardOperation for RemoteShard {
12011201
} = batch_response;
12021202

12031203
if let Some(hw_usage) = usage {
1204-
if let Some(hardware) = hw_usage.hardware {
1205-
hw_measurement_acc.accumulate_request(hardware);
1206-
}
1204+
hw_measurement_acc.accumulate_request(hw_usage);
12071205
}
12081206

12091207
let result = results

src/tonic/api/points_internal_api.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use std::str::FromStr;
33
use std::sync::Arc;
44
use std::time::{Duration, Instant};
55

6+
use api::grpc::HardwareUsage;
67
use api::grpc::qdrant::points_internal_server::PointsInternal;
78
use api::grpc::qdrant::{
89
ClearPayloadPointsInternal, CoreSearchBatchPointsInternal, CountPointsInternal, CountResponse,
@@ -15,7 +16,6 @@ use api::grpc::qdrant::{
1516
SyncPointsInternal, UpdateBatchInternal, UpdateVectorsInternal, UpsertPointsInternal,
1617
};
1718
use api::grpc::update_operation::Update;
18-
use api::grpc::{HardwareUsage, Usage};
1919
use collection::operations::shard_selector_internal::ShardSelectorInternal;
2020
use collection::operations::universal_query::shard_query::ShardQueryRequest;
2121
use collection::shards::shard::ShardId;
@@ -375,9 +375,7 @@ pub async fn query_batch_internal(
375375
})
376376
.collect(),
377377
time: timing.elapsed().as_secs_f64(),
378-
usage: Option::from(Usage {
379-
hardware: request_hw_data.to_grpc_api(),
380-
}),
378+
usage: request_hw_data.to_grpc_api(),
381379
};
382380

383381
Ok(Response::new(response))

0 commit comments

Comments
 (0)