Continuous performance analysis reports for software projects 🤖

Performabot

Version CircleCI Coverage Doc License MIT

Welcome to Performabot! This little helper can be used to provide Continuous Performance Reports within your GitHub project. But please be aware that currently only ginkgo (Go) performance benchmarks are supported.

How it works

Performabot parses the output of a micro-benchmarking framework. After the successful parsing it puts the data into a new GitHub repository called performabot-results. This repository is automatically created by the user who owns the specified token. All data within that repository will be managed by performabot, whereas data updates result in additional commits within that repository. If Performabot finds data where it can compare the current run against, then it will do that as well.

Performabot updates the corresponding GitHub pull request after the run with a comment which contains all necessary information, like these:

@@                  Performance Diff                    @@
##                                        Ø       ±   × ##
==========================================================
  create Container                   0.122s  0.035s  20
  start Container                    0.030s  0.012s  20
  stop Container                     0.048s  0.014s  20
  remove Container                   0.026s  0.004s  20
==========================================================
- list PodSandbox                    0.000s  0.000s  20
+ list PodSandbox                    0.000s  0.000s  20
=                                    0.000s  0.000s   0
==========================================================
- list Container                     0.002s  0.005s  20
+ list Container                     0.000s  0.000s  20
=                                   -0.002s -0.005s   0
==========================================================

The test name, its average (Ø) and derivation (±) times and the amount (×) of runs for the test is visible inside the table. Beside this, the difference between two tests is being calculated as well if Performabot finds a base commit to compare against.

During the run, Performabot needs some information about the local test environment before actually commenting to GitHub pull requests. These parameters can be specified either via local environment variables or the command line, where test runs within CircleCI should work out of the box, except for the token. The needed environmental information are:

Flag Environment Variable Description
-c --commit $PB_COMMIT $CIRCLE_SHA1 Commit hash
-p --pull-request $PB_PULL_REQUEST $CIRCLE_PR_NUMBER Pull request number
-r --repository $PB_REPOSITORY $CIRCLE_PROJECT_REPONAME GitHub repository name
-o --owner $PB_OWNER $CIRCLE_PROJECT_USERNAME GitHub repository owner
-t --token $PB_TOKEN Personal access OAuth token

Personal access tokens can be generated via the GitHub developer settings, whereas only public_repo (Access public repositories) has to be activated in case of an open source project.

Benchmark runs

As already mentioned, right now only ginkgo benchmarks are supported. The tests have to be executed with --succinct to let the parser finally work. Succinct silences much of Ginkgo’s more verbose output. Test suites that succeed basically get printed out on just one line! Succinct is turned off, by default, when running tests for one package. It is turned on by default when Ginkgo runs multiple test packages.

Feel free to open an issue or pull request for additional parsing support.

Try it out

If you want to give the latest master branch a quick try, then install a container runtime like podman and test it with the test/sample file:

> cat test/sample | podman run -i saschagrunert/performabot -l
...
[NOTE]: Welcome to performabot!
...
[NOTE]: Processing done, found 16 results
[NOTE]: Local run specified
[NOTE]: The report:

### Performabot Result 🤖

Nothing to compare against.

@@                  Performance Diff                    @@
##                                        Ø       ±   × ##
==========================================================
  create PodSandbox                  0.404s  0.471s  20
  PodSandbox status                  0.000s  0.000s  20
  stop PodSandbox                    0.240s  0.015s  20
  remove PodSandbox                  0.056s  0.012s  20
  create PodSandbox and container    0.405s  0.049s  20
  list Container                     0.002s  0.005s  20
  pull Image                         6.498s  0.478s  20
  Image status                       0.002s  0.001s  20
  remove Image                       0.068s  0.044s  20
  create Container                   0.122s  0.035s  20
  start Container                    0.030s  0.012s  20
  Container status                   0.002s  0.001s  20
  stop Container                     0.048s  0.014s  20
  remove Container                   0.026s  0.004s  20
  list PodSandbox                    0.000s  0.000s  20
  list Container                     0.000s  0.000s  20
==========================================================

The -l --local flag specifies a local run. This means that there will be no validation of the local environment variables nor any GitHub interaction at all. Nevertheless, a local performabot.sqlite should now be available within the current directory which contains the run.

Further command line arguments are:

