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

Function BenchmarkGenMarkdownToFile

doc/md_docs_test.go:111–125  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

109}
110
111func BenchmarkGenMarkdownToFile(b *testing.B) {
112 file, err := os.CreateTemp("", "")
113 if err != nil {
114 b.Fatal(err)
115 }
116 defer os.Remove(file.Name())
117 defer file.Close()
118
119 b.ResetTimer()
120 for i := 0; i < b.N; i++ {
121 if err := GenMarkdown(rootCmd, file); err != nil {
122 b.Fatal(err)
123 }
124 }
125}

Callers

nothing calls this directly

Calls 2

GenMarkdownFunction · 0.85
NameMethod · 0.80

Tested by

no test coverage detected