Skip to content

Faster tests by reducing the size of lists#1759

Merged
kailuowang merged 2 commits intotypelevel:masterfrom
peterneyens:faster-tests-smaller-lists
Jul 7, 2017
Merged

Faster tests by reducing the size of lists#1759
kailuowang merged 2 commits intotypelevel:masterfrom
peterneyens:faster-tests-smaller-lists

Conversation

@peterneyens
Copy link
Collaborator

(Partial) fix for #1757.

This doesn't help to speed up the associativity laws in CokleisliTests (or not very much).


{
// Ceremony to help scalac to do the right thing, see also #267.
type CokleisliNEL[A, B] = Cokleisli[NonEmptyList, A, B]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, α, α]]]))
Copy link
Collaborator Author

@peterneyens peterneyens Jul 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping minSuccessful as it is set in CatsSuite only seems to add around half a second to the total test time of WriterTTests.

Copy link
Collaborator Author

@peterneyens peterneyens Jul 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reducing minSuccessful would reduce the time for CokleisliTests:

  • 50, around 1m20s (now, default value CatsSuite for JVM)
  • 25, around 50s
  • 20, around 30s

Opinions?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

20 sounds safe enough to me. 1m is a big difference for people who wants to work on cokleisli.

@codecov-io
Copy link

codecov-io commented Jul 6, 2017

Codecov Report

Merging #1759 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1759   +/-   ##
=======================================
  Coverage   94.17%   94.17%           
=======================================
  Files         256      256           
  Lines        4208     4208           
  Branches       93       93           
=======================================
  Hits         3963     3963           
  Misses        245      245

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d642013...e8354c0. Read the comment docs.

@kailuowang
Copy link
Contributor

kailuowang commented Jul 6, 2017

looks like it reduced the build time by about 5-10 min. Thanks so much @peterneyens

Copy link
Contributor

@edmundnoble edmundnoble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So many times, yes

@kailuowang kailuowang merged commit 099e459 into typelevel:master Jul 7, 2017
@kailuowang kailuowang added this to the 1.0.0-MF milestone Jul 7, 2017
@peterneyens peterneyens deleted the faster-tests-smaller-lists branch July 7, 2017 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments