MCPcopy
hub / github.com/spf13/cobra / BenchmarkGenManToFile

Function BenchmarkGenManToFile

doc/man_docs_test.go:217–231  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

215}
216
217func BenchmarkGenManToFile(b *testing.B) {
218 file, err := os.CreateTemp("", "")
219 if err != nil {
220 b.Fatal(err)
221 }
222 defer os.Remove(file.Name())
223 defer file.Close()
224
225 b.ResetTimer()
226 for i := 0; i < b.N; i++ {
227 if err := GenMan(rootCmd, nil, file); err != nil {
228 b.Fatal(err)
229 }
230 }
231}

Callers

nothing calls this directly

Calls 2

GenManFunction · 0.85
NameMethod · 0.80

Tested by

no test coverage detected