예제 #1
0
def get_project_time_to_fix(pjid, **kwargs):
    begin = kwargs['begin']
    if begin is None:
        begin = 0
    end = kwargs['end']
    if end is None:
        end = calendar.timegm(datetime.now().timetuple())

    return {}, [avg([store.get_time_to_fix(rid, begin=begin, end=end) for rid in store.get_project_repositories(pjid)])]
예제 #2
0
def get_avg_builds(**kwargs):
    return avg([len(store.get_repo_builds(rid)) for rid in store.get_repositories()])
예제 #3
0
def get_avg_build_time(**kwargs):
    average = avg(
        [store.get_repo_build_time(rid, begin=kwargs['begin'], end=kwargs['end']) for rid in store.get_repositories()])
    if math.isnan(average):
        return []
    return [average]