server module¶
- class panco.descriptor.server.Server(service_curve: List[RateLatency], max_service_curve: List[TokenBucket], regulator=0)¶
Bases:
object
The Server class encodes the description of a server, characterized by:
a (minimal) service curve \(\beta(t) = \max_i(R_i(t-T_i)_+)\)
a greedy shaping curve \(\gamma(t) = \min_i (\sigma_i + \rho_i t)\)
- Parameters:
service_curve (List[RateLatency]) – the service curve, given by a maximum of the rate-latency functions \(\beta\).
max_service_curve (List[TokenBucket]) – the maximum curve, given by a minimum of the token-bucket functions \(\gamma\)
regulator – is the server followed by a regulator? (0=no, 1=per-flow regulator, 2=interleaved regulator).
Default=0 :type regulator: int
>>> Server([RateLatency(10, 1), RateLatency(20, 2)], [TokenBucket(5, 20), TokenBucket(0, 30)]) <Server: β(t) = max [10(t - 1)_+, 20(t - 2)_+] σ(t) = min [5 + 20t, 0 + 30t]>
- property is_constant_rate: bool¶