chore: remove dependency on "atty" (#7725)

Signed-off-by: luofucong <luofc@foxmail.com>
This commit is contained in:
LFC
2026-02-26 17:58:01 +08:00
committed by GitHub
parent 0c30bf1a10
commit 5eac4f10aa
16 changed files with 45 additions and 116 deletions

124
Cargo.lock generated
View File

@@ -954,17 +954,6 @@ version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
[[package]]
name = "atty"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
dependencies = [
"hermit-abi 0.1.19",
"libc",
"winapi",
]
[[package]]
name = "auth"
version = "1.0.0-rc.1"
@@ -1946,18 +1935,6 @@ dependencies = [
"libloading",
]
[[package]]
name = "clap"
version = "3.2.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123"
dependencies = [
"bitflags 1.3.2",
"clap_lex 0.2.4",
"indexmap 1.9.3",
"textwrap",
]
[[package]]
name = "clap"
version = "4.5.40"
@@ -1976,7 +1953,7 @@ checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e"
dependencies = [
"anstream",
"anstyle",
"clap_lex 0.7.5",
"clap_lex",
"strsim 0.11.1",
]
@@ -1992,15 +1969,6 @@ dependencies = [
"syn 2.0.114",
]
[[package]]
name = "clap_lex"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
dependencies = [
"os_str_bytes",
]
[[package]]
name = "clap_lex"
version = "0.7.5"
@@ -2018,7 +1986,7 @@ dependencies = [
"cache",
"catalog",
"chrono",
"clap 4.5.40",
"clap",
"client",
"common-base",
"common-catalog",
@@ -2146,7 +2114,7 @@ dependencies = [
"cache",
"catalog",
"chrono",
"clap 4.5.40",
"clap",
"cli",
"client",
"colored",
@@ -2530,7 +2498,7 @@ dependencies = [
"common-runtime",
"common-telemetry",
"common-time",
"criterion 0.4.0",
"criterion 0.7.0",
"dashmap",
"datatypes",
"flatbuffers",
@@ -2799,7 +2767,7 @@ name = "common-runtime"
version = "1.0.0-rc.1"
dependencies = [
"async-trait",
"clap 4.5.40",
"clap",
"common-error",
"common-macro",
"common-telemetry",
@@ -3244,34 +3212,6 @@ dependencies = [
"cfg-if",
]
[[package]]
name = "criterion"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7c76e09c1aae2bc52b3d2f29e13c6572553b30c4aa1b8a49fd70de6412654cb"
dependencies = [
"anes",
"atty",
"cast",
"ciborium",
"clap 3.2.25",
"criterion-plot 0.5.0",
"futures",
"itertools 0.10.5",
"lazy_static",
"num-traits",
"oorandom",
"plotters",
"rayon",
"regex",
"serde",
"serde_derive",
"serde_json",
"tinytemplate",
"tokio",
"walkdir",
]
[[package]]
name = "criterion"
version = "0.5.1"
@@ -3281,7 +3221,7 @@ dependencies = [
"anes",
"cast",
"ciborium",
"clap 4.5.40",
"clap",
"criterion-plot 0.5.0",
"is-terminal",
"itertools 0.10.5",
@@ -3307,7 +3247,7 @@ dependencies = [
"anes",
"cast",
"ciborium",
"clap 4.5.40",
"clap",
"criterion-plot 0.6.0",
"itertools 0.13.0",
"num-traits",
@@ -3318,6 +3258,7 @@ dependencies = [
"serde",
"serde_json",
"tinytemplate",
"tokio",
"walkdir",
]
@@ -3495,7 +3436,7 @@ version = "1.0.190"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1f29a879d35f7906e3c9b77d7a1005a6a0787d330c09dfe4ffb5f617728cb44"
dependencies = [
"clap 4.5.40",
"clap",
"codespan-reporting 0.13.1",
"indexmap 2.12.0",
"proc-macro2",
@@ -6003,15 +5944,6 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hermit-abi"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
dependencies = [
"libc",
]
[[package]]
name = "hermit-abi"
version = "0.5.2"
@@ -6576,7 +6508,7 @@ dependencies = [
"common-runtime",
"common-telemetry",
"common-test-util",
"criterion 0.4.0",
"criterion 0.7.0",
"datatypes",
"fastbloom",
"fst",
@@ -6662,7 +6594,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2094aecddc672e902cd773bad7071542f63641e01e9187c3bba4b43005e837e9"
dependencies = [
"ahash 0.8.12",
"clap 4.5.40",
"clap",
"crossbeam-channel",
"crossbeam-utils",
"dashmap",
@@ -6803,7 +6735,7 @@ version = "0.4.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9"
dependencies = [
"hermit-abi 0.5.2",
"hermit-abi",
"libc",
"windows-sys 0.52.0",
]
@@ -7865,7 +7797,7 @@ dependencies = [
"axum-macros",
"bytes",
"chrono",
"clap 4.5.40",
"clap",
"client",
"common-base",
"common-catalog",
@@ -7977,7 +7909,7 @@ dependencies = [
"common-test-util",
"common-time",
"common-wal",
"criterion 0.4.0",
"criterion 0.7.0",
"datafusion",
"datatypes",
"futures-util",
@@ -8110,7 +8042,7 @@ dependencies = [
"common-time",
"common-wal",
"crc32fast",
"criterion 0.4.0",
"criterion 0.7.0",
"crossbeam-utils",
"dashmap",
"datafusion",
@@ -8722,7 +8654,7 @@ version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b"
dependencies = [
"hermit-abi 0.5.2",
"hermit-abi",
"libc",
]
@@ -9293,12 +9225,6 @@ dependencies = [
"windows-sys 0.52.0",
]
[[package]]
name = "os_str_bytes"
version = "6.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1"
[[package]]
name = "otel-arrow-rust"
version = "0.1.0"
@@ -9498,7 +9424,7 @@ dependencies = [
"common-macro",
"common-meta",
"common-query",
"criterion 0.5.1",
"criterion 0.7.0",
"datafusion-common",
"datafusion-expr",
"datafusion-physical-expr",
@@ -9864,7 +9790,7 @@ dependencies = [
"common-runtime",
"common-telemetry",
"common-time",
"criterion 0.4.0",
"criterion 0.7.0",
"crossbeam-utils",
"csv",
"dashmap",
@@ -10005,7 +9931,7 @@ version = "1.0.0-rc.1"
dependencies = [
"auth",
"catalog",
"clap 4.5.40",
"clap",
"cli",
"common-base",
"common-error",
@@ -12756,7 +12682,7 @@ name = "sqlness-runner"
version = "1.0.0-rc.1"
dependencies = [
"async-trait",
"clap 4.5.40",
"clap",
"client",
"common-error",
"common-query",
@@ -13737,7 +13663,7 @@ dependencies = [
"cache",
"catalog",
"chrono",
"clap 4.5.40",
"clap",
"client",
"cmd",
"common-base",
@@ -13819,12 +13745,6 @@ dependencies = [
"zstd 0.13.3",
]
[[package]]
name = "textwrap"
version = "0.16.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057"
[[package]]
name = "thiserror"
version = "1.0.69"
@@ -15025,7 +14945,7 @@ dependencies = [
"chrono-tz",
"ciborium",
"cidr",
"clap 4.5.40",
"clap",
"codespan-reporting 0.12.0",
"community-id",
"convert_case 0.7.1",

View File

@@ -124,6 +124,7 @@ chrono-tz = { version = "0.10", features = ["case-insensitive"] }
clap = { version = "4.4", features = ["derive"] }
config = "0.13.0"
const_format = "0.2"
criterion = "0.7"
crossbeam-utils = "0.8"
dashmap = "6.1"
datafusion = "51.0"

View File

@@ -35,7 +35,7 @@ tower.workspace = true
vec1 = "1.12"
[dev-dependencies]
criterion = "0.4"
criterion.workspace = true
hyper-util = { workspace = true, features = ["tokio"] }
rand.workspace = true
tempfile.workspace = true

View File

@@ -27,7 +27,7 @@ snafu.workspace = true
tokio.workspace = true
[dev-dependencies]
criterion = "0.7.0"
criterion.workspace = true
tokio.workspace = true
[[bench]]

View File

@@ -49,7 +49,7 @@ uuid.workspace = true
[dev-dependencies]
common-test-util.workspace = true
criterion = "0.4"
criterion.workspace = true
rand.workspace = true
rand_chacha = "0.9"
tempfile.workspace = true

View File

@@ -48,7 +48,7 @@ common-meta = { workspace = true, features = ["testing"] }
common-test-util.workspace = true
mito2 = { workspace = true, features = ["test"] }
common-wal = { workspace = true }
criterion = { version = "0.4", features = ["async", "async_tokio"] }
criterion = { workspace = true, features = ["async", "async_tokio"] }
mur3 = "0.1"
common-function = { workspace = true }
partition = { workspace = true }

View File

@@ -13,8 +13,9 @@
// limitations under the License.
use std::hash::Hasher;
use std::hint::black_box;
use criterion::{Criterion, black_box, criterion_group, criterion_main};
use criterion::{Criterion, criterion_group, criterion_main};
use fxhash::FxHasher;
use mur3::Hasher128;

View File

@@ -92,7 +92,7 @@ uuid.workspace = true
common-function.workspace = true
common-meta = { workspace = true, features = ["testing"] }
common-test-util.workspace = true
criterion = { version = "0.4", features = ["async", "async_tokio"] }
criterion = { workspace = true, features = ["async", "async_tokio"] }
dotenv.workspace = true
log-store.workspace = true
mito-codec = { workspace = true, features = ["testing"] }

View File

@@ -12,7 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use criterion::{Criterion, black_box, criterion_group, criterion_main};
use std::hint::black_box;
use criterion::{Criterion, criterion_group, criterion_main};
use mito2::compaction::run::{
Item, Ranged, SortedRun, find_overlapping_items, find_sorted_runs, merge_seq_files, reduce_runs,
};

View File

@@ -12,10 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use std::hint::black_box;
use std::str::FromStr;
use std::sync::Arc;
use criterion::{Criterion, black_box, criterion_group, criterion_main};
use criterion::{Criterion, criterion_group, criterion_main};
use datatypes::arrow;
use datatypes::arrow::array::{ArrayRef, RecordBatch, TimestampMillisecondArray};
use datatypes::arrow::datatypes::{DataType, Field, Schema, TimeUnit};

View File

@@ -12,11 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use std::hint::black_box;
use std::sync::Arc;
use api::v1::value::ValueData;
use api::v1::{Mutation, OpType, Row, Rows, SemanticType};
use criterion::{Criterion, black_box, criterion_group, criterion_main};
use criterion::{Criterion, criterion_group, criterion_main};
use datatypes::data_type::ConcreteDataType;
use datatypes::schema::ColumnSchema;
use mito2::memtable::simple_bulk_memtable::SimpleBulkMemtable;

View File

@@ -30,7 +30,7 @@ store-api.workspace = true
table.workspace = true
[dev-dependencies]
criterion = "0.5"
criterion.workspace = true
rand = "0.8"
[[bench]]

View File

@@ -12,10 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use std::hint::black_box;
use std::sync::Arc;
use std::vec;
use criterion::{Criterion, black_box, criterion_group, criterion_main};
use criterion::{Criterion, criterion_group, criterion_main};
use datatypes::arrow::array::{ArrayRef, Int32Array, StringArray, TimestampMillisecondArray};
use datatypes::arrow::datatypes::{DataType, Field, Schema, TimeUnit};
use datatypes::arrow::record_batch::RecordBatch;

View File

@@ -65,7 +65,7 @@ yaml-rust = "0.4"
[dev-dependencies]
catalog = { workspace = true, features = ["testing"] }
criterion = { version = "0.4", features = ["html_reports"] }
criterion = { workspace = true, features = ["html_reports"] }
rayon = "1.0"
serde = { version = "1.0", features = ["derive"] }
session = { workspace = true, features = ["testing"] }

View File

@@ -12,9 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use std::hint::black_box;
use std::sync::Arc;
use criterion::{Criterion, black_box, criterion_group, criterion_main};
use criterion::{Criterion, criterion_group, criterion_main};
use pipeline::error::Result;
use pipeline::{Content, Pipeline, PipelineContext, SchemaInfo, parse, setup_pipeline};
use serde_json::Deserializer;

View File

@@ -13,8 +13,9 @@
// limitations under the License.
use std::collections::BTreeMap;
use std::hint::black_box;
use criterion::{Criterion, black_box, criterion_group, criterion_main};
use criterion::{Criterion, criterion_group, criterion_main};
use servers::error::Result;
use servers::http::loki::parse_loki_labels;