mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 18:57:17 -07:00
new: cpuprofile and memprofile options for easy profiling
This commit is contained in:
parent
e9dac1a4cf
commit
47230567ba
4 changed files with 34 additions and 1 deletions
|
@ -9,6 +9,8 @@ type Options struct {
|
|||
Silent *bool
|
||||
NoHistory *bool
|
||||
Commands *string
|
||||
CpuProfile *string
|
||||
MemProfile *string
|
||||
}
|
||||
|
||||
func ParseOptions() (Options, error) {
|
||||
|
@ -19,6 +21,8 @@ func ParseOptions() (Options, error) {
|
|||
Silent: flag.Bool("silent", false, "Suppress all logs which are not errors."),
|
||||
NoHistory: flag.Bool("no-history", false, "Disable interactive session history file."),
|
||||
Commands: flag.String("eval", "", "Run one or more commands separated by ; in the interactive session, used to set variables via command line."),
|
||||
CpuProfile: flag.String("cpuprofile", "", "Write cpu profile `file`."),
|
||||
MemProfile: flag.String("memprofile", "", "Write memory profile to `file`."),
|
||||
}
|
||||
|
||||
flag.Parse()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue