Before you start
Writing code for an application is the first stage in the long process required to deliver robust production-quality programs. Code must be tested to vet its operation and accuracy. Code must often be profiled to remove bottlenecks that impede performance and to remove wasteful or inadvertent use of resources, especially memory. Code must also be monitored -- to pinpoint failures, of course, but also to identify usage patterns, opportunities for further enhancement and optimization, and attempted and actual intrusions.
The Eclipse Test & Performance Tools Platform (TPTP) is a software architecture and several realized components (so far) that extend the Eclipse platform to include test, performance, and monitoring tools. This "Eclipse Test & Performance Tools Platform" series explores the capabilities of TPTP. Part 1 demonstrates how to profile a Java™ technology application. Part 2 demonstrates how to capture and transform arbitrary log files to the widely supported Common Base Events (CBE) format. Part 3 explains how to manage application testing.
This tutorial shows how to use the capabilities of the Eclipse TPTP to convert a typical application log file into CBE occurrences. With a modicum of specifications and some light coding to create a series of rules, you can transform virtually any log file into a unified, structured format. Then, using the Eclipse TPTP and other specialized tools, you can combine, process, and quickly discern usage patterns, performance profiles, and errors.
In this tutorial, you learn how to write an adapter to transform a typical Linux® software service log file into CBE data. You create the transform incrementally and debug the transform with the Eclipse TPTP Adapter Configuration Editor, then the Generic Log Adapter (GLA) to input, transform, and emit the data.
You should have experience with software development and the entire software development life cycle, including testing and profiling. You should also have experience installing software from the command line, and setting and managing shell and system environment variables, such as the shell's PATH variable and the Java CLASSPATH. Additionally, it's vital that you have some experience reading and writing regular expressions. Acquaintance with Eclipse and the Eclipse user interface (UI) paradigms is also beneficial.
You can run Eclipse on any system that has a JVM, such as Solaris, Linux, Mac OS X, or Windows. If you don't have a JVM and Eclipse installed on your system, make sure you have at least 300 MB of disk space free for all the software. You also need enough free physical memory to run the JVM. In general, 64 MB or more of free physical memory is recommended.
You must install several software packages on your UNIX®, Linux, Mac OS X, or Microsoft® Windows® system. You need a functioning Java Virtual Machine (JVM), a copy of the Eclipse SDK, a copy of the Eclipse TPTP runtime, and several prerequisites and co-requisites on which the Eclipse TPTP depends. You also need a copy of the Eclipse TPTP GLA, which allows you to transform log files in a stand-alone application or in your own application. Here's everything you need:



