[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-10-03 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16637148#comment-16637148
 ] 

ASF GitHub Bot commented on IGNITE-9541:


asfgit closed pull request #23: IGNITE-9541 Add row highlight for 'failed', add 
title for columns, re…
URL: https://github.com/apache/ignite-teamcity-bot/pull/23
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ignite-tc-helper-web/src/main/webapp/comparison.html 
b/ignite-tc-helper-web/src/main/webapp/comparison.html
index 5efe4e3..7868f64 100644
--- a/ignite-tc-helper-web/src/main/webapp/comparison.html
+++ b/ignite-tc-helper-web/src/main/webapp/comparison.html
@@ -29,11 +29,11 @@
 
 
 
-TESTS
+TESTS
 COUNT
 
-
-
+
+
 
 
 
@@ -42,8 +42,8 @@
 
 PASSED
 
-
-
+
+
 
 
 
@@ -52,8 +52,8 @@
 
 FAILED
 
-
-
+
+
 
 
 
@@ -62,8 +62,8 @@
 
 IGNORED
 
-
-
+
+
 
 
 
@@ -72,19 +72,19 @@
 
 MUTED
 
-
-
+
+
 
 
 
 
 
-PROBLEMS
+PROBLEMS
 
 TOTAL
 
-
-
+
+
 
 
 
@@ -92,8 +92,8 @@
 
 EXECUTION TIMEOUT
 
-
-
+
+
 
 
 
@@ -102,8 +102,8 @@
 
 JVM CRASH
 
-
-
+
+
 
 
 
@@ -112,8 +112,8 @@
 
 OOME
 
-
-
+
+
 
 
 
@@ -122,8 +122,8 @@
 
 EXIT CODE
 
-
-
+
+
 
 
 
@@ -200,6 +200,7 @@
 if (dates.length === 0) {
 printImportantMessage(num, "#ff", "No data for the selected 
period");
 fillAllDataCells(num, "");
+$('.title' + num).html("");
 
 return;
 } else {
@@ -211,37 +212,47 @@
 (firstDate === lastDate ? firstDate : ("the period from " 
+ firstDate + " to " + lastDate)) + "");
 } else {
 $("#info" + num).html("");
-if (document.getElementById("info" + anotherNum).innerHTML === 
"") {
-document.getElementById("showInfo").style.display = "none";
+if ($('#info' + anotherNum).text() === ''){
+$('#showInfo').css('display', 'none')
 }
 }
 }
 
