A performance dashboard to compare metrics between software versions like the Jenkins Performance Plugin but in modern and CI server independent.
We used the Jenkins Performance Plugin but it's not customizable and looks old fashioned. So we created Perfably. Send performance metrics and meta data after every CI build via a simple HTTP API to perfably and get beautiful dashboards.
Here is an example for adding data to Perfably:
$ hyperfine --runs 1 'yarn build' --export-json result.json
$ http -a $AUTH --json POST "https://example.com/project/perfably/report/0.0.1" \
"yarn_build_seconds:=$(jq '.results[].mean' result.json)"
$ http -a $AUTH --json POST "https://example.com/project/perfably/report/0.0.1/meta" \
"yarn_version[value]=$(yarn --version)" \
"commit[value]=$(git rev-parse HEAD)" \
"commit[url]=https://github.com/FACT-Finder/perfably/commit/$(git rev-parse HEAD)"
And this is what the dashboard could look like:
The perfably/perfably container
exposes the UI and HTTP API on port 8000. The users, metrics and meta data are
stored inside /opt/perfably
. No container is tagged with latest
use
unstable
, if you don't want to explicitly define the tag (not recommended).
$ docker run -v "$PWD/data:/opt/perfably" -p 8000:8000 perfably/perfably:$VERSION
Download the latest release here, uncompress the archive and start perfably:
$ ./perfably --help
- Install Go 1.18, Node >= 16 and a recent version of Yarn.
- Install oapi-codegen
$ go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.11.0
- Build the UI:
$ (cd ui && yarn install && yarn build)
- Run code generators (this downloads the swagger artifacts and generates the
server methods from the openapi spec)
$ go generate ./...
- Build with Go:
$ go build
In the config the projects and dashboards are defined. See example config with comments.
The API is documented via OpenAPI3, you can view the raw spec
or
swagger ui.
The Swagger UI is also served on /docs/
on a running Perfably instance.