fix: download too long logs (#638)

Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
Gaius 2024-07-31 00:35:54 +08:00 committed by GitHub
parent 20bac0f4ab
commit ef7a6df21a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 18 deletions

16
Cargo.lock generated
View File

@ -1118,7 +1118,7 @@ dependencies = [
[[package]] [[package]]
name = "dragonfly-client" name = "dragonfly-client"
version = "0.1.91" version = "0.1.92"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"blake3", "blake3",
@ -1188,7 +1188,7 @@ dependencies = [
[[package]] [[package]]
name = "dragonfly-client-backend" name = "dragonfly-client-backend"
version = "0.1.91" version = "0.1.92"
dependencies = [ dependencies = [
"dragonfly-api", "dragonfly-api",
"dragonfly-client-core", "dragonfly-client-core",
@ -1210,7 +1210,7 @@ dependencies = [
[[package]] [[package]]
name = "dragonfly-client-config" name = "dragonfly-client-config"
version = "0.1.91" version = "0.1.92"
dependencies = [ dependencies = [
"bytesize", "bytesize",
"bytesize-serde", "bytesize-serde",
@ -1231,7 +1231,7 @@ dependencies = [
[[package]] [[package]]
name = "dragonfly-client-core" name = "dragonfly-client-core"
version = "0.1.91" version = "0.1.92"
dependencies = [ dependencies = [
"hyper 1.4.0", "hyper 1.4.0",
"hyper-util", "hyper-util",
@ -1246,7 +1246,7 @@ dependencies = [
[[package]] [[package]]
name = "dragonfly-client-init" name = "dragonfly-client-init"
version = "0.1.91" version = "0.1.92"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"clap", "clap",
@ -1262,7 +1262,7 @@ dependencies = [
[[package]] [[package]]
name = "dragonfly-client-storage" name = "dragonfly-client-storage"
version = "0.1.91" version = "0.1.92"
dependencies = [ dependencies = [
"base16ct", "base16ct",
"blake3", "blake3",
@ -1286,7 +1286,7 @@ dependencies = [
[[package]] [[package]]
name = "dragonfly-client-util" name = "dragonfly-client-util"
version = "0.1.91" version = "0.1.92"
dependencies = [ dependencies = [
"base16ct", "base16ct",
"blake3", "blake3",
@ -1755,7 +1755,7 @@ dependencies = [
[[package]] [[package]]
name = "hdfs" name = "hdfs"
version = "0.1.91" version = "0.1.92"
dependencies = [ dependencies = [
"dragonfly-client-backend", "dragonfly-client-backend",
"dragonfly-client-core", "dragonfly-client-core",

View File

@ -12,7 +12,7 @@ members = [
] ]
[workspace.package] [workspace.package]
version = "0.1.91" version = "0.1.92"
authors = ["The Dragonfly Developers"] authors = ["The Dragonfly Developers"]
homepage = "https://d7y.io/" homepage = "https://d7y.io/"
repository = "https://github.com/dragonflyoss/client.git" repository = "https://github.com/dragonflyoss/client.git"
@ -22,13 +22,13 @@ readme = "README.md"
edition = "2021" edition = "2021"
[workspace.dependencies] [workspace.dependencies]
dragonfly-client = { path = "dragonfly-client", version = "0.1.91" } dragonfly-client = { path = "dragonfly-client", version = "0.1.92" }
dragonfly-client-core = { path = "dragonfly-client-core", version = "0.1.91" } dragonfly-client-core = { path = "dragonfly-client-core", version = "0.1.92" }
dragonfly-client-config = { path = "dragonfly-client-config", version = "0.1.91" } dragonfly-client-config = { path = "dragonfly-client-config", version = "0.1.92" }
dragonfly-client-storage = { path = "dragonfly-client-storage", version = "0.1.91" } dragonfly-client-storage = { path = "dragonfly-client-storage", version = "0.1.92" }
dragonfly-client-backend = { path = "dragonfly-client-backend", version = "0.1.91" } dragonfly-client-backend = { path = "dragonfly-client-backend", version = "0.1.92" }
dragonfly-client-util = { path = "dragonfly-client-util", version = "0.1.91" } dragonfly-client-util = { path = "dragonfly-client-util", version = "0.1.92" }
dragonfly-client-init = { path = "dragonfly-client-init", version = "0.1.91" } dragonfly-client-init = { path = "dragonfly-client-init", version = "0.1.92" }
thiserror = "1.0" thiserror = "1.0"
dragonfly-api = "2.0.141" dragonfly-api = "2.0.141"
reqwest = { version = "0.12.4", features = ["stream", "native-tls", "default-tls", "rustls-tls"] } reqwest = { version = "0.12.4", features = ["stream", "native-tls", "default-tls", "rustls-tls"] }

View File

@ -347,8 +347,8 @@ pub fn collect_upload_task_finished_metrics(
if task_size == TaskSize::Level1 && cost > UPLOAD_TASK_LEVEL1_DURATION_THRESHOLD { if task_size == TaskSize::Level1 && cost > UPLOAD_TASK_LEVEL1_DURATION_THRESHOLD {
warn!( warn!(
"upload task cost is too long: {}ms {}bytes", "upload task cost is too long: {}ms {}bytes",
cost.as_millis(),
content_length, content_length,
cost.as_millis()
); );
} }
@ -405,8 +405,8 @@ pub fn collect_download_task_finished_metrics(
if task_size == TaskSize::Level1 && cost > DOWNLOAD_TASK_LEVEL1_DURATION_THRESHOLD { if task_size == TaskSize::Level1 && cost > DOWNLOAD_TASK_LEVEL1_DURATION_THRESHOLD {
warn!( warn!(
"download task cost is too long: {}ms {}bytes", "download task cost is too long: {}ms {}bytes",
cost.as_millis(),
size, size,
cost.as_millis()
); );
} }