com.atlassian.fisheye.spi.services
Interface ChangesetMetricsService
public interface ChangesetMetricsService
Provides an API for efficiently retrieving repository metrics such as changeset, revision and LOC counts
getChangesetCount
java.lang.Long getChangesetCount(java.lang.String repository,
ChangesetMetricsService.QueryParameters parameters)
- Parameters:
repository
- a repository nameparameters
- a ChangesetMetricsService.QueryParameters
object
- Returns:
- the number of changesets that matched the supplied
ChangesetMetricsService.QueryParameters
criteria
getCommitVolumeByDay
java.util.Map<java.lang.String,java.lang.Integer> getCommitVolumeByDay(java.lang.String repository,
ChangesetMetricsService.QueryParameters parameters)
- Parameters:
repository
- a repository nameparameters
- a ChangesetMetricsService.QueryParameters
object
- Returns:
- a Map<String, Integer> representing the commit volume of the specified repositry broken down by
days of the week. For example:
Key | Value |
Sun | 293 |
Mon | 10293 |
Tue | 12141 |
Wed | 10321 |
Thu | 11421 |
Fri | 9423 |
Sat | 2401 |
getCommitVolumeByHour
java.util.Map<java.lang.String,java.lang.Integer> getCommitVolumeByHour(java.lang.String repository,
ChangesetMetricsService.QueryParameters parameters)
- Parameters:
repository
- a repository nameparameters
- a ChangesetMetricsService.QueryParameters
object
- Returns:
- a Map<String, Integer> representing the commit volume of the specified repositry broken down by
hours of a day (keyed in 24 hour notation, i.e. "0"-"23"). For example:
Key | Value |
0 | 293 |
1 | 10293 |
2 | 12141 |
3 | 10321 |
... | ... |
22 | 9423 |
23 | 2401 |
getCommitVolumeForLastYearByWeek
java.util.Map<java.lang.String,java.lang.Integer> getCommitVolumeForLastYearByWeek(java.lang.String repository,
ChangesetMetricsService.QueryParameters parameters)
- Parameters:
repository
- a repository nameparameters
- a ChangesetMetricsService.QueryParameters
object
- Returns:
- a Map<String, Integer> representing the commit volume of the specified repositry over the last
year broken down by week. For example, the results for a query performed on May 25th, 2009 (the 22nd week of the
year) might look like this (where the key is a four-digit year followed by a two-digit week number):
Key | Value |
200922 | 293 |
200921 | 10293 |
200920 | 12141 |
200919 | 10321 |
... | ... |
200824 | 9423 |
200823 | 2401 |
getQueryBuilder
ChangesetMetricsService.QueryParameters.Builder getQueryBuilder()
- Returns:
- an uninitialised
ChangesetMetricsService.QueryParameters.Builder
for building ChangesetMetricsService.QueryParameters
to be passed to the
ChangesetMetricsService SPI methods