Skip to main content

"Profiler for buildbot master and its UI"

Project description

This plugin implements a profiler for buildbot master.

  • It uses statistical profiling loosely based on plop https://github.com/bdarnell/plop

  • Suitable for prod as statistical profiling is very low overhead

  • Profiles all threads including main thread and db threads

  • Removes noise samples when the threads are actually in the main loop

  • In-browser UI based on nvd3 and d3-flame-graph

  • Show cpu and memory percent over time

  • flame graph can be restricted to a subset of the trace

  • Detailed caller/callee are displayed when clicking on a function

Usage

installation:

pip install buildbot_profiler

then in master.cfg:

c['www']['plugins']['profiler'] = True

Alternatively, you can install it in service mode, without the UI

c['services'] = [util.ProfilerService()]

ProfilerService takes following arguments:

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.

Standalone Viewer

A standalone viewer is provided for offline browse of user submitted profiles.

bbprofiler

Then you can open your browser on http://localhost:8080

Screenshot

https://raw.githubusercontent.com/tardyp/buildbot_profiler/master/screenshot.png

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

buildbot-profiler-1.1.0.tar.gz (810.1 kB view details)

Uploaded Source

Built Distribution

buildbot_profiler-1.1.0-py2.py3-none-any.whl (848.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file buildbot-profiler-1.1.0.tar.gz.

File metadata

File hashes

Hashes for buildbot-profiler-1.1.0.tar.gz
Algorithm Hash digest
SHA256 65e204af59f81984a9fa46b487e1ab0eca43d97f52328abbb88fc6201089c621
MD5 4c03214a65a4035b7580b4c7a2ffb6d7
BLAKE2b-256 53a48320219b0475644fa52f07beb84663d6cbe2c41c59e3e5ffba22c456bc12

See more details on using hashes here.

File details

Details for the file buildbot_profiler-1.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for buildbot_profiler-1.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e82580b172bda2507434b393e5ff396e0ecf628b803bfab4bdd5f02bfb81a03f
MD5 048f49b674b8f368d748f201eda4db9f
BLAKE2b-256 a132e7ded4bda02b9e0f4e810fd7280dd5666140e00244eba9689eaa5cfa4513

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page