Go stdlib package — testing. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.
.AllocsPerRun()NeutralAllocsPerRun(runs int, f func()) float64
AllocsPerRun returns the average number of allocations during calls to f.
.B.Elapsed()NeutralB.Elapsed() time.Duration
Elapsed returns the measured elapsed time of the benchmark.
.B.ReportAllocs()NeutralB.ReportAllocs()
ReportAllocs enables malloc statistics for this benchmark.
.B.ReportMetric()NeutralB.ReportMetric(n float64, unit string)
ReportMetric adds "n unit" to the reported benchmark results.
.B.ResetTimer()NeutralB.ResetTimer()
ResetTimer zeroes the elapsed benchmark time and memory allocation counters
.B.Run()NeutralB.Run(name string, f func(b *B)) bool
Run benchmarks f as a subbenchmark with the given name. It reports
.B.RunParallel()NeutralB.RunParallel(body func(*PB))
RunParallel runs a benchmark in parallel.
.B.SetBytes()NeutralB.SetBytes(n int64)
SetBytes records the number of bytes processed in a single operation.
.B.SetParallelism()NeutralB.SetParallelism(p int)
SetParallelism sets the number of goroutines used by RunParallel to p*GOMAXPROCS.
.B.StartTimer()NeutralB.StartTimer()
StartTimer starts timing a test. This function is called automatically
| FQN | Field | |
|---|---|---|
| testing | fqns[0] |
Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.
// standard library — no go.mod entry required
from codepathfinder.go_rule import ... # testing