csle_collector.client_manager.threads package
Submodules
csle_collector.client_manager.threads.arrival_thread module
- class csle_collector.client_manager.threads.arrival_thread.ArrivalThread(time_step_len_seconds: float, clients: List[Client], workflows_config: WorkflowsConfig)[source]
Bases:
Thread
Thread that generates client arrivals (starts client threads according to a Poisson process)
- static constant_poisson_rate(arrival_config: ConstantArrivalConfig) float [source]
Function that returns the rate of a stationary Poisson process
- Parameters
arrival_config – the arrival process configuration
- Returns
the rate
- static eptmp_rate(t: int, arrival_config: EPTMPArrivalConfig) float [source]
Function that returns the rate of a EPTMP Poisson process.
EPTMP or Exponential-Polynomial-Trigonometric rate function having Multiple Periodicities. This class is used for creating a rate function that can exhibit both global trends as well as periodic components with individual frequencies and amplitudes. (Kuhl and Wilson, 1995)
- Parameters
t – the time-step
arrival_config – the arrival process configuration
- Returns
the rate
- static piece_wise_constant_rate(t: int, arrival_config: PieceWiseConstantArrivalConfig) float [source]
Function that returns the rate of a piece-wise constant Poisson process
- Parameters
t – the time-step
arrival_config – the arrival process configuration
- Returns
the rate
- run() None [source]
Runs the arrival generator, generates new clients dynamically according to a Poisson process
- Returns
None
- static sine_modulated_poisson_rate(t: int, arrival_config: SineArrivalConfig) float [source]
Function that returns the rate of a sine-modulated Poisson process
- Parameters
t – the time-step
arrival_config – the arrival process configuration
- Returns
the rate
- static spiking_poisson_arrival_rate(t: int, arrival_config: SpikingArrivalConfig) float [source]
Function that returns the rate of a spiking Poisson process
- Parameters
t – the time-step
arrival_config – the arrival process configuration
- Returns
the rate
csle_collector.client_manager.threads.client_thread module
csle_collector.client_manager.threads.producer_thread module
- class csle_collector.client_manager.threads.producer_thread.ProducerThread(arrival_thread: ArrivalThread, time_step_len_seconds: int, ip: str, port: int)[source]
Bases:
Thread
Thread that pushes statistics to Kafka