Usage: performabot [-c|--commit COMMIT] [-p|--pull-request PULL_REQUEST]
                   [-r|--repository REPOSITORY] [-o|--owner OWNER]
                   [-t|--token TOKEN] [-v|--verbose] [-l|--local] [--version]

Available options:
  -c,--commit COMMIT       Commit hash - fallback environment variables:
                           $PB_COMMIT, $CIRCLE_SHA1
  -p,--pull-request PULL_REQUEST
                           Pull request number - fallback environment variables:
                           $PB_PULL_REQUEST, $CIRCLE_PR_NUMBER
  -r,--repository REPOSITORY
                           GitHub repository - fallback environment variables:
                           $PB_REPOSITORY, $CIRCLE_PROJECT_REPONAME
  -o,--owner OWNER         GitHub owner - fallback environment variables:
                           $PB_OWNER, $CIRCLE_PROJECT_USERNAME
  -t,--token TOKEN         Token - fallback environment variable: $PB_TOKEN
  -h,--help                Show this help text
  -v,--verbose             Logging verbosity, can be specified up to 2x
  -l,--local               Run only locally and do not upload anything
  --version                Print the current version
  -h,--help                Show this help text

Build dependencies

There is only one dependency needed to get started with this project: nix

To build the project, simply run:

> make

The binary should be available at result/bin/performabot after successful compilation. Before running that binary please ensure that you have the $LOCALE_ARCHIVE environment variable set. This is done automatically on NixOS and nix shells, but it does not apply to other environments. The repository contains two helper scripts which can be sourced from bash or fish to ensure this:

. hack/env.fish
. hack/env.sh

If you need a shell where all build time dependencies are already included in $PATH, then run:

> make shell

There are other useful targets within the Makefile, which are used by the CI and could be worth a look. If you don’t want to use nix, then you’re free to build the project with stack or cabal as well.

Contributing

You want to contribute to this project? Wow, thanks! So please just fork it and send me a pull request.

Owner
Sascha Grunert
The difference between fine and great software is listening to people.
Sascha Grunert
Similar Resources

A software which can manage and analysis your hands played on GGPoker and Natural8

PokerManager PokerManagr is a software which can manage and analysis your hands played on GGPoker and Natural8 Related Installation Web server : Nginx

Apr 20, 2022

Hermit manages isolated, self-bootstrapping sets of tools in software projects.

Hermit - uniform tooling for Linux and Mac Hermit installs tools for software projects in self-contained, isolated sets, so your team, your contributo

Jan 3, 2023

Clones github projects into ~/Projects/github/{org}/{repo}

Tidy clone Github cli extension (gh extension) to clone repos into ~/Projects/github/{org}/{repo} on the local filesystem Install gh extension install

Jan 19, 2022

[mirror] Performance measurement, storage, and analysis.

Go performance measurement, storage, and analysis tools This subrepository holds the source for various packages and tools related to performance meas

Dec 24, 2022

Pat - Performance Analysis Toolbox for Go programs.

Pat - Performance Analysis Toolbox for Go programs.

pat Performance Analysis Toolbox for Go programs. Usage Get with: go install github.com/maruel/pat/cmd/...@latest disfunc Disassemble a function at t

Sep 6, 2022

Cloudprober is a monitoring software that makes it super-easy to monitor availability and performance of various components of your system.

Cloudprober is a monitoring software that makes it super-easy to monitor availability and performance of various components of your system. Cloudprobe

Dec 30, 2022

The portal gates to coverage reports

The portal gates to coverage reports

Covergates - Portal Gates to Coverage Reports Purpose Covergates is to make the easiest way to setup a self-hosted coverage report service. It's an al

Dec 18, 2022

A Go package that reports processor topology

Description ------------ cpu package reports (some) processor topology information Note that the term package refers to a physical processor

Nov 5, 2022

A minimalist Go PDF writer in 1982 lines. Draws text, images and shapes. Helps understand the PDF format. Used in production for reports.

A minimalist Go PDF writer in 1982 lines. Draws text, images and shapes. Helps understand the PDF format. Used in production for reports.

one-file-pdf - A minimalist PDF generator in 2K lines and 1 file The main idea behind this project was: "How small can I make a PDF generator for it

Dec 11, 2022

Query git repositories with SQL. Generate reports, perform status checks, analyze codebases. 🔍 📊

