webMethods and Intelligent Business Operations 10.2 | Designing and Implementing Composite Applications | webMethods CAF and OpenCAF Development Help | Performance Monitoring | Measuring Application Performance
 
Measuring Application Performance
In your Composite Application Framework application, you can use custom performance tokens, to measure the performance of a specific portlet, bean, class, or method. You might need to create numerous custom token to obtain a thorough performance analysis of your application.
When creating custom tokens, you should define and initialize all custom tokens using the initialize() method of the managed bean’s code instead of initializing the custom tokens in the methods used before each call. If you want to use custom tokens in non-managed bean code such as a utility class, you can use a static class initialization blocks. You can define custom token and category names. However, to avoid any conflicts during the invocation, you must use unique names. For token names, you should use portlet_or_class_name/method_name.
You should also use the portlet application name as a performance category. Later, you can use the performance category name to browse the performance analysis information of the functionality.
Use separate tokens to measure the performance of different areas of functionality. You can use and invoke the same token, however, using the same token loads extra performance data that can lead to incorrect measurements of the concrete functionality. You can split up a particular function or method call into sections that consists of one or more than one line of code for a more thorough performance analysis.
You can collect performance information by inserting PerfUtil.actionStart(customToken) in the beginning and PerfUtil.actionEnd(customToken) in the end of the business logic which you want to measure and analyze.
public String customFunction() {
try { PerfUtil.actionStart(customToken); ...
<custom_business_logic>
...
return OUTCOME_OK;
}
finally { PerfUtil.actionEnd(customToken); }
}
You can invoke multiple nested tokens in an application. Later, you can browse the nested tokens when you analyze the captured performance snapshot using the Performance Analysis tool.
public String customFunction() {
try { PerfUtil.actionStart(customToken); try {
PerfUtil.actionStart(customNestedToken1); ...
<custom_business_logic>
...
}
finally {
PerfUtil.actionEnd(customNestedToken1); }
...
<custom_business_logic>
...
try {
PerfUtil.actionStart(customNestedToken2); ...
<custom_business_logic>
...
}
finally {
PerfUtil.actionEnd(customNestedToken2); }
return OUTCOME_OK;
}
finally { PerfUtil.actionEnd(customToken); }
}
For more information about creating custom tokens, see Creating Custom Tokens for Performance Monitoring. For more information about measuring the performance using custom tokens, see Using and Extending the MWS Performance Service.

Copyright © 2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release