2024 Clojure调查问卷中分享您的想法!

欢迎!请查看关于页面以了解更多关于如何使用本站的信息。

0票数
test.check

用于生成指数值的生成器。我正在使用它来生成队列延迟值,以模拟某些test.check规范中事件的错序处理。

3 答案

0票数

由:eraserhd发表的评论

修正了exponential.diff(前一个缺少括号)

0票数

由: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票数
参考:https://clojure.atlassian.net/browse/TCHECK-71(由eraserhd 提出)
...