Skip to content

Commit

Permalink
fix: add pkg listen
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhouYixun committed Aug 1, 2023
1 parent c9a8011 commit 198b851
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions cmd/perfmon.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,12 @@ var perfmonCmd = &cobra.Command{
pidStr := ""
if isForce {
perfmonUtil.IsForce = true
}
if pid == -1 && packageName != "" {
pidStr, err = perfmonUtil.GetPidOnPackageName(device, packageName)
if err != nil {
fmt.Println("no corresponding application PID found")
if packageName == "" {
fmt.Println("please enter packageName.")
os.Exit(0)
}
} else if pid != -1 && packageName == "" {
}
if pid != -1 && packageName == "" {
pidStr = fmt.Sprintf("%d", pid)
packageName, err = perfmonUtil.GetNameOnPid(device, pidStr)
if err != nil {
Expand Down

0 comments on commit 198b851

Please sign in to comment.