MCPcopy Index your code
hub / github.com/coder/coder / BenchmarkString20

Function BenchmarkString20

cryptorand/strings_test.go:136–142  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

134}
135
136func BenchmarkString20(b *testing.B) {
137 b.SetBytes(20)
138 b.ReportAllocs()
139 for i := 0; i < b.N; i++ {
140 _, _ = cryptorand.String(20)
141 }
142}
143
144func BenchmarkStringUnsafe20(b *testing.B) {
145 mkstring := func(charSetStr string, size int) (string, error) {

Callers

nothing calls this directly

Calls 1

StringFunction · 0.92

Tested by

no test coverage detected