Performance and debugging visualization for DevStack and Tempest
Go to file
Tim Buckley 0034283601 Add initial Angular boilerplate files.
Adds boilerplate files from `angularjs-gulp-browserify-boilerplate`
to start work on Angular rewrite of the frontend.

Change-Id: I54392c24f397496582f9d06d561d5c14a92ccbe6
2015-09-25 16:26:44 -06:00
app Add initial Angular boilerplate files. 2015-09-25 16:26:44 -06:00
doc/source Convert README to rst, and add documentation template from cookiecutter 2015-08-03 10:15:34 -06:00
gulp Add initial Angular boilerplate files. 2015-09-25 16:26:44 -06:00
stackviz Fix the pep8 issues 2015-09-15 13:48:51 -04:00
test Add initial Angular boilerplate files. 2015-09-25 16:26:44 -06:00
.bowerrc switch from browserify to plain bower, add initial template from bootstrap 2015-07-14 15:13:04 -06:00
.coveragerc Change ignore-errors to ignore_errors 2015-09-21 14:55:37 +00:00
.eslintignore Add eslint configuration 2015-08-03 11:20:32 -06:00
.eslintrc Add eslint configuration 2015-08-03 11:20:32 -06:00
.gitignore Add initial Angular boilerplate files. 2015-09-25 16:26:44 -06:00
.gitreview Add .gitreview file 2015-09-14 15:59:30 -06:00
.jshintrc Add initial Angular boilerplate files. 2015-09-25 16:26:44 -06:00
.testr.conf Add more test cookiecutter template items 2015-08-03 11:26:08 -06:00
CONTRIBUTING.rst Add more test cookiecutter template items 2015-08-03 11:26:08 -06:00
HACKING.rst Add .gitignore entries, HACKING.rst, and __init__.py contents from cookiecutter 2015-08-03 10:01:01 -06:00
LICENSE Add some missing base files from cookiecutter (LICENSE, manifest, setuptools config) 2015-08-03 09:11:51 -06:00
MANIFEST.in Include bower components during `setup.py install`, and use properly use relative static directory during export. 2015-08-13 14:45:09 -06:00
README.rst Update README.rst to reflect syntax changes to `stackviz-export` 2015-08-20 13:56:14 -06:00
babel.cfg Add stub unit tests from cookiecutter 2015-08-03 10:37:55 -06:00
bower.json Add jquery-ui to bower.json 2015-08-11 13:52:20 -06:00
gulpfile.js Add initial Angular boilerplate files. 2015-09-25 16:26:44 -06:00
karma.conf.js Minor adjustments to karma config and npm packages 2015-08-03 15:16:26 -06:00
manage.py Initial import containing a barebones django / browserify project 2015-07-13 15:55:45 -06:00
package.json Add initial Angular boilerplate files. 2015-09-25 16:26:44 -06:00
requirements.txt Add dependencies to requirements.txt 2015-08-21 07:38:07 -06:00
setup.cfg Move export_static.py to export.py; add executable command definition to setup.cfg to install `stackviz-export` command during `setup.py install`. 2015-08-11 17:06:09 -06:00
setup.py Add some missing base files from cookiecutter (LICENSE, manifest, setuptools config) 2015-08-03 09:11:51 -06:00
test-requirements.txt Add stub unit tests from cookiecutter 2015-08-03 10:37:55 -06:00
tox.ini Add stub unit tests from cookiecutter 2015-08-03 10:37:55 -06:00

README.rst

StackViz

A visualization utility to help analyze the performance of DevStack setup and Tempest executions.

Installation

Installation of the frontend requires Node.js and Bower. On Ubuntu:

sudo apt-get install nodejs npm nodejs-legacy
sudo npm install -g bower

Then, install the Bower components by running, from the project directory:

bower install

Lastly, install the project. Pip is recommended, like so:

sudo pip install .

Usage - Server

First, install the necessary dependencies with Pip:

sudo pip install -r requirements.txt

The Django development server may then be used to view the interface. Run:

python manage.py runserver

You can then browse to the printed URL in your browser of choice.

Usage - Static Site

The server can be "snapshotted" and exported to a static HTML site using the installed stackviz-export utility. StackViz can then be viewed using any web browser with no requirement of any server-side processing.

To generate, run:

stackviz-export -r path/to/testrepository/ dest_dir

... where dest_dir is the path to a target directory where files should be written. When finished, the index.html file can be opened in a browser. Note that the above gathers test data from a testrepository directory, though direct subunit streams either from files or standard input are also supported. For more information, see stackviz-export --help.

Note that some browsers enforce content origin policies that may disallow XHRs when viewed directly from the local filesystem. To work around this, you can use something like the Python SimpleHTTPServer:

python -m SimpleHTTPServer

GZipped Data

As the log data can become quite large, exported files can be compressed with GZip to significantly reduce the size of the data files. To enable, run:

stackviz-export -r path/to/testrepository/ --gzip dest_dir

Data files will then be written in compressed form, and will be suffixed with *.json.gz. Note that web servers must be properly configured to serve pre-compressed files. Notably, Python's SimpleHTTPServer will not do this by default. However, Twisted can be used as a drop-in replacement as follows:

twistd -no web --path=.

Other web servers, such as Apache, should also serve these files correctly without any extra configuration.

(Specifically, the response must have headers Content-Type: application/json and Content-Encoding: gzip.)

DStat Data

StackViz will also show charts generated from DStat logs, if available. Note that console output from DStat is not sufficient - a CSV logfile must be used. Then, provide the logfile to stackviz-export:

stackviz-export -r testrepository/ --dstat path/to/dstat.csv dest_dir

Log Locations

Log locations are configured along with normal Django settings in stackviz/settings.py, or specified as command-line arguments to stackviz-export. Several different types of logs are rendered by StackViz are read by default from:

  • Tempest (testr repositories): ./test_data/
  • Dstat: ./dstat.log
  • DevStack: TODO

Testing

Server (Python)

Server-side tests can be run using Tox:

tox

A linter (flake8) will be run automatically and its output included in the report.

Client (JavaScript)

Client-side tests are run via Karma. To run, install the karma-cli and the npm dependencies:

npm install
sudo npm install --global karma-cli

Then, run Karma:

karma start --single-run

Tests will be executed using PhantomJS by default. Similarly, ESLint can be used to verify formatting:

eslint stackviz/static/