Skip to content

Commit

Permalink
Document the "-m plop.collector" functionality.
Browse files Browse the repository at this point in the history
Document how to use "python -m plop.collector".

Also, specify how to write out collector.stack_counts.
  • Loading branch information
Lorin Hochstein committed Aug 31, 2012
1 parent 4802c8b commit df73be6
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions README.rst
Expand Up @@ -28,9 +28,17 @@ Usage
-----

In the application to be profiled, create a ``plop.collector.Collector``,
call ``start()``, wait, then ``stop()``. Dump ``collector.stack_counts``
to a file. See ``ProfileHandler`` in ``demo/busy_server.py`` for an example
of how to trigger profiling via an HTTP interface.
call ``start()``, wait, then ``stop()``. Write
``repr(dict(collector.stack_counts))`` to a file. See ``ProfileHandler`` in
``demo/busy_server.py`` for an example of how to trigger profiling via an HTTP
interface.

To profile an entire Python script, run::

python -m plop.collector myscript.py

This will write the profile to ``/tmp/plop.out``


To use the viewer, run::

Expand Down

0 comments on commit df73be6

Please sign in to comment.