File tree Expand file tree Collapse file tree
src/main/java/com/xwintop/xJavaFxTool/services/littleTools Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ public FileSearchToolService(FileSearchToolController fileSearchToolController)
102102 }
103103
104104 public void searchContentAction () throws Exception {
105+ long startTime = System .currentTimeMillis ();
105106 String queryText = fileSearchToolController .getSearchContentTextField ().getText ().trim ();
106107 String path = fileSearchToolController .getSearchDirectoryTextField ().getText ().trim ();
107108 BooleanQuery .Builder builder = new BooleanQuery .Builder ();
@@ -157,7 +158,8 @@ public void searchContentAction() throws Exception {
157158 fileSearchToolController .getSearchResultTableData ().add (map );
158159 }
159160 int allCount = indexSearcher .count (new MatchAllDocsQuery ());
160- fileSearchToolController .getSearchTextLabel ().setText ("总共查询到" + topDocs .totalHits .value + "个文档;当前一共缓存" + allCount + "个文档" );
161+ long consumingTime = System .currentTimeMillis () - startTime ;
162+ fileSearchToolController .getSearchTextLabel ().setText ("总共查询到" + topDocs .totalHits .value + "个文档; 当前一共缓存" + allCount + "个文档; 耗时:" + consumingTime + "毫秒" );
161163 }
162164
163165 public void refreshIndexAction () throws Exception {
You can’t perform that action at this time.
0 commit comments