MCPcopy Create free account
hub / github.com/syncthing/syncthing / Run

Method Run

cmd/syncthing/cli/debug.go:32–39  ·  view source on GitHub ↗
(ctx Context)

Source from the content-addressed store, hash-verified

30}
31
32func (p *profileCommand) Run(ctx Context) error {
33 switch t := p.Type; t {
34 case "cpu", "heap":
35 return saveToFile(fmt.Sprintf("debug/%vprof", p.Type), ctx.clientFactory)
36 default:
37 return fmt.Errorf("expected cpu or heap as argument, got %v", t)
38 }
39}
40
41type debugCommand struct {
42 File fileCommand `cmd:"" help:"Show information about a file (or directory/symlink)"`

Callers

nothing calls this directly

Calls 1

saveToFileFunction · 0.85

Tested by

no test coverage detected