gotestbench

package module
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 8 Imported by: 0

README

octocov-go-test-bench

CI Coverage Code to Test Ratio Test Execution Time

Generate octocov custom metrics JSON from the output of go test -bench.

Usage

$ go test -bench . -benchmem | octocov-go-test-bench

Install

go install:

$ go install github.com/k1LoW/octocov-go-test-bench/cmd/octocov-go-test-bench@latest

deb:

$ export OCTOCOV_GO_TEST_BENCH_VERSION=X.X.X
$ curl -o octocov-go-test-bench.deb -L https://github.com/k1LoW/octocov-go-test-bench/releases/download/v$OCTOCOV_GO_TEST_BENCH_VERSION/octocov-go-test-bench_$OCTOCOV_GO_TEST_BENCH_VERSION-1_amd64.deb
$ dpkg -i octocov-go-test-bench.deb

RPM:

$ export OCTOCOV_GO_TEST_BENCH_VERSION=X.X.X
$ yum install https://github.com/k1LoW/octocov-go-test-bench/releases/download/v$OCTOCOV_GO_TEST_BENCH_VERSION/octocov-go-test-bench_$OCTOCOV_GO_TEST_BENCH_VERSION-1_amd64.rpm

apk:

$ export OCTOCOV_GO_TEST_BENCH_VERSION=X.X.X
$ curl -o octocov-go-test-bench.apk -L https://github.com/k1LoW/octocov-go-test-bench/releases/download/v$OCTOCOV_GO_TEST_BENCH_VERSION/octocov-go-test-bench_$OCTOCOV_GO_TEST_BENCH_VERSION-1_amd64.apk
$ apk add octocov-go-test-bench.apk

homebrew tap:

$ brew install k1LoW/tap/octocov-go-test-bench

manually:

Download binary from releases page

Documentation

Index

Constants

View Source
const (
	StasticsTypeAvg                    = "avg"
	StasticsTypeMedByN                 = "med-by-n"
	StasticsTypeMedByNsPerOp           = "med-by-ns-per-op"
	StasticsTypeMedByMBPerS            = "med-by-mb-per-s"
	StasticsTypeMedByAllocedBytesPerOp = "med-by-alloced-bytes-per-op"
	StasticsTypeMedByAllocsPerOp       = "med-by-allocs-per-op"
)

Variables

This section is empty.

Functions

func Convert

func Convert(set parse.Set, stype string) ([]*report.CustomMetricSet, error)

func ParseMetadata added in v1.2.0

func ParseMetadata(in io.Reader) []*report.MetadataKV

ParseMetadata parse stdin and return metadata

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL