mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -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
|
||||||
*/
|
*/
|
||||||
|
@@ -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>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user