Commit 0db89d48 authored by Christian Eichenberger's avatar Christian Eichenberger 🏸
Browse files

Merge branch '65-run-benchmarks-and-baselines-on-schedule' into 'master'

"Profile and Optimize the codebase"

See merge request flatland/flatland!67
parents b582cf50 4bfce982
Pipeline #1145 passed with stages
in 13 minutes and 50 seconds
......@@ -11,6 +11,7 @@ image: themattrix/tox
stages:
- tests
- benchmarks_and_profiling
- deploy_docs
cache:
paths:
......@@ -47,3 +48,20 @@ build_and_deploy_docs:
environment:
name: ${CI_COMMIT_REF_SLUG}
url: http://${BUCKET_NAME}.s3-website.${AWS_DEFAULT_REGION}.amazonaws.com/
benchmarks_and_profiling:
dependencies:
- tests
stage: benchmarks_and_profiling
only:
# refs:
# - master
variables:
- $BENCHMARKS_AND_PROFILING
script:
- apt update
- apt install -y libgl1-mesa-glx xvfb graphviz xdg-utils libcairo2-dev libjpeg-dev libgif-dev
- pip install tox
- xvfb-run tox -e benchmarks -v --recreate
import random
import numpy as np
from examples.demo import Demo
random.seed(1)
np.random.seed(1)
if __name__ == "__main__":
Demo.run_complex_scene()
......@@ -164,7 +164,3 @@ class Demo:
demo_001 = Demo(Scenario_Generator.load_scenario('complex_scene.pkl'))
demo_001.set_record_frames(os.path.join(__file_dirname__, '..', 'rendering', 'frame_{:04d}.bmp'))
demo_001.run_demo(120)
if __name__ == "__main__":
Demo.run_complex_scene()
import random
import numpy as np
from examples.demo import Demo
random.seed(1)
np.random.seed(1)
if __name__ == "__main__":
Demo.run_example_flatland_000()
import random
import numpy as np
from examples.demo import Demo
random.seed(1)
np.random.seed(1)
if __name__ == "__main__":
Demo.run_example_flatland_001()
import random
import numpy as np
from examples.demo import Demo
random.seed(1)
np.random.seed(1)
if __name__ == "__main__":
Demo.run_example_network_000()
import random
import numpy as np
from examples.demo import Demo
random.seed(1)
np.random.seed(1)
if __name__ == "__main__":
Demo.run_example_network_001()
import random
import numpy as np
from examples.demo import Demo
random.seed(1)
np.random.seed(1)
if __name__ == "__main__":
Demo.run_example_network_002()
import random
import numpy as np
from examples.demo import Demo
random.seed(1)
np.random.seed(1)
if __name__ == "__main__":
Demo.run_example_network_003()
import random
import numpy as np
from examples.demo import Demo
random.seed(1)
np.random.seed(1)
if __name__ == "__main__":
Demo.run_generate_complex_scenario()
import random
import numpy as np
from examples.demo import Demo
random.seed(1)
np.random.seed(1)
if __name__ == "__main__":
Demo.run_generate_random_scenario()
import random
import numpy as np
from examples.demo import Demo
# ensure that every demo run behave constantly equal
random.seed(1)
np.random.seed(1)
def test_flatland_000():
Demo.run_example_flatland_000()
# TODO test assertions
def test_flatland_001():
Demo.run_example_flatland_001()
# TODO test assertions
def test_network_000():
Demo.run_example_network_000()
# TODO test assertions
def test_network_001():
Demo.run_example_network_001()
# TODO test assertions
def test_network_002():
Demo.run_example_network_002()
# TODO test assertions
def test_complex_scene():
Demo.run_complex_scene()
# TODO test assertions
def test_generate_complex_scenario():
Demo.run_generate_complex_scenario()
# TODO test assertions
def test_generate_random_scenario():
Demo.run_generate_random_scenario()
# TODO test assertions
[tox]
envlist = py36, py37, examples, notebooks, flake8, docs, coverage, benchmarks
envlist = py36, py37, examples, notebooks, flake8, docs, coverage
[travis]
python =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment