Skip to content

Commit

Permalink
chore: add log about presign elapsed (#14990)
Browse files Browse the repository at this point in the history
* add log about presign elapsed

* update
  • Loading branch information
flaneur2020 authored Mar 19, 2024
1 parent ed740cb commit 9b47de7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/query/service/src/interpreters/interpreter_presign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use databend_common_expression::Value;
use databend_common_storages_stage::StageTable;
use jsonb::Value as JsonbValue;
use log::debug;
use log::info;

use crate::interpreters::Interpreter;
use crate::pipelines::PipelineBuildResult;
Expand Down Expand Up @@ -66,6 +67,7 @@ impl Interpreter for PresignInterpreter {
));
}

let start_time = std::time::Instant::now();
let presigned_req = match self.plan.action {
PresignAction::Download => op.presign_read(&self.plan.path, self.plan.expire).await?,
PresignAction::Upload => {
Expand All @@ -76,6 +78,10 @@ impl Interpreter for PresignInterpreter {
fut.await?
}
};
info!(
"query_id" = self.ctx.get_id();
"presign {:?} {} success in {}ms", self.plan.action, self.plan.path, start_time.elapsed().as_millis()
);

let header = JsonbValue::Object(
presigned_req
Expand Down

0 comments on commit 9b47de7

Please sign in to comment.