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


Nested Class Summary
static interface ChangesetMetricsService.QueryParameters
           
 
Method Summary
 java.lang.Long getChangesetCount(java.lang.String repository, ChangesetMetricsService.QueryParameters parameters)
           
 java.util.Map<java.lang.String,java.lang.Integer> getCommitVolumeByDay(java.lang.String repository, ChangesetMetricsService.QueryParameters parameters)
           
 java.util.Map<java.lang.String,java.lang.Integer> getCommitVolumeByHour(java.lang.String repository, ChangesetMetricsService.QueryParameters parameters)
           
 java.util.Map<java.lang.String,java.lang.Integer> getCommitVolumeForLastYearByWeek(java.lang.String repository, ChangesetMetricsService.QueryParameters parameters)
           
 ChangesetMetricsService.QueryParameters.Builder getQueryBuilder()
           
 

Method Detail

getChangesetCount

java.lang.Long getChangesetCount(java.lang.String repository,
                                 ChangesetMetricsService.QueryParameters parameters)
Parameters:
repository - a repository name
parameters - 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 name
parameters - 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:
KeyValue
Sun293
Mon10293
Tue12141
Wed10321
Thu11421
Fri9423
Sat2401

getCommitVolumeByHour

java.util.Map<java.lang.String,java.lang.Integer> getCommitVolumeByHour(java.lang.String repository,
                                                                        ChangesetMetricsService.QueryParameters parameters)
Parameters:
repository - a repository name
parameters - 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:
KeyValue
0293
110293
212141
310321
......
229423
232401

getCommitVolumeForLastYearByWeek

java.util.Map<java.lang.String,java.lang.Integer> getCommitVolumeForLastYearByWeek(java.lang.String repository,
                                                                                   ChangesetMetricsService.QueryParameters parameters)
Parameters:
repository - a repository name
parameters - 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):
KeyValue
200922293
20092110293
20092012141
20091910321
......
2008249423
2008232401

getQueryBuilder

ChangesetMetricsService.QueryParameters.Builder getQueryBuilder()
Returns:
an uninitialised ChangesetMetricsService.QueryParameters.Builder for building ChangesetMetricsService.QueryParameters to be passed to the ChangesetMetricsService SPI methods