feat: add profiler

main
sudo pacman -Syu 2023-01-17 18:17:28 +07:00
parent 76665bed73
commit b3769056e7
2 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@ -13,6 +13,7 @@
# Go
coverage.out
vendor
*.prof
# GoReleaser
dist

View File

@ -55,7 +55,7 @@ func (a *action) Run(c *cli.Context) error {
}
if a.flags.profiler {
f, err := os.Create("cpuprofile")
f, err := os.Create("cpu.prof")
if err != nil {
return fmt.Errorf("os: failed to create: %w", err)
}
@ -84,7 +84,7 @@ func (a *action) Run(c *cli.Context) error {
}
if a.flags.profiler {
f, err := os.Create("memprofile")
f, err := os.Create("mem.prof")
if err != nil {
return fmt.Errorf("os: failed to create: %w", err)
}