Comments (8)
Thank you for submitting issue. Let me run your code and investigate.
from go-httpstat.
Basically, there are 2 problems.
One is it shows non-zero time.Duration
(9223372036854
). The other is Proxy time problem.
Let's solve one by one. The first problem is because you old Dial
. httptrace
is enabled when you use DialContext
. Could you update your code to use newer function?
And now I fix not to show non-zero time.Duration
(9223372036854
) on #5
from go-httpstat.
I updated the http.Transport
to use the new DialContext
and updated go-httpstat
to the latest version but the result still doesn't look right. Can you replicate this problem?
t := &http.Transport{
DialContext: (&net.Dialer{
Timeout: 5 * time.Second,
}).DialContext,
TLSHandshakeTimeout: 5 * time.Second,
Proxy: http.ProxyURL(u),
}
c := &http.Client{
Timeout: time.Second * 10,
Transport: t,
}
Result:
2016/10/21 11:08:51 DNS lookup: 0 ms
2016/10/21 11:08:51 TCP connection: 582 ms
2016/10/21 11:08:51 TLS handshake: 0 ms
2016/10/21 11:08:51 Server processing: 98 ms
2016/10/21 11:08:51 Content transfer: 0 ms
2016/10/21 11:08:51 Name Lookup: 0 ms
2016/10/21 11:08:51 Connect: 9223372036854 ms
2016/10/21 11:08:51 Pre Transfer: 9223372036854 ms
2016/10/21 11:08:51 Start Transfer: 9223372036854 ms
2016/10/21 11:08:51 Total: 9223372036854 ms
from go-httpstat.
I reproduced it and found it's because of DNSLookup part.
Fix is on feature/when-connecting-ip-proxy
branch. Can you try it ?
from go-httpstat.
I will merge. Report again if still broken.
from go-httpstat.
Sorry for the late reply, this fixed the issue. Thanks!
from go-httpstat.
Great! Thank you for reporting !
from go-httpstat.
Hi, i'm getting same error on aws lambda, it works fine on my local env, but having issue on lambda. Do you have any idea about that?
Thanks.
from go-httpstat.
Related Issues (10)
- result.ContentTransfer freezed value since update Go1.8 HOT 11
- Goroutine support?
- Multiple runs HOT 2
- Results marshalling to json
- race conditions writing to Result
- Travis Build Failing due to new golint location
- Please cut a new tag for the latest commit
- Not possible to access contentTransfer or total HOT 1
- Wrong sum if all values are zero HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-httpstat.