Re: test.check slow shrinking

2014-11-25 Thread Reid Draper
Short answer: Use a string generator that is much more likely to have collisions, and thus provoke your failure. Here's an example: (def small-strings (gen/sized (fn [s] (gen/resize (min s 2) (gen/not-empty gen/string-ascii) Longer answer: When using gen/bind, you create a nested shrink t

Re: test.check slow shrinking

2014-11-13 Thread Lucas Bradstreet
My thought process with that suggestion is that a shrink of the matrix elements (not the size), will not require the samples and probes to be regenerated. At some point I'll probably have to look into how the shrinking works. > On 13 Nov 2014, at 06:18, Brian Craft wrote: > > I tried your idea

Re: test.check slow shrinking

2014-11-12 Thread Brian Craft
I tried your idea of generating the size first, then passing it to the matrix & vector generators. This does seem to work better. The shrunk cases that return are actually worse, but so far it hasn't wedged itself, which is a great improvement. They all return within a few seconds. I don't yet

Re: test.check slow shrinking

2014-11-12 Thread Lucas Bradstreet
I'm pretty sure I did encounter the performance problem you're talking about, but I killed it and re-ran until I hit cases that shrink quickly. I'm afraid I'm not much help with those, although I agree that the bad shrinking is probably related to the performance issues. > On 13 Nov 2014, at 04

Re: test.check slow shrinking

2014-11-12 Thread Brian Craft
Interesting that you don't see a performance problem. What version did you try? I'm using 0.5.9. I just re-ran this example to make sure I wasn't imagining it. On the 11th run, it wedged, not returning, and burning a lot of cpu, presumably trying to shrink. It's a larger problem with the real

Re: test.check slow shrinking

2014-11-12 Thread Lucas Bradstreet
I've also had some tricky shrinking type issues with recursive generators using bind. I had a play with your generators, using such-that to reduce the row/column name length and also preventing some generator shrinking by using no-shrink, but I didn't have much luck improving the resulting shrin

test.check slow shrinking

2014-11-11 Thread Brian Craft
Using test.check, I'm finding the shrinking to be very, very slow. Running a hundred cases takes a few seconds, unless it hits an error, in which case it takes 40-60 minutes to shrink, and the shrinking is not very effective (resulting test case is much larger than necessary). Sometimes the shr