Giter Site home page Giter Site logo

gobench's Introduction

GoBench

GoBench is the first benchmark suite for Go concurrency bugs. Currently, GoBench consists of 82 real bugs from 9 popular open source applications and 103 bug kernels. The bug kernels are carefully extracted and simplified from 67 out of these 82 bugs and 36 additional bugs reported in a recent study to preserve their bug-inducing complexities as much as possible. These bugs cover a variety of concurrency issues, both traditional and Go-specific. We believe GoBench will be instrumental in helping researchers understand concurrency bugs in Go and develop effective tools for their detection.

More detailed descriptions can be found in README.md

Artifact evaluation in our CGO 2021 paper

To evaluation, run

make all

Results can be found in artifact.pdf

Prequisites

  • OS: Linux, MacOS

  • Software: go 1.13+ and rsync

Call GoBench in Go

There is an example for GoBench harness API

package main

import (
	"fmt"
	"github.com/timmyyuan/gobench"
	"path/filepath"
	"strings"
	"time"
)

func main() {
	s := gobench.NewSuite(gobench.SuiteConfig{
		ExecEnvConfig: gobench.ExecEnvConfig{
			Count:   1,
			Timeout: 5 * time.Second,
			Repeat:  2,
			PositiveCheckFunc: func(r *gobench.SingleRunResult) bool {
				return strings.Contains(string(r.Logs), "DATA RACE")
			},
		},
		Name:   "go-rd",
		Type:   gobench.GoKerNonBlocking,
		BugIDs: []string{"etcd_4876"},
		SetUpFunc: func() {
			// You can do some changes for etcd_4876 here before start the suite.
		},
	})

	s.Run()

	result := s.GetResult("etcd_4876")
	fmt.Printf("etcd_4876 logs -> %s\n", filepath.Join(result.OutputDir, "full.log"))

	if result.IsPositive() {
		fmt.Println("OK, we reproduced etcd_4876 in GoBench (GoKer)")
	} else {
		fmt.Println("Sorry, we failed to reproduce etcd_4876 in GoBench (GoKer)")
	}
}

You can find this example in gobench/examples. Run it by:

go run gobench/examples/goker/main.go

gobench's People

Stargazers

Roman avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.