• Stars
    star
    310
  • Rank 134,900 (Top 3 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created almost 9 years ago
  • Updated about 7 years ago

Reviews

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

Repository Details

A generic latency benchmarking library.

bench GoDoc

Bench is a generic latency benchmarking library. It's generic in the sense that it exposes a simple interface (Requester) which can be implemented for various systems under test. Several example Requesters are provided out of the box.

Bench works by attempting to issue a fixed rate of requests per second and measuring the latency of each request issued synchronously. Latencies are captured using HDR Histogram, which observes the complete latency distribution and attempts to correct for Coordinated Omission. It provides facilities to generate output which can be plotted to produce graphs like the following:

Latency Distribution

Example Benchmark

package main

import (
	"fmt"
	"time"

	"github.com/tylertreat/bench"
	"github.com/tylertreat/bench/requester"
)

func main() {
	r := &requester.RedisPubSubRequesterFactory{
		URL:         ":6379",
		PayloadSize: 500,
		Channel:     "benchmark",
	}

	benchmark := bench.NewBenchmark(r, 10000, 1, 30*time.Second, 0)
	summary, err := benchmark.Run()
	if err != nil {
		panic(err)
	}

	fmt.Println(summary)
	summary.GenerateLatencyDistribution(nil, "redis.txt")
}

More Repositories

1

comcast

Simulating shitty network connections so you can build better systems.
Go
10,309
star
2

BoomFilters

Probabilistic data structures for processing continuous, unbounded streams.
Go
1,594
star
3

chan

Pure C implementation of Go channels.
Shell
1,406
star
4

BigQuery-Python

Simple Python client for interacting with Google BigQuery.
Python
456
star
5

Flotilla

Automated message queue orchestration for scaled-up benchmarking.
Go
236
star
6

mq-benchmarking

Performance benchmarks for various message queues.
Go
192
star
7

CS-Literature-of-the-Day

A curated list of computer science literature, updated daily.
164
star
8

go-benchmarks

A few miscellaneous Go microbenchmarks.
Go
147
star
9

fast-topic-matching

Messaging middleware topic matching implementations.
Go
75
star
10

nanomsg-service-discovery

Service-discovery pattern implemented with nanomsg.
Python
25
star
11

gatling

Minimal pub/sub message queue in C.
C
22
star
12

Zinc

Real-time distributed messaging and document synchronization.
Java
15
star
13

InverseBloomFilter

Concurrent inverse Bloom filter.
Go
13
star
14

PubSub-Python

Simple Python client for interacting with Google Cloud Pub/Sub.
Python
9
star
15

log-benchmarking

Benchmarking for distributed logs.
Go
9
star
16

OpenGL-Playground

Playing with OpenGL.
C
8
star
17

thrift-nats

Thrift RPC over NATS.
Go
8
star
18

go-fast

Material for 'So You Wanna Go Fast?' Strange Loop talk
Go
8
star
19

hdrhistogram-writer

API for writing HdrHistograms in a readable format consumable by http://hdrhistogram.github.io/HdrHistogram/plotFiles.html.
Go
7
star
20

go-zab

Go implementation of ZooKeeper Atomic Broadcast.
Go
7
star
21

Dalvik-Baksmali

Android library for disassembling DEX files using baksmali.
Java
7
star
22

nats-leader-election

Leader election implemented with Raft over NATS.
Go
6
star
23

httpmonitor

CLI tool for monitoring HTTP traffic.
Go
5
star
24

kaput.io

Laws of General Systemantics.
CSS
5
star
25

sync

Some basic synchronization primitives.
C
4
star
26

rdcss

RDCSS double-compare-single-swap.
Go
4
star
27

dockerfiles

Contain yourself.
Shell
3
star
28

gae-circleci-java

Example Java Spring app running on Google App Engine deployed from CircleCI.
Java
2
star
29

uthread

C
2
star
30

dexmaker

Java
2
star
31

gatling-gun

Go client for gatling broker.
Go
2
star
32

matchboxd

Replicated matchbox server (https://github.com/Workiva/matchbox)
Go
2
star
33

vessel

Fast, asynchronous client-server messaging.
Go
2
star
34

SQLAlchemyUtils

Useful utilities for working with SQLAlchemy.
Python
2
star
35

TrendBlotter

The world talks, we listen.
JavaScript
2
star
36

vessel.js

Vessel messaging client.
JavaScript
2
star
37

gaeutils

Useful utilities for working with Google App Engine.
Python
1
star
38

crapchat

A janky and obnoxious chat application.
Go
1
star
39

Jockey

Seamless Google App Engine authentication for Android.
Java
1
star
40

type-ahead-search

Toy type-ahead search.
Java
1
star
41

nimbus

Nim
1
star
42

zk-select

Go
1
star
43

dotfiles

The most exciting thing you will ever see.
Vim Script
1
star
44

pipe-sem

C
1
star
45

webhook-test

webhook test
Python
1
star
46

frugal

Java
1
star
47

jump-consistent-hash

Go implementation of Jump Consistent Hash.
Go
1
star
48

config-parser

A simple API for parsing ini-like configuration files.
1
star