MCPcopy
hub / github.com/dgraph-io/dgraph / collectDebugInfo

Function collectDebugInfo

dgraph/cmd/debuginfo/run.go:95–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93}
94
95func collectDebugInfo() (err error) {
96 if debugInfoCmd.directory == "" {
97 debugInfoCmd.directory, err = os.MkdirTemp("/tmp", "dgraph-debuginfo")
98 if err != nil {
99 return fmt.Errorf("error while creating temporary directory: %s", err)
100 }
101 } else {
102 err = os.MkdirAll(debugInfoCmd.directory, 0644)
103 if err != nil {
104 return err
105 }
106 }
107 glog.Infof("using directory %s for debug info dump.", debugInfoCmd.directory)
108
109 collectDebug()
110
111 if debugInfoCmd.archive {
112 return archiveDebugInfo()
113 }
114 return nil
115}
116
117func collectDebug() {
118 if debugInfoCmd.alphaAddr != "" {

Callers 1

initFunction · 0.85

Calls 4

collectDebugFunction · 0.85
archiveDebugInfoFunction · 0.85
InfofMethod · 0.80
ErrorfMethod · 0.45

Tested by

no test coverage detected