askgit askgit is a command-line tool for running SQL queries on git repositories. It's meant for ad-hoc querying of git repositories on disk through a

Jan 5, 2023

ginko-volkswagen detects when your tests are being run in a CI server, and reports them as passing

detects when your ginkgo-based tests are being run in a CI server, and reports them as passing

Dec 4, 2021

Cloud governance reports from native services in a clear and readable digest

Cloud governance reports from native services in a clear and readable digest

cloudig, or Cloudigest, is a simple CLI tool for creating reports from various cloud sources with user-provided comments. It is written in Go and curr

Nov 10, 2022

A simple http service that generates *.PDF reports from Grafana dashboards.

A simple http service that generates *.PDF reports from Grafana dashboards.

Grafana reporter A simple http service that generates *.PDF reports from Grafana dashboards. Requirements Runtime requirements pdflatex installed and

Dec 27, 2022

Query git repositories with SQL. Generate reports, perform status checks, analyze codebases. 🔍 📊

Query git repositories with SQL. Generate reports, perform status checks, analyze codebases. 🔍 📊

askgit is a command-line tool for running SQL queries on git repositories. It's meant for ad-hoc querying of git repositories on disk through a common interface (SQL), as an alternative to patching together various shell commands.

Jan 3, 2023

Go linter that checks types that are json encoded - reports unsupported types and unnecessary error checks

Checks types passed to the json encoding functions. Reports unsupported types and reports occations, where the check for the returned error can be omited.

Oct 7, 2022

A tool to aggregate and mine data from JSON reports of Go tests.

teststat A tool to aggregate and mine data from JSON reports of Go tests. Why? Mature Go projects often have a lot of tests, and not all of them are i

Sep 15, 2022

Send Slack reports of pull requests pending review

Send Slack reports of pull requests pending review

preport Born out of a desire to get pull requests reviewed faster without having to send manual reminders, preport generates reports of GitLab pull re

Nov 23, 2021

A prometheus exporter which reports metrics about your Gmail inbox.

prometheus-gmail-exporter-go A prometheus exporter for gmail. Heavily inspired by https://github.com/jamesread/prometheus-gmail-exporter, but written

Nov 15, 2022

A tool to convert go test results to testng reports xml.

go-testng-report A tool to convert go test results to testng reports xml. Usage of testng-report: -json-report string Golang json test report (defa

Dec 8, 2021
A serverless bot which periodically checks configured BigQuery capacity commitments, reservations and assignments against actual slot consumption of running jobs and reports findings to Slack/Google Chat.
A serverless bot which periodically checks configured BigQuery capacity commitments, reservations and assignments against actual slot consumption of running jobs and reports findings to Slack/Google Chat.

Solution Guide This solution implements a ChatOps-like approach to monitoring slot utilization of Google Cloud BigQuery reservations. As an alternativ

Dec 7, 2022
A telegram bot that fetches multiple RSS cryptocurrency news feeds for sentiment analysis

Crypto News Telegram Bot A simple telegram bot that will help you stay updated on your latest crypto news This bot will help you keep track of the lat

Aug 22, 2021
A boiler-plate like base for people to get started in creating automation software specifically for purchasing items on websites.

Bot-Base Bot-Base is a small project with concepts for most elements of a bot. Feel free to contact me on Twitter with any questions. Contributing Pul

Dec 27, 2022
Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.
Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.

Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.

Jan 2, 2023
An open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developersAn open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developers
An open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developersAn open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developers

Developer-oriented Continuous Delivery Product ⁣ English | 简体中文 Table of Contents Zadig Table of Contents What is Zadig Quick start How to use? How to

Oct 19, 2021
Continuous profiling for long-term postmortem analysis

profefe, a continuous profiling system, collects profiling data from a fleet of running applications and provides API for querying profiling samples for postmortem performance analysis.

Dec 27, 2022
🔥 Continuous profiling platform — debug performance issues in your code!
🔥  Continuous profiling platform — debug performance issues in your code!

Pyroscope is an open source continuous profiling platform.

Jan 7, 2023
Project developed for the course Software Systems Analysis and Design (SSAD) at IU in F21 semester.

Go knowledge yield summary Project description Project developed for the course Software Systems Analysis and Design (SSAD) at IU in F21 semester. Eva

Sep 17, 2022