By: Bob Arnson
Abstract: When it comes to releasing quality software, everyone could use a little help from his friends. Enter TurboPower's Sleuth QA Suite, which promises to help you find bugs and optimize your Delphi and C++Builder code. By Bob Arnson.
When it comes to releasing quality software, everyone could use a little
help from his friends. Enter TurboPower's Sleuth QA Suite, which promises to help
you find bugs and optimize your Delphi and C++Builder code.
Everyone knows that with Delphi's try...finally statements, leaking
memory, resources, and objects is a thing of the past. Of course, that assumes
you always use try...finally, doesn't it? Er, yes.
QA Suite promises to make leaks and the bugs they cause disappear by finding
them and pointing out where the leak occurs. Sleuth QA Suite is really two
utilities: CodeWatch, the aforementioned leak-detection tool, and StopWatch, a
profiling tool for performance analysis.
CodeWatch is a standalone utility that monitors your program as it runs,
collecting controllable amounts of data about memory and resource allocations
and calls to API functions. When you first run CodeWatch on a program, it
prompts you to run a wizard to configure the amount of error detection it should
do. Why wouldn't you always want the most error detection possible? Because the
more detection CodeWatch performs, the more your program slows, as CodeWatch
checks each allocation and API call. The only time I found performance to be too
slow to be useful on a regular basis was when I enabled CodeWatch's API
parameter logging feature. When parameter logging is enabled, CodeWatch records
the thousands of API calls your code, the VCL, and other components make, so a
slowdown isn't surprising.
CodeWatch provides a shortcut bar that makes it easy to switch among the
views of CodeWatch's analysis of your programs:
CodeWatch's different views make it very easy to focus on whatever kind of
debugging you're interested in at the time.
StopWatch is similar in user interface and operation to CodeWatch. StopWatch
is a standalone utility that collects performance information about your program
as it runs. It too steps through a wizard when you first load a program. Because
collecting accurate performance data can take a significant amount of time,
StopWatch's wizard offers several ways to limit the amount of performance data
that's collected. The easiest is StopWatch's trigger mode, which starts
profiling only when a routine (function or procedure) you specify is called.
When you start to look at performance analysis in a program, you probably have a
pretty good idea of where to start looking, so having to manually specify where
to start profiling isn't a major inconvenience.
Before running your program, StopWatch displays all the routines in your
program in the Routines view. That's where you can specify which routines should
trigger profiling or, if you're not using trigger mode, which routines shouldn't
be profiled at all.
After running your program and collecting performance data, StopWatch shows
the Profile view. The Profile view shows a lot of information, so StopWatch
includes several ways of focusing on what you're interested in seeing. For
example, you can use filters to show only the most-called routines or most
time-consuming routines. You can also organize the view by module and scope,
which helps pinpoint the performance of specific modules and classes in your
StopWatch also includes a Comparison view, which makes it easy to compare the
results of two profiling sessions. For example, you can profile your app as it
exists now, make a change you think will improve performance, then profile the
app again -- proving whether the change actually improved performance.
Server Response from: ETNASC03