Skip to content

Commit 1104066

Browse files
committed
updated the docs, it has now a new development section
1 parent 4ade0e3 commit 1104066

3 files changed

Lines changed: 103 additions & 1 deletion

File tree

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191

9292
# The theme to use for HTML and HTML Help pages. See the documentation for
9393
# a list of builtin themes.
94-
html_theme = 'default'
94+
html_theme = 'sphinx_rtd_theme'
9595

9696
# Theme options are theme-specific and customize the look and feel of a theme
9797
# further. For a list of options available for each theme, see the

docs/development.rst

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
Develop VMProf
2+
==============
3+
4+
VMProf consists of several projects working together:
5+
6+
* `vmprof-python`_: The PyPI package providing the command line interface to enable vmprof.
7+
* `vmprof-server`_: Webservice hosted at `vmprof.com`_. Hosts and visualizes data uploaded by `vmprof-python`_ package.
8+
* `vmprof-integration`_: Test suite for pulling together all different projects and ensuring that all play together nicely.
9+
* `PyPy`_: A virtual machine for the Python programming language. Most notably it contains an implementation for the logging facility `vmprof-server`_ can display.
10+
11+
The following description helps you to set up a development environment on Linux. For Windows
12+
and MacOSX the instructions might be similar.
13+
14+
.. _`PyPy`: http://pypy.org
15+
.. _`vmprof.com`: http://vmprof.com
16+
.. _`vmprof-python`: https://github.com/vmprof/vmprof-python
17+
.. _`vmprof-server`: https://github.com/vmprof/vmprof-server
18+
.. _`vmprof-integration`: https://github.com/vmprof/vmprof-integration
19+
20+
Develop VMProf on Linux
21+
-----------------------
22+
23+
It is recommended to use Python 3.x for development. Here is a list of requirements
24+
on your system:
25+
26+
* python
27+
* sqlite3
28+
* virtualenv
29+
30+
Please move you shell to the location you store your source code in and setup
31+
a virtual environment::
32+
33+
$ virtualenv -p /usr/bin/python3 vmprof3
34+
$ source vmprof3/bin/activate
35+
36+
All commands from now on assume you have the vmprof3 virutal environment enabled.
37+
38+
Clone the repositories
39+
----------------------
40+
41+
::
42+
43+
$ git clone git@github.com:vmprof/vmprof-integration.git
44+
$ git clone git@github.com:vmprof/vmprof-server.git
45+
$ git clone git@github.com:vmprof/vmprof-python.git
46+
# on old mercurial version the following command takes ages. please use a recent version
47+
$ hg clone ssh://hg@bitbucket.org/pypy/pypy # optional, only if you want to hack on pypy as well
48+
49+
VMProf Server
50+
-------------
51+
52+
::
53+
54+
# setup django service
55+
$ cd vmprof-server
56+
$ pip install -r requirements/development.txt
57+
$ python manage.py migrate
58+
# to run the service
59+
$ python manage.py runserver -v 3
60+
61+
VMProf Python
62+
-------------
63+
64+
An optional stage. It is only necessary if you want to co develop `vmprof-python`_ with `vmprof-server`_::
65+
66+
# install vmprof for development (only needed if you want to co develop vmprof-python)
67+
$ cd vmprof-python
68+
$ python setup.py develop
69+
70+
71+
Now you are able to change both the python package and the server and see the results.
72+
Here are some more hints on how to develop this platform
73+
74+
Smaller Profiles
75+
----------------
76+
77+
Some times it is tedious to generate a big log file and develop a new feature with it.
78+
Both for VMProf and JitLog you can generate small log files that ease development.
79+
80+
There are small logs generated by a python script in `vmprof-server/vmlog/test/data/loggen.py`. Use the following command to load those::
81+
82+
$ ./manage.py loaddata vmlog/test/fixtures.yaml
83+
84+
Now open your browser and redirect them to the jitlog. E.g. http://localhost:8000/#/1v1/traces
85+
86+
Integration Tests
87+
-----------------
88+
89+
This is a very important test suite to ensure that all packages work together. It is automatically run every day by travis. You can run them locally. If you happen not to run a Debian base distribution, you can provide the following shell variable to prevent the tests from downloading a Debian PyPy::
90+
91+
$ TEST_PYPY_EXEC=/path/to/pypy py.test testvmprof/
92+
93+

docs/index.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
12
.. image:: _static/vmprof-logo.png
23
:width: 386px
34
:align: center
45

6+
7+
|
8+
|
9+
10+
VMProf Platform
11+
===============
12+
513
`vmprof`_ is a platform to understand and resolve performance bottlenecks in your code.
614
It includes a *lightweight profiler* for `CPython`_ 2.7, `CPython`_ 3 and `PyPy`_
715
and a log visualizer for `PyPy`_.
@@ -13,6 +21,7 @@ The following provides more information about CPU profiles and JIT Compiler Logs
1321

1422
vmprof
1523
jitlog
24+
development
1625

1726
.. _`CPython`: http://python.org
1827
.. _`PyPy`: http://pypy.org

0 commit comments

Comments
 (0)