This plugin implements a profiler for buildbot master.
installation:
.. code:: bash
pip install buildbot_profiler
then in master.cfg:
.. code:: python
c['www']['plugins']['profiler'] = True
Alternatively, you can install it in service mode, without the UI
.. code:: python
c['services'] = [util.ProfilerService()]
ProfilerService takes following arguments:
.. code:: python
ProfilerService(frequency=100, gatherperiod=30 * 60, mode='virtual', basepath=None, wantBuilds=100)
frequency
: the profiling frequency in HZ. Not that if there is no activity during a profiling timer, no data will be recorded.
gatherperiod
: the period during which the profiler works on one file. By default a new json file is created every 30min with the profile of the last 30min. Note that if there is no activity the gather period might be longer.
mode
: profiling timer to use. Can be:
prof
: use SIG_PROF
timer,virtual
: use SIGVTALRM
timer,real
: use SIGALRM
timer,basepath
: the base path where to store the json files. (defaults to (master's basedir)/prof_
)
wantBuilds
: if this is > 0 then the last N builds are stored along side the profile data, for debug purpose.
A standalone viewer is provided for offline browse of user submitted profiles.
.. code:: bash
bbprofiler
Then you can open your browser on http://localhost:8080
.. image:: https://raw.githubusercontent.com/tardyp/buildbot_profiler/master/screenshot.png