mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 10:45:30 +00:00
aquatic_udp_load_test: set core affinities
This commit is contained in:
parent
2c4f4a32da
commit
53ccedc194
4 changed files with 41 additions and 1 deletions
|
|
@ -27,6 +27,7 @@ pub struct Config {
|
|||
pub duration: usize,
|
||||
pub network: NetworkConfig,
|
||||
pub handler: HandlerConfig,
|
||||
pub core_affinity: CoreAffinityConfig,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
|
|
@ -96,6 +97,13 @@ pub struct HandlerConfig {
|
|||
pub additional_request_factor: f64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[serde(default)]
|
||||
pub struct CoreAffinityConfig {
|
||||
/// Set core affinities, descending from last core
|
||||
pub set_affinities: bool,
|
||||
}
|
||||
|
||||
impl Default for Config {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
|
|
@ -105,6 +113,7 @@ impl Default for Config {
|
|||
duration: 0,
|
||||
network: NetworkConfig::default(),
|
||||
handler: HandlerConfig::default(),
|
||||
core_affinity: CoreAffinityConfig::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -183,3 +192,11 @@ pub struct SocketWorkerLocalStatistics {
|
|||
pub responses_scrape: usize,
|
||||
pub responses_error: usize,
|
||||
}
|
||||
|
||||
impl Default for CoreAffinityConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
set_affinities: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue