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

Function BenchmarkGenReSTToFile

doc/rest_docs_test.go:98–112  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

96}
97
98func BenchmarkGenReSTToFile(b *testing.B) {
99 file, err := os.CreateTemp("", "")
100 if err != nil {
101 b.Fatal(err)
102 }
103 defer os.Remove(file.Name())
104 defer file.Close()
105
106 b.ResetTimer()
107 for i := 0; i < b.N; i++ {
108 if err := GenReST(rootCmd, file); err != nil {
109 b.Fatal(err)
110 }
111 }
112}

Callers

nothing calls this directly

Calls 2

GenReSTFunction · 0.85
NameMethod · 0.80

Tested by

no test coverage detected