• Stars
    star
    532
  • Rank 83,377 (Top 2 %)
  • Language
    Go
  • License
    Do What The F*ck ...
  • Created about 9 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

UI for overview of your Golang package benchmarks progress.

GoBenchUI

Build Status

UI for overview of your package benchmarks progress.

Intro

GoBenchUI does one simple thing - it copies your package into temporary directory, checks out every commit in source control history and run benchmarks for this version. It presents results on highcharts.js based web UI in realtime.

gobenchui demo image

Features

  • nice web based UI with animation, tooltips, icons and realtime status update
  • separate time and memory charts
  • export chart to PNG, JPEG, PDF or SVG formats
  • supports Git and Mercurial version control
  • supports projects that use gb or GO15VENDOREXPERIMENT vendoring
  • advanced commits filtering
  • supports regexps for benchmarks
  • handles build errors and panics

Installation

Just go get it:

go get -u github.com/divan/gobenchui

Usage

To run benchmarks, simply specify package name:

gobenchui -last 10 github.com/jackpal/bencode-go

or, if you're inside this directory, use .:

cd $GOPATH/github.com/jackpal/bencode-go
gobenchui -last 10 .

Browser will pops up. If not, follow instructions printed to console.

Filtering commits

Basic filtering

By default, gobenchui will run benchmarks over all commits in repository. You may want to limit commits amount to last N commits only. Use -last option:

gobenchui -last 20 .

If the number of commits is huge, but you want to get overview for complete project history, you may use -max option. It tries to divide all commits to N equal blocks, spread it as equally as possible and guarantee that you'll get overview for exactly N commits:

gobenchui -max 15 .

You also may use -last and -max in conjunction, to, say, get maximum 10 commits overview from last 100:

gobenchui -max 10 -last 100 .

VCS specific filtering

If you need more powerful commits filtering, you can pass arbitrary arguments to you VCS command with -vcsArgs. Say, for git, you may specify:

gobenchui -vcsArgs "--since=12.hours" .

to get commits from the last 12 hours. Or:

gobenchui -vcsArgs "--author Ivan --since 2.weeks --grep bench" .

to get all commits by author 'Ivan' for the last 2 weeks that has word "bench" in commit message. Or:

gobenchui -vcsArgs "--no-walk --tag" .

to get only commits where tag was added.

In other words, it's really powerful way to select only needed commits. See this git book chapter for more details.

Note, that gobenchui will filter out args that may modify output (like --pretty or --graph), because fixed formatting is used for parsing output.

Benchmark options

In the same manner you may pass additional options to benchmarking tool. Typically you only need to specify regexp for benchmark functions:

gobenchui -bench Strconv$ .

It uses the same regexp rules as go test tool. You may also add additional flags like -short.

Vendoring support

gobenchui supports gb and GO15VENDOREXPERIMENT out of the box. It can be extended to support more vendoring solutions, as it has proper interface for that.

It tries to detect right tool on each commit, so if you introduced vendoring recently, older benchmarks would work also (just make sure, needed packages still in your GOPATH before running benchmarks).

I didn't test heavily that part, so there may be some bugs or corner cases I'm not aware of.

Known issues

  • in case where latest commits has broken test, they will not appear in chart
  • may be issues with internal/ subpackages
  • chart icons for errors aren't exported correctly

Contribute

My frontend JS code sucks, just because, so if you want to design and implement new better web UI - you're more than welcome.

Make sure to run go generate to regenerate assets. Or use GOBENCHUI_DEV env variable to read assets from filesystem.

Afterwords

Hopefully, this tool will bring more incentive to write benchmarks.

License

This program is under WTFPL license

More Repositories

1

txqr

Transfer data via animated QR codes
Go
2,917
star
2

expvarmon

TermUI based monitor for Go apps using expvars (/debug/vars). Quickest way to monitor your Go app(s).
Go
2,017
star
3

gotrace

Concurrency tracer and visualizer for Go (Golang) programming language
JavaScript
1,960
star
4

depscheck

Dependency checker for Golang (Go) packages. Prints stats and suggests to remove small LeftPad-like imports if any.
Go
428
star
5

gofresh

Keep your Go package dependencies fresh. Console tool for checking and updating package dependencies (imports).
Go
141
star
6

txqr-reader

TXQR (Animated QR data transfer) demo reader app for iOS
Swift
92
star
7

gorilla-xmlrpc

Gorilla XML RPC implementation (Golang/Go)
Go
69
star
8

qrlogo

QR with logo overlay generator for Go (Golang)
Go
67
star
9

num2words

num2words - Numbers to words converter in Go (Golang)
Go
52
star
10

whispervis

Whisper p2p messaging visualizing and analysis tool
Go
42
star
11

goabm

Go ABM (Agent-Based Modelling) library
Go
26
star
12

graphx

Graph layout and display library.
Go
19
star
13

divan.github.io

Personal blog
JavaScript
19
star
14

go2nodebinding

Go 2 Node.js Addon C++ bindings generator
Go
13
star
15

psh

Пщ - комманд аліас фо Go
Go
12
star
16

blog

Personal blog sources
JavaScript
10
star
17

ankiqml

Anki QML
Python
8
star
18

txqr-tester-ios

iOS version of txqr-tester client
Swift
8
star
19

hackertyper

HackerTyper for Maemo/Harmattan
Python
6
star
20

qechoprint

Qt-based music identify app powered by EchoNest
C++
4
star
21

talks

JavaScript
3
star
22

wgames

WebOS Games Manager for Maemo
C
3
star
23

dotfiles

.dotfiles
Vim Script
3
star
24

errfreq

Disttribution of 'if err !=' checks per function counter
Go
3
star
25

hclust

Quick rewrite of Agglomerative hierarchical clustering for Node JS
Go
2
star
26

status_flutter

PoC of Flutter version of Status UI
Dart
2
star
27

qt-worldclock

WIP Simple Qt fullscreen worldclock app
QMake
2
star
28

kyivcity

Demo repository for working on documents
HTML
2
star
29

incognito

Incognito Color Scheme for Vim
Vim Script
2
star
30

simulation

Misc simulation code for p2p messaging protocols
Go
2
star
31

vkontakteqml

Vkontante QML client
JavaScript
2
star
32

locust2graphite

Send Locust metrics to Graphite
Go
2
star
33

dep-issue-example

Simple CGo program with .c files in src/, for dep issue demonstration.
Go
1
star
34

graph-experiments

Misc graph related experiments and snippets
JavaScript
1
star
35

interviews

Convert txt to xls for interviews
Go
1
star
36

skating.science

Skating.science website stub
HTML
1
star
37

go-gce-debug-demo

Demo project to test GCE Debugger for Go
Go
1
star
38

whisper-gopherjs

Demo POC of WhisperV6 encryption converted to JS using GopherJS
JavaScript
1
star
39

qml-screens

Screens implementation for QT-podcast contest
1
star
40

vecty-visibility-demo

Small vecty project to check visibilitychange event handler in vecty programs
JavaScript
1
star