mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-09 06:23:52 +08:00
feat: log uixt action elapsed in seconds
This commit is contained in:
@@ -377,7 +377,19 @@ func (dExt *DriverExt) GenAbsScope(x1, y1, x2, y2 float64) AbsScope {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (dExt *DriverExt) DoAction(action MobileAction) error {
|
func (dExt *DriverExt) DoAction(action MobileAction) error {
|
||||||
log.Info().Str("method", string(action.Method)).Interface("params", action.Params).Msg("start UI action")
|
log.Debug().
|
||||||
|
Str("method", string(action.Method)).
|
||||||
|
Interface("params", action.Params).
|
||||||
|
Msg("uixt action start")
|
||||||
|
actionStartTime := time.Now()
|
||||||
|
|
||||||
|
defer func() {
|
||||||
|
log.Debug().
|
||||||
|
Str("method", string(action.Method)).
|
||||||
|
Interface("params", action.Params).
|
||||||
|
Float64("elapsed(s)", time.Since(actionStartTime).Seconds()).
|
||||||
|
Msg("uixt action end")
|
||||||
|
}()
|
||||||
|
|
||||||
switch action.Method {
|
switch action.Method {
|
||||||
case ACTION_AppInstall:
|
case ACTION_AppInstall:
|
||||||
|
|||||||
Reference in New Issue
Block a user