forked from SonicCloudOrg/sonic-ios-bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit a18e992 Author: ZhouYixun <291028775@qq.com> Date: Tue Sep 13 10:05:53 2022 +0800 feat:rm_armv6 commit 55d9877 Author: Eason <291028775@qq.com> Date: Wed Sep 7 10:38:51 2022 +0800 Update release.yml commit 62c7db2 Author: Eason <291028775@qq.com> Date: Wed Sep 7 10:30:35 2022 +0800 Update version.go commit 1c21340 Author: Eason <291028775@qq.com> Date: Wed Sep 7 10:30:11 2022 +0800 Update release.yml commit 40959aa Author: ZhouYixun <291028775@qq.com> Date: Wed Sep 7 01:46:05 2022 +0800 feat: version check commit f757dfe Author: Eason <291028775@qq.com> Date: Wed Sep 7 01:42:58 2022 +0800 Update test.yml commit 169b554 Author: Eason <291028775@qq.com> Date: Wed Sep 7 01:41:04 2022 +0800 Update test.yml commit a08f518 Author: Eason <291028775@qq.com> Date: Wed Sep 7 01:32:05 2022 +0800 Update test.yml commit 2d85424 Author: Eason <291028775@qq.com> Date: Wed Sep 7 01:26:06 2022 +0800 Update test.yml commit e18a0bf Author: Eason <291028775@qq.com> Date: Wed Sep 7 01:23:03 2022 +0800 Update test.yml commit e0fa5ca Author: Eason <291028775@qq.com> Date: Wed Sep 7 01:19:48 2022 +0800 Update test.yml commit e614092 Author: Eason <291028775@qq.com> Date: Wed Sep 7 01:17:50 2022 +0800 Update test.yml commit 6e1bca9 Author: Eason <291028775@qq.com> Date: Wed Sep 7 01:14:17 2022 +0800 Update test.yml commit a91b2a8 Author: Eason <291028775@qq.com> Date: Wed Sep 7 01:06:41 2022 +0800 Update test.yml commit 9d2e950 Author: Eason <291028775@qq.com> Date: Wed Sep 7 01:05:36 2022 +0800 Update test.yml commit 5d74004 Author: ZhouYixun <291028775@qq.com> Date: Wed Sep 7 00:53:09 2022 +0800 test actions3 commit 472ea13 Author: ZhouYixun <291028775@qq.com> Date: Wed Sep 7 00:52:38 2022 +0800 test actions3 commit a702b9c Author: ZhouYixun <291028775@qq.com> Date: Wed Sep 7 00:48:19 2022 +0800 test actions2 commit ae2bacb Author: ZhouYixun <291028775@qq.com> Date: Wed Sep 7 00:41:50 2022 +0800 test actions commit d07a80a Author: Eason <291028775@qq.com> Date: Mon Sep 5 20:42:04 2022 +0800 Update release.yml commit a1bd000 Author: Eason <291028775@qq.com> Date: Mon Sep 5 20:33:21 2022 +0800 Update pr-labeler.yml commit 2202321 Author: ZhouYixun <291028775@qq.com> Date: Mon Sep 5 20:19:04 2022 +0800 fix: release version commit 589c34a Author: Eason <291028775@qq.com> Date: Mon Sep 5 16:33:00 2022 +0800 Update pr-labeler.yml commit 6020511 Author: Eason <291028775@qq.com> Date: Mon Sep 5 16:27:19 2022 +0800 Update pull-request-template.md commit 7c4d2e4 Author: Eason <291028775@qq.com> Date: Mon Sep 5 16:24:19 2022 +0800 Update pull-request-template.md commit bff1ef7 Author: Eason <291028775@qq.com> Date: Mon Sep 5 16:21:31 2022 +0800 Update pr-labeler.yml commit d964d56 Merge: de6edc6 e696001 Author: Eason <291028775@qq.com> Date: Mon Sep 5 16:20:38 2022 +0800 Merge pull request SonicCloudOrg#38 from aoliaoaoaojiao/fix_output #fix output commit de6edc6 Author: Eason <291028775@qq.com> Date: Mon Sep 5 16:16:45 2022 +0800 Update pr-labeler.yml commit e696001 Author: 奥利嗷嗷嗷叫 <go3011739322@gmail.com> Date: Mon Sep 5 16:09:10 2022 +0800 fix output commit e26c7c3 Author: Eason <291028775@qq.com> Date: Mon Sep 5 16:01:51 2022 +0800 Create pr-labeler.yml commit 0b0ef8f Author: Eason <291028775@qq.com> Date: Sat Sep 3 23:04:40 2022 +0800 Update release.yml commit 9df055e Author: ZhouYixun <291028775@qq.com> Date: Sat Sep 3 22:55:52 2022 +0800 fix: mount fail on 12.5 commit 2eccb4a Author: Eason <291028775@qq.com> Date: Sat Sep 3 21:09:38 2022 +0800 Update go-lint.yml commit 67d90b7 Author: Eason <291028775@qq.com> Date: Sat Sep 3 21:09:17 2022 +0800 Update go-lint.yml commit a68cef4 Author: ZhouYixun <291028775@qq.com> Date: Sat Sep 3 21:06:26 2022 +0800 feat: pre release commit 5916895 Merge: d82c004 a76a870 Author: Eason <291028775@qq.com> Date: Sat Sep 3 20:59:16 2022 +0800 Merge pull request SonicCloudOrg#37 from SonicCloudOrg/feat-get-perform Feat get perform commit a76a870 Author: ZhouYixun <291028775@qq.com> Date: Sat Sep 3 20:56:02 2022 +0800 fix: some better commit d82c004 Merge: 9cb559e 716fed8 Author: Eason <291028775@qq.com> Date: Sat Sep 3 20:47:54 2022 +0800 Merge pull request SonicCloudOrg#36 from SonicCloudOrg/fix/wda_connection Fix/wda connection commit 716fed8 Author: ZhouYixun <291028775@qq.com> Date: Sat Sep 3 20:46:39 2022 +0800 fix: xctest commit 0b75854 Author: ZhouYixun <291028775@qq.com> Date: Sat Sep 3 20:17:48 2022 +0800 try_fix_connection commit 1ee4b65 Author: ZhouYixun <291028775@qq.com> Date: Thu Sep 1 00:42:02 2022 +0800 fix: xctest commit 2a49f47 Merge: 9cb559e ca6ba16 Author: Eason <291028775@qq.com> Date: Sat Aug 27 23:43:54 2022 +0800 Merge pull request SonicCloudOrg#32 from aoliaoaoaojiao/main 增加性能命令-初版 commit ca6ba16 Author: 奥利奥嗷嗷叫 <go3011739322@gmail.com> Date: Sat Aug 27 11:19:01 2022 +0800 修改引用 commit b1945af Author: 奥利奥嗷嗷叫 <go3011739322@gmail.com> Date: Sat Aug 27 01:16:30 2022 +0800 增加性能方法 # Conflicts: # go.mod # go.sum
- Loading branch information
1 parent
88271cf
commit 4901cf9
Showing
14 changed files
with
348 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
name: Bug 报告 | Bug report | ||
about: Create a report to help us improve | ||
title: "【Bug】" | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**在提出此issue时,我确认了以下几点(保存后请点击复选框):** | ||
|
||
- [ ] 我已自己确认这是Sonic自身的Bug。 | ||
- [ ] 我接受此issue可能被关闭,并查看开发人员的建议。 | ||
|
||
**Bug 描述** | ||
清晰地描述Bug的情况与详细复现步骤 | A clear and concise description of what the bug is. | ||
|
||
**版本** | ||
Sonic的版本号 | Sonic's Version. | ||
部署的系统(mac,windows32...) | System | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
alwaysReplace: true | ||
customLabels: | ||
- text: 'fix' | ||
label: 'fix' | ||
- text: 'feature' | ||
label: 'feature' | ||
- text: 'feat' | ||
label: 'feature' | ||
- text: 'bug' | ||
label: 'fix' | ||
- text: 'doc' | ||
label: 'document' | ||
searchBody: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
**在提出此拉取请求时,我确认了以下几点(保存后请点击复选框):** | ||
|
||
- [ ] 标题为fix、feat或doc开头 | ||
- [ ] 我已检查没有与此请求重复的拉取请求。 | ||
- [ ] 我已经考虑过,并确认这份呈件对其他人很有价值。 | ||
- [ ] 我接受此提交可能不会被使用,并根据维护人员的意愿关闭拉取请求。 | ||
|
||
**填写PR内容:** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Go | ||
name: Go Build | ||
|
||
on: [pull_request] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Go lint Check | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Run golangci-lint | ||
uses: golangci/golangci-lint-action@v3.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,6 @@ builds: | |
goarch: | ||
- "386" | ||
- amd64 | ||
- arm | ||
- arm64 | ||
archives: | ||
- replacements: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
/* | ||
* Copyright (C) [SonicCloudOrg] Sonic Project | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
package cmd | ||
|
||
import ( | ||
"fmt" | ||
"github.com/SonicCloudOrg/sonic-ios-bridge/src/entity" | ||
"github.com/SonicCloudOrg/sonic-ios-bridge/src/util" | ||
giDevice "github.com/electricbubble/gidevice" | ||
"github.com/spf13/cobra" | ||
"os" | ||
"os/signal" | ||
"strconv" | ||
) | ||
|
||
var pefmonCmd = &cobra.Command{ | ||
Use: "perfmon", | ||
Short: "Get perfmon from your device.", | ||
Long: "Get perfmon from your device.", | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
device := util.GetDeviceByUdId(udid) | ||
if device == nil { | ||
os.Exit(0) | ||
} | ||
if appName != "" && pid != -1 { | ||
fmt.Println("pid and appName cannot be used at the same time") | ||
os.Exit(0) | ||
} | ||
if appName != "" { | ||
var err error | ||
pid, err = util.GetApplicationPID(device, appName) | ||
if err != nil { | ||
os.Exit(0) | ||
} | ||
} | ||
util.CheckMount(device) | ||
var opts = &giDevice.PerfmonOption{ | ||
PID: strconv.Itoa(pid), | ||
OpenChanMEM: getMEM, | ||
OpenChanNetWork: getNetWork, | ||
OpenChanCPU: getCPU, | ||
OpenChanFPS: getFPS, | ||
OpenChanGPU: getGPU, | ||
} | ||
output, cancelFunc, err := device.GetPerfmon(opts) | ||
|
||
if err != nil { | ||
fmt.Println(err) | ||
os.Exit(0) | ||
} | ||
done := make(chan os.Signal, 1) | ||
signal.Notify(done) | ||
// add timer? | ||
|
||
for { | ||
select { | ||
case <-done: | ||
if cancelFunc != nil { | ||
cancelFunc() | ||
} | ||
return nil | ||
default: | ||
if data, ok := <-output; ok { | ||
d := util.ResultData(entity.CreatePerformanceData(data)) | ||
fmt.Println(util.Format(d, isFormat, isJson)) | ||
} | ||
} | ||
} | ||
return nil | ||
}, | ||
} | ||
|
||
var ( | ||
getCPU bool | ||
getGPU bool | ||
getMEM bool | ||
getFPS bool | ||
getNetWork bool | ||
pid int | ||
appName string | ||
) | ||
|
||
func init() { | ||
rootCmd.AddCommand(pefmonCmd) | ||
pefmonCmd.Flags().StringVarP(&udid, "udid", "u", "", "device's serialNumber ( default first device )") | ||
pefmonCmd.Flags().IntVarP(&pid, "pid", "p", -1, "get PID data") | ||
pefmonCmd.Flags().StringVarP(&appName, "app-name", "a", "", "get app data ( Valid for memory and CPU only )") | ||
pefmonCmd.Flags().BoolVar(&getCPU, "cpu", false, "get cpu data") | ||
pefmonCmd.Flags().BoolVar(&getMEM, "mem", false, "get memory data") | ||
pefmonCmd.Flags().BoolVar(&getGPU, "gpu", false, "get gpu data") | ||
pefmonCmd.Flags().BoolVar(&getFPS, "fps", false, "get fps data") | ||
pefmonCmd.Flags().BoolVar(&getNetWork, "network", false, "get networking data") | ||
pefmonCmd.Flags().BoolVarP(&isFormat, "format", "f", false, "convert to JSON string and format") | ||
pefmonCmd.Flags().BoolVarP(&isJson, "json", "j", false, "convert to JSON string") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.