Skip to content

Commit

Permalink
fix: --prof flag
Browse files Browse the repository at this point in the history
  • Loading branch information
howeyc committed Sep 2, 2023
1 parent 23dc68b commit f6d8102
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ledger/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func init() {
ledgerFilePath = os.Getenv("LEDGER_FILE")

rootCmd.PersistentFlags().StringVarP(&ledgerFilePath, "file", "f", ledgerFilePath, "ledger file (default is $LEDGER_FILE)")
rootCmd.PersistentFlags().StringVarP(&cpuprofile, "profile", "", "", "write profile to `file`")
rootCmd.PersistentFlags().StringVarP(&cpuprofile, "prof", "", "", "write cpu profile to `file`")
}

// initConfig reads in config file and ENV variables if set.
Expand Down
8 changes: 4 additions & 4 deletions ledger/genprofile.bash
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash

./ledger --profile "bal.pprof" bal > /dev/null
./ledger --profile "reg.pprof" reg > /dev/null
./ledger --profile "print.pprof" print > /dev/null
./ledger --profile "stats.pprof" stats > /dev/null
./ledger --prof "bal.pprof" bal > /dev/null
./ledger --prof "reg.pprof" reg > /dev/null
./ledger --prof "print.pprof" print > /dev/null
./ledger --prof "stats.pprof" stats > /dev/null

rm default.pgo

Expand Down

0 comments on commit f6d8102

Please sign in to comment.