refactor: ios perfd

This commit is contained in:
debugtalk
2022-12-15 23:15:58 +08:00
parent f4af2d131a
commit 961cc3489c
7 changed files with 77 additions and 42 deletions

View File

@@ -98,7 +98,7 @@ type WorldCupLive struct {
Interval int `json:"interval"` // seconds
Duration int `json:"duration"` // seconds
Timelines []timeLog `json:"timelines"`
PerfData []string `json:"perfData"`
PerfFile string `json:"perf"`
}
func NewWorldCupLive(device uixt.Device, matchName, bundleID string, duration, interval int) *WorldCupLive {
@@ -268,7 +268,7 @@ func (wc *WorldCupLive) dumpResult() error {
encoder.SetEscapeHTML(false)
encoder.SetIndent("", " ")
wc.PerfData = wc.driver.GetPerfData()
wc.PerfFile = wc.driver.Device.StopPerf()
err := encoder.Encode(wc)
if err != nil {
log.Error().Err(err).Msg("encode json failed")

View File

@@ -60,10 +60,10 @@ func TestIOSDouyinWorldCupLive(t *testing.T) {
uixt.WithWDAPort(8700),
uixt.WithWDAMjpegPort(8800),
uixt.WithXCTest("com.gtf.wda.runner.xctrunner"),
// uixt.WithIOSPerfOptions(
// uixt.WithIOSPerfNetwork(true),
// uixt.WithIOSPerfBundleID("com.ss.iphone.ugc.Aweme"),
// ),
uixt.WithIOSPerfOptions(
uixt.WithIOSPerfNetwork(true),
// uixt.WithIOSPerfBundleID("com.ss.iphone.ugc.Aweme"),
),
uixt.WithIOSPcapOn(true),
),
TestSteps: []hrp.IStep{