@@ -171,25 +171,25 @@ public void collect(Collector collector){
171171 enabledRepos = enabledRepos .stream ().filter (repo -> GithubRepoMatcher .orgNameMatcher (repo .getRepoUrl (), searchCriteria [1 ])).collect (Collectors .toList ());
172172 }
173173 }
174+ LOG .info ("GitHubCollectorTask:collect start, total enabledRepos=" + enabledRepos .size ());
175+ LOG .warn ("error threshold = " + gitHubSettings .getErrorThreshold ());
174176 collectProcess (collector , enabledRepos );
177+
175178 }
176179
177180
178181 @ SuppressWarnings ({"PMD.AvoidDeeplyNestedIfStmts" })
179182 public void collectProcess (Collector collector , List <GitHubRepo > enabledRepos ) {
180-
181- logBanner ("Starting..." );
182183 long start = System .currentTimeMillis ();
183184 int repoCount = 0 ;
184185 int commitCount = 0 ;
185186 int pullCount = 0 ;
186187 int issueCount = 0 ;
187188 count .set (0 );
188189
189- LOG .info ("GitHubCollectorTask:collect start, total enabledRepos=" + enabledRepos .size ());
190- LOG .warn ("error threshold = " + gitHubSettings .getErrorThreshold ());
191190 for (GitHubRepo repo : enabledRepos ) {
192191 repoCount ++;
192+ long repoStart = System .currentTimeMillis ();
193193 String repoUrl = repo ==null ?"null" :(repo .getRepoUrl () + "/tree/" + repo .getBranch ());
194194 String statusString = "UNKNOWN" ;
195195 long lastUpdated = repo ==null ?0 :repo .getLastUpdated ();
@@ -241,7 +241,7 @@ public void collectProcess(Collector collector, List<GitHubRepo> enabledRepos) {
241241 repo .setLastUpdated (System .currentTimeMillis ());
242242 // if everything went alright, there should be no error!
243243 repo .getErrors ().clear ();
244- statusString = "SUCCESS, pulls=" + pullCount1 + ", commits=" + pullCount1 + ", issues=" + issueCount1 ;
244+ statusString = "SUCCESS, pulls=" + pullCount1 + ", commits=" + commitCount1 + ", issues=" + issueCount1 ;
245245 } catch (HttpStatusCodeException hc ) {
246246 LOG .error ("Error fetching commits for:" + repo .getRepoUrl (), hc );
247247 statusString = "EXCEPTION, " + hc .getClass ().getCanonicalName ();
@@ -275,16 +275,19 @@ public void collectProcess(Collector collector, List<GitHubRepo> enabledRepos) {
275275 LOG .error ("Unexpected exception when collecting url=" + repoUrl , e );
276276 } finally {
277277 String age = readableAge (lastUpdated , start );
278- LOG .info (String .format ("%d of %d, repository=%s, lastUpdated=%d [%s], status=%s" ,
279- repoCount , enabledRepos .size (), repoUrl , lastUpdated , age , statusString ));
280-
278+ long repoEnd = System .currentTimeMillis ();
279+ long repoProcSeconds = (repoEnd - repoStart ) / 1000 ;
280+ LOG .info (String .format ("%d of %d, repository=%s, itemProcessSeconds=%d, lastUpdated=%d [%s], status=%s" ,
281+ repoCount , enabledRepos .size (), repoUrl , repoProcSeconds , lastUpdated , age , statusString ));
281282 }
282283 }
283284 long end = System .currentTimeMillis ();
284285 long elapsedSeconds = (end - start ) / 1000 ;
285286 count .set (commitCount );
286287 LOG .info (String .format ("GitHubCollectorTask:collect stop, totalProcessSeconds=%d, totalRepoCount=%d, totalNewPulls=%d, totalNewCommits=%d totalNewIssues=%d" ,
287288 elapsedSeconds , repoCount , pullCount , commitCount , issueCount ));
289+
290+ collector .setLastExecutionRecordCount (repoCount +pullCount +commitCount +issueCount );
288291 }
289292
290293
0 commit comments