openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] OpenJPA > Fetch Statistics
Date Tue, 17 Jul 2012 19:59:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/5/_/styles/combined.css?spaceKey=openjpa&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/openjpa/Fetch+Statistics">Fetch
Statistics</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~curtisr7@gmail.com">Rick
Curtis</a>
    </h4>
        <br/>
                         <h4>Changes (5)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>* The persistent fields
which satisfy all the following conditions will be tracked : <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">**
The field has EAGER fetch mode. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">**
The field is fetched eagerly. <br></td></tr>
            <tr><td class="diff-changed-lines" >** The field is not <span class="diff-added-words"style="background-color:
#dfd;">a</span> primary key. <br></td></tr>
            <tr><td class="diff-unchanged" >** The field is not defined as a version
field. <br> <br>h2. Download <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >The latest OpenJPA <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">Tools
JAR</span> <span class="diff-added-words"style="background-color: #dfd;">FST jar</span>
file can be download from the [SNAPSHOT Repository|https://repository.apache.org/content/groups/snapshots/org/apache/openjpa/openjpa-fetch-statistics/]
or can be built from the source code in [svn|https://svn.apache.org/repos/asf/openjpa/trunk/openjpa-tools/openjpa-fetch-statistics/]
by using Maven 2.2.1 and Java SE 6. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>h2. Configuration <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >h2. Statistics Collecting and Monitoring
<br>{warning:title=Performance Consideration} <br></td></tr>
            <tr><td class="diff-changed-lines" >There will be a large performance
impact when running this tooling. It is not supported, nor recommended for production use.
<span class="diff-changed-words"><span class="diff-added-chars"style="background-color:
#dfd;">*</span>This</span> tool should not be used on a production <span
class="diff-changed-words">machine.<span class="diff-added-chars"style="background-color:
#dfd;">*</span></span> <br></td></tr>
            <tr><td class="diff-unchanged" >{warning}  <br>* When this tool
is configured, it will be active for all persistence units in the JVM. Statistics will be
dumped via the openjpa.Runtime channel with the INFO level every 10 minutes, or when the JVM
terminates.  <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h1><a name="FetchStatistics-FetchStatistics"></a>Fetch Statistics</h1>

<p>The OpenJPA Fetch Statistics Tool (FST) monitors persistent field access and helps
determine which fields in an application are not used. This tool is a development / test time
tool that can help a developer properly tune an application.</p>

<h2><a name="FetchStatistics-Note"></a>Note</h2>

<ul>
	<li>Currently, FST only works with runtime enhancement (javaagent or in JEE container
hook).</li>
</ul>


<ul>
	<li>The persistent fields which satisfy all the following conditions will be tracked
:
	<ul>
		<li>The field is fetched eagerly.</li>
		<li>The field is not a primary key.</li>
		<li>The field is not defined as a version field.</li>
	</ul>
	</li>
</ul>


<h2><a name="FetchStatistics-Download"></a>Download</h2>

<p>The latest OpenJPA FST jar file can be download from the <a href="https://repository.apache.org/content/groups/snapshots/org/apache/openjpa/openjpa-fetch-statistics/"
class="external-link" rel="nofollow">SNAPSHOT Repository</a> or can be built from
the source code in <a href="https://svn.apache.org/repos/asf/openjpa/trunk/openjpa-tools/openjpa-fetch-statistics/"
class="external-link" rel="nofollow">svn</a> by using Maven 2.2.1 and Java SE 6.</p>

<h2><a name="FetchStatistics-Configuration"></a>Configuration</h2>
<ul>
	<li>JSE - Append the path of openjpa-fetch-statistics-version-SNAPSHOT.jar file to
the classpath prior to lanuching the JVM.</li>
	<li><a href="/confluence/pages/createpage.action?spaceKey=openjpa&amp;title=For+Websphere+Application+Server&amp;linkCreation=true&amp;fromPageId=29131113"
class="createlink">Websphere Application Server</a></li>
	<li>OSGi &#8211; ?? &#8211; Probably need another module that creates a proper
bundle.</li>
</ul>


<h2><a name="FetchStatistics-StatisticsCollectingandMonitoring"></a>Statistics
Collecting and Monitoring</h2>
<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/forbidden.gif" width="16"
height="16" align="absmiddle" alt="" border="0"></td><td><b>Performance
Consideration</b><br />There will be a large performance impact when running this
tooling. It is not supported, nor recommended for production use. <b>This tool should
not be used on a production machine.</b></td></tr></table></div>

<ul>
	<li>When this tool is configured, it will be active for all persistence units in the
JVM. Statistics will be dumped via the openjpa.Runtime channel with the INFO level every 10
minutes, or when the JVM terminates.</li>
</ul>


<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"></td><td><b>Example output</b><br
/>[7/13/12 9:05:44:265 CDT] 00000072 Runtime       I   CWWJP9990I: openjpa.Runtime: Info:
Successfully collected fetch statistics from Entities [org.apache.openjpa.test.Address]. The
following fields are FetchType.EAGER and were never fetched [ total 7 ] : <br/>
org.apache.openjpa.test.Address.city<br/>
org.apache.openjpa.test.Address.country<br/>
org.apache.openjpa.test.Address.phone<br/>
org.apache.openjpa.test.Address.state<br/>
org.apache.openjpa.test.Address.street1<br/>
org.apache.openjpa.test.Address.street2<br/>
org.apache.openjpa.test.Address.zip</td></tr></table></div> 

<h2><a name="FetchStatistics-Configurationremoval"></a>Configuration removal</h2>
<ul>
	<li>Stop the JVM and reverse the steps completed to configure the tool.</li>
</ul>

    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/openjpa/Fetch+Statistics">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=29131113&revisedVersion=40&originalVersion=39">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/openjpa/Fetch+Statistics?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message