[httperf] Modify httperf to do host lookups for each request

Sven Ingebrigt Ulland SvenI.Ulland at iu.hio.no
Thu Apr 6 04:58:37 PDT 2006


Hi. I'm currently running a simple student project where I measure the
impact of DNS TTL values on total response time when fetching a web
page. So far, I (and fellow students) have used httperf for web-only
testing, with success. But for an extension of the project, it would
be desirable to modify httperf to do a DNS lookup for each request.

Unfortunately, my programming skills are below par, but I've looked in
the code, and found gethostbyname() in the core_addr_intern() function
in core.c. However, I have problems seeing how the core_addr_intern()
function is used: It is called without fetching the return value, even
though the function itself returns &h->sin as a sockaddr_in struct..

Line 694--695 of core.c in version 0.8:
  if (param.server)
    core_addr_intern (param.server, strlen (param.server), param.port);

So my questions are: Do any of you have tips on how I can modify the
code so that there is one DNS lookup (gethostbyaddr()) per HTTP query?
Is this a good idea, or should I look for alternative solutions? I
have not come across any viable alternatives so far.

regards,
Sven Ulland


More information about the httperf mailing list