-let anotherMedian;
-let result = {};
+$('.title' + num).html('min - median - max');
 
 for (let i = 0; i < prOcc.length; i++) {
-result = getMinMaxMedian(statistics[prOcc[i]]);
-anotherMedian = parseMedian(document.getElementById(prOcc[i] + 
anotherNum).innerHTML);
-
-$('#' + prOcc[i] + num).html(result.min + " - " + result.median +  
" - " + result.max);
-
-if (!isNaN(anotherMedian)){
-if (result.median > anotherMedian){
-document.getElementById(prOcc[i] + 
num).style.backgroundColor = "#ffeee9";
-document.getElementById(prOcc[i] + 
anotherNum).style.backgroundColor = "#e5ffe8";
-} else if (result.median < anotherMedian){
-document.getElementById(prOcc[i] + 
anotherNum).style.backgroundColor = "#ffeee9";
-document.getElementById(prOcc[i] + 
num).style.backgroundColor = "#e5ffe8";
-}
-}
+fillCellWithStatistics(prOcc[i], num, statistics, dates);
+fillCellWithStatistics(tOcc[i], num, statistics, dates);
+}
+}
+
+function fillCellWithStatistics(prefix, num, statistics, dates) {
+let result = getMinMaxMedian(statistics[prefix]);
 
-result = getMinMaxMedian(statistics[tOcc[i]]);
+$('#' + prefix + num).html(result.min + " - " + result.median +  " - " 
+ result.max);
 
-$('#' + tOcc[i] + num).html(result.min + " - " + result.median + " 
- " + result.max);
+compareAndHighlight(prefix, num, result.median);
+
+drawGraph(prefix, num, dates, statistics[prefix], prefix);
+}
 
-drawGraph(prOcc[i], num, dates, statistics[prOcc[i]], prOcc[i]);
-drawGraph(tOcc[i], num, dates, statistics[tOcc[i]], tOcc[i]);
+function compareAndHighlight(prefix, thisNum, thisMedian){
+let anotherNum = (thisNum === 1) ? 2 : 1;
+
+let thisElement = $('#' + prefix + thisNum);
+let 

[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-10-01 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16634140#comment-16634140
 ] 

ASF GitHub Bot commented on IGNITE-9541:


zzzadruga opened a new pull request #23: IGNITE-9541 Add row highlight for 
'failed', add title for columns, re…
URL: https://github.com/apache/ignite-teamcity-bot/pull/23
 
 
   …place JS code  with JQuery


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16629194#comment-16629194
 ] 

ASF GitHub Bot commented on IGNITE-9541:


asfgit closed pull request #21: IGNITE-9541 Fix bugs, refactor and add new info 
on html page
URL: https://github.com/apache/ignite-teamcity-bot/pull/21
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
index 837a9dc..bbf96a2 100644
--- 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
+++ 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
@@ -408,14 +408,18 @@ private boolean isHistoryAgeLessThanSecs(SuiteInBranch 
key, int seconds, Expirab
 
 List buildRefs = loadBuildHistory(buildHistCache(), 90, 
suiteInBranch,
 (key, sinceBuildId) -> {
-buildsFromRest.addAll(teamcity.getFinishedBuilds(projectId, 
branch, sinceDate, untilDate, sinceBuildId));
+List reverseList = teamcity.getFinishedBuilds(projectId, 
branch, sinceDate, untilDate, sinceBuildId);
+
+Collections.reverse(reverseList);
+
+buildsFromRest.addAll(reverseList);
 
 return buildsFromRest;
 });
 
 if (sinceDate != null || untilDate != null) {
 if (!buildsFromRest.isEmpty() && sinceDate != null){
-int firstBuildId = 
buildRefs.indexOf(buildsFromRest.get(buildsFromRest.size() - 1));
+int firstBuildId = buildRefs.indexOf(buildsFromRest.get(0));
 
 if (firstBuildId == 0)
 return buildsFromRest;
@@ -457,7 +461,7 @@ private boolean isHistoryAgeLessThanSecs(SuiteInBranch key, 
int seconds, Expirab
 if (build == null || build.isFakeStub())
 return false;
 
-Date date = build.getFinishDate();
+Date date = build.getStartDate();
 
 if (sinceDate != null && untilDate != null)
 if ((date.after(sinceDate) || 
date.equals(sinceDate)) &&
diff --git a/ignite-tc-helper-web/src/main/webapp/comparison.html 
b/ignite-tc-helper-web/src/main/webapp/comparison.html
index 909ee44..5efe4e3 100644
--- a/ignite-tc-helper-web/src/main/webapp/comparison.html
+++ b/ignite-tc-helper-web/src/main/webapp/comparison.html
@@ -16,13 +16,19 @@
 
 
 
-
+
 
 DATE INTERVAL
-
+
 
 
 
+
+
+FEATURES
+
+
+
 TESTS
 COUNT
 
@@ -167,7 +173,11 @@
 return parseFloat(string.substring(string.indexOf("-") + 2, 
string.lastIndexOf("-") - 1));
 }
 
-function printStatistics(num, map) {
+function printStatistics(num, map, sinceDate, untilDate) {
+clearBackgroundFromAllDataCells();
+clearGraphs(num);
+
+const anotherNum = (num === 1) ? 2 : 1;
 const parseTime = d3.timeParse("%d-%m-%YT%H:%M:%S");
 
 let statistics = {};
@@ -187,15 +197,30 @@
 }
 }
 
-const anotherNum = (num === 1) ? 2 : 1;
+if (dates.length === 0) {
+printImportantMessage(num, "#ff", "No data for the selected 
period");
+fillAllDataCells(num, "");
+
+return;
+} else {
+let firstDate = 
moment(parseTime(map[0].startDate)).format("DD-MM-");
+let lastDate = moment(parseTime(map[map.length - 
1].startDate)).format("DD-MM-");
+
+if ((sinceDate.format("DD-MM-") !== firstDate) || 
(untilDate.format("DD-MM-") !== lastDate)) {
+printImportantMessage(num, "#ffb856", "Data for " +
+(firstDate === lastDate ? firstDate : ("the period from " 
+ firstDate + " to " + lastDate)) + "");
+} else {
+$("#info" + num).html("");
+if (document.getElementById("info" + anotherNum).innerHTML === 
"") {
+document.getElementById("showInfo").style.display = "none";
+}
+}
+}
+
 let anotherMedian;
 let result = {};
 
 for (let i = 0; i < prOcc.length; i++) {
-
-document.getElementById(prOcc[i] + 1).style.background = null;
-document.getElementById(prOcc[i] + 2).style.background = null;
-
 result = getMinMaxMedian(statistics[prOcc[i]]);
 anotherMedian = parseMedian(document.getElementById(prOcc[i] + 
anotherNum).innerHTML);
 
@@ 

[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16629012#comment-16629012
 ] 

ASF GitHub Bot commented on IGNITE-9541:


zzzadruga opened a new pull request #21: IGNITE-9541 Fix bugs, refactor and add 
new info on html page
URL: https://github.com/apache/ignite-teamcity-bot/pull/21
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-25 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16627658#comment-16627658
 ] 

ASF GitHub Bot commented on IGNITE-9541:


asfgit closed pull request #18: IGNITE-9541 Hotfix for old cache
URL: https://github.com/apache/ignite-teamcity-bot/pull/18
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
index 33497bb..837a9dc 100644
--- 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
+++ 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
@@ -443,50 +443,59 @@ private boolean isHistoryAgeLessThanSecs(SuiteInBranch 
key, int seconds, Expirab
 idUntil = idUntil == -2 ? buildRefs.size() - 1 : idUntil;
 }
 
-if (idSince == -1 || idUntil == -1)
-return Collections.emptyList();
-else if (idSince == -3 || idUntil == -3) {
+if (idSince == -3 || idUntil == -3) {
 AtomicBoolean stopFilter = new AtomicBoolean();
 AtomicBoolean addBuild = new AtomicBoolean();
 
-return buildRefs.stream()
-.filter(b -> {
-if (stopFilter.get())
-return addBuild.get();
-
-Build build = getBuild(b.href);
-
-if (build == null || build.isFakeStub())
-return false;
+return buildRefs.stream()
+.filter(b -> {
+if (stopFilter.get())
+return addBuild.get();
 
-Date date = build.getFinishDate();
+Build build = getBuild(b.href);
 
-if (sinceDate != null && untilDate != null)
-return (date.after(sinceDate) || 
date.equals(sinceDate)) &&
-(date.before(untilDate) || 
date.equals(untilDate));
-else if (sinceDate != null) {
-if (date.after(sinceDate) || 
date.equals(sinceDate)) {
-stopFilter.set(true);
-addBuild.set(true);
+if (build == null || build.isFakeStub())
+return false;
 
-return true;
-}
+Date date = build.getFinishDate();
 
-return false;
-}
+if (sinceDate != null && untilDate != null)
+if ((date.after(sinceDate) || 
date.equals(sinceDate)) &&
+(date.before(untilDate) || 
date.equals(untilDate)))
+return true;
 else {
 if (date.after(untilDate)) {
 stopFilter.set(true);
 addBuild.set(false);
-
-return false;
 }
 
+return false;
+}
+else if (sinceDate != null) {
+if (date.after(sinceDate) || 
date.equals(sinceDate)) {
+stopFilter.set(true);
+addBuild.set(true);
+
 return true;
 }
-})
-.collect(Collectors.toList());
-}
+
+return false;
+}
+else {
+if (date.after(untilDate)) {
+stopFilter.set(true);
+addBuild.set(false);
+
+return false;
+}
+
+return true;
+}
+})
+.collect(Collectors.toList());
+}
+else if (idSince == -1 || idUntil == -1)
+return Collections.emptyList();
 else
 return buildRefs.subList(idSince, idUntil + 1);
 }


 



[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-25 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16627643#comment-16627643
 ] 

ASF GitHub Bot commented on IGNITE-9541:


zzzadruga opened a new pull request #18: IGNITE-9541 Hotfix for old cache
URL: https://github.com/apache/ignite-teamcity-bot/pull/18
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-25 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16627599#comment-16627599
 ] 

ASF GitHub Bot commented on IGNITE-9541:


asfgit closed pull request #17: IGNITE-9541 Hotfix
URL: https://github.com/apache/ignite-teamcity-bot/pull/17
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgniteTeamcityConnection.java
 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgniteTeamcityConnection.java
index 9ddd68a..65ece8d 100644
--- 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgniteTeamcityConnection.java
+++ 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgniteTeamcityConnection.java
@@ -486,7 +486,8 @@ public String basicAuthToken() {
 String branchFilter = isNullOrEmpty(branchName) ? "" :",branch:" + 
branchName;
 String sinceDateFilter = sinceDate == null ? "" : ",sinceDate:" + 
getDateYyyyMmDdTHhMmSsZ(sinceDate);
 String untilDateFilter = untilDate == null ? "" : ",untilDate:" + 
getDateYyyyMmDdTHhMmSsZ(untilDate);
-String buildNoFilter = sinceBuildId == null ? "" : ",sinceBuild:(id:" 
+ sinceBuildId + ")";
+String buildNoFilter = sinceBuildId == null || 
!(sinceDateFilter.isEmpty() && untilDateFilter.isEmpty()) ?
+"" : ",sinceBuild:(id:" + sinceBuildId + ")";
 
 return sendGetXmlParseJaxb(host + "app/rest/latest/builds"
 + "?locator="


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-25 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16627472#comment-16627472
 ] 

ASF GitHub Bot commented on IGNITE-9541:


zzzadruga opened a new pull request #17: IGNITE-9541 Hotfix
URL: https://github.com/apache/ignite-teamcity-bot/pull/17
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-25 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16627334#comment-16627334
 ] 

ASF GitHub Bot commented on IGNITE-9541:


asfgit closed pull request #9: IGNITE-9541 Add the comparison for two general 
statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/ITeamcity.java 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/ITeamcity.java
index 6be0446..4151793 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/ITeamcity.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/ITeamcity.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.ci;
 
 import java.io.File;
+import java.util.Date;
 import java.util.List;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ExecutorService;
@@ -54,6 +55,7 @@
 public interface ITeamcity extends AutoCloseable {
 
 String DEFAULT = "";
+
 long DEFAULT_BUILDS_COUNT = 1000;
 
 CompletableFuture> getProjectSuites(String projectId);
@@ -61,45 +63,45 @@
 String serverId();
 
 /**
- * @param projectId suite ID (string without spaces)
- * @param branch
- * @return list of builds in historical order, recent builds coming last
+ * @param projectId Suite ID (string without spaces).
+ * @param branch Branch in TC identification.
+ * @return List of builds in historical order, recent builds coming last.
  */
 default List getFinishedBuilds(String projectId, String branch) {
-return getFinishedBuilds(projectId, branch, null, null);
+return getFinishedBuilds(projectId, branch, null, null, null);
 };
 
 /**
  * @param projectId suite ID (string without spaces).
  * @param branch Branch name in TC identification.
- * @param cnt builds count.
+ * @param sinceDate Since date.
+ * @param untilDate Until date.
  * @param sinceBuildId Some build ID in the past to to use as minimal 
build to export.
  * @return list of builds in historical order, recent builds coming last.
  */
-List getFinishedBuilds(String projectId, String branch, Long 
cnt, Integer sinceBuildId);
+List getFinishedBuilds(String projectId, String branch, Date 
sinceDate, Date untilDate, Integer sinceBuildId);
 
 /**
- * Includes snapshot dependencies failed builds into list
+ * Includes snapshot dependencies failed builds into list.
  *
- * @param projectId suite ID (string without spaces)
- * @param branch branch in TC identification
- * @return list of builds in historical order, recent builds coming last
+ * @param projectId suite ID (string without spaces).
+ * @param branch branch in TC identification.
+ * @return list of builds in historical order, recent builds coming last.
  */
 default List getFinishedBuildsIncludeSnDepFailed(String 
projectId, String branch){
-return getFinishedBuildsIncludeSnDepFailed(projectId, branch, null, 
null);
+return getFinishedBuildsIncludeSnDepFailed(projectId, branch, null);
 };
 
 /**
  * Includes 'snapshot dependencies failed' builds into list.
  * loads build history with following parameter: 
defaultFilter:false,state:finished
  *
- * @param projectId suite ID (string without spaces)
- * @param branch branch in TC identification
- * @param cnt builds count
- * @param sinceBuildId limit builds export with some build number, not 
operational for Persistent connection
- * @return list of builds in historical order, recent builds coming last
+ * @param projectId suite ID (string without spaces).
+ * @param branch branch in TC identification.
+ * @param sinceBuildId limit builds export with some build number, not 
operational for Persistent connection.
+ * @return list of builds in historical order, recent builds coming last.
  */
-List getFinishedBuildsIncludeSnDepFailed(String projectId, 
String branch, Long cnt, Integer sinceBuildId);
+List getFinishedBuildsIncludeSnDepFailed(String projectId, 
String branch, Integer sinceBuildId);
 
 /**   */
 CompletableFuture> getRunningBuilds(@Nullable String 
branch);
@@ -107,8 +109,24 @@
 /**   */
 CompletableFuture> getQueuedBuilds(@Nullable String branch);
 
-default int[] getBuildNumbersFromHistory(String projectId, String 
branchNameForHist, Long cnt) {
-return getFinishedBuilds(projectId, branchNameForHist, cnt, 
null).stream().mapToInt(BuildRef::getId).toArray();
+/**
+ * @param projectId 

[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-20 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16621993#comment-16621993
 ] 

ASF GitHub Bot commented on IGNITE-9541:


dspavlov commented on issue #9: IGNITE-9541 Add the comparison for two general 
statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#issuecomment-423176000
 
 
   I've applied PR locally and tried it on existing DB. The result is a failure 
by not found build
   ```
'Exception UncheckedIOException: java.io.FileNotFoundException: Service 
https://ci.ignite.apache.org/app/rest/latest/builds/id:1362502 returned not 
found error.Responding with error, status code: 404 (Not Found).
   Details: jetbrains.buildServer.server.rest.errors.NotFoundException: No 
build found by id '1362502'.
   Could not find the entity requested. Check the reference is correct and the 
user has permissions to access the entity.
   ```
   
   It is quite normal TC Bot has reference to build, but TC don't have it 
(history in the bot is longer that in TC), so it is up to bot correctly handle 
absent REST requests.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617644#comment-16617644
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218096888
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgniteTeamcityHelper.java
 ##
 @@ -378,7 +402,16 @@ public Build getBuild(String href) {
 }
 
 public ProblemOccurrences getProblems(Build build) {
-return getJaxbUsingHref(build.problemOccurrences.href, 
ProblemOccurrences.class);
+if (build.problemOccurrences != null) {
+ProblemOccurrences problemOccurrences = 
getJaxbUsingHref(build.problemOccurrences.href, ProblemOccurrences.class);
+
+problemOccurrences.problemOccurrences
+.forEach(p -> p.buildRef = build);
 
 Review comment:
   No need new line here.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617664#comment-16617664
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218103132
 
 

 ##
 File path: ignite-tc-helper-web/src/main/webapp/statistics.html
 ##
 @@ -0,0 +1,213 @@
+
+
+Ignite Teamcity - statistics master's branch
+
+https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css;>
+
+
+https://code.jquery.com/jquery-1.12.4.js";>
+https://code.jquery.com/ui/1.12.1/jquery-ui.js";>
+
+
+
+table {
+width: 70%;
+border-collapse: collapse;
+}
+td, th {
+
+padding: 10px 5px 10px 5px;
+}
+th {
+text-align: left;
+padding: 5px;
+background-color: #f5f5ff;
+color: #00;
+}
+tr:nth-child(odd) { background-color: #fafaff; }
+
+
+

[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617671#comment-16617671
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218102484
 
 

 ##
 File path: ignite-tc-helper-web/src/main/webapp/statistics.html
 ##
 @@ -0,0 +1,213 @@
+
+
+Ignite Teamcity - statistics master's branch
+
+https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css;>
+
+
+https://code.jquery.com/jquery-1.12.4.js";>
+https://code.jquery.com/ui/1.12.1/jquery-ui.js";>
+
+
+

[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617663#comment-16617663
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218099007
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/result/issues/IssueRef.java
 ##
 @@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.ci.tcmodel.result.issues;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ * Issue short version from list of build's related issues.
+ *
+ * See example of XML, e.g. here
+ * https://ci.ignite.apache.org/app/rest/latest/builds/id:1694977/relatedIssues
+ */
+public class IssueRef {
+@XmlAttribute public String id;
+@XmlAttribute public String url;
+
+@Override public String toString() {
 
 Review comment:
   Missed javadoc.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617668#comment-16617668
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218102850
 
 

 ##
 File path: ignite-tc-helper-web/src/main/webapp/statistics.html
 ##
 @@ -0,0 +1,213 @@
+
+
+Ignite Teamcity - statistics master's branch
+
+https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css;>
+
+
+https://code.jquery.com/jquery-1.12.4.js";>
+https://code.jquery.com/ui/1.12.1/jquery-ui.js";>
+
+
+
+table {
+width: 70%;
+border-collapse: collapse;
+}
+td, th {
+
+padding: 10px 5px 10px 5px;
+}
+th {
+text-align: left;
+padding: 5px;
+background-color: #f5f5ff;
+color: #00;
+}
+tr:nth-child(odd) { background-color: #fafaff; }
+
+
+

[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617657#comment-16617657
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218101483
 
 

 ##
 File path: ignite-tc-helper-web/src/main/webapp/comparison.html
 ##
 @@ -0,0 +1,286 @@
+
+
+
+
+Ignite Teamcity - comparison master's branch in the date 
interval
+
+https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css;>
+
+https://cdn.jsdelivr.net/jquery/latest/jquery.min.js";>
+https://cdn.jsdelivr.net/momentjs/latest/moment.min.js";>
+https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js";>
+https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css; />
+
+https://d3js.org/d3.v4.min.js";>
+
+
+
+
+
+
+DATE INTERVAL
+
+
+
+TESTS
+COUNT
+
+
+
+PASSED
+
+
+
+FAILED
+
+
+
+IGNORED
+
+
+
+MUTED
+
+
+PROBLEMS
+TOTAL
+
+
+
+
+
+
+EXECUTION_TIMEOUT
+
+
+
+JVM_CRASH
+
+
+
+OOME
+
+
+
+EXIT_CODE
+
+
+
+FAILED_TESTS
+
+
+
+SNAPSHOT_DEPENDENCY_ERROR
+
+
+
+OTHER
+
+
+
+
+log1
+log2
+
+
+
+

[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617669#comment-16617669
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218104124
 
 

 ##
 File path: ignite-tc-helper-web/src/main/webapp/statistics.html
 ##
 @@ -0,0 +1,213 @@
+
+
+Ignite Teamcity - statistics master's branch
+
+https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css;>
+
+
+https://code.jquery.com/jquery-1.12.4.js";>
+https://code.jquery.com/ui/1.12.1/jquery-ui.js";>
+
+
+
+table {
+width: 70%;
+border-collapse: collapse;
+}
+td, th {
+
+padding: 10px 5px 10px 5px;
+}
+th {
+text-align: left;
+padding: 5px;
+background-color: #f5f5ff;
+color: #00;
+}
+tr:nth-child(odd) { background-color: #fafaff; }
+
+
+

[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617655#comment-16617655
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218104050
 
 

 ##
 File path: ignite-tc-helper-web/src/main/webapp/statistics.html
 ##
 @@ -0,0 +1,213 @@
+
+
+Ignite Teamcity - statistics master's branch
+
+https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css;>
+
+
+https://code.jquery.com/jquery-1.12.4.js";>
+https://code.jquery.com/ui/1.12.1/jquery-ui.js";>
+
+
+
+table {
+width: 70%;
+border-collapse: collapse;
+}
+td, th {
+
+padding: 10px 5px 10px 5px;
+}
+th {
+text-align: left;
+padding: 5px;
+background-color: #f5f5ff;
+color: #00;
+}
+tr:nth-child(odd) { background-color: #fafaff; }
+
+
+
+
+var g_shownDataHashCodeHex = ""
+var g_updTimer = null;
+
+$(document).ready(function() {
+$.getScript("js/testfails-2.0.js", function(data, textStatus, jqxhr){ 
});
+
+$( document ).tooltip();
+loadData();
+//todo fix setInterval( function() { checkForUpdate(); }, 3);
+
+$.ajax({ url: "rest/branches/version",  success: showVersionInfo, 
error: showErrInLoadStatus });
+
+if(g_updTimer==null) {
+g_updTimer=setTimeout(tstTimeout, 3200);
+}
+setInterval(tstTimeout, 1);
+});
+
+function tstTimeout() {
+
+if(g_updTimer!=null) {
+clearTimeout(g_updTimer);
+g_updTimer=null;
+}
+
+
+var d = new Date();
+var n = d.getTime();
+
+// $(document.body).prepend("timeout at "+n+"
"); + + +if(g_updTimer==null) { +g_updTimer=setTimeout(tstTimeout, 3200); +} +} + +function parmsForRest() { +var curReqParms = ""; +var server = findGetParameter("server"); +if(server!=null) { +curReqParms += "&server=" + server; +} + +var buildType = findGetParameter("buildType"); +if(buildType!=null) { +curReqParms += "&buildType=" + buildType; +} + +var branch = findGetParameter("branch"); +if(branch!=null) { +curReqParms += "&branch=" + branch; +} + +var count = findGetParameter("count"); +if(count!=null) { +curReqParms += "&count=" + count; +} + +var sinceDate = findGetParameter("sinceDate"); +if(sinceDate!=null) { +curReqParms += "&sinceDate=" + sinceDate; +} + +var untilDate = findGetParameter("untilDate"); +if(untilDate!=null) { +curReqParms += "&untilDate=" + untilDate; +} + +curReqParms = curReqParms.replace("&","?"); + +return curReqParms; +} + +function loadData() { +var curFailuresUrl = "rest/build/history" + parmsForRest(); + +$("#loadStatus").html(" Please wait"); +$.ajax({ +url: curFailuresUrl, +success: function(result) { +if(result.updateRequired || (isDefinedAndFilled(result.runningUpdates) && result.runningUpdates>0)) { +setTimeout(checkForUpdate, 3000) +$("#loadStatus").html(" Updating"); +} else { +$("#loadStatus").html(""); +} +showData(result); +g_shownDataHashCodeHex = isDefinedAndFilled(result.hashCodeHex) ? result.hashCodeHex : ""; +}, +error: showErrInLoadStatus +}); +} +function showData(result) { +$("#statistics").html(showBuildHistory(result)); +} + +function median(arr){ +arr = arr.sort(function(a, b){ return a - b; }); +var i = arr.length / 2; +return i % 1 == 0 ? (arr[i - 1] + arr[i]) / 2 : arr[Math.floor(i)]; +} + +function formatString(string) { +if (string.indexOf("_") < string.indexOf(":")) +string = string.substring(string.indexOf("_") + 1); + +return "" + string.substring(0, string.indexOf(":") + 1) + "" + string.substring(string.indexOf(":") + 1); +} + +function

[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617645#comment-16617645
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218096565
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgniteTeamcityHelper.java
 ##
 @@ -354,18 +357,39 @@ public String basicAuthToken() {
 private List getBuildHistory(@Nullable String buildTypeId,
 @Nullable String branchName,
 boolean dfltFilter,
-@Nullable String state) {
+@Nullable String state){
+
+return getBuildHistory(buildTypeId, branchName, dfltFilter, state, 
null, null);
+}
+
+private List getBuildHistory(@Nullable String buildTypeId,
+@Nullable String branchName,
+boolean dfltFilter,
+@Nullable String state,
+@Nullable Date sinceDate,
+@Nullable Date untilDate) {
 String btFilter = isNullOrEmpty(buildTypeId) ? "" : ",buildType:" + 
buildTypeId + "";
 String stateFilter = isNullOrEmpty(state) ? "" : (",state:" + state);
-String brachFilter = isNullOrEmpty(branchName) ? "" :",branch:" + 
branchName;
+String branchFilter = isNullOrEmpty(branchName) ? "" :",branch:" + 
branchName;
+String sinceDateFilter = sinceDate == null ? "" : ",sinceDate:" + 
getDateYyyyMmDdTHhMmSsZ(sinceDate);
+String untilDateFilter = untilDate == null ? "" : ",untilDate:" + 
getDateYyyyMmDdTHhMmSsZ(untilDate);
 
 return sendGetXmlParseJaxb(host + "app/rest/latest/builds"
 + "?locator="
 + "defaultFilter:" + dfltFilter
 + btFilter
 + stateFilter
-+ brachFilter
-+ ",count:1000", Builds.class).getBuildsNonNull();
++ branchFilter
++ ",count:" + DEFAULT_BUILDS_COUNT
++ sinceDateFilter
++ untilDateFilter, Builds.class).getBuildsNonNull();
+}
+
+public String getDateYyyyMmDdTHhMmSsZ(Date date){
+
 
 Review comment:
   Redundant blank line.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617660#comment-16617660
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218100744
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/BuildStatisticsSummary.java
 ##
 @@ -0,0 +1,293 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.ci.web.model.current;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import javax.annotation.Nonnull;
+import org.apache.ignite.ci.ITeamcity;
+import org.apache.ignite.ci.tcmodel.hist.BuildRef;
+import org.apache.ignite.ci.tcmodel.result.Build;
+import org.apache.ignite.ci.tcmodel.result.TestOccurrencesRef;
+import org.apache.ignite.ci.tcmodel.result.issues.IssueRef;
+import org.apache.ignite.ci.tcmodel.result.issues.IssueUsage;
+import org.apache.ignite.ci.tcmodel.result.problems.ProblemOccurrence;
+import org.apache.ignite.ci.util.TimeUtil;
+import org.apache.ignite.ci.web.IBackgroundUpdatable;
+
+/**
+ * Summary of build statistics.
+ */
+public class BuildStatisticsSummary extends UpdateInfo implements 
IBackgroundUpdatable {
+/** Short problem names. */
+public static final String TOTAL = "TOTAL";
+
+private static Map shortProblemNames = new HashMap<>();
+
+static {
+shortProblemNames.put(TOTAL, "TT");
+shortProblemNames.put(ProblemOccurrence.TC_EXECUTION_TIMEOUT, "ET");
+shortProblemNames.put(ProblemOccurrence.TC_JVM_CRASH, "JC");
+shortProblemNames.put(ProblemOccurrence.TC_OOME, "OO");
+shortProblemNames.put(ProblemOccurrence.TC_EXIT_CODE, "EC");
+shortProblemNames.put(ProblemOccurrence.TC_FAILED_TESTS, "FT");
+shortProblemNames.put(ProblemOccurrence.SNAPSHOT_DEPENDENCY_ERROR, 
"SD");
+shortProblemNames.put(ProblemOccurrence.OTHER, "OT");
+}
+
+/** Build with test and problems references. */
+public Integer buildId;
+
+public String date;
+
+/** Test occurrences. */
+public TestOccurrencesRef testOccurrences;
+
+/** List of problem occurrences. */
+private List problemOccurrenceList;
+
+/** Snapshot-dependencies build run result. */
+public Map> dependenciesProblems;
+
+/** List of related issues. */
+private List relatedIssues;
+
+/** Duration printable. */
+public String durationPrintable;
+
+/** Short build run result (without snapshot-dependencies printable 
result). */
+public Map totalProblems;
+
+/** Build problems count. */
+public long problemsCount;
+
+/** Is fake stub. */
+public boolean isFakeStub;
+
+/**
+ * @param buildId Build id.
+ */
+public BuildStatisticsSummary(Integer buildId){
+this.buildId = buildId;
+}
+
+/** Initialize build statistics. */
+public void initialize(@Nonnull final ITeamcity teamcity) {
+Build build = teamcity.getBuild(buildId);
+
+DateFormat dateFormat = new SimpleDateFormat("dd-MM-'T'HH:mm:ss");
+dateFormat.format(build.getFinishDate());
+date = dateFormat.format(build.getFinishDate());
+
+isFakeStub = build.isFakeStub();
+
+if (isFakeStub)
+return;
+
+testOccurrences = build.testOccurrences;
+
+relatedIssues = 
teamcity.getIssuesUsagesList(build.relatedIssuesRef.href).getIssuesUsagesNonNull().stream()
+.map(IssueUsage::getIssue).collect(Collectors.toList());
+
+durationPrintable = TimeUtil
+.getDurationPrintable(build.getFinishDate().getTime() - 
build.getStartDate().getTime());
+
+List snapshotDependencies = 

[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617661#comment-16617661
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218091080
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/ITeamcity.java
 ##
 @@ -80,7 +97,11 @@
 CompletableFuture> getQueuedBuilds(@Nullable String branch);
 
 default int[] getBuildNumbersFromHistory(String projectId, String 
branchNameForHist) {
-return getFinishedBuilds(projectId, 
branchNameForHist).stream().mapToInt(BuildRef::getId).toArray();
+return getBuildNumbersFromHistory(projectId, branchNameForHist, null, 
null);
+}
+
+default int[] getBuildNumbersFromHistory(String projectId, String 
branchNameForHist, Date sinceDate, Date untilDate) {
 
 Review comment:
   Missec javadoc.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617658#comment-16617658
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218100654
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/BuildStatisticsSummary.java
 ##
 @@ -0,0 +1,293 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.ci.web.model.current;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import javax.annotation.Nonnull;
+import org.apache.ignite.ci.ITeamcity;
+import org.apache.ignite.ci.tcmodel.hist.BuildRef;
+import org.apache.ignite.ci.tcmodel.result.Build;
+import org.apache.ignite.ci.tcmodel.result.TestOccurrencesRef;
+import org.apache.ignite.ci.tcmodel.result.issues.IssueRef;
+import org.apache.ignite.ci.tcmodel.result.issues.IssueUsage;
+import org.apache.ignite.ci.tcmodel.result.problems.ProblemOccurrence;
+import org.apache.ignite.ci.util.TimeUtil;
+import org.apache.ignite.ci.web.IBackgroundUpdatable;
+
+/**
+ * Summary of build statistics.
+ */
+public class BuildStatisticsSummary extends UpdateInfo implements 
IBackgroundUpdatable {
+/** Short problem names. */
+public static final String TOTAL = "TOTAL";
+
+private static Map shortProblemNames = new HashMap<>();
+
+static {
+shortProblemNames.put(TOTAL, "TT");
+shortProblemNames.put(ProblemOccurrence.TC_EXECUTION_TIMEOUT, "ET");
+shortProblemNames.put(ProblemOccurrence.TC_JVM_CRASH, "JC");
+shortProblemNames.put(ProblemOccurrence.TC_OOME, "OO");
+shortProblemNames.put(ProblemOccurrence.TC_EXIT_CODE, "EC");
+shortProblemNames.put(ProblemOccurrence.TC_FAILED_TESTS, "FT");
+shortProblemNames.put(ProblemOccurrence.SNAPSHOT_DEPENDENCY_ERROR, 
"SD");
+shortProblemNames.put(ProblemOccurrence.OTHER, "OT");
+}
+
+/** Build with test and problems references. */
+public Integer buildId;
+
+public String date;
+
+/** Test occurrences. */
+public TestOccurrencesRef testOccurrences;
+
+/** List of problem occurrences. */
+private List problemOccurrenceList;
+
+/** Snapshot-dependencies build run result. */
+public Map> dependenciesProblems;
+
+/** List of related issues. */
+private List relatedIssues;
+
+/** Duration printable. */
+public String durationPrintable;
+
+/** Short build run result (without snapshot-dependencies printable 
result). */
+public Map totalProblems;
+
+/** Build problems count. */
+public long problemsCount;
+
+/** Is fake stub. */
+public boolean isFakeStub;
+
+/**
+ * @param buildId Build id.
+ */
+public BuildStatisticsSummary(Integer buildId){
+this.buildId = buildId;
+}
+
+/** Initialize build statistics. */
+public void initialize(@Nonnull final ITeamcity teamcity) {
+Build build = teamcity.getBuild(buildId);
+
+DateFormat dateFormat = new SimpleDateFormat("dd-MM-'T'HH:mm:ss");
+dateFormat.format(build.getFinishDate());
+date = dateFormat.format(build.getFinishDate());
+
+isFakeStub = build.isFakeStub();
+
+if (isFakeStub)
+return;
+
+testOccurrences = build.testOccurrences;
+
+relatedIssues = 
teamcity.getIssuesUsagesList(build.relatedIssuesRef.href).getIssuesUsagesNonNull().stream()
+.map(IssueUsage::getIssue).collect(Collectors.toList());
+
+durationPrintable = TimeUtil
+.getDurationPrintable(build.getFinishDate().getTime() - 
build.getStartDate().getTime());
+
+List snapshotDependencies = 

[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617662#comment-16617662
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218099774
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/BuildStatisticsSummary.java
 ##
 @@ -0,0 +1,293 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.ci.web.model.current;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import javax.annotation.Nonnull;
+import org.apache.ignite.ci.ITeamcity;
+import org.apache.ignite.ci.tcmodel.hist.BuildRef;
+import org.apache.ignite.ci.tcmodel.result.Build;
+import org.apache.ignite.ci.tcmodel.result.TestOccurrencesRef;
+import org.apache.ignite.ci.tcmodel.result.issues.IssueRef;
+import org.apache.ignite.ci.tcmodel.result.issues.IssueUsage;
+import org.apache.ignite.ci.tcmodel.result.problems.ProblemOccurrence;
+import org.apache.ignite.ci.util.TimeUtil;
+import org.apache.ignite.ci.web.IBackgroundUpdatable;
+
+/**
+ * Summary of build statistics.
+ */
+public class BuildStatisticsSummary extends UpdateInfo implements 
IBackgroundUpdatable {
+/** Short problem names. */
+public static final String TOTAL = "TOTAL";
+
+private static Map shortProblemNames = new HashMap<>();
+
+static {
+shortProblemNames.put(TOTAL, "TT");
+shortProblemNames.put(ProblemOccurrence.TC_EXECUTION_TIMEOUT, "ET");
+shortProblemNames.put(ProblemOccurrence.TC_JVM_CRASH, "JC");
+shortProblemNames.put(ProblemOccurrence.TC_OOME, "OO");
+shortProblemNames.put(ProblemOccurrence.TC_EXIT_CODE, "EC");
+shortProblemNames.put(ProblemOccurrence.TC_FAILED_TESTS, "FT");
+shortProblemNames.put(ProblemOccurrence.SNAPSHOT_DEPENDENCY_ERROR, 
"SD");
+shortProblemNames.put(ProblemOccurrence.OTHER, "OT");
+}
+
+/** Build with test and problems references. */
+public Integer buildId;
+
+public String date;
+
+/** Test occurrences. */
+public TestOccurrencesRef testOccurrences;
+
+/** List of problem occurrences. */
+private List problemOccurrenceList;
+
+/** Snapshot-dependencies build run result. */
+public Map> dependenciesProblems;
+
+/** List of related issues. */
+private List relatedIssues;
+
+/** Duration printable. */
+public String durationPrintable;
+
+/** Short build run result (without snapshot-dependencies printable 
result). */
+public Map totalProblems;
+
+/** Build problems count. */
+public long problemsCount;
+
+/** Is fake stub. */
+public boolean isFakeStub;
+
+/**
+ * @param buildId Build id.
+ */
+public BuildStatisticsSummary(Integer buildId){
+this.buildId = buildId;
+}
+
+/** Initialize build statistics. */
+public void initialize(@Nonnull final ITeamcity teamcity) {
+Build build = teamcity.getBuild(buildId);
+
+DateFormat dateFormat = new SimpleDateFormat("dd-MM-'T'HH:mm:ss");
+dateFormat.format(build.getFinishDate());
+date = dateFormat.format(build.getFinishDate());
+
+isFakeStub = build.isFakeStub();
+
+if (isFakeStub)
+return;
+
+testOccurrences = build.testOccurrences;
+
+relatedIssues = 
teamcity.getIssuesUsagesList(build.relatedIssuesRef.href).getIssuesUsagesNonNull().stream()
+.map(IssueUsage::getIssue).collect(Collectors.toList());
+
+durationPrintable = TimeUtil
+.getDurationPrintable(build.getFinishDate().getTime() - 
build.getStartDate().getTime());
+
+List snapshotDependencies = 

[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617667#comment-16617667
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218100191
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/BuildStatisticsSummary.java
 ##
 @@ -0,0 +1,293 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.ci.web.model.current;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import javax.annotation.Nonnull;
+import org.apache.ignite.ci.ITeamcity;
+import org.apache.ignite.ci.tcmodel.hist.BuildRef;
+import org.apache.ignite.ci.tcmodel.result.Build;
+import org.apache.ignite.ci.tcmodel.result.TestOccurrencesRef;
+import org.apache.ignite.ci.tcmodel.result.issues.IssueRef;
+import org.apache.ignite.ci.tcmodel.result.issues.IssueUsage;
+import org.apache.ignite.ci.tcmodel.result.problems.ProblemOccurrence;
+import org.apache.ignite.ci.util.TimeUtil;
+import org.apache.ignite.ci.web.IBackgroundUpdatable;
+
+/**
+ * Summary of build statistics.
+ */
+public class BuildStatisticsSummary extends UpdateInfo implements 
IBackgroundUpdatable {
+/** Short problem names. */
+public static final String TOTAL = "TOTAL";
+
+private static Map shortProblemNames = new HashMap<>();
+
+static {
+shortProblemNames.put(TOTAL, "TT");
+shortProblemNames.put(ProblemOccurrence.TC_EXECUTION_TIMEOUT, "ET");
+shortProblemNames.put(ProblemOccurrence.TC_JVM_CRASH, "JC");
+shortProblemNames.put(ProblemOccurrence.TC_OOME, "OO");
+shortProblemNames.put(ProblemOccurrence.TC_EXIT_CODE, "EC");
+shortProblemNames.put(ProblemOccurrence.TC_FAILED_TESTS, "FT");
+shortProblemNames.put(ProblemOccurrence.SNAPSHOT_DEPENDENCY_ERROR, 
"SD");
+shortProblemNames.put(ProblemOccurrence.OTHER, "OT");
+}
+
+/** Build with test and problems references. */
+public Integer buildId;
+
+public String date;
+
+/** Test occurrences. */
+public TestOccurrencesRef testOccurrences;
+
+/** List of problem occurrences. */
+private List problemOccurrenceList;
+
+/** Snapshot-dependencies build run result. */
+public Map> dependenciesProblems;
+
+/** List of related issues. */
+private List relatedIssues;
+
+/** Duration printable. */
+public String durationPrintable;
+
+/** Short build run result (without snapshot-dependencies printable 
result). */
+public Map totalProblems;
+
+/** Build problems count. */
+public long problemsCount;
+
+/** Is fake stub. */
+public boolean isFakeStub;
+
+/**
+ * @param buildId Build id.
+ */
+public BuildStatisticsSummary(Integer buildId){
+this.buildId = buildId;
+}
+
+/** Initialize build statistics. */
+public void initialize(@Nonnull final ITeamcity teamcity) {
+Build build = teamcity.getBuild(buildId);
+
+DateFormat dateFormat = new SimpleDateFormat("dd-MM-'T'HH:mm:ss");
+dateFormat.format(build.getFinishDate());
+date = dateFormat.format(build.getFinishDate());
+
+isFakeStub = build.isFakeStub();
+
+if (isFakeStub)
+return;
+
+testOccurrences = build.testOccurrences;
+
+relatedIssues = 
teamcity.getIssuesUsagesList(build.relatedIssuesRef.href).getIssuesUsagesNonNull().stream()
+.map(IssueUsage::getIssue).collect(Collectors.toList());
+
+durationPrintable = TimeUtil
+.getDurationPrintable(build.getFinishDate().getTime() - 
build.getStartDate().getTime());
+
+List snapshotDependencies = 

[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617665#comment-16617665
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218099174
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/result/issues/IssueUsage.java
 ##
 @@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.ci.tcmodel.result.issues;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.apache.ignite.ci.tcmodel.changes.ChangesList;
+
+/**
+ * Build's related issue from TC.
+ *
+ * See example of XML, e.g. here
+ * https://ci.ignite.apache.org/app/rest/latest/builds/id:1694977/relatedIssues
+ */
+@XmlRootElement(name = "IssueUsage")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class IssueUsage {
+@XmlElement(name = "issue")
+private IssueRef issue;
+@XmlElement(name = "changes")
+private ChangesList changesList;
+
+public IssueRef getIssue(){
 
 Review comment:
   Missed javadoc.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617659#comment-16617659
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218100329
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/BuildStatisticsSummary.java
 ##
 @@ -0,0 +1,293 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.ci.web.model.current;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import javax.annotation.Nonnull;
+import org.apache.ignite.ci.ITeamcity;
+import org.apache.ignite.ci.tcmodel.hist.BuildRef;
+import org.apache.ignite.ci.tcmodel.result.Build;
+import org.apache.ignite.ci.tcmodel.result.TestOccurrencesRef;
+import org.apache.ignite.ci.tcmodel.result.issues.IssueRef;
+import org.apache.ignite.ci.tcmodel.result.issues.IssueUsage;
+import org.apache.ignite.ci.tcmodel.result.problems.ProblemOccurrence;
+import org.apache.ignite.ci.util.TimeUtil;
+import org.apache.ignite.ci.web.IBackgroundUpdatable;
+
+/**
+ * Summary of build statistics.
+ */
+public class BuildStatisticsSummary extends UpdateInfo implements 
IBackgroundUpdatable {
+/** Short problem names. */
+public static final String TOTAL = "TOTAL";
+
+private static Map shortProblemNames = new HashMap<>();
+
+static {
+shortProblemNames.put(TOTAL, "TT");
+shortProblemNames.put(ProblemOccurrence.TC_EXECUTION_TIMEOUT, "ET");
+shortProblemNames.put(ProblemOccurrence.TC_JVM_CRASH, "JC");
+shortProblemNames.put(ProblemOccurrence.TC_OOME, "OO");
+shortProblemNames.put(ProblemOccurrence.TC_EXIT_CODE, "EC");
+shortProblemNames.put(ProblemOccurrence.TC_FAILED_TESTS, "FT");
+shortProblemNames.put(ProblemOccurrence.SNAPSHOT_DEPENDENCY_ERROR, 
"SD");
+shortProblemNames.put(ProblemOccurrence.OTHER, "OT");
+}
+
+/** Build with test and problems references. */
+public Integer buildId;
+
+public String date;
+
+/** Test occurrences. */
+public TestOccurrencesRef testOccurrences;
+
+/** List of problem occurrences. */
+private List problemOccurrenceList;
+
+/** Snapshot-dependencies build run result. */
+public Map> dependenciesProblems;
+
+/** List of related issues. */
+private List relatedIssues;
+
+/** Duration printable. */
+public String durationPrintable;
+
+/** Short build run result (without snapshot-dependencies printable 
result). */
+public Map totalProblems;
+
+/** Build problems count. */
+public long problemsCount;
+
+/** Is fake stub. */
+public boolean isFakeStub;
+
+/**
+ * @param buildId Build id.
+ */
+public BuildStatisticsSummary(Integer buildId){
+this.buildId = buildId;
+}
+
+/** Initialize build statistics. */
+public void initialize(@Nonnull final ITeamcity teamcity) {
+Build build = teamcity.getBuild(buildId);
+
+DateFormat dateFormat = new SimpleDateFormat("dd-MM-'T'HH:mm:ss");
+dateFormat.format(build.getFinishDate());
+date = dateFormat.format(build.getFinishDate());
+
+isFakeStub = build.isFakeStub();
+
+if (isFakeStub)
+return;
+
+testOccurrences = build.testOccurrences;
+
+relatedIssues = 
teamcity.getIssuesUsagesList(build.relatedIssuesRef.href).getIssuesUsagesNonNull().stream()
+.map(IssueUsage::getIssue).collect(Collectors.toList());
+
+durationPrintable = TimeUtil
+.getDurationPrintable(build.getFinishDate().getTime() - 
build.getStartDate().getTime());
+
+List snapshotDependencies = 

[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617651#comment-16617651
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218100491
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/BuildStatisticsSummary.java
 ##
 @@ -0,0 +1,293 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.ci.web.model.current;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import javax.annotation.Nonnull;
+import org.apache.ignite.ci.ITeamcity;
+import org.apache.ignite.ci.tcmodel.hist.BuildRef;
+import org.apache.ignite.ci.tcmodel.result.Build;
+import org.apache.ignite.ci.tcmodel.result.TestOccurrencesRef;
+import org.apache.ignite.ci.tcmodel.result.issues.IssueRef;
+import org.apache.ignite.ci.tcmodel.result.issues.IssueUsage;
+import org.apache.ignite.ci.tcmodel.result.problems.ProblemOccurrence;
+import org.apache.ignite.ci.util.TimeUtil;
+import org.apache.ignite.ci.web.IBackgroundUpdatable;
+
+/**
+ * Summary of build statistics.
+ */
+public class BuildStatisticsSummary extends UpdateInfo implements 
IBackgroundUpdatable {
+/** Short problem names. */
+public static final String TOTAL = "TOTAL";
+
+private static Map shortProblemNames = new HashMap<>();
+
+static {
+shortProblemNames.put(TOTAL, "TT");
+shortProblemNames.put(ProblemOccurrence.TC_EXECUTION_TIMEOUT, "ET");
+shortProblemNames.put(ProblemOccurrence.TC_JVM_CRASH, "JC");
+shortProblemNames.put(ProblemOccurrence.TC_OOME, "OO");
+shortProblemNames.put(ProblemOccurrence.TC_EXIT_CODE, "EC");
+shortProblemNames.put(ProblemOccurrence.TC_FAILED_TESTS, "FT");
+shortProblemNames.put(ProblemOccurrence.SNAPSHOT_DEPENDENCY_ERROR, 
"SD");
+shortProblemNames.put(ProblemOccurrence.OTHER, "OT");
+}
+
+/** Build with test and problems references. */
+public Integer buildId;
+
+public String date;
+
+/** Test occurrences. */
+public TestOccurrencesRef testOccurrences;
+
+/** List of problem occurrences. */
+private List problemOccurrenceList;
+
+/** Snapshot-dependencies build run result. */
+public Map> dependenciesProblems;
+
+/** List of related issues. */
+private List relatedIssues;
+
+/** Duration printable. */
+public String durationPrintable;
+
+/** Short build run result (without snapshot-dependencies printable 
result). */
+public Map totalProblems;
+
+/** Build problems count. */
+public long problemsCount;
+
+/** Is fake stub. */
+public boolean isFakeStub;
+
+/**
+ * @param buildId Build id.
+ */
+public BuildStatisticsSummary(Integer buildId){
+this.buildId = buildId;
+}
+
+/** Initialize build statistics. */
+public void initialize(@Nonnull final ITeamcity teamcity) {
+Build build = teamcity.getBuild(buildId);
+
+DateFormat dateFormat = new SimpleDateFormat("dd-MM-'T'HH:mm:ss");
+dateFormat.format(build.getFinishDate());
+date = dateFormat.format(build.getFinishDate());
+
+isFakeStub = build.isFakeStub();
+
+if (isFakeStub)
+return;
+
+testOccurrences = build.testOccurrences;
+
+relatedIssues = 
teamcity.getIssuesUsagesList(build.relatedIssuesRef.href).getIssuesUsagesNonNull().stream()
+.map(IssueUsage::getIssue).collect(Collectors.toList());
+
+durationPrintable = TimeUtil
+.getDurationPrintable(build.getFinishDate().getTime() - 
build.getStartDate().getTime());
+
+List snapshotDependencies = 

[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617647#comment-16617647
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218091389
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/ITeamcity.java
 ##
 @@ -52,6 +54,7 @@
 public interface ITeamcity extends AutoCloseable {
 
 String DEFAULT = "";
+long DEFAULT_BUILDS_COUNT = 1000;
 
 Review comment:
   Missec javadoc. Need empty line before previous field.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617653#comment-16617653
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218102209
 
 

 ##
 File path: ignite-tc-helper-web/src/main/webapp/css/style-1.5.css
 ##
 @@ -115,4 +115,33 @@ form li:after
clear:both;
display:block;
margin-top:10px;
+}
+.stat{
 
 Review comment:
   Missed blank lines between styles.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617641#comment-16617641
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218090321
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/ITeamcity.java
 ##
 @@ -62,7 +65,19 @@
  * @param branch
  * @return list of builds in historical order, recent builds coming last
  */
-List getFinishedBuilds(String projectId, String branch);
+default List getFinishedBuilds(String projectId, String branch) {
+return getFinishedBuilds(projectId, branch, null, null);
+};
+
+/**
+ * @param projectId suite ID (string without spaces)
+ * @param branch
+ * @param sinceDate
+ * @param untilDate
+ * @return list of builds in historical order, recent builds coming last
+ */
+
 
 Review comment:
   Remove empty line.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617642#comment-16617642
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218091720
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
 ##
 @@ -197,7 +203,7 @@ private IgnitePersistentTeamcity(Ignite ignite, 
IgniteTeamcityHelper teamcity) {
 }
 
 /**
- * @return Build history: {@link BuildRef} lists cache, 32 parts, 
transaactional
+ * @return Build history: {@link BuildRef} lists cache, 32 parts, 
transactional
 
 Review comment:
   Missed dot at the end of sentence.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617654#comment-16617654
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218097013
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgniteTeamcityHelper.java
 ##
 @@ -409,12 +444,12 @@ public ChangesList getChangesList(String href) {
 }
 
 /** {@inheritDoc} */
-@Override public List getFinishedBuilds(String projectId,
-String branch) {
+public List getFinishedBuilds(String projectId,
+String branch, Date sinceDate, Date untilDate) {
 List finished = getBuildHistory(projectId,
 UrlUtil.escape(branch),
 true,
-null);
+null, sinceDate, untilDate);
 
 Review comment:
   Move args to the new lines.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617648#comment-16617648
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218098330
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/hist/BuildRef.java
 ##
 @@ -52,6 +52,8 @@
 
 @XmlAttribute public Boolean composite;
 
+@XmlAttribute public String webUrl;
 
 Review comment:
   Rebase your branch on current master.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617670#comment-16617670
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218100964
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/build/GetBuildTestFailures.java
 ##
 @@ -149,4 +153,71 @@ public TestFailuresSummary getBuildTestFails(
 
 return res;
 }
+
+@GET
+@Path("history")
+public List getBuildsHistory(
+@Nullable @QueryParam("server") String server,
+@Nullable @QueryParam("buildType") String buildType,
+@Nullable @QueryParam("branch") String branch,
+@Nullable @QueryParam("sinceDate") String sinceDate,
+@Nullable @QueryParam("untilDate") String untilDate)
+throws ServiceUnauthorizedException, ParseException {
+
+DateFormat dateFormat = new SimpleDateFormat("ddMMHHmmss");
+
+String srvId = isNullOrEmpty(server) ? "apache" : server;
+String buildTypeId = isNullOrEmpty(buildType) ? 
"IgniteTests24Java8_RunAll" : buildType;
+String branchName = isNullOrEmpty(branch) ? "refs/heads/master" : 
branch;
+Date sinceDateFilter = isNullOrEmpty(sinceDate) ? null : 
dateFormat.parse(sinceDate);
+Date untilDateFilter = isNullOrEmpty(untilDate) ? null : 
dateFormat.parse(untilDate);
+
+final BackgroundUpdater updater = 
CtxListener.getBackgroundUpdater(context);
+
+final ITcHelper tcHelper = CtxListener.getTcHelper(context);
+
+final ICredentialsProv prov = ICredentialsProv.get(req);
+
+try (IAnalyticsEnabledTeamcity teamcity = tcHelper.server(srvId, 
prov)) {
+
+int[] finishedBuilds = 
teamcity.getBuildNumbersFromHistory(buildTypeId, branchName, sinceDateFilter, 
untilDateFilter);
+
+List buildsStatistics = new ArrayList<>();
+
+for (int i = 0; i < finishedBuilds.length; i++) {
+int buildId = finishedBuilds[i];
+
+FullQueryParams param = new FullQueryParams();
+param.setBuildId(buildId);
+param.setBranch(branchName);
+param.setServerId(srvId);
+
+BuildStatisticsSummary buildsStatistic = updater.get(
+BUILDS_STATISTICS_SUMMARY_CACHE_NAME, prov, param,
+(k) -> getBuildStatisticsSummaryNoCache(srvId, buildId), 
false);
+
+if (!buildsStatistic.isFakeStub)
+buildsStatistics.add(buildsStatistic);
+}
+
+return buildsStatistics;
+}
+}
+
+private BuildStatisticsSummary getBuildStatisticsSummaryNoCache(String 
server, int buildId) {
+
 
 Review comment:
   Redundant blank line.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617666#comment-16617666
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218102782
 
 

 ##
 File path: ignite-tc-helper-web/src/main/webapp/statistics.html
 ##
 @@ -0,0 +1,213 @@
+
+
+Ignite Teamcity - statistics master's branch
+
+https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css;>
+
+
+https://code.jquery.com/jquery-1.12.4.js";>
+https://code.jquery.com/ui/1.12.1/jquery-ui.js";>
+
+
+
+table {
+width: 70%;
+border-collapse: collapse;
+}
+td, th {
+
+padding: 10px 5px 10px 5px;
+}
+th {
+text-align: left;
+padding: 5px;
+background-color: #f5f5ff;
+color: #00;
+}
+tr:nth-child(odd) { background-color: #fafaff; }
+
+
+

[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617649#comment-16617649
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218097631
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgniteTeamcityHelper.java
 ##
 @@ -409,12 +444,12 @@ public ChangesList getChangesList(String href) {
 }
 
 /** {@inheritDoc} */
-@Override public List getFinishedBuilds(String projectId,
-String branch) {
+public List getFinishedBuilds(String projectId,
+String branch, Date sinceDate, Date untilDate) {
 
 Review comment:
   Place all args on the same line or different lines.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617652#comment-16617652
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218096032
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
 ##
 @@ -591,6 +625,24 @@ private void addTestOccurrencesToStat(TestOccurrences 
val, String normalizedBran
 });
 }
 
+@Override public IssuesUsagesList getIssuesUsagesList(String href) {
 
 Review comment:
   Missec javadoc.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617656#comment-16617656
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218099233
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/result/issues/IssuesUsagesList.java
 ##
 @@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.ci.tcmodel.result.issues;
+
+import java.util.Collections;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * List of build's related issues from TC.
+ *
+ * See example of XML, e.g. here
+ * https://ci.ignite.apache.org/app/rest/latest/builds/id:1694977/relatedIssues
+ */
+@XmlRootElement(name = "issuesUsages")
+public class IssuesUsagesList {
+@XmlElement(name = "issueUsage")
+private List issuesUsages;
+
+@XmlElement Integer count;
+
+@XmlElement String href;
+
+public List getIssuesUsagesNonNull() {
+return issuesUsages == null ? Collections.emptyList() : issuesUsages;
+}
+
+@Override public String toString() {
 
 Review comment:
   Missed javadoc.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617650#comment-16617650
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218095484
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
 ##
 @@ -290,6 +300,26 @@ private IgnitePersistentTeamcity(Ignite ignite, 
IgniteTeamcityHelper teamcity) {
 
 return mergeByIdToHistoricalOrder(persistedValue, builds);
 });
+
+if (sinceDate != null && untilDate != null)
 
 Review comment:
   Is it possible to get request with `sinceDate` and without `untilDate`? And 
vice versa?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617643#comment-16617643
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218090754
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/ITeamcity.java
 ##
 @@ -62,7 +65,19 @@
  * @param branch
  * @return list of builds in historical order, recent builds coming last
  */
-List getFinishedBuilds(String projectId, String branch);
+default List getFinishedBuilds(String projectId, String branch) {
+return getFinishedBuilds(projectId, branch, null, null);
+};
+
+/**
+ * @param projectId suite ID (string without spaces)
+ * @param branch
 
 Review comment:
   Missed param description.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16617646#comment-16617646
 ] 

ASF GitHub Bot commented on IGNITE-9541:


SomeFire commented on a change in pull request #9: IGNITE-9541 Add the 
comparison for two general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9#discussion_r218098809
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/result/Build.java
 ##
 @@ -127,4 +137,4 @@ public Triggered getTriggered() {
 public void setTriggered(Triggered triggered) {
 this.triggered = triggered;
 }
-}
+}
 
 Review comment:
   File should ends with a blank line.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9541) Add the comparison for two general statistics "RunAll" for master in the date interval

2018-09-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16613788#comment-16613788
 ] 

ASF GitHub Bot commented on IGNITE-9541:


zzzadruga opened a new pull request #9: IGNITE-9541 Add the comparison for two 
general statistics "RunAll" for master in the date interval
URL: https://github.com/apache/ignite-teamcity-bot/pull/9
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add the comparison for two general statistics "RunAll" for master in the date 
> interval
> --
>
> Key: IGNITE-9541
> URL: https://issues.apache.org/jira/browse/IGNITE-9541
> Project: Ignite
>  Issue Type: Sub-task
>Reporter: Nikolai Kulagin
>Assignee: Nikolai Kulagin
>Priority: Major
>
> Based on IGNITE-9333 add the comparison for two general statistics "RunAll" 
> for master in the date interval



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)