Gizra / drupal-elm-starter

DEPRECATED - See https://github.com/Gizra/drupal-starter
33 stars 9 forks source link

WebTestCase performance optimization #171

Closed AronNovak closed 6 years ago

AronNovak commented 7 years ago

will fix #170

Status

merely the patch is there

Todo

check with real tests, check if any further steps are needed

amitaibu commented 7 years ago

Note:

The thing is opt-in. You will need to put --cache for the test runner for that to work.

AronNovak commented 7 years ago

0.3/4h

What's left:

amitaibu commented 7 years ago

add a basic Simpletest into the Hedley group

You can run core's tests

AronNovak commented 7 years ago

Actually there are tests in the Hedley group: image

That's likely a good opportunity to fix (or drop) these tests (in another PR).

bitamar commented 7 years ago

I think I added these tests. I'll have a look.

AronNovak commented 7 years ago

Local performance test on SimpleTest group: image without the --cache option.

image with the --cache option.

image with the --cache and --cache-modules option.

so the final execution time is 77% of the original one at localhost. Maybe in the cloud, with worse IO, the benefit is even greater, going to check soon.

AronNovak commented 7 years ago

image

So the same three cases are being tested right now in the cloud.

bitamar commented 7 years ago

The Hedley tests should be passing with #174

AronNovak commented 7 years ago

Test results from Travis with SimpleTest test case (Hedley is not meaningful with only one test):

no caching

https://travis-ci.org/Gizra/drupal-elm-starter/jobs/283675496

 > Starting SimpleTest tests 
Thu Oct  5 13:01:16 UTC 2017
> Finished SimpleTest tests 
Thu Oct  5 13:03:22 UTC 2017

Total time: 126 seconds (100%)

--cache option

https://travis-ci.org/Gizra/drupal-elm-starter/jobs/283674325

> Starting SimpleTest tests 
Thu Oct  5 12:48:20 UTC 2017

 > Finished SimpleTest tests 
Thu Oct  5 12:49:45 UTC 2017

Total time: 85 seconds (67%)

--cache --cache-modules options

https://travis-ci.org/Gizra/drupal-elm-starter/jobs/283674971

> Starting SimpleTest tests 
Thu Oct  5 12:57:20 UTC 2017
 > Finished SimpleTest tests 
Thu Oct  5 12:58:40 UTC 2017

Total time: 61 seconds (48%)

That's impressive, I must say.

AronNovak commented 6 years ago

I think it"s ready for review, and then, ready to propagate to all projects with non-trivial SimpleTest coverage (where there's only one single test case, like at Hedley group here, it does not help actually).

amitaibu commented 6 years ago

👍 MWG