Welcome! Please see the About page for a little more info on how this works.

0 votes
in test.check by

A generator for generating exponential values. I'm using this to generate queue latency values, to simulate out-of-order processing of events in some test.check specifications.

3 Answers

0 votes
by

Comment made by: eraserhd

Corrected exponential.diff (previous one missing parenthesis)

0 votes
by

Comment made by: eraserhd

user=> (require '[clojure.test.check.generators :as gen]) nil user=> (gen/sample (gen/exponential 1/500)) (2377.5877207475132 320.68681344358293 144.18262694905863 1422.342802626106 300.8014248144241 79.8053977813952 36.18465309993865 93.65252446233575 806.4125368253829 37.88916712893676) user=> (gen/sample (gen/exponential 1/500)) (61.431732383617884 93.51860239112023 557.6183626329674 57.553819177701584 60.4171805107351 7.152938152340775 31.84874217796871 215.71248467032976 470.69904975577214 222.89410284392252) user=> (gen/sample (gen/exponential 1/500)) (231.68194071961852 74.5153426725424 135.57104449489148 48.2988483633354 566.3041916582175 925.9673009296939 169.65855270732143 914.1156710720605 1445.3554035600935 674.1395344157389) user=> (gen/sample (gen/exponential 1/500)) (1467.6817487657213 1084.3796561112276 444.15866332358667 491.2566970512585 737.2979791960513 92.05590733338545 341.58867531092477 254.66969942333122 1150.8085459403007 111.21710097838688)

0 votes
by
Reference: https://clojure.atlassian.net/browse/TCHECK-71 (reported by eraserhd)
...