1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-05-20 00:18:12 +08:00
Files
kubo/core/commands/diag.go
Steven Allen d52d183020 feat: add an "ipfs diag profile" command
This should replace the "collect-profiles.sh" script and allow users to
easily collect profiles.

At the moment, it just dumps all profiles into a single zip file. It
does this server-side so it's easy fetch them with curl.

In the future, it would be nice to add:

1. Progress indicators (cpu profiles take 30 seconds).
2. An option to specify which profiles to collect.

But we can handle that later.

Unfortunately, this command doesn't produce symbolized svgs as I didn't
want to depend on having a local go compiler.
2021-07-21 14:51:47 -07:00

18 lines
297 B
Go

package commands
import (
cmds "github.com/ipfs/go-ipfs-cmds"
)
var DiagCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Generate diagnostic reports.",
},
Subcommands: map[string]*cmds.Command{
"sys": sysDiagCmd,
"cmds": ActiveReqsCmd,
"profile": sysProfileCmd,
},
}