1
+ use core_affinity:: CoreId ;
1
2
use serde:: Deserialize ;
2
3
use std:: fmt:: Display ;
3
- use core_affinity:: CoreId ;
4
4
5
5
pub mod worker;
6
6
7
7
/// Main workload configuration, contains general bits for all types of
8
8
/// workloads plus workload specific data.
9
9
#[ derive( Debug , Copy , Clone , Deserialize ) ]
10
10
pub struct WorkloadConfig {
11
-
12
11
/// An amount of time for workload payload to run before restarting.
13
12
pub restart_interval : u64 ,
14
13
@@ -21,18 +20,15 @@ pub struct WorkloadConfig {
21
20
#[ derive( Debug , Copy , Clone , Deserialize ) ]
22
21
#[ serde( rename_all = "lowercase" , tag = "type" ) ]
23
22
pub enum Workload {
24
-
25
23
/// How to listen on ports.
26
24
Endpoints {
27
-
28
25
/// Governing the number of ports open.
29
26
#[ serde( flatten) ]
30
27
distribution : Distribution ,
31
28
} ,
32
29
33
30
/// How to spawn processes.
34
31
Processes {
35
-
36
32
/// How often a new process will be spawn.
37
33
arrival_rate : f64 ,
38
34
@@ -45,7 +41,6 @@ pub enum Workload {
45
41
46
42
/// How to invoke syscalls
47
43
Syscalls {
48
-
49
44
/// How often to invoke a syscall.
50
45
arrival_rate : f64 ,
51
46
} ,
@@ -55,7 +50,6 @@ pub enum Workload {
55
50
#[ derive( Debug , Copy , Clone , Deserialize ) ]
56
51
#[ serde( tag = "distribution" ) ]
57
52
pub enum Distribution {
58
-
59
53
/// Few processes are opening large number of ports, the rest are only few.
60
54
#[ serde( alias = "zipf" ) ]
61
55
Zipfian { n_ports : u64 , exponent : f64 } ,
0 commit comments