You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dp...@apache.org on 2019/08/16 18:13:08 UTC
[ignite-teamcity-bot] branch master updated: Board: small fixes for
counters
This is an automated email from the ASF dual-hosted git repository.
dpavlov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git
The following commit(s) were added to refs/heads/master by this push:
new d59191f Board: small fixes for counters
d59191f is described below
commit d59191f6ef3e6023e33709982ca13638c34c9cb7
Author: Dmitriy Pavlov <dp...@apache.org>
AuthorDate: Fri Aug 16 21:13:03 2019 +0300
Board: small fixes for counters
---
ignite-tc-helper-web/src/main/webapp/board/index.html | 2 +-
.../java/org/apache/ignite/tcbot/engine/board/BoardService.java | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/ignite-tc-helper-web/src/main/webapp/board/index.html b/ignite-tc-helper-web/src/main/webapp/board/index.html
index 60311fe..82b1ee4 100644
--- a/ignite-tc-helper-web/src/main/webapp/board/index.html
+++ b/ignite-tc-helper-web/src/main/webapp/board/index.html
@@ -34,7 +34,7 @@
loadData();
- setInterval(loadDataSilent, 3000);
+ setInterval(loadDataSilent, 7000);
$.ajax({ url: "/rest/branches/version", success: showVersionInfo, error: showErrInLoadStatus });
});
diff --git a/tcbot-engine/src/main/java/org/apache/ignite/tcbot/engine/board/BoardService.java b/tcbot-engine/src/main/java/org/apache/ignite/tcbot/engine/board/BoardService.java
index 6c8649c..4bfbba6 100644
--- a/tcbot-engine/src/main/java/org/apache/ignite/tcbot/engine/board/BoardService.java
+++ b/tcbot-engine/src/main/java/org/apache/ignite/tcbot/engine/board/BoardService.java
@@ -20,6 +20,7 @@ import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import java.util.Collection;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
@@ -212,7 +213,7 @@ public class BoardService {
changeDao.init();
AtomicInteger cntIssues = new AtomicInteger();
- AtomicInteger cntDefects = new AtomicInteger();
+ HashSet<Integer> processedDefects = new HashSet<>();
stream
.filter(issue -> {
long detected = issue.detectedTs == null ? 0 : issue.detectedTs;
@@ -247,7 +248,7 @@ public class BoardService {
int tcSrvCodeCid = compactor.getStringId(srvCode);
defectStorage.merge(tcSrvCodeCid, srvId, fatBuild,
(k, defect) -> {
- cntDefects.incrementAndGet();
+ processedDefects.add(defect.id());
defect.trackedBranchCidSetIfEmpty(trackedBranchCid);
@@ -263,7 +264,7 @@ public class BoardService {
});
- return cntDefects.get() + " defects processed for " + cntIssues.get() + " issues checked";
+ return processedDefects.size() + " defects processed for " + cntIssues.get() + " issues checked";
}
private void fillBlameCandidates(int srvId, FatBuildCompacted fatBuild, DefectCompacted defect) {