Skip to content

Commit

Permalink
Update README.md.
Browse files Browse the repository at this point in the history
  • Loading branch information
nvdv committed Apr 9, 2017
1 parent df32c2b commit 787eb3b
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

vprof is a Python package providing rich and interactive visualizations for
various Python program characteristics such as running time and memory usage.
It supports Python 2.7, Python 3.4, Python 3.5 and distributed under BSD license.
It supports Python 2.7, Python 3.4+ and distributed under BSD license.

The project is in active development and some of its features might not work as
expected.
Expand All @@ -16,18 +16,19 @@ expected.
## Contributing
All contributions are highly encouraged! You can add new features,
report and fix existing bugs and write docs and tutorials.
Feel free to open issue or send pull request!
Feel free to open an issue or send a pull request!

## Prerequisites
The required dependencies to build ```vprof``` from source code:
Dependencies to build ```vprof``` from source code:
* Python 2.7, Python 3.4 or Python 3.5
* `pip`
* `npm` >= 3.3.12

`npm` is required to build `vprof` from sources only.

## Dependencies
All Python and `npm` module dependencies are listed in `package.json` and `requirements.txt`.
All Python and `npm` module dependencies are listed in `package.json` and
`requirements.txt`.

## Installation
`vprof` can be installed from PyPI
Expand Down Expand Up @@ -61,17 +62,19 @@ Shows CPU flame graph for `<src>`.

* `p` - profiler

Runs Python profiler on `<src>` and displays results.
Runs built-in Python profiler on `<src>` and displays results.

* `m` - memory graph

Shows objects that are tracked by CPython GC and left in memory after code execution. Also shows process memory usage after execution of each line of `<src>`.
Shows objects that are tracked by CPython GC and left in memory after code
execution. Also shows process memory usage after execution of each line of `<src>`.

* `h` - code heatmap

Displays all executed code of `<src>` with line execution count.
Displays all executed code of `<src>` with line run times and execution counts.

`<src>` can be Python source file (e.g. `testscript.py`) or path to package (e.g. `myproject/test_package`).
`<src>` can be Python source file (e.g. `testscript.py`) or path to package
(e.g. `myproject/test_package`).

To run scripts with arguments use double quotes

Expand Down Expand Up @@ -105,9 +108,12 @@ def foo(arg1, arg2):
runner.run(foo, 'cmhp', args=(arg1, arg2), host='localhost', port=8000)
```

where `cmhp` is profiling mode, `host` and `port` are hostname and port of `vprof` server launched in remote mode. Obtained stats will be rendered in new tab of default web browser, opened by `vprof -r` command.
where `cmhp` is profiling mode, `host` and `port` are hostname and port of
`vprof` server launched in remote mode. Obtained stats will be rendered in new
tab of default web browser, opened by `vprof -r` command.

`vprof` is able to save profile stats to file and render visualizations from previously saved file.
`vprof` can save profile stats to file and render visualizations from
previously saved file.

```sh
vprof -c cmh src.py --output-file profile.json
Expand All @@ -128,8 +134,6 @@ Also you can check `examples` directory for more profiling examples.

## Testing

Just run:

```sh
python setup.py test && python setup.py e2e_test
```
Expand Down

0 comments on commit 787eb3b

Please sign in to comment.