mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 10:43:29 +00:00
src/testing: stub b.RunParallel() and PB.Next()
This commit is contained in:
@@ -218,3 +218,19 @@ func (b *B) add(other BenchmarkResult) {
|
|||||||
r.N = 1
|
r.N = 1
|
||||||
r.T += time.Duration(other.NsPerOp())
|
r.T += time.Duration(other.NsPerOp())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A PB is used by RunParallel for running parallel benchmarks.
|
||||||
|
type PB struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
// Next reports whether there are more iterations to execute.
|
||||||
|
func (pb *PB) Next() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// RunParallel runs a benchmark in parallel.
|
||||||
|
//
|
||||||
|
// Not implemented
|
||||||
|
func (b *B) RunParallel(body func(*PB)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user