Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timeout in the first Marshal/Unmarshal when the struct is very deep #138

Closed
liuq19 opened this issue Nov 24, 2021 · 0 comments · Fixed by #137
Closed

timeout in the first Marshal/Unmarshal when the struct is very deep #138

liuq19 opened this issue Nov 24, 2021 · 0 comments · Fixed by #137

Comments

@liuq19
Copy link
Collaborator

liuq19 commented Nov 24, 2021

A very deep and large struct is pretouched at first, then, it is marshaled or unmarshaled in TestTimeOutOp.
And all time is recorded.

command:

 go test -v  -count=4 -run TestTimeOutOp

output:

Pretouch time is: 2.023615109s
Pretouch done
=== RUN   TestTimeOutOp
==================
==================
The marshal and unmarshal time is: 3.511962887s
--- PASS: TestTimeOutOp (3.51s)
=== RUN   TestTimeOutOp
==================
==================
The marshal and unmarshal time is: 3.595865ms
--- PASS: TestTimeOutOp (0.00s)
=== RUN   TestTimeOutOp
==================
==================
The marshal and unmarshal time is: 4.327786ms
--- PASS: TestTimeOutOp (0.00s)
=== RUN   TestTimeOutOp
==================
==================
The marshal and unmarshal time is: 19.701935ms
--- PASS: TestTimeOutOp (0.02s)
PASS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant