Skip to content
New issue

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

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

Already on GitHub? # to your account

How do you get pre-connection stats? #13

Open
bandtank opened this issue May 22, 2015 · 2 comments
Open

How do you get pre-connection stats? #13

bandtank opened this issue May 22, 2015 · 2 comments

Comments

@bandtank
Copy link

cURL allows you to specify much more specific timing categories as follows:

time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_pretransfer: %{time_pretransfer}\n
time_redirect: %{time_redirect}\n
time_starttransfer: %{time_starttransfer}\n
time_total: %{time_total}\n

The result looks like this:

time_namelookup: 0.015
time_connect: 0.065
time_appconnect: 0.299
time_pretransfer: 0.299
time_redirect: 0.000
time_starttransfer: 0.913
time_total: 0.914

Is something like this possible in siege? I've been looking through http.c to see if I could figure out where to extract this information, but it's not clear to me if it's even being recorded. Any tips or information would be greatly appreciated.

@JoeDog
Copy link
Owner

JoeDog commented May 22, 2015

Thing are separated by library dependencies. socket stuff, including
lookups, is in sock.c, the protocol stuff is in http.c, ssl stuff in ssl.c,
etc.

The transaction logic is in client.c

This means everything you want to time is located in three different
locations. On the bright side, each of those gets a CONN struct (defined in
sock.h) So I'd put the data there:

typedef struct
{
[snipped]
struct {
float connect;
float lookup;
float appconnect;
float redirect;
float whatever;
} times;
} CONN;

CONN is passed as CONN *C;

So in each individual module, when after you time it, assign it:

C->times.connect = 0.001;
C->times.lookup = 0.011;

etc.

On Fri, May 22, 2015 at 12:02 PM, Anthony Andriano <notifications@github.com

wrote:

cURL allows you to specify much more specific timing categories as follows:

time_namelookup: %{time_namelookup}\n time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n time_pretransfer:
%{time_pretransfer}\n time_redirect: %{time_redirect}\n time_starttransfer:
%{time_starttransfer}\n ---------\n time_total: %{time_total}\n

The result looks like this:

__time_namelookup: 0.015
time_connect: 0.065
time_appconnect: 0.299
time_pretransfer: 0.299
time_redirect: 0.000
time_starttransfer: 0.913

time_total: 0.914__

Is something like this possible in siege? I've been looking through http.c
to see if I could figure out where to extract this information, but it's
not clear to me if it's even being recorded. Any tips or information would
be greatly appreciated.


Reply to this email directly or view it on GitHub
#13.

@bandtank
Copy link
Author

thanks. i was able to break out some of the various pieces of the connection sequence using your method.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants