-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
323dcc7
commit ec3be9d
Showing
10 changed files
with
166 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# values starting with $$ are looked up in project.properties | ||
index=$$jira.index | ||
|
||
enabled=true | ||
name=Non-Bug Density | ||
description=Percentage of open issues not being Bugs | ||
factors=softwarestability | ||
weights=1.0 | ||
|
||
param.project=$$jira.project | ||
param.status.unresolved=["Open","In Progress","To be reviewed","Ready for Implementation"] | ||
param.bug.issuetypes = ["Bug"] | ||
|
||
result.openIssues=hits.total | ||
result.openBugs=aggregations.openbugs.doc_count | ||
|
||
# metric defines a formula based on execution results of parameter- and metric-queries | ||
metric= ( openIssues - openBugs ) / openIssues | ||
onError=set0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"size": 0, | ||
"query": { | ||
"bool": { | ||
"must" : [ | ||
{"term" : { "projectKey": "{{projectKey}}" } }, | ||
{"terms" : { "status" : {{#toJson}}status.unresolved{{/toJson}} } } | ||
] | ||
} | ||
}, | ||
"aggs": { | ||
"openbugs": { | ||
"filter": { "terms" : {"issuetype" : {{#toJson}}bug.issuetypes{{/toJson}} } } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# values starting with $$ are looked up in project.properties | ||
index=$$redmine.index | ||
|
||
enabled=true | ||
name=Non-Bug Density | ||
description=Percentage of open issues not being Bugs | ||
factors=softwarestability | ||
weights=1.0 | ||
|
||
param.project=$$redmine.project | ||
param.status.unresolved=["New","Assigned","Feedback"] | ||
param.bug.trackers = ["Issue"] | ||
|
||
result.openIssues=hits.total | ||
result.openBugs=aggregations.openbugs.doc_count | ||
|
||
# metric defines a formula based on execution results of parameter- and metric-queries | ||
metric= ( openIssues - openBugs ) / openIssues | ||
onError=set0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"size": 0, | ||
"query": { | ||
"bool": { | ||
"must" : [ | ||
{"term" : { "project": "{{project}}" } }, | ||
{"terms" : { "status" : {{#toJson}}status.unresolved{{/toJson}} } } | ||
] | ||
} | ||
}, | ||
"aggs": { | ||
"openbugs": { | ||
"filter": { "terms" : {"tracker" : {{#toJson}}bug.trackers{{/toJson}} } } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# values starting with $$ are looked up in project.properties | ||
index=$$jenkins.index | ||
|
||
enabled=true | ||
name=Test Performance | ||
description=Last test duration is within limit | ||
factors=testingstatus | ||
weights=2.0 | ||
|
||
param.testperformance.limit.seconds=900 | ||
param.jobName=$$jenkins.jobName | ||
|
||
# the metric is computed by a script | ||
# "if ( doc['testDuration'].value < {{testperformance.limit.seconds}}) return 1; else return 0;" | ||
result.performanceOK=hits.hits[0].fields.performanceOK[0] | ||
|
||
# metric defines a formula based on execution results of parameter- and metric-queries | ||
metric = performanceOK | ||
onError=set0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"query" : {"bool": { "must" : { "match" : { "jobName" : "{{jobName}}" }}}}, | ||
"sort" : { "buildNumber" : {"order" : "desc"}}, | ||
"size" : 1, | ||
|
||
"script_fields": { | ||
"performanceOK": { | ||
"script": { | ||
"lang": "painless", | ||
"inline": "if ( doc['testDuration'].value < {{testperformance.limit.seconds}} ) return 1; else return 0;" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# values starting with $$ are looked up in project.properties | ||
index=$$jenkins.index | ||
|
||
enabled=true | ||
name=Passed Tests Percentage | ||
description=Percentage tests being passed | ||
factors=testingstatus | ||
weights=2.0 | ||
|
||
param.jobName=$$jenkins.jobName | ||
|
||
result.testsPass = hits.hits[0]._source.testsPass | ||
result.testsFail = hits.hits[0]._source.testsFail | ||
result.testsSkip = hits.hits[0]._source.testsSkip | ||
|
||
# metric defines a formula based on execution results of parameter- and metric-queries | ||
metric = testsPass / ( testsPass + testsFail + testsSkip ) | ||
onError=set0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"query" : {"bool": { "must" : { "match" : { "jobName" : "{{jobName}}" }}}}, | ||
"sort" : { "buildNumber" : {"order" : "desc"}}, | ||
"size" : 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# values starting with $$ are looked up in project.properties | ||
index=$$jira.status.index | ||
|
||
enabled=true | ||
name=Well defined issues (Jira) | ||
description=Percentage of issues created within the last month that have required properties defined | ||
factors=qualityissuespecification | ||
weights=1.0 | ||
|
||
param.projectKey=$$jira.projectKey | ||
|
||
result.totalIssues=hits.total | ||
result.welldefinedIssues=aggregations.welldefined.doc_count | ||
|
||
# metric defines a formula based on execution results of parameter- and metric-queries | ||
metric= welldefinedIssues / totalIssues | ||
onError=set0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"size": 0, | ||
"query": { | ||
"bool" : { | ||
"must" : [ | ||
{ "term" : { "projectKey" : "{{projectKey}}" } }, | ||
{ "range" : { "created" : { "from" : "now-3000d" } } } | ||
] | ||
} | ||
}, | ||
"aggs" : { | ||
"welldefined" : { | ||
"filter" : { | ||
"bool" : { | ||
"must" : [ | ||
{ "exists" : { "field" : "duedate" } }, | ||
{ "exists" : { "field" : "description" } } | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |