Hi All,
We
are not very sure if there is any plan or any mechanim already used to
measure the performance of IdAS components. As in almost all usage performance
is the mandatory non-feature requiement that is supported by all
products, we need to provide a mechanism to mesure the performance
of IdAS components(APIs) and also if possible we can provide performance
bench mark for the same.
Requirement (To measure the performance
of IdAS APIs)
-------------------------------------------------------------------------------------
Since IdAS components are inteded
to be used along with consumer code and as well as with service provider
codes, its always a good idea to isolate the time consumed by IdAS APIs
only when used along with these codes and let the consumer and service
provider decide the performance impact of the code owned by them.
At present its not possible to identify
performance issues that occurs becuase of the following reasons as we have
seen so far through debugging,
1. Slow
response in accessing remote resources such as context dbs,remote
objects ,operating on remote APIs and so on becuase bandwidth or any other
infrastructure problem.
2.
Performance issue becuase of error prone or poorly written SPI code or
consumer code.
Proposal to measure performance of IdAS
code
-----------------------------------------------------------------------
We can use one of the following options
to measure the performance
1. Measuirng performanceof IdAS
APIs by using dynamic instrumentation(using various JVM profiling
options during run time) .
2. Implementing static instrumentation(by
adding least CPU bound time based APIs such as start,stop as used
in StopWatch kind of implementation to calculate the time spent by various
APIs).
3. Possibly by building/executing IdAS
based application in some platform provided by performance measuring tools
.
But as mentioned above IdAS components
are not used in isolation like other stand-alone application, so its not
possible to get more accurate or realistic time data as consumed by these
APIs to perform a task in a production environment by using either
dynamic instrumentation mechanism or any performance tools.
So using static instrumentation we will
have more control to extract the time consumed by IdAS APIs from
external codes such as consumer code and service provider code. Once the
time consumed data is obtained through instumentation , the same can be
logged (using trace/debug log level) to a log file.This mechanism will
also add entry and exit time into a method which is or can be added by
apache common log calls already used in IdAS source codes. This instrumentation
can be protected through IsDebuggable/IsLoggable calls so that we will
enable it at a particular log level such as TRACE/DEBUG .
Overally this feature will help the
cosumer or service provider stakeholders to know the performance of IdAS
code in their environment. In addition to that we can create a common package
such as org.eclipse.higgins.util.performance to provide utility methods
for static instrumentation which can be used by IdAS developer,consumers
and Service Providers.
We have a mechanism as suggested by
David and TIM Hahn to implment the same using Stopwatch similar to the
one provided by apache ..Please refer the link http://commons.apache.org/lang/api/org/apache/commons/lang/time/StopWatch.html
for more information.
If all of you think we need this
support , please let me know. Please provide your inputs on this. I am
planning to have a prototype for this once I get some feed backs from all
of you.
Thanks and Regards,
Prakash
---------------------------------------------------------------------------------------------------
Advisory Software Engineer,
Tivoli Security Products
ETZ, Plot No. 3 , Rajiv Gandhi Infotech Park
Phase II, Hinjewadi, Pune - 411057
Ph: +91-20-42025544
e-mail: prakash.mallick@xxxxxxxxxx
---------------------------------------------------------------------------------------------------