pub struct RuntimeCfg {
pub worker_threads: usize,
pub io_threads: usize,
pub time_threads: usize,
pub blocking_threads: usize,
pub enable_ebpf: bool,
pub enable_xsk: bool,
pub numa_aware: bool,
}Expand description
运行时线程模型与内核加速特性配置。
全标量字段(usize × 4 + bool × 3),按 AGENT.md §6.1.3 实现 Copy,
避免热路径上的 Clone 开销。
Fields§
§worker_threads: usize业务工作线程数。
io_threads: usizeI/O 轮询线程数。
time_threads: usize定时器轮询线程数。
blocking_threads: usize阻塞任务线程数。
enable_ebpf: bool是否启用 eBPF 加速。
enable_xsk: bool是否启用 XDP/AF_XDP 零拷贝。
numa_aware: bool是否启用 NUMA 感知内存分配。
Implementations§
Source§impl RuntimeConfig
impl RuntimeConfig
Trait Implementations§
Source§impl Clone for RuntimeConfig
impl Clone for RuntimeConfig
Source§fn clone(&self) -> RuntimeConfig
fn clone(&self) -> RuntimeConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RuntimeConfig
Source§impl Debug for RuntimeConfig
impl Debug for RuntimeConfig
Source§impl Default for RuntimeConfig
impl Default for RuntimeConfig
Source§fn default() -> RuntimeConfig
fn default() -> RuntimeConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RuntimeConfig
impl<'de> Deserialize<'de> for RuntimeConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RuntimeConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RuntimeConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for RuntimeConfig
impl Serialize for RuntimeConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for RuntimeConfig
impl RefUnwindSafe for RuntimeConfig
impl Send for RuntimeConfig
impl Sync for RuntimeConfig
impl Unpin for RuntimeConfig
impl UnsafeUnpin for RuntimeConfig
impl UnwindSafe for RuntimeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more