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

(option to) show the DNS->Ip resolution (and which thread has which) #531

Closed
ldemailly opened this issue Mar 25, 2022 · 4 comments
Closed
Assignees

Comments

@ldemailly
Copy link
Member

Right now this only shows in verbose which is too floody outside of debuging

14:51:56 V network.go:319> Resolved www.google.com:http to tcp addr 142.250.217.68:80

the thread id is also not given so maybe in the summary:

14:50:37 I periodic.go:693> T000 ended after 5.097465303s : 10 calls. qps=1.961759306947067
14:50:37 I periodic.go:693> T002 ended after 5.102628034s : 10 calls. qps=1.959774440419264
14:50:37 I periodic.go:693> T003 ended after 5.104432384s : 10 calls. qps=1.9590816858198195
14:50:37 I periodic.go:693> T001 ended after 5.105603079s : 10 calls. qps=1.9586324759813942

could be instead

14:50:37 I periodic.go:693> T000 ended after 5.097465303s : 10 calls. qps=1.961759306947067 (142.250.217.68:80)
14:50:37 I periodic.go:693> T002 ended after 5.102628034s : 10 calls. qps=1.959774440419264 (...)
14:50:37 I periodic.go:693> T003 ended after 5.104432384s : 10 calls. qps=1.9590816858198195 (...)
14:50:37 I periodic.go:693> T001 ended after 5.105603079s : 10 calls. qps=1.9586324759813942 (...)

though that's only at the end so maybe another block of info once connected - tbd

@wuhaoyujerry
Copy link
Member

I export the destination ip when creating the fast client and pass to the http runner. Then I created a new block at start to print out the ip per thread. Like this

❯ go run . load www.google.com
Fortio dev running at 8 queries per second, 10->10 procs, for 5s: www.google.com
15:15:31 I httprunner.go:87> Starting http test for www.google.com with 4 threads at 8.0 qps and parallel warmup
15:15:31 W http_client.go:147> Assuming http:// on missing scheme for 'www.google.com'
15:15:31 I httprunner.go:113> [0] destination url http://www.google.com resolve to ip address 142.250.69.196:80 
15:15:31 I httprunner.go:113> [1] destination url http://www.google.com resolve to ip address 142.250.69.196:80 
15:15:31 I httprunner.go:113> [2] destination url http://www.google.com resolve to ip address 142.250.69.196:80 
15:15:31 I httprunner.go:113> [3] destination url http://www.google.com resolve to ip address 142.250.69.196:80 
...

Lemme know what you think on this approach.

@ldemailly
Copy link
Member Author

I export the destination ip when creating the fast client and pass to the http runner. Then I created a new block at start to print out the ip per thread. Like this

Why not just print it when we call resolve? (what do you mean by new block and export)

https://github.com/fortio/fortio/blob/master/fhttp/http_client.go#L593 here?

@ldemailly
Copy link
Member Author

btw if it turns out we get the same ip for all conns we can probably consider picking a random one when there is more than 1

@ldemailly
Copy link
Member Author

fixed by #556

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

No branches or pull requests

2 participants