forked from mirrors/kingfisher
Fix changes in response to code review
This commit is contained in:
parent
f24f00d6bd
commit
43fce5159a
3 changed files with 18 additions and 18 deletions
|
|
@ -27,7 +27,7 @@ rules:
|
|||
(?xi)
|
||||
\b
|
||||
(
|
||||
(:?api|ondemand)\.(?:us|eu)-(?:west|east|central)-[0-9]\.saucelabs\.com
|
||||
(?:api|ondemand)\.(?:us|eu)-(?:west|east|central)-[0-9]\.saucelabs\.com
|
||||
)
|
||||
\b
|
||||
confidence: medium
|
||||
|
|
|
|||
30
src/main.rs
30
src/main.rs
|
|
@ -5,27 +5,27 @@
|
|||
// * Fallback - system allocator (`system-alloc` feature)
|
||||
// ────────────────────────────────────────────────────────────
|
||||
|
||||
// // --- jemalloc (opt-in) ---
|
||||
// #[cfg(feature = "use-jemalloc")]
|
||||
// #[global_allocator]
|
||||
// static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
|
||||
// --- jemalloc (opt-in) ---
|
||||
#[cfg(feature = "use-jemalloc")]
|
||||
#[global_allocator]
|
||||
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
|
||||
|
||||
// // --- mimalloc (default) ---
|
||||
// #[cfg(all(not(feature = "use-jemalloc"), not(feature = "system-alloc")))]
|
||||
// #[global_allocator]
|
||||
// static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||
|
||||
// // --- system allocator (explicit opt-out) ---
|
||||
// #[cfg(feature = "system-alloc")]
|
||||
// use std::alloc::System;
|
||||
// #[cfg(feature = "system-alloc")]
|
||||
// #[global_allocator]
|
||||
// static GLOBAL: System = System;
|
||||
// --- mimalloc (default) ---
|
||||
#[cfg(all(not(feature = "use-jemalloc"), not(feature = "system-alloc")))]
|
||||
#[global_allocator]
|
||||
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||
|
||||
// --- system allocator (explicit opt-out) ---
|
||||
#[cfg(feature = "system-alloc")]
|
||||
use std::alloc::System;
|
||||
#[cfg(feature = "system-alloc")]
|
||||
#[global_allocator]
|
||||
static GLOBAL: System = System;
|
||||
|
||||
// use std::alloc::System;
|
||||
// #[global_allocator]
|
||||
// static GLOBAL: System = System;
|
||||
|
||||
use std::{
|
||||
io::Read,
|
||||
sync::{Arc, Mutex},
|
||||
|
|
|
|||
|
|
@ -94,8 +94,8 @@ fn is_local_host(h: &str) -> bool {
|
|||
const FAST_CONNECT_MS: u64 = 700; // direct single-host URIs
|
||||
const FAST_SELECT_MS: u64 = 300;
|
||||
const SRV_PARSE_MS: u64 = 2_000; // limit DNS resolution time
|
||||
const SRV_CONNECT_MS: u64 = 2500; //700;
|
||||
const SRV_SELECT_MS: u64 = 2500; //300;
|
||||
const SRV_CONNECT_MS: u64 = 2500;
|
||||
const SRV_SELECT_MS: u64 = 2500;
|
||||
|
||||
/// Validates a MongoDB URI in ≤ 2 s. Returns `(bool, String)` where the
|
||||
/// boolean indicates success and the string provides a status message.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue