New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timing in 2.2.2 seems to be wrong #3331

Closed
torkiljohnsen opened this Issue Jul 12, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@torkiljohnsen
Contributor

torkiljohnsen commented Jul 12, 2016

The seconds taken on each test seem to be wrong. Codeception seems to think that 0.7 < 0.14, so I think perhaps sometimes 0.7 should be 0.07.

Here is an example:

Before I had some methods in my Cest's _before which were unnecessary. The tests were performing like this prior to the cleanup (names have been removed):

SuiteName Tests (5) --------------------------------------------------------------------------
✔ MyCest: Test 1 (0.17s)
✔ MyCest: Test 2 (0.14s)
✔ MyCest: Test 3 (0.13s)
✔ MyCest: Test 4 (0.13s)
✔ MyCest: Test 5 (0.13s)
---------------------------------------------------------------------------------------

Time: 945 ms, Memory: 20.00MB

After I cleaned up the _before method, the results look like this:

SuiteName Tests (5) --------------------------------------------------------------------------
✔ MyCest: Test 1 (0.10s)
✔ MyCest: Test 2 (0.7s)
✔ MyCest: Test 3 (0.7s)
✔ MyCest: Test 4 (0.7s)
✔ MyCest: Test 5 (0.7s)
---------------------------------------------------------------------------------------

Time: 644 ms, Memory: 20.00MB

The times vary of course, but on average a 300 ms improvement I would say.

The times for the individual tests are all wrong though. One would think that the tests had gotten faster, but no, they have gotten much slower! :) Codeception seems to think that 0.13 < 0.7, which is very weird to me ;)

Possibly related to #3262.

@torkiljohnsen

This comment has been minimized.

Show comment
Hide comment
@torkiljohnsen

torkiljohnsen Jul 12, 2016

Contributor

It might just be a simple decimal error… anything < 0.10 is missing a zero.

Contributor

torkiljohnsen commented Jul 12, 2016

It might just be a simple decimal error… anything < 0.10 is missing a zero.

@DavertMik DavertMik added the BUG label Jul 13, 2016

DavertMik added a commit that referenced this issue Jul 23, 2016

@DavertMik DavertMik closed this in 1e2181a Jul 23, 2016

DavertMik added a commit that referenced this issue Jul 24, 2016

Specify package requirements for module (#3366)
* fixed time calculation. Fixes #3331

* Added RequiresPackage interface and validation to check external package dependencies for modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment