|
| 1 | +//go:build codspeed |
| 2 | +// +build codspeed |
| 3 | + |
| 4 | +package codspeed |
| 5 | + |
| 6 | +import ( |
| 7 | + codspeed_testing "github.com/CodSpeedHQ/codspeed-go/testing/testing" |
| 8 | +) |
| 9 | + |
| 10 | +type B = codspeed_testing.B |
| 11 | +type BenchmarkResult = codspeed_testing.BenchmarkResult |
| 12 | +type Cover = codspeed_testing.Cover |
| 13 | +type CoverBlock = codspeed_testing.CoverBlock |
| 14 | +type F = codspeed_testing.F |
| 15 | +type InternalBenchmark = codspeed_testing.InternalBenchmark |
| 16 | +type InternalExample = codspeed_testing.InternalExample |
| 17 | +type InternalFuzzTarget = codspeed_testing.InternalFuzzTarget |
| 18 | +type InternalTest = codspeed_testing.InternalTest |
| 19 | +type M = codspeed_testing.M |
| 20 | +type PB = codspeed_testing.PB |
| 21 | +type T = codspeed_testing.T |
| 22 | +type TB = codspeed_testing.TB |
| 23 | + |
| 24 | +func AllocsPerRun(runs int, f func()) (avg float64) { |
| 25 | + return codspeed_testing.AllocsPerRun(runs, f) |
| 26 | +} |
| 27 | + |
| 28 | +func CoverMode() string { |
| 29 | + return codspeed_testing.CoverMode() |
| 30 | +} |
| 31 | + |
| 32 | +func Coverage() float64 { |
| 33 | + return codspeed_testing.Coverage() |
| 34 | +} |
| 35 | + |
| 36 | +func Init() { |
| 37 | + codspeed_testing.Init() |
| 38 | +} |
| 39 | + |
| 40 | +func Main(matchString func(pat, str string) (bool, error), tests []codspeed_testing.InternalTest, benchmarks []codspeed_testing.InternalBenchmark, examples []codspeed_testing.InternalExample) { |
| 41 | + codspeed_testing.Main(matchString, tests, benchmarks, examples) |
| 42 | +} |
| 43 | + |
| 44 | +func RegisterCover(c codspeed_testing.Cover) { |
| 45 | + codspeed_testing.RegisterCover(c) |
| 46 | +} |
| 47 | + |
| 48 | +func RunBenchmarks(matchString func(pat, str string) (bool, error), benchmarks []codspeed_testing.InternalBenchmark) { |
| 49 | + codspeed_testing.RunBenchmarks(matchString, benchmarks) |
| 50 | +} |
| 51 | + |
| 52 | +func RunExamples(matchString func(pat, str string) (bool, error), examples []codspeed_testing.InternalExample) (ok bool) { |
| 53 | + return codspeed_testing.RunExamples(matchString, examples) |
| 54 | +} |
| 55 | + |
| 56 | +func RunTests(matchString func(pat, str string) (bool, error), tests []codspeed_testing.InternalTest) (ok bool) { |
| 57 | + return codspeed_testing.RunTests(matchString, tests) |
| 58 | +} |
| 59 | + |
| 60 | +func Short() bool { |
| 61 | + return codspeed_testing.Short() |
| 62 | +} |
| 63 | + |
| 64 | +func Testing() bool { |
| 65 | + return codspeed_testing.Testing() |
| 66 | +} |
| 67 | + |
| 68 | +func Verbose() bool { |
| 69 | + return codspeed_testing.Verbose() |
| 70 | +} |
0 commit comments