]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/dashboard: Resolve TestBed performance issue
authorStephan Müller <smueller@suse.com>
Fri, 1 Jun 2018 15:11:35 +0000 (17:11 +0200)
committerStephan Müller <smueller@suse.com>
Fri, 8 Jun 2018 12:50:25 +0000 (14:50 +0200)
commit7253b97d42aa78ef43257bb84b29be74fee322c4
tree4a91d6a049d35e3467da9e19ee78fb3dcbf2a361
parentbe651ca759cc9d1c0198d917dfb76421db94761f
mgr/dashboard: Resolve TestBed performance issue

With this helper function you can easily resolve the TestBed resetting
performance issue. If more tests exists in a test suite, it makes sense
to configure TestBed only once if you are not doing a lot of TestBed
specific stuff (haven't hit the limitation). It will reduce the test
run time by around $tests * 50 %. In my case it was a test suite with
47 tests with a run time of over 30s after using the static test bed
method it ran in 1.2s. The run time was reduced to 0.04 %! This is
equivalent to a speed increase of 2500% (100/0.04)!

For our own security the normal way will be taken if you not
set the _DEV_ configuration variable to true. It will be false when
"run-frontend-unittests.sh" is run.

Signed-off-by: Stephan Müller <smueller@suse.com>
src/pybind/mgr/dashboard/HACKING.rst
src/pybind/mgr/dashboard/frontend/.gitignore
src/pybind/mgr/dashboard/frontend/src/app/shared/unit-test-helper.ts [new file with mode: 0644]
src/pybind/mgr/dashboard/frontend/src/tsconfig.app.json
src/pybind/mgr/dashboard/frontend/src/unit-test-configuration.ts.sample [new file with mode: 0644]
src/pybind/mgr/dashboard/run-frontend-unittests.sh