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/06/20 17:10:16 UTC

[ignite-teamcity-bot] branch test-hist-performance updated: Trusted tests & suite history performance fixes: Bug fixed with builds in and out of scope

This is an automated email from the ASF dual-hosted git repository.

dpavlov pushed a commit to branch test-hist-performance
in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git


The following commit(s) were added to refs/heads/test-hist-performance by this push:
     new 0470757  Trusted tests & suite history performance fixes: Bug fixed with builds in and out of scope
0470757 is described below

commit 0470757b4ef38b569c720cb336b52ed78c638f5e
Author: Dmitriy Pavlov <dp...@apache.org>
AuthorDate: Thu Jun 20 20:09:55 2019 +0300

    Trusted tests & suite history performance fixes: Bug fixed with builds in and out of scope
---
 .../tracked/TrackedBranchChainsProcessor.java      |  7 ++---
 .../ignite/tcignited/history/HistoryCollector.java | 35 +++++++++++++---------
 2 files changed, 24 insertions(+), 18 deletions(-)

diff --git a/tcbot-engine/src/main/java/org/apache/ignite/tcbot/engine/tracked/TrackedBranchChainsProcessor.java b/tcbot-engine/src/main/java/org/apache/ignite/tcbot/engine/tracked/TrackedBranchChainsProcessor.java
index bda0b02..a0b40af 100644
--- a/tcbot-engine/src/main/java/org/apache/ignite/tcbot/engine/tracked/TrackedBranchChainsProcessor.java
+++ b/tcbot-engine/src/main/java/org/apache/ignite/tcbot/engine/tracked/TrackedBranchChainsProcessor.java
@@ -22,18 +22,17 @@ import java.util.concurrent.atomic.AtomicInteger;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 import javax.inject.Inject;
-
 import org.apache.ignite.tcbot.common.conf.ITcServerConfig;
+import org.apache.ignite.tcbot.common.interceptor.AutoProfiling;
 import org.apache.ignite.tcbot.engine.chain.BuildChainProcessor;
 import org.apache.ignite.tcbot.engine.chain.FullChainRunCtx;
 import org.apache.ignite.tcbot.engine.chain.LatestRebuildMode;
 import org.apache.ignite.tcbot.engine.chain.ProcessLogsMode;
-import org.apache.ignite.tcbot.common.interceptor.AutoProfiling;
 import org.apache.ignite.tcbot.engine.conf.ITcBotConfig;
 import org.apache.ignite.tcbot.engine.conf.ITrackedBranch;
 import org.apache.ignite.tcbot.engine.ui.DsChainUi;
-import org.apache.ignite.tcbot.engine.ui.LrTestsFullSummaryUi;
 import org.apache.ignite.tcbot.engine.ui.DsSummaryUi;
+import org.apache.ignite.tcbot.engine.ui.LrTestsFullSummaryUi;
 import org.apache.ignite.tcbot.persistence.IStringCompactor;
 import org.apache.ignite.tcignited.ITeamcityIgnited;
 import org.apache.ignite.tcignited.ITeamcityIgnitedProvider;
@@ -107,7 +106,7 @@ public class TrackedBranchChainsProcessor {
                 boolean includeScheduled = buildResMergeCnt == 1;
 
                 final FullChainRunCtx ctx = chainProc.loadFullChainContext(
-                        tcIgnited,
+                    tcIgnited,
                     chains,
                     rebuild,
                     logs,
diff --git a/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/history/HistoryCollector.java b/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/history/HistoryCollector.java
index f16a1ca..84c4f7d 100644
--- a/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/history/HistoryCollector.java
+++ b/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/history/HistoryCollector.java
@@ -17,6 +17,7 @@
 package org.apache.ignite.tcignited.history;
 
 import com.google.common.cache.CacheBuilder;
+import com.google.common.collect.Iterables;
 import java.time.Duration;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -159,7 +160,7 @@ public class HistoryCollector {
         System.err.println("*** Build " + btId + " branch " + branchId + " builds in scope " +
             buildInScope.size() + " from " + buildIds.size());
 
-        return buildIds;
+        return buildInScope;
     }
 
     @AutoProfiling
@@ -229,23 +230,29 @@ public class HistoryCollector {
         Map<Integer, SuiteInvocation> suiteRunHist = new HashMap<>();
         int successStatusStrId = compactor.getStringId(TestOccurrence.STATUS_SUCCESS);
 
-        fatBuildDao.getAllFatBuilds(srvId, missedBuildsIds).forEach((buildCacheKey, fatBuildCompacted) -> {
-            if(!applicableForHistory(fatBuildCompacted))
-                return;
+        System.err.println("GET ALL: " + missedBuildsIds.size());
+        Iterables.partition(missedBuildsIds, 32*10).forEach(
+            chunk->{
+                fatBuildDao.getAllFatBuilds(srvId, chunk).forEach((buildCacheKey, fatBuildCompacted) -> {
+                    if(!applicableForHistory(fatBuildCompacted))
+                        return;
 
-            SuiteInvocation sinv = new SuiteInvocation(srvId, normalizedBaseBranch, fatBuildCompacted, compactor, (k, v) -> false);
+                    SuiteInvocation sinv = new SuiteInvocation(srvId, normalizedBaseBranch, fatBuildCompacted, compactor, (k, v) -> false);
 
-            Stream<TestCompacted> tests = fatBuildCompacted.getAllTests();
-            tests.forEach(
-                testCompacted -> {
-                    Invocation invocation = testCompacted.toInvocation(fatBuildCompacted, (k, v) -> false, successStatusStrId);
+                    Stream<TestCompacted> tests = fatBuildCompacted.getAllTests();
+                    tests.forEach(
+                        testCompacted -> {
+                            Invocation invocation = testCompacted.toInvocation(fatBuildCompacted, (k, v) -> false, successStatusStrId);
 
-                    sinv.addTest(testCompacted.testName(), invocation);
-                }
-            );
+                            sinv.addTest(testCompacted.testName(), invocation);
+                        }
+                    );
+
+                    suiteRunHist.put(fatBuildCompacted.id(), sinv);
+                });
+            }
+        );
 
-            suiteRunHist.put(fatBuildCompacted.id(), sinv);
-        });
 
         System.err.println("***** + Adding to persisted history   "
             + " branch " + compactor.getStringFromId(normalizedBaseBranch) + ": added " +