Added time taken in ms debug output to Admin NodeBrowser when executing a search.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31029 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2011-10-07 10:34:42 +00:00
parent 639e951c20
commit 8e41c0aed3
2 changed files with 15 additions and 1 deletions

View File

@@ -94,6 +94,7 @@ public class AdminNodeBrowseBean implements Serializable
private QName nodeType = null; private QName nodeType = null;
private Path primaryPath = null; private Path primaryPath = null;
private Boolean inheritPermissions = null; private Boolean inheritPermissions = null;
private Long searchElapsedTime = null;
// stores and node // stores and node
transient private DataModel stores = null; transient private DataModel stores = null;
@@ -694,6 +695,7 @@ public class AdminNodeBrowseBean implements Serializable
*/ */
public String submitSearch() public String submitSearch()
{ {
long start = System.currentTimeMillis();
RetryingTransactionCallback<String> searchCallback = new RetryingTransactionCallback<String>() RetryingTransactionCallback<String> searchCallback = new RetryingTransactionCallback<String>()
{ {
public String execute() throws Throwable public String execute() throws Throwable
@@ -725,7 +727,9 @@ public class AdminNodeBrowseBean implements Serializable
try try
{ {
return getTransactionService().getRetryingTransactionHelper().doInTransaction(searchCallback, true); String result = getTransactionService().getRetryingTransactionHelper().doInTransaction(searchCallback, true);
this.searchElapsedTime = System.currentTimeMillis() - start;
return result;
} }
catch (Throwable e) catch (Throwable e)
{ {
@@ -738,6 +742,14 @@ public class AdminNodeBrowseBean implements Serializable
} }
} }
/**
* @return the searchElapsedTime
*/
public Long getSearchElapsedTime()
{
return this.searchElapsedTime;
}
/** /**
* Property wrapper class * Property wrapper class
*/ */

View File

@@ -84,6 +84,8 @@
</h:column> </h:column>
</h:dataTable> </h:dataTable>
<p>Time ms: <h:outputText value="#{AdminNodeBrowseBean.searchElapsedTime}"/></p>
</h:form> </h:form>
</f:view> </f:view>