Faster tests by reducing the size of lists#1759
Conversation
|
|
||
| { | ||
| // Ceremony to help scalac to do the right thing, see also #267. | ||
| type CokleisliNEL[A, B] = Cokleisli[NonEmptyList, A, B] |
There was a problem hiding this comment.
We don't need this ceremony anymore.
| } | ||
| } | ||
| checkAll("Cokleisli[List, Int, Int]", SemigroupKTests[λ[α => Cokleisli[List, α, α]]].semigroupK[Int]) | ||
| checkAll("SemigroupK[λ[α => Cokleisli[List, α, α]]]", SerializableTests.serializable(SemigroupK[λ[α => Cokleisli[List, α, α]]])) |
There was a problem hiding this comment.
Cokleisli's SemigroupK instance just needs a CoflatMap[F] so I replaced NonEmptyList with List.
| // issues. | ||
| implicit override val generatorDrivenConfig: PropertyCheckConfiguration = | ||
| PropertyCheckConfiguration(minSuccessful = 20, sizeRange = 5) | ||
| checkConfiguration.copy(sizeRange = 5) |
There was a problem hiding this comment.
Keeping minSuccessful as it is set in CatsSuite only seems to add around half a second to the total test time of WriterTTests.
There was a problem hiding this comment.
Reducing minSuccessful would reduce the time for CokleisliTests:
- 50, around 1m20s (now, default value
CatsSuitefor JVM) - 25, around 50s
- 20, around 30s
Opinions?
There was a problem hiding this comment.
20 sounds safe enough to me. 1m is a big difference for people who wants to work on cokleisli.
Codecov Report
@@ Coverage Diff @@
## master #1759 +/- ##
=======================================
Coverage 94.17% 94.17%
=======================================
Files 256 256
Lines 4208 4208
Branches 93 93
=======================================
Hits 3963 3963
Misses 245 245Continue to review full report at Codecov.
|
|
looks like it reduced the build time by about 5-10 min. Thanks so much @peterneyens |
(Partial) fix for #1757.
This doesn't help to speed up the associativity laws in
CokleisliTests(or not very much).