You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is already done; but, a note here is required.
I've executed close to 700 specs in under 1.8s using mspec as-is today. That is not slow - in terms of all other BDD test runners I've used in the past (Java, C#, NodeJS, Ruby, Python, etc).
But, it is slow in regards to Go! Especially when compared to raw unit testing of Go.
To prove this, I've added a number of benchmarks already to compare mspec to normal Go tests. The results are:
Focus on the last 4. You can see that mspec as it stands today is about 220x slower on simple tests, and about 90x slower on more complex unit tests written in raw Go tests.
That's not too bad, considering you still can run a 1000 specs in under 2 seconds. Also, remember you can make Go even faster by specifying which test to run like go test -run Test_Registration. But it's fast enough.
These benchmarks were written to set a baseline before the refactoring. That way, during refactoring to using channels and goroutines, we can see if there are any regressions.
I predict a number of regressions (since we'll be adding a lot more objects for the GC, more context, and optional runners) for simple tests. But, if creating complex specs with multiple Whens and multiple Thens, it should be a significant speed up with the built-in channels we'll have.
The text was updated successfully, but these errors were encountered:
eduncan911
changed the title
Benchmarking: Ensure it runs faster than before
Refactoring: Benchmarking: Ensure it runs faster than before the refactoring
Jun 23, 2016
This is already done; but, a note here is required.
I've executed close to 700 specs in under 1.8s using
mspec
as-is today. That is not slow - in terms of all other BDD test runners I've used in the past (Java, C#, NodeJS, Ruby, Python, etc).But, it is slow in regards to Go! Especially when compared to raw unit testing of Go.
To prove this, I've added a number of benchmarks already to compare
mspec
to normal Go tests. The results are:Focus on the last 4. You can see that
mspec
as it stands today is about 220x slower on simple tests, and about 90x slower on more complex unit tests written in raw Go tests.That's not too bad, considering you still can run a 1000 specs in under 2 seconds. Also, remember you can make Go even faster by specifying which test to run like
go test -run Test_Registration
. But it's fast enough.These benchmarks were written to set a baseline before the refactoring. That way, during refactoring to using channels and goroutines, we can see if there are any regressions.
I predict a number of regressions (since we'll be adding a lot more objects for the GC, more context, and optional runners) for simple tests. But, if creating complex specs with multiple Whens and multiple Thens, it should be a significant speed up with the built-in channels we'll have.
See #4 for more details.
The text was updated successfully, but these errors were encountered: