MCPcopy Create free account
hub / github.com/MG-RAST/Shock / startTrace

Function startTrace

shock-server/trace.go:39–55  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

37}
38
39func startTrace(name string) (err error) {
40 if traceOn && (traceFile != nil) {
41 err = fmt.Errorf("tracing is already enabled with file %s", traceFile.Name())
42 return
43 }
44 traceFile, err = os.Create(fmt.Sprintf("%s/%s", conf.PATH_LOGS, name))
45 if err != nil {
46 return
47 }
48 err = trace.Start(traceFile)
49 if err != nil {
50 traceFile.Close()
51 return
52 }
53 traceOn = true
54 return
55}
56
57func stopTrace() (err error) {
58 if traceOn {

Callers 2

durationTraceFunction · 0.85
mapRoutesFunction · 0.85

Calls 2

CreateMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected