Skip to content

Commit

Permalink
improved command help
Browse files Browse the repository at this point in the history
Signed-off-by: chaozbj <[email protected]>
  • Loading branch information
chaozbj committed Jul 25, 2020
1 parent e97f907 commit 344ec6e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions plugins/admin/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Examples:
Flags:
--all Download all profile data
--block Download go routine blocking data
--cpu string Download cpu profile data, you can specify a profile data duration with 's' for second(s), 'm' for minute(s) and 'h' for hour(s), e.g: '1m' for one minute (default "5")
--cpu string Download cpu profile data, you can specify a profile data duration with 's' for second(s), 'm' for minute(s) and 'h' for hour(s), e.g: '1m' for one minute (default "5s")
--disable Disable Knative profiling
--enable Enable Knative profiling
--goroutine Download stack traces of all current goroutines data
Expand All @@ -159,7 +159,7 @@ Flags:
-s, --save-to string The path to save the downloaded profile data, if not speicifed, the data will be saved in current working folder
-t, --target string The profiling target. It can be a Knative component name or a specific pod name, e.g: 'activator' or 'activator-586d468c99-w59cm'
--thread-create Download stack traces that led to the creation of new OS threads data
--trace string Download execution trace data, you can specify a trace data duration with 's' for second(s), 'm' for minute(s) and 'h' for hour(s), e.g: '1m' for one minute (default "5")
--trace string Download execution trace data, you can specify a trace data duration with 's' for second(s), 'm' for minute(s) and 'h' for hour(s), e.g: '1m' for one minute (default "5s")
Global Flags:
--config string config file (default is $HOME/.config/kn/plugins/admin.yaml)
Expand Down
4 changes: 2 additions & 2 deletions plugins/admin/pkg/command/profiling/profiling.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ func NewProfilingCommand(p *pkg.AdminParams) *cobra.Command {
flags.StringVarP(&pflags.target, "target", "t", "", targetFlagUsgae)
flags.StringVarP(&pflags.saveTo, "save-to", "s", "", saveToFlagUsage)
flags.BoolVar(&pflags.allProfiles, "all", false, allFlagUsage)
flags.StringVarP(&pflags.cpuProfile, cpuFlagName, "", "5", cpuFlagUsage)
flags.StringVarP(&pflags.cpuProfile, cpuFlagName, "", "5s", cpuFlagUsage)
flags.BoolVar(&pflags.heapProfile, heapFlagName, false, heapFlagUsage)
flags.BoolVar(&pflags.blockProfile, blockFlagName, false, blockFlagUsage)
flags.StringVarP(&pflags.traceProfile, traceFlagName, "", "5", traceFlagUsage)
flags.StringVarP(&pflags.traceProfile, traceFlagName, "", "5s", traceFlagUsage)
flags.BoolVar(&pflags.memAllocsProfile, memAllocsFlagName, false, memAllocsFlagUsage)
flags.BoolVar(&pflags.mutexProfile, mutexFlagName, false, mutexFlagUsage)
flags.BoolVar(&pflags.goroutineProfile, goroutineFlagName, false, goroutineFlagUsage)
Expand Down
1 change: 0 additions & 1 deletion plugins/admin/pkg/command/profiling/profiling_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import (
"k8s.io/client-go/rest"
k8stesting "k8s.io/client-go/testing"
"knative.dev/client-contrib/plugins/admin/pkg"

"knative.dev/client-contrib/plugins/admin/pkg/testutil"
)

Expand Down

0 comments on commit 344ec6e

Please sign in to comment.