| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> |
| <meta http-equiv="Content-Style-Type" content="text/css" /> |
| <meta http-equiv="Content-Script-Type" content="text/javascript" /> |
| <title>Performance Monitoring | EclipseLink 2.5.x Understanding EclipseLink</title> |
| <meta name="generator" content="Oracle DARB XHTML Converter (Mode = document) - Version 1.0.17" /> |
| <meta name="date" content="2013-10-03T10:37:16Z" /> |
| <meta name="robots" content="noarchive" /> |
| <meta name="doctitle" content="Performance Monitoring" /> |
| <meta name="relnum" content="2.5" /> |
| <link rel="stylesheet" type="text/css" href="../../dcommon/style.css" media="screen" /> |
| <link rel="copyright" href="../../dcommon/html/cpyr.htm" title="Copyright" type="text/html" /> |
| <link rel="start" href="../../index.htm" title="Home" type="text/html" /> |
| <link rel="contents" href="toc.htm" title="Contents" type="text/html" /> |
| <link rel="prev" href="monitoring002.htm" title="Previous" type="text/html" /> |
| <link rel="next" href="monitoring004.htm" title="Next" type="text/html" /> |
| <!-- START: Disqus --><script type="text/javascript"> var disqus_developer = 0; </script><!-- END: Disqus --><!-- START: Sharethis --><script type="text/javascript">var switchTo5x=true;</script><script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript" src="http://s.sharethis.com/loader.js"></script> <!-- END: Sharethis --></head> |
| <body bgcolor="#FFFFFF"><iframe id="docheader" frameborder="0" framemargin="0" scrolling="no" src="../../dcommon/header.html"></iframe><script src="http://www.google.com/jsapi" type="text/javascript"></script><script type="text/javascript"> google.load('search', '1', {language : 'en'}); google.setOnLoadCallback(function() { var customSearchOptions = {}; var googleAnalyticsOptions = {}; googleAnalyticsOptions['queryParameter'] = 'q'; googleAnalyticsOptions['categoryParameter'] = ''; customSearchOptions['googleAnalyticsOptions'] = googleAnalyticsOptions; var customSearchControl = new google.search.CustomSearchControl( '016171230611334810008:mdbgdwjv8zu', customSearchOptions); customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET); var options = new google.search.DrawOptions(); options.setSearchFormRoot('cse-search-form'); customSearchControl.draw('cse', options); }, true);</script><link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" /><div id="cse" style="width:100%;"></div> |
| <div class="header"><a id="top" name="top"></a> |
| <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> |
| <tr> |
| <td align="left" valign="top"><div class="booktitle">Understanding EclipseLink, |
| <b>2.5</b><br /></font></td> |
| <td valign="bottom" align="right" width="144"> |
| <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> |
| <tr> |
| <td> </td> |
| <td align="center" valign="top"><a href="toc.htm"><img src="../../dcommon/images/contents.png" alt="Go To Table Of Contents" border="0" height="16" width="16" /><br /> |
| </td><td> </td><td align="center"><a href="../../" target="_top" class="external text" title="Search" rel="nofollow"><img src="../../dcommon/images/search.png" alt="Search" style="border:0;" /><br /><span class="mini"></span></a></td><td> </td><td align="center"><a href="../eclipselink_otlcg.pdf" title="PDF" target="_blank"><img src="../../dcommon/images/pdf_icon.png" style="padding-right:5px;border:0" alt="PDF"></a></td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| </table> |
| <hr /> |
| <table class="navigation simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100" align="center"> |
| <tr> |
| <td align="center"><a href="monitoring002.htm"><img src="../../dcommon/images/larrow.png" alt="Previous" border="0" height="16" width="16" /></a></td> |
| <td align="center"><a href="monitoring004.htm"><img src="../../dcommon/images/rarrow.png" alt="Next" border="0" height="16" width="16" /></a></td> |
| <td> </td> |
| </tr> |
| </table> |
| </div> |
| <!-- class="header" --> |
| <div class="ind"><!-- End Header --><a id="BABJABIH" name="BABJABIH"></a><a id="OTLCG94449" name="OTLCG94449"></a> |
| <div class="sect1"> |
| <h1 class="sect1"><font face="arial, helvetica, sans-serif" color="#330099">Performance Monitoring</font></h1> |
| <p>Use the Performance Monitor to provide detailed profiling and monitoring information in a multithreaded server environment.</p> |
| <p>Enable the monitor in persistence.xml as follows:</p> |
| <pre xml:space="preserve" class="oac_no_warn"> |
| <property name="eclipselink.profiler" value="PerformanceMonitor"/> |
| </pre> |
| <p>The performance monitor can also be enabled through code using a <code>SessionCustomizer</code>.</p> |
| <p>The performance monitor will output a dump of cumulative statistics every minute to the EclipseLink log.</p> |
| <p>The statistics contains three sets of information:</p> |
| <ul> |
| <li> |
| <p><strong>Info</strong>; statistics that are constant informational data, such as the session name, or time of login.</p> |
| </li> |
| <li> |
| <p><strong>Counter</strong>; statistics that are cumulative counters of total operations, such as cache hits, or query executions.</p> |
| </li> |
| <li> |
| <p><strong>Timer</strong>; statistics that are cumulative measurements of total time (in nano seconds) for a specific type of operation, reading, writing, database operations.</p> |
| </li> |
| </ul> |
| <p>Statistics are generally grouped in total and also by query type, query class, and query name. Counters and timers are generally recorded for the same operations, so the time per operation could also be calculated.</p> |
| <p>The time in between statistic dumps can be configured through the <code>PerformanceMonitor</code> API using the <code>setDumpTime(long)</code> API. If dumping the results is not desired, then the <code>dumpTime</code> attribute can be set to be very large such as <code>Long.MAX_VALUE</code>. The statistic can also be accessed in a Java program by using the <code>getOperationTime(String)</code> API.</p> |
| <p>The performance monitor can also be configured with a profile weight.</p> |
| <p>The profile weights are defined on <code>SessionProfiler</code> and include:</p> |
| <ul> |
| <li> |
| <p><strong>NONE</strong>; No statistics are recorded.</p> |
| </li> |
| <li> |
| <p><strong>NORMAL</strong>; Informational statistics are recorded.</p> |
| </li> |
| <li> |
| <p><strong>HEAVY</strong>; Informational, counter and timer statistics are recorded.</p> |
| </li> |
| <li> |
| <p><strong>ALL</strong>; All statistics are recorded (this is the default).</p> |
| </li> |
| </ul> |
| <p><a href="#BABBBIBG">Example 13-1</a> illustrates sample output from the Performance Monitor.</p> |
| <div class="example"><a id="BABBBIBG" name="BABBBIBG"></a><a id="OTLCG94450" name="OTLCG94450"></a> |
| <p><strong><em><font face="arial, helvetica, sans-serif">Example 13-1 Example Output</font></em></strong></p> |
| <pre xml:space="preserve" class="oac_no_warn"> |
| Performance Monitor:1279113281664 |
| Operation Value (ns) |
| Counter:CacheHits 1,375,664 |
| Counter:CacheMisses 127 |
| Counter:ClientSessionCreates 1,204,817 |
| Counter:ConnectCalls 2 |
| Counter:DataModifyQuery 48 |
| Counter:DataModifyQuery:inventory 21 |
| Counter:DataModifyQuery:order 27 |
| Counter:DeleteObjectQuery 67,792 |
| Counter:DeleteObjectQuery:Customer 1 |
| ... |
| Counter:ReadAllQuery 1,041,767. |
| Counter:ReadAllQuery:Item.findByCategory 733,827 |
| Counter:ReadAllQuery:Item.findByCategory:CacheHits 733,779 |
| Counter:ReadAllQuery:Item.findByCategory:CacheMisses 50 |
| ... |
| Counter:ReadObjectQuery 1,058,273 |
| Counter:ReadObjectQuery:Item:item 130,063 |
| Counter:ReadObjectQuery:Item:item:CacheHits 130,063 |
| Counter:ReadObjectQuery:Item:item:CacheMisses 1 |
| Counter:UnitOfWorkCommits 72,568 |
| Counter:UnitOfWorkCreates 471,491 |
| Counter:UnitOfWorkRollbacks 1 |
| Counter:UpdateObjectQuery 71,498 |
| Counter:UpdateObjectQuery:Customer 62,531 |
| ... |
| Info:LoginTime Wed Jul 14 08:55:41 EDT 2010 |
| Info:SessionName file:/scratch/user_domains/servers/mt-1/app.jar |
| Timer:Caching 6,411,372,000 |
| Timer:ConnectionManagement 17,225,641,000 |
| Timer:DeleteObjectQuery 41,351,430,000 |
| Timer:DeleteObjectQuery:Customer 4,441,000 |
| Timer:DeleteObjectQuery:Customer:QueryPreparation 86,000 |
| Timer:DeleteObjectQuery:Customer:SqlGeneration 28,000 |
| Timer:DeleteObjectQuery:Customer:SqlPrepare 72,000 |
| Timer:DeleteObjectQuery:Customer:StatementExecute 2,265,000 |
| ... |
| Timer:InsertObjectQuery 69,111,086,000 |
| Timer:Logging 4,236,000 |
| Timer:Merge 1,144,400,000 |
| Timer:ObjectBuilding 31,914,397,000 |
| Timer:QueryPreparation 984,396,000 |
| Timer:ReadAllQuery 260,943,930,000 |
| Timer:ReadAllQuery:Item:Item.findByCategory 14,790,333,000 |
| Timer:ReadAllQuery:Item:Item.findByCategory:ObjectBuilding 250,959,000 |
| Timer:ReadAllQuery:Item:Item.findByCategory:QueryPreparation 1,880,000 |
| Timer:ReadAllQuery:Item:Item.findByCategory:RowFetch 113,552,000 |
| Timer:ReadAllQuery:Item:Item.findByCategory:SqlGeneration 522,000 |
| Timer:ReadAllQuery:Item:Item.findByCategory:SqlPrepare 2,055,000 |
| Timer:ReadAllQuery:Item:Item.findByCategory:StatementExecute 107,382,000 |
| ... |
| Timer:Register 3,272,443,000 |
| Timer:RowFetch 25,340,990,000 |
| Timer:Sequencing 1,352,326,000 |
| Timer:SqlGeneration 6,646,000 |
| Timer:SqlPrepare 19,536,031,000 |
| Timer:StatementExecute 508,589,220,000 |
| Timer:TXAfterCompletion 1,854,152,000 |
| Timer:TXBeforeCompletion 169,381,843,000 |
| Timer:UnitOfWorkCommit 167,483,825,000 |
| Timer:UpdateObjectQuery 46,440,589,000 |
| Timer:UpdateObjectQuery:Customer 40,466,433,000 |
| Timer:UpdateObjectQuery:Customer:QueryPreparation 867,496,000 |
| Timer:UpdateObjectQuery:Customer:SqlGeneration 98,000 |
| Timer:UpdateObjectQuery:Customer:SqlPrepare 1,319,333,000 |
| Timer:UpdateObjectQuery:Customer:StatementExecute 32,901,366,000 |
| </pre></div> |
| <!-- class="example" --></div> |
| <!-- class="sect1" --></div> |
| <!-- class="ind" --> |
| <!-- Start Footer --> |
| <div class="footer"> |
| <hr /> |
| <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> |
| <col width="33%" /> |
| <col width="*" /> |
| <col width="33%" /> |
| <tr> |
| <td valign="bottom"> |
| <table class="navigation simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100" align="center"> |
| <col width="*" /> |
| <col width="48%" /> |
| <col width="48%" /> |
| <tr> |
| <td> </td> |
| <td align="center"><a href="monitoring002.htm"><img src="../../dcommon/images/larrow.png" alt="Previous" border="0" height="16" width="16" /></a></td> |
| <td align="center"><a href="monitoring004.htm"><img src="../../dcommon/images/rarrow.png" alt="Next" border="0" height="16" width="16" /></a></td> |
| </tr> |
| </table> |
| </td> |
| <td align="center" width="34%"><a href="http://www.eclipse.org/eclipselink/" title="EclipseLink home"><img src="../../dcommon/images/ellogo.png" alt="EclipseLink" width="150" border="0" /></a><br /> |
| |
| |
| <td valign="bottom" align="right"> |
| <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="225"> |
| <tr> |
| <td> </td> |
| <td align="center" valign="top"><a href="toc.htm"><img src="../../dcommon/images/contents.png" alt="Go To Table Of Contents" border="0" height="16" width="16" /><br /> |
| </td><td> </td><td align="center"><a href="../../" target="_top" class="external text" title="Search" rel="nofollow"><img src="../../dcommon/images/search.png" alt="Search" style="border:0;" /><br /><span class="mini"></span></a></td><td> </td><td align="center"><a href="../eclipselink_otlcg.pdf" title="PDF" target="_blank"><img src="../../dcommon/images/pdf_icon.png" style="padding-right:5px;border:0" alt="PDF"></a></td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| </table> |
| </div> |
| <!-- class="footer" --> |
| <div id="copyright">Copyright © 2012 by The Eclipse Foundation under the <a href="http://www.eclipse.org/org/documents/epl-v10.php">Eclipse Public License (EPL)</a><br /> <script type="text/javascript">var LastUpdated = document.lastModified;document.writeln ("Updated: " + LastUpdated);</script> </div><!-- START: Analytics --><script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-1608008-2']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script><!-- END: Analytics --><!-- START: Sharethis --><script>var options={ "publisher": "e2fe9e07-fab6-4f84-83ea-0991b429842c", "position": "right", "ad": { "visible": false, "openDelay": 5, "closeDelay": 0}};var st_hover_widget = new sharethis.widgets.hoverbuttons(options);</script><!-- END: Sharethis --></body> |
| </html> |