Saturday, July 12, 2008

What are those prizes in the race? - Part 2

Next up in the list of pizes for the race to be evaluated is SmartInspect. I must be honest here: I'm a CodeSite user and quite satisfied. My evaluation will inevatably be influenced by my CodeSite experiences and there will be a couple of comparisions. This is my second easiest evaluation because I already know the concepts from CodeSite.

Installing
Installing was like it should be: no hassle and flawless. SmartInspect can be used in Delphi, Visual Studio and Java. I've only looked at the Delphi implementation: I guess VS and Java implementations will be compareble.

Using SmartInspect
Basically SmartInspect is an advanced logging tool. You start a session, send out information and that is caught by either a server, a file or in memory. When logging to a server (which is built in into the viewer) the logging information is displayed live while running your program. When logging to a file, you can later view the file with a viewer.

You can of course log a simple string, but more usefull things can be done. You can log objects, the properties of which are available in the viewer. You can log images, stacks traces, system memory information, a screendump of the current window or the desktop window. There's a lot too choose from.

For more advanced debugging tracing methods/functions can be quite helpfull. Now, it basically is a minor thing, but I found the TrackMethod statements vary valuable. The working is comparable to the EnterMethod/LeaveMethod combination. But, EnterMethod/LeaveMethod must be used in pairs. And that means you best add a try/finally construction to your code to make sure the LeaveMethod is executed alwas.

TrackMethod however works with an interface and relies on the reference counting of the interface. This means you only need to add one call at the beginning of amethod/function to track it. There's no need for the try/finally construction. To me, that is a good thing because it won't clutter the readabilty of your code as much. Nice.

The console
Until now CodeSite and SmartInspect are about equal. The only real difference I found was the TrackMethods in SmartInspect, but CodeSite has functionallity to log to the windows event logs. So, the scores are equal at half time. But the real difference is in the console. While the CodeSite viewer isn't bad at all and gives you good possibilities to view and filter log messages, I think SmartInspect wins on points in that department. You have various viewers (a watch pane, some detail panes) for information from you log file. There's plenty to filter and various ways of finding specific information in your log file.

Conclusion
SmartInspect is just a very good product. From experience I can tell you that having these kinds of logging capabilities out of the box helps you to debug your software immensely. I couldn't program without them anymore. CodeSite and SmartInspect are comparable products with (about) equal prices. Download the trial versions to see what's your favourite.

Bye,
Bart

3 comments:

Anonymous said...

Hi,

Thanks for the posting! I agree that SmartInspect and CodeSite can look similar on the first glance. However, when you look under the hood (or start using it in a real project), there are many differences (especially regarding the architecture and protocols). If I could point out just 5 things that SmartInspect does better (I don't want to spam, so I will stick with 5), I would pick the following:

- Speed and Performance

Customers who switched to SmartInspect regularly tell us that the speed differences are HUGE. It looks like both the SmartInspect libraries and the Console are a lot faster.

- Advanced Protocols

Named pipes for local logging is probably one of the best features we've ever implemented in SmartInspect. Additional useful protocols include the text protocol for end-user logs and the memory protocol for integration with exception reporting tools (EurekaLog, madExcept, Jedi etc).

- Advanced Library Features

Too many to list .. just a few: log levels, log rotation, backlog buffer, soon asynchronous logging, log file encryption, high-resolution timers, additional useful log methods such as named counters

- Full Unicode support

Gets more important every day. Tiburon (the new Delphi) will be fully Unicode based and SmartInspect will be a great help when updating applications to Unicode.

- Multi-threading

We offer a lot of things to make it easier to debug multi-threaded applications. First of all, SmartInspect is fully thread-safe (and supports multiple threads over the same connection). We also support logging of threads and processes and have them integrated in the Console (ProcessFlow toolbox and more useful stuff).

There are so many more things that are different; I really have to write a whitepaper / review guide! :-) Anyway, sorry for the comment, but I just had to point out a few differences. :-)

Thanks and good luck with the competition!

Regards,
Dennis

Bart Roozendaal said...

Ok, fair enough. The things that you point out were not looked at by me (and I don't think that will be easy to do really without a real life example).

However, speed can be tested quit quickly. I will implement SmartInspect in our publication engine (which makes a lot of use of logging features) and will compare publication times between CodeSite and SmartInspect. I'll publish those figures somewhere next weeek probably.

Anonymous said...

Great idea! Additionally, some synthetic tests are always a good indicator on how fast a library / implementation is (like logging 100.000 log entries to a file and via TCP/IP to the Console etc). For the Console/Viewer part: you might also want to test auto scrolling when stress testing TCP/IP logging, as this is a demanding scenario.