Patent ID: 8904412

Claim:
A method for collecting one or more performance metrics, the method comprising: providing a plurality of source code instructions having a plurality of macro calls among the plurality of source code instructions, wherein at least one of the plurality of macro calls includes a plurality of predetermined parameters and wherein the at least one of the plurality of macro calls is assigned a desired level of granularity; executing a plurality of object code instructions corresponding to the plurality of source code instructions; receiving a user request to collect the one or more performance metrics, wherein the user request specifies the predetermined parameters, and wherein the predetermined parameters include a starting point, a ending point and the desired level of granularity; determining whether the starting and ending points matches a plurality of reached macro call identifiers of least one of the plurality of macro calls; comparing, if the starting and ending points does not match the plurality of reached macro call identifiers, a predefined level parameter value with the desired level of granularity of least one of the plurality of macro calls; and collecting, the one or more performance metrics using the identified at least one of the plurality of macro calls, if the predefined level parameter value matches the desired level of granularity.