sim-tests
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Ouroboros.Network.RateLimiting

Synopsis

Documentation

data Event Source #

To emulate environment we generate Events: we either receive a new connection, or one of the accepted connections is terminating.

DiffTime - a delay between consecutive events.

Instances

Instances details
Show Event Source # 
Instance details

Defined in Test.Ouroboros.Network.RateLimiting

Methods

showsPrecIntEventShowS #

showEventString #

showList ∷ [Event] → ShowS #

Eq Event Source # 
Instance details

Defined in Test.Ouroboros.Network.RateLimiting

Methods

(==)EventEventBool #

(/=)EventEventBool #

Ord Event Source # 
Instance details

Defined in Test.Ouroboros.Network.RateLimiting

Methods

compareEventEventOrdering #

(<)EventEventBool #

(<=)EventEventBool #

(>)EventEventBool #

(>=)EventEventBool #

maxEventEventEvent #

minEventEventEvent #

Arbitrary (Arb ([Event], AcceptedConnectionsLimit)) Source # 
Instance details

Defined in Test.Ouroboros.Network.RateLimiting

Arbitrary (Arb [Event]) Source # 
Instance details

Defined in Test.Ouroboros.Network.RateLimiting

Methods

arbitraryGen (Arb [Event]) Source #

shrinkArb [Event] → [Arb [Event]] Source #

newtype Arb a Source #

A newtype wrapper for Arbitrary instances.

Constructors

Arb 

Fields

Instances

Instances details
Arbitrary (Arb ([Event], AcceptedConnectionsLimit)) Source # 
Instance details

Defined in Test.Ouroboros.Network.RateLimiting

Arbitrary (Arb [Event]) Source # 
Instance details

Defined in Test.Ouroboros.Network.RateLimiting

Methods

arbitraryGen (Arb [Event]) Source #

shrinkArb [Event] → [Arb [Event]] Source #

Show a ⇒ Show (Arb a) Source # 
Instance details

Defined in Test.Ouroboros.Network.RateLimiting

Methods

showsPrecIntArb a → ShowS #

showArb a → String #

showList ∷ [Arb a] → ShowS #

Eq a ⇒ Eq (Arb a) Source # 
Instance details

Defined in Test.Ouroboros.Network.RateLimiting

Methods

(==)Arb a → Arb a → Bool #

(/=)Arb a → Arb a → Bool #

Ord a ⇒ Ord (Arb a) Source # 
Instance details

Defined in Test.Ouroboros.Network.RateLimiting

Methods

compareArb a → Arb a → Ordering #

(<)Arb a → Arb a → Bool #

(<=)Arb a → Arb a → Bool #

(>)Arb a → Arb a → Bool #

(>=)Arb a → Arb a → Bool #

maxArb a → Arb a → Arb a #

minArb a → Arb a → Arb a #

propRateLimit_NotExceedHardLimitArb ([Event], AcceptedConnectionsLimit) → Property Source #

We never should exceed the hard limit.

propRateLimit_SoftLimitDelayArb ([Event], AcceptedConnectionsLimit) → Property Source #

When above soft limit and below the hard limit, the delay should be between '0' and acceptedConnectionsDelay.

interprIntEventIntInt Source #