refactor: ios perfd

This commit is contained in:
debugtalk
2022-12-15 23:15:58 +08:00
parent 66f1e581c7
commit 358b7dd685
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")