Commit 79ca222
test(profiling): stabilize Poisson sampling filter spec (#8659)
The `should cap endTime to now() if event endTime is in the future` test set
`nowValue = 1000`, which is only ~10x the samplingInterval of 100. The
filter's initial `nextSamplingInstant` is an exponential RV with mean 100, so
P(initial > 1000) = e^-10 ≈ 4.5e-5: the while loop in filter() would skip,
`currentSamplingInstant` would stay 0, and the first assertion would fail.
Raise `nowValue` to 100000 (P(initial > 100000) = e^-1000 ≈ 0). The
resetInterval still bounds the while loop to ~2 iterations, so the other
assertions remain tight.
Co-authored-by: Ruben Bridgewater <ruben@bridgewater.de>1 parent 3e1f5df commit 79ca222
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
135 | 139 | | |
136 | 140 | | |
137 | 141 | | |
| |||
0 commit comments