Skip to content
Permalink
Browse files
Board: small fixes for counters
  • Loading branch information
dspavlov committed Aug 16, 2019
1 parent c2e89ae commit d59191f6ef3e6023e33709982ca13638c34c9cb7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
@@ -34,7 +34,7 @@

loadData();

setInterval(loadDataSilent, 3000);
setInterval(loadDataSilent, 7000);

$.ajax({ url: "/rest/branches/version", success: showVersionInfo, error: showErrInLoadStatus });
});
@@ -20,6 +20,7 @@
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 @@ protected String issuesToDefects() {
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 @@ protected String issuesToDefects() {
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 @@ protected String issuesToDefects() {

});

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) {

0 comments on commit d59191f

Please sign in to comment.