View on GitHub

Buildtime Trend client

Visualise what's trending in your build process

Download this project as a .zip file Download this project as a tar.gz file

Buildtime trend Buildtime trend

Dashboard example

Graphs generated with API Click the image for recently generated trends.


Visualise trends of build processes on Continuous Integration platforms by gathering and analysing build and timing data:

How to get it?

The latest version is available for download as zip and tarball on GitHub. Unzip and copy to the desired directory.

If you prefer to use git, several options are available :


Dependency installation

pip install -r requirements.txt

pip install -r requirements-native.txt


First the timestamp recording needs to be initialised :

source /path/to/

This script will detect the location of the build-trend script folder, adds it to the PATH and cleans logfiles of previous runs. Executing the init script with source is required to export environment variables to the current shell session.

Because the script dir is added to PATH, no path needs to be added when logging a timestamp : event_name

This will log the current timestamp to a file and display it on STDOUT. Repeat this step as much as needed.

When all build stages are finished, run

which will analyse the logfile with timestamps and print out the results. The script will calculate the duration between the timestamps and add those to a file with the analysed data of previous builds. When the analysis script encounters the end timestamp, it will stop analysing the timestamp file and return the duration of the build stages. Possible event names ending the analysis are : end, done, finished or completed.

Optionally end can be run before, but adds the end timestamp automatically. The end timestamp can be useful if is not immediately run after the monitored build process finishes.

When is enabled, the data will be sent to your project for analysis.

When run on Travis CI, it will automatically add build/job related info. Parameter -m native will store data in xml format. It is recommended to use to store data, see below for details.

To generate a graph from previous builds, run

It will take the file with analysed data generated by the analyse script and turn it into a trend graph and saves this graph. Parameter --mode=native will create a trend using Python matplotlib. It is recommended to use to generate graphs, see below for details. If is enabled, can be run without parameters.

Use the script when you run it as part of a Travis CI build. See below for details.

Store build time data in xml (native mode)

(It is recommended to use to store data and generate trends, see below)

To store data in xml, native mode needs to be enabled. The xml file is stored in dashboard/buildtimes.xml by default.

To analyse timestamps and store the analysed data : --mode=native

See wiki for data schema of the xml file.

To generate a chart from the data stored in the xml file : --mode=native

This will save a trend image in dashboard/trend.png

Store build time data in

Next to storing your build time data in xml, it can be sent to for storage, analysis and generating graphs.

Follow these steps to enable using :

  1. Create a account, if you haven't already done so.
  2. Create a project in your account.
  3. Look up the project ID, Write Key and Master key and assign them to environment variables :
  4. export KEEN_PROJECT_ID=<Project ID>
  5. export KEEN_WRITE_KEY=<Write Key> (when running on Travis CI, use Master Key, see below)
  6. export KEEN_MASTER_KEY=<Master Key>

If these environment variables are set, the scripts will detect this and use to store data, do analysis and generate graphs.

See wiki for data schema of data sent to

Visualise the trends (powered by

Multiple trends are available when data was stored in keen mode :

Folder dashboard contains all files necessary to display the generated trends.

If you are building a Github repo on Travis CI, and you have gh-pages branch, you can use the script mentioned below to automatically add the right files and create the config file.

Integrate with Travis CI

You can integrate Buildtime Trend with your build process on Travis CI : install and initialise the buildtime trend scripts, add timestamp labels, generate the trend and synchronise it with your gh-pages branch.

All you need is a github repo, a Travis CI account for your repo and a gh-pages branch to publish the results.

You also need to create an encrypted GH_TOKEN to get write access to your repo (publish results on gh-pages branch) :

To enable integration with, KEEN_PROJECT_ID and KEEN_WRITE_KEY should be set (see above):

  1. Follow the steps above to create a account and project and look up the Project ID and Master Key
  2. Assign the Project ID and Master Key to the corresponding environment variables and encrypt them using the Travis CI command line tool and add it them to .travis.yml (see below) :
  3. travis encrypt KEEN_PROJECT_ID=<Project ID>
  4. travis encrypt KEEN_WRITE_KEY=<Master Key> Remark : Use the Master Key instead of the Write Key of your project, because the Write Key is too long to encrypt using the Travis CI encryption tool
  5. travis encrypt KEEN_MASTER_KEY=<Master Key> The Master Key of your project is used to generate a scoped read key

The generated trend graph and build-data will be put in folder buildtime-trend on your gh-pages branch. The trend is available on http://{username}{repo_name}/buildtime-trend/index.html

Example .travis.yml file :

language: python
    - secure: # your secure GH_TOKEN goes here (required to share trend on gh-pages)
    - secure: # your secure KEEN_PROJECT_ID goes here (required to store data on
    - secure: # your secure KEEN_WRITE_KEY goes here (required to store data on
    - secure: # your secure KEEN_MASTER_KEY goes here (required to generate a scoped read key to generate graphs using the API)
  # install and initialise build-trend scripts
  # uncomment one of two options below (stable or development)
  # download latest stable release
  - git clone --recursive --depth 1 --branch release $HOME/buildtime-trend
  # use latest development version (clone git repo)
  # - if [[ -d $HOME/buildtime-trend/.git ]]; then cd $HOME/buildtime-trend; git pull; cd ..; else git clone --recursive $HOME/buildtime-trend; fi
  # initialise buildtime-trend scripts
  - source $HOME/buildtime-trend/
  # generate timestamp with label 'install'
  - install
  # install buildtime-trend dependencies
  - CFLAGS="-O0" pip install -r ${BUILD_TREND_HOME}/requirements.txt
  # install dependencies
  # generate timestamp with label 'tests'
  - tests
  # run your tests
  # synchronise buildtime-trend result with gh-pages

Run in after_script to report the gathered timestamps with the result of the build in $TRAVIS_TEST_RESULT, which comes available in after_{success|failure}. after_script is executed regardless of the build result, so after both after_success and after_failure.

To enable native mode, add -m native when calling

Bugs and feature requests

Please report bugs and add feature requests in the Github issue tracker.


For an overview of who contributed to create Buildtime trend, see Credits.


Mailinglist : Buildtime Trend Community

Follow us on Twitter, Github and OpenHub.