On 8/30/06, Adrian Chadd <[EMAIL PROTECTED]> wrote:
Try to keep this just onto squid-dev.
sure thing.
On Wed, Aug 30, 2006, Pranav Desai wrote:
> Hello,
>
> For this patch I have to use the following structures to store the
> timestamps.
> ConnStateData (for clientIn/Out)
> HttpStateData (for serverIn/Out)
> StoreEntry (for diskIn/Out)
>
> With this is becomes kind of difficult to present the result in one
> place. Do you think its possible to use StoreEntry struct for
> everything, since it seems like the all the above structs use
> StoreEntry.
Rightio. The main reason to not increase the size of StoreEntry
is that it'll blow out the memory footprint of your cache.
You could easily double the size of StoreEntry.
So I'd suggest using storeIOState for diskIn/Out. Its nice and
ephemeral. :)
What about the others, client and serverIn/Out ? are those the right ones ?
Also, are the location of the profile points correct, since that would
be important for getting accurate info.
Also: please consider using access/store.log - or create a new
logfile using the logfile.c routines - as cache.log is written
in a simple but potentially easily-bottlenecked method.
The latest snapshots of Squid-2.6 use an external process to write
access/store logs (ie, logs written through the logfile.c
code) and this'll write out very quickly.
A profiling log wouldn't be a bad idea! You'd do it this way:
Global:
Logfile *f;
Startup:
f = logfileOpen("/tmp/profile.log", 1, 1);
To write profiling logs:
logfileLineStart(f);
logfilePrintf(f, "stuff, to print, printf style", printf-style-arguments);
logfilePrintf(f, "and the rest of the line..\n", more-printf-arguments);
logfileLineEnd(f);
.. then during shutdown:
logfileClose(f);
Sounds good ... this should work out perfectly, I think.
-- Pranav
--
------------------------------
http://pd.dnsalias.org