diff --git a/hrp/code/code.go b/hrp/code/code.go index bb1cb366..1abba60a 100644 --- a/hrp/code/code.go +++ b/hrp/code/code.go @@ -14,6 +14,7 @@ const ( var ( ConfigureError = errors.New("configure error") // 3 UnauthorizedError = errors.New("unauthorized error") // 4 + NetworkError = errors.New("network error") // 5 InvalidPython3Venv = errors.New("prepare python3 venv failed") // 9 ) @@ -114,6 +115,7 @@ var errorsMap = map[error]int{ // environment ConfigureError: 3, UnauthorizedError: 4, + NetworkError: 5, InvalidPython3Venv: 9, // loader diff --git a/hrp/internal/version/VERSION b/hrp/internal/version/VERSION index d98b50b7..5bec49cc 100644 --- a/hrp/internal/version/VERSION +++ b/hrp/internal/version/VERSION @@ -1 +1 @@ -v5.0.0-beta-2409201812 \ No newline at end of file +v5.0.0-beta-2409211833 \ No newline at end of file diff --git a/hrp/pkg/uixt/client.go b/hrp/pkg/uixt/client.go index ac4a91e0..c75c47fb 100644 --- a/hrp/pkg/uixt/client.go +++ b/hrp/pkg/uixt/client.go @@ -73,10 +73,10 @@ type Driver struct { } type DriverResult struct { - RequestUrl string `json:"request_driver_url"` - RequestBody string `json:"request_driver_body,omitempty"` - RequestDuration time.Duration `json:"request_driver_duration"` - RequestTime time.Time `json:"request_driver_time"` + RequestUrl string `json:"request_driver_url"` + RequestBody string `json:"request_driver_body,omitempty"` + RequestDuration int64 `json:"request_driver_duration(ms)"` // ms + RequestTime time.Time `json:"request_driver_time"` } func (wd *Driver) concatURL(u *url.URL, elem ...string) string { @@ -133,7 +133,7 @@ func (wd *Driver) httpRequest(method string, rawURL string, rawBody []byte) (raw driverResult := &DriverResult{ RequestUrl: rawURL, RequestBody: string(rawBody), - RequestDuration: duration, + RequestDuration: duration.Milliseconds(), RequestTime: time.Now(), } wd.session.addRequestResult(driverResult)