Continuous integration: buildbot + codespeed + guppy-pe + resource

Translation of the original in Catalan. Read it in: CatalàCastellano

Due to a requirement we had at work I have set up a continuous integration environment. Essentially what is sought is the following:

  • Launching tests automatically on the commits made to the code (buildbot)
  • Having a repository of the test results that is easy to consult (web) (buildbot)
  • Supporting automatic performance (profiling) tests (guppy-pe + resource)
  • Being able to check the evolution of these performance tests with a visual tool (codespeed)

In order to achieve these objectives the following has been used:

  • buildbot: which allows automating the compilation and testing environment of the commits being made to the repository (it is programmed in python). To better understand buildbot, I recommend you read the section: system architecure of its manual.
  • codespeed: it is a tool made with python+django+mysql, through an HTTP+JSON interface it can inject information into the database and through the GUI it shows us:
    • overview: through a table it shows the trends of the results of the benchmarks associated with an executable.
    • timeline: it shows on a graph the evolution of the archived results on a specific benchmark made on a host.
  • guppy-pe: it allows us to extract data referring to the system resources that a part of the code is consuming: class, function, variable, etc.
  • resource: it is a python module that allows knowing (resource.getrusage(PID)) which resources a PID is consuming at a given moment.

Since the documentation I made for work had to be filtered so as not to reveal internal information, the documentation I publish is in OpenOffice and PDF format so that it is simple for everyone to read and modify it if they want.

  • Package .tar.gz, it contains:
    • buildbot configuration file, master.cfg
    • sample code to test the environment, buildbot-test
    • code of tobami-codespeed modified so that it is more general than the original version
    • integracion-continua-instalacion.odt: document with notes about the procedures I have followed for the installation of the whole thing.
    • integracion-continua-manual.odt: user manual of the whole thing. (also the pdf version)
  • integracion-continua-manual.pdf: I link this manual directly in case you want to take a look to see if the topic interests you.

Related links: