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

WebTestCase performance optimization #171

Merged
merged 13 commits into from Oct 10, 2017

Conversation

Projects
None yet
3 participants
@AronNovak
Member

AronNovak commented Oct 2, 2017

will fix #170

Status

merely the patch is there

Todo

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

@amitaibu

This comment has been minimized.

Member

amitaibu commented Oct 2, 2017

Note:

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

@AronNovak

This comment has been minimized.

Member

AronNovak commented Oct 2, 2017

0.3/4h

What's left:

  • add a basic Simpletest into the Hedley group
  • make sure Travis calls Simpletest correctly
  • check the benefit of the patch
@amitaibu

This comment has been minimized.

Member

amitaibu commented Oct 2, 2017

add a basic Simpletest into the Hedley group

You can run core's tests

export PATH="$HOME/.composer/vendor/bin:$PATH"
drush @server.local en simpletest -y
cd $ROOT_DIR/server
php ./www/scripts/run-tests.sh --cache --php $(which php) --concurrency 4 --verbose --color --url http://server.local Hedley 2>&1 | tee /tmp/simpletest-result.txt

This comment has been minimized.

@bitamar

bitamar Oct 2, 2017

Contributor

According to this comment: https://www.drupal.org/node/2759197#comment-11970372 , adding --cache-modules should save a lot of time

This comment has been minimized.

@AronNovak

AronNovak Oct 3, 2017

Member

Good point, i will apply it too afterwards everything is stable with one option.

@AronNovak

This comment has been minimized.

Member

AronNovak commented Oct 3, 2017

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

This comment has been minimized.

Contributor

bitamar commented Oct 3, 2017

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

@AronNovak

This comment has been minimized.

Member

AronNovak commented Oct 5, 2017

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

This comment has been minimized.

Member

AronNovak commented Oct 5, 2017

image

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

@bitamar

This comment has been minimized.

Contributor

bitamar commented Oct 5, 2017

The Hedley tests should be passing with #174

@AronNovak

This comment has been minimized.

Member

AronNovak commented Oct 5, 2017

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 added some commits Oct 5, 2017

Revert "ci-scripts/docker_files/run_simpletest.sh: trivial way to mea…
…sure wall clock time of SimpleTest execution."

This reverts commit 8a6246a.

@AronNovak AronNovak changed the title from WIP: WebTestCase performance optimization to WebTestCase performance optimization Oct 10, 2017

@AronNovak

This comment has been minimized.

Member

AronNovak commented Oct 10, 2017

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).

@AronNovak AronNovak requested a review from amitaibu Oct 10, 2017

@amitaibu

This comment has been minimized.

Member

amitaibu commented Oct 10, 2017

👍 MWG

AronNovak added a commit to Gizra/Municipality that referenced this pull request Oct 10, 2017

@AronNovak AronNovak merged commit 5dd8334 into master Oct 10, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@AronNovak AronNovak deleted the 170-perf branch Oct 10, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment