refresh (optional) : enables auto-refreshing the dashboard charts. 0 = disabled (default), a positive integer is the number of minutes after which the charts are refreshed, a value of 10 will refresh the charts every 10 minutes. The refresh rate should at least be equal to maximum age of the Query cache, if it is less, the cache max age value will be used (typically, 10 min).

timeframe (optional) : the default timeframe can be set with this url parameter. Possible values : day, week, month, year. If it is not defined the default timeframe is used (week)

filter_* : set the default filter value. When this url parameter is defined, the corresponding filter dropdown will be set to this value and it will be applied to the queries of all charts and metrics. Available filters :

Remark : When visiting /dashboard (without parameters), an overview of all hosted projects is displayed.

Service usage statistics

Display a dashboard with Buildtime Trend service usage statistics

path : /stats

usage : /stats?timeframe=<timeframe_setting>

parameters :

timeframe (optional) : the default timeframe can be set with this url parameter. Possible values : day, week, month, year. If it is not defined the default timeframe is used (week)

Shield badges

Generate a shield badges

path : /badge

usage : /badge/repo_owner/repo_name/badge_type/interval

parameters :

repo_owner : name of the Github repo owner, fe. buildtimetrend

repo_name : name of the Github repo, fe. service

badge_type : type of badge, options :

latest : buildtime of last build job

avg : average buildtime of buildjobs in period set by interval (default)

jobs : number of build jobs in period set by interval

builds : number of builds in period set by interval

passed : percentage of successful build jobs during interval

interval : time interval, options :

week (default) : events of last week (last 7 days)

month : events of last month (last 30 days)

year : events of last year (last 52 weeks)

Badge examples

: /badge/buildtimetrend/service/latest

: /badge/buildtimetrend/service/avg/week

: /badge/buildtimetrend/service/avg/month

: /buildtimetrend/service/avg/year

: /badge/buildtimetrend/service/jobs/week

: /badge/buildtimetrend/service/jobs/month

: /buildtimetrend/service/jobs/year

: /badge/buildtimetrend/service/builds/week

: /badge/buildtimetrend/service/builds/month

: /buildtimetrend/service/builds/year

: /badge/buildtimetrend/service/passed/week

: /badge/buildtimetrend/service/passed/month

: /badge/buildtimetrend/service/passed/year

Process Travis CI build log

Loads a Travis CI build log file, processes it and sends the data to Keen.io.

path : /travis

usage : /travis/<repo_owner>/<repo_name>/<first_build>/<last_build>

parameters :

repo_owner : name of the Github repo owner, fe. buildtimetrend

repo_name : name of the Github repo, fe. service

first_build : Travis CI build number of the first build to be processed

last_build : (optional) Travis CI build number of the last build to be processed

If last_build is not defined, only a single build will be processed, namely the one defined by first_build.
If last_build is defined, it turns into batch mode : multiple builds will be processed : all builds from first_build to and including last_build will be scheduled to be processed.
To limit the load on the worker, a delay is added to every next build. F.e. build #1 will be executed immediately, build #2 after x seconds, build #3 after x*2 seconds, build #n after x*(n-1) seconds.
By default the delay is 3 seconds, but this can be configured with the multi_import.delay setting in config_service.yml or BTT_MULTI_DELAY env variable.
The maximum number of builds that can be imported at once in batch mode is by default limited to 100. This can be configured with the multi_import.max_builds setting in config_service.yml or BTT_MULTI_MAX_BUILDS env variable.

To trigger the service at the end of a Travis CI build, add this to your .travis.yml file:

notifications:webhooks:# trigger Buildtime Trend Service to parse Travis CI log and send result to Keen.io- https://buildtimetrend.herokuapp.com/travis

When Buildtime Trend Service is triggered by a Travis CI notification, it will get the necessary parameters (repo name and build number) from the payload that is passed by Travis CI. This will trigger loading and parsing the Travis CI log of the corresponding build, the analysed data is stored in the Keen.io database.

Config file

Add a configfile named config_service.yml based on config_sample.yml to configure the way the service behaves.

denied_repo : defines which repos are not allowed by the service. If the denied_repo setting is not defined, all repos are allowed (unless allowed_repo is defined, see below). If a substring matches the repo name, it is denied, so fe. my_name will disallow my_name/my_first_repo and my_name/another_repo. A complete repo name is valid as well.

Remark : Setting denied_repo takes precedence over allowed_repo, if a repo name matches a rule in denied_repo setting, the repo will be denied, even if it matches a rule in allowed_repo.
Multiple entries are allowed, fe. :

allowed_repo : defines which repos are allowed by the service. If the allowed_repo setting is not defined, all repos are allowed (unless denied by the denied_repo setting). If substring matches the repo name, it is allowed, so fe. my_name will allow my_name/my_first_repo and my_name/another_repo. A complete repo name is allowed as well.

Remark : Setting denied_repo takes precedence over allowed_repo, if a repo name matches a rule in denied_repo setting, the repo will be denied, even if it matches a rule in allowed_repo.
Multiple entries are allowed, fe. :

The environment variables are checked in this order, the first one that is defined, will be used.
The backend type (amqp, redis, ...) associated with the environment variable will be set automatically.

buildtimetrend:multi_import:max_builds: 100 # maximum number of builds allowed in one batchdelay: 3 # number of seconds between the start of each build

Setting max_builds is 100 by default, and can also be set with the BTT_MULTI_MAX_BUILDS environment variable.
Setting delay is 3 seconds by default, and can also be set with the BTT_MULTI_DELAY environment variable.

Bugs and feature requests

Contribute

If you want to contribute to make Buildtime Trend even better, check out the contribution page.
We are looking for testers, developers, designers, ... and what more. Contact us if you want to help out.

Donations

You can support the project by making a donation. The donations will help pay for the hosting and support further development.

Credits

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