MCPcopy Index your code
hub / github.com/cli/cli / BenchmarkGenManToFile

Function BenchmarkGenManToFile

internal/docs/man_test.go:305–318  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

303}
304
305func BenchmarkGenManToFile(b *testing.B) {
306 file, err := os.CreateTemp(b.TempDir(), "")
307 if err != nil {
308 b.Fatal(err)
309 }
310 defer file.Close()
311
312 b.ResetTimer()
313 for i := 0; i < b.N; i++ {
314 if err := renderMan(rootCmd, nil, file); err != nil {
315 b.Fatal(err)
316 }
317 }
318}

Callers

nothing calls this directly

Calls 2

renderManFunction · 0.85
CloseMethod · 0.65

Tested by

no test coverage detected