The profiling stuff you mention below is a good start - I've got it running
on Win32 AOLserver 4.x

I am seeing intermittent errors from it:
[10/Mar/2003:23:15:58][1332.816][-conn:intranet::2] Error: can't read
"timewas": no such variable
can't read "timewas": no such variable
    while executing
"if {$timewas != 0 } {

                set page [ns_conn url]

                set conntime [expr [clock clicks] - $timewas]

                if {[nsv..."
    (procedure "EndTime" line 9)
    invoked from within
"EndTime trace"

and I'm not sure how this can be happening.

Any thoughts anyone?




Being able to get to the next level of profiling information is crucial
though -  you want to be able to find out
why a slow page/URL detected by the above is so slow and stepping down to
command level profiling at that point is useful.

There's lots of goodies in tcllib (The Standard Tcl Library) including a
pure Tcl profiling module.
I don't think it offers the real/cpu timing breakdown, but its a step in the
right direction and may offer enough information.

Quite what would be required to get it working I'm not sure - I guess
turning it on at initialization and writing some pages that extract and
present the data collected.



AOLserver 3.5 had profiling at URL level and Tcl command level built in.
This has disappeared in 4.x
Was this intentional?









> -----Original Message-----
> From: AOLserver Discussion [mailto:[EMAIL PROTECTED] Behalf
> Of Alfred Werner
> Sent: Friday, March 21, 2003 3:56 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [AOLSERVER] Tcl profiling suggestions with AOLserver?
>
>
> http://sdm.openacs.org/wp/display/140/ has a good presentation on a
> different approach to profiling. (I just happen to have the printout
> next to my keyboard :)
>
> Regards,
> Alfred Werner
>
> On Thu, 20 Mar 2003, Eric Larkin wrote:
>
> > We are using AOLserver (3.4.2 with a ported version of the ACS encoding
> > patches) in our production environment, and have reached the
> point where we
> > would like to profile our Tcl code to find procs that could be
> optimized or
> > rewritten.  We're particularly interested in a report that
> looks something
> > like this:
> >
> > --------------------------------------------------------
> > Procedure                       Calls           Real Time       CPU Time
> > --------------------------------------------------------
> > some_proc                       2               88982           6904
> > another_proc            2               39392           3202
> > yet_another_proc                2               50329           2032
> >
> > We've identified nsprofile
> (http://acs-misc.sourceforge.net/nsprofile.html)
> > as a module which would provide this functionality, but I'm a
> little worried
> > by the documentation, which lists as a pending task: "limiting
> the number of
> > profile data kept. Right now it's unlimited so eventually we'll
> eat all the
> > memory available".
> >
> > We also have some pages that seem to have excessively large
> memory usage in
> > production, so we are also interested in monitoring and/or logging the
> > amount of memory used by each http request and/or proc
> execution.  However,
> > we haven't found any tools to do so.
> >
> > Does anyone have experience using nsprofile in a production environment?
> > Are there other tools (or other ways of solving the same
> problem) that we
> > should consider?
> >
> > Thanks in advance,
> >
> > Eric Larkin
> > Chief Technology Officer
> > Arena Solutions, Inc.  (formerly bom.com)
> > [EMAIL PROTECTED]
> >
> >
> > --
> > AOLserver - http://www.aolserver.com/
> > To Remove yourself from this list:
> http://www.aolserver.com/listserv.html
> > List information and options: http://listserv.aol.com/
> >
>
>
> --
> AOLserver - http://www.aolserver.com/
> To Remove yourself from this list: http://www.aolserver.com/listserv.html
> List information and options: http://listserv.aol.com/
>


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/

Reply via email to