31 August 2013

Code Instrumentation

A few days ago, I have given a presentation about code instrumentation to my colleagues. Instrumentation is something that shall not be an optional issue; shall be a quality concern.

A slide  from the presentation:

How to Instrument

Use database tables for logging, tracing and performance counters. Archive these log information, when it is not frequently analyzed. If not necessary, erase these table data, otherwise DBAs will complain.
It can also be used file system(utl_file package) for logging. But note that, database tables are very easy to analyze and query.
Use Oracle’s built-in tools for performance monitoring and profiling. (Statspack, AWR reports, PL/SQL Hierarchical Profiler etc)
Only log, necessary information. These log records are read by human eyes. Tons of log information are very difficult to read and analyze.
Please analyze the log and trace information. Be proactive. Take actions before something goes wrong. 
Instrumentation shall be a quality issue and shall not be skipped. It is a code discipline.
In Code Review process, reviewer shall mark un-instrumented code.






No comments: