Trying to do a simple time command for procs...can't get output into console...
- From: daneyul <danielb@xxxxxxxxxxxxxxxxxxxxx>
- Date: 27 Apr 2007 15:10:37 -0700
Hi,
Does anyone have a good generic method of easily timing every proc in
an application for diagnostics? Something that can be turned on and
off at will by simply redefining the proc command? I'm trying from a
freewrapped app, using the following at the beginning of the script,
but I'm failing miserably...
proc TimeProcs {} {
console show
rename ::proc ::proc2
::proc2 ::proc {name vars body} {
::proc2 $name $vars "time {$body}"
}
}
While this doesn't fail, and all the procedures in the script
function, I can't come up with a way to put the time output into the
console.
Inserting a puts command before the time command in the new proc2
procedure gets me into quoting hell. No method seems to work here for
actually getting the output into the console.
Any help would be appreciated!
-Danny
.
- Follow-Ups:
- Re: Trying to do a simple time command for procs...can't get output into console...
- From: Alexandre Ferrieux
- Re: Trying to do a simple time command for procs...can't get output into console...
- From: Glenn Jackman
- Re: Trying to do a simple time command for procs...can't get output into console...
- From: Cameron Laird
- Re: Trying to do a simple time command for procs...can't get output into console...
- Prev by Date: Trying to do a simple time command for procs...can't get output into console...
- Next by Date: Does tclkit support Tclx package
- Previous by thread: Trying to do a simple time command for procs...can't get output into console...
- Next by thread: Re: Trying to do a simple time command for procs...can't get output into console...
- Index(es):
Relevant Pages
|