Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Usage of ./myprofiler:
-dump="": Write raw queries to this file
-host="localhost": Host of database
-interval=1: (float) Sampling interval
-password="": Password
-password="": Password - Can also be supplied using environment variable `MYSQL_PWD`
-port=3306: Port
-last=0: (int) Last N samples are summarized. 0 means summarize all samples
-top=10: (int) Show N most common queries
Expand Down
2 changes: 1 addition & 1 deletion myprofiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func main() {
cfg := Config{}
flag.StringVar(&host, "host", "localhost", "Host of database")
flag.StringVar(&dbuser, "user", dbuser, "User")
flag.StringVar(&password, "password", "", "Password")
flag.StringVar(&password, "password", os.Getenv("MYSQL_PWD"), "Password")
flag.IntVar(&port, "port", 3306, "Port")

flag.StringVar(&dumpfile, "dump", "", "Write raw queries to this file")
Expand Down