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 18:58: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 (3)</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" >h2. Configuration <br> * JSE
- Append the path of openjpa-fetch-statistics-version-SNAPSHOT.jar file to the classpath prior
to lanuching the JVM. <br></td></tr>
            <tr><td class="diff-changed-lines" >* [Websphere Application <span
class="diff-changed-words">Server|<span class="diff-added-chars"style="background-color:
#dfd;">For </span>Websphere</span> Application Server] <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">
* OSGi -- ?? -- Probably need another module that creates a proper bundle. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words">h<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">3</span><span
class="diff-added-chars"style="background-color: #dfd;">2</span>.</span> Statistics
Collecting and Monitoring <br></td></tr>
            <tr><td class="diff-unchanged" >{warning:title=Performance Consideration}
<br>There will be a large performance impact when running this tooling. It is not supported,
nor recommended for production use. This tool should not be used on a production machine.
<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 has EAGER fetch mode.</li>
		<li>The field is not 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 Tools 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. This tool should not be
used on a production machine.</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=39&originalVersion=38">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