Browse Prior Art Database

How to improve servicability by automatically generating consistent trace points with appropriate level

IP.com Disclosure Number: IPCOM000220059D
Publication Date: 2012-Jul-19
Document File: 2 page(s) / 91K

Publishing Venue

The IP.com Prior Art Database

Abstract

When writing production code, developers are required to make it serviceable by adding trace points in to the code. This might be such things as entry/exit trace including parameters or points where the control flow went along an unexpected route. It is a very laborious process to ensure that they are all there and correct, and there are often missing or incorrect points. This relies heavily on the developer's judgement and experience to include the appropriate points at the right levels, and they are not likely to be consistent across different sections of code. One known solution is to analyse all methods in the program, then use the results to determine which points require trace, and what logging level to use depending on the importance of the method, then add the trace points to the code.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 59% of the total text.

Page 01 of 2

How to improve servicability by automatically generating consistent trace points with appropriate level

It is possible to use known techniques such as aspect oriented programming to apply standard trace points, but this is a manual step to correctly apply the different trace levels to the different methods. This means that methods would have to be identified and categorised somehow.

    The present solution is to analyse all methods in the program, then use the results to determine which points require trace, and what logging level to use depending on the importance of the method, then add the trace points to the code.

    A user would look at if statements, while statements, loops and if the execution follows the wrong path compared with normal (branch prediction) it would log the variables it was using.

    On exit/entry trace it would increase the level the more complexity in the method.

    Using http://en.wikipedia.org/wiki/Cyclomatic_complexity on all methods in the code base

This finds all the decision points, e.g. if statements.

The user would also look at the complexity of the parameters (including any

that are directly accessed from the local scope) and return types by totalling up the number of fields and methods.)

    The user would then order the methods based on their combined score. Then, the user would chop the list into sections based on how many log levels there are. The user would then instrument the code with entry and exit trace based on the appropriate log lev...