Implemented stats for external CIs
All CI votes are collected in new records with type 'ci_vote'. All standard statistics are available for these records. Also added a new "CI Status" report that shows summary of CI tests execution on merged patch sets, overall summary and results per merged change requests. List of CIs is taken from DriverLog's repo. Change-Id: Ic7a830dc5b331ba4c099be458ad2bab4c2072607
This commit is contained in:
@@ -25,6 +25,7 @@ from stackalytics.openstack.common import log as logging
|
||||
from stackalytics.processor import bps
|
||||
from stackalytics.processor import config
|
||||
from stackalytics.processor import default_data_processor
|
||||
from stackalytics.processor import driverlog
|
||||
from stackalytics.processor import lp
|
||||
from stackalytics.processor import mls
|
||||
from stackalytics.processor import mps
|
||||
@@ -77,6 +78,22 @@ def _record_typer(record_iterator, record_type):
|
||||
yield record
|
||||
|
||||
|
||||
def _process_reviews(record_iterator, ci_map, module, branch):
|
||||
for record in record_iterator:
|
||||
yield record
|
||||
|
||||
for driver_info in driverlog.find_ci_result(record, ci_map):
|
||||
driver_info['record_type'] = 'ci_vote'
|
||||
driver_info['module'] = module
|
||||
driver_info['branch'] = branch
|
||||
|
||||
release = branch.lower()
|
||||
if release.find('/') > 0:
|
||||
driver_info['release'] = release.split('/')[1]
|
||||
|
||||
yield driver_info
|
||||
|
||||
|
||||
def _process_repo(repo, runtime_storage_inst, record_processor_inst,
|
||||
bug_modified_since):
|
||||
uri = repo['uri']
|
||||
@@ -131,8 +148,14 @@ def _process_repo(repo, runtime_storage_inst, record_processor_inst,
|
||||
rcs_key = 'rcs:' + str(parse.quote_plus(uri) + ':' + branch)
|
||||
last_id = runtime_storage_inst.get_by_key(rcs_key)
|
||||
|
||||
review_iterator = rcs_inst.log(branch, last_id)
|
||||
review_iterator = rcs_inst.log(branch, last_id,
|
||||
grab_comments=('ci' in repo))
|
||||
review_iterator_typed = _record_typer(review_iterator, 'review')
|
||||
|
||||
if 'ci' in repo: # add external CI data
|
||||
review_iterator_typed = _process_reviews(
|
||||
review_iterator_typed, repo['ci'], repo['module'], branch)
|
||||
|
||||
processed_review_iterator = record_processor_inst.process(
|
||||
review_iterator_typed)
|
||||
runtime_storage_inst.set_records(processed_review_iterator,
|
||||
@@ -310,7 +333,8 @@ def main():
|
||||
default_data_processor.process(runtime_storage_inst,
|
||||
default_data,
|
||||
cfg.CONF.git_base_uri,
|
||||
gerrit)
|
||||
gerrit,
|
||||
cfg.CONF.driverlog_data_uri)
|
||||
|
||||
process_program_list(runtime_storage_inst, cfg.CONF.program_list_uri)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user