Closed charlesbaynham closed 3 years ago
These are the updates as a result of #139.
heroku run --app wurwolves-lazy-and-bake-7lwfq1 echo \$DATABASE_URL
IGNORE_TESTING_DB=true
in .envpytest -k state_speed
In master branch (1bfcc0f89d24a0f314da2cb4fd04f6e292ae80c2) render time is
WARNING root:test_backend.py:85 time_per_join = 0.358s of which 0.302s in 12.4 DB calls
WARNING root:test_backend.py:90 time_per_render = 0.100s of which 0.058s in 1.0 DB calls
In this branch (at 73ca49337dce3546d8e318e85e3692a09898d5a4) render time is
WARNING root:test_backend.py:85 time_per_join = 0.751s of which 0.663s in 15.4 DB calls
WARNING root:test_backend.py:90 time_per_render = 0.385s of which 0.337s in 13.0 DB calls
Errrrrmmmm I thought I'd made it better.
https://wurwolves.com/test_game
or the equivalent on this PR. This method is more representative of a real game: the code on master is fast when the games are trivially small, but slows down as they grow large.
On master (i.e. wurwolves.com, at 1bfcc0f89d24a0f314da2cb4fd04f6e292ae80c2):
Either 3900 or 12400 ms.
On this branch (i.e. https://wurwolves-lazy-and-bake-7lwfq1.herokuapp.com/ at 73ca49337dce3546d8e318e85e3692a09898d5a4):
422ms.
Repeating above, but altering the test protocol by adding "start game, abort game, start game, abort game, start game" to simulate a long-running session.
135ms
Could not do the test. Starting the third game took so long and consumed so much memory that the app exceeded its limits and crashed.
Closes #133