Skip to content

Commit

Permalink
feat: add profiler
Browse files Browse the repository at this point in the history
  • Loading branch information
haunt98 committed Jan 17, 2023
1 parent 76665be commit b376905
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# Go
coverage.out
vendor
*.prof

# GoReleaser
dist
4 changes: 2 additions & 2 deletions internal/cli/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit b376905

Please sign in to comment.