esc-reporting/esc-analyze.py | 51 ++++++++++++---- esc-reporting/esc-report.py | 133 ++++++++++++++++++++++++++++++++++++++----- 2 files changed, 157 insertions(+), 27 deletions(-)
New commits: commit d6d366bbbf3af1379031e4ed0f0a55bbfd371326 Author: Xisco Fauli <aniste...@gmail.com> Date: Sun Dec 11 23:33:26 2016 +0100 List top 10 fixers diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 7c16aec..8332a41 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -123,13 +123,13 @@ def util_create_person_gerrit(person, email): '1month': {'owner': 0, 'reviewer': 0, 'total': 0}, '1week': {'owner': 0, 'reviewer': 0, 'total': 0}}, 'qa': {'1year': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, - 'bisected': 0, 'backtrace': 0, 'total': 0}, + 'bisected': 0, 'backtrace': 0, 'fixed': 0, 'total': 0}, '3month': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, - 'bisected': 0, 'backtrace': 0, 'total': 0}, + 'bisected': 0, 'backtrace': 0, 'fixed': 0, 'total': 0}, '1month': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, - 'bisected': 0, 'backtrace': 0, 'total': 0}, + 'bisected': 0, 'backtrace': 0, 'fixed': 0, 'total': 0}, '1week': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, - 'bisected': 0, 'backtrace': 0, 'total': 0}}, + 'bisected': 0, 'backtrace': 0, 'fixed': 0, 'total': 0}}, 'isCommitter': False, 'isContributor': False, 'hasLicense': False, @@ -429,6 +429,10 @@ def analyze_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): util_build_period_stat(cfg, statList, xDate, email, '', 'regression', base='qa') if keyword == 'haveBacktrace': util_build_period_stat(cfg, statList, xDate, email, '', 'backtrace', base='qa') + elif entry['field_name'] == 'resolution': + if entry['added'] == 'FIXED': + util_build_period_stat(cfg, statList, xDate, email, '', 'fixed', base='qa') + for change in row['comments']: email = util_check_mail('*UNKNOWN*', change['creator'], statList, cfg['contributor']['combine-email']) diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index ae8f694..6281b45 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -437,7 +437,7 @@ def report_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): 'name': statList['people'][i]['name'], 'week' :statList['people'][i]['qa']['1week']['owner'], 'month' :statList['people'][i]['qa']['1month']['owner'], - '3month':statList['people'][i]['qa']['1month']['owner']} + '3month':statList['people'][i]['qa']['3month']['owner']} top10reporters.append(x) if len(top10reporters) >= 10: break @@ -448,6 +448,27 @@ def report_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): print(' {} reported {} bugs in 1 week, {} bugs in 1 month and {} bugs in 3 months'.format( i['name'], i['week'], i['month'], i['3month']), file=fp) + + tmpClist = sorted(statList['people'], key=lambda k: (statList['people'][k]['qa']['1week']['fixed']), reverse=True) + top10fixers = [] + for i in tmpClist: + if i != 'qa-ad...@libreoffice.org' and i != 'libreoffice-comm...@lists.freedesktop.org': + x = {'mail': i, + 'name': statList['people'][i]['name'], + 'week' :statList['people'][i]['qa']['1week']['fixed'], + 'month' :statList['people'][i]['qa']['1month']['fixed'], + '3month':statList['people'][i]['qa']['3month']['fixed']} + top10fixers.append(x) + if len(top10fixers) >= 10: + break + + print("\n + top 10 bugs fixers:", file=fp) + xRow = [] + for i in top10fixers: + print(' {} fixed {} bugs in 1 week, {} bugs in 1 month and {} bugs in 3 months'.format( + i['name'], i['week'], i['month'], i['3month']), file=fp) + + tmpClist = sorted(statList['people'], key=lambda k: (statList['people'][k]['qa']['1week']['bisected']), reverse=True) top10bisected = [] for i in tmpClist: @@ -457,7 +478,7 @@ def report_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): 'name': statList['people'][i]['name'], 'week' :statList['people'][i]['qa']['1week']['bisected'], 'month' :statList['people'][i]['qa']['1month']['bisected'], - '3month':statList['people'][i]['qa']['1month']['bisected']} + '3month':statList['people'][i]['qa']['3month']['bisected']} top10bisected.append(x) if len(top10bisected) >= 10: break @@ -478,7 +499,7 @@ def report_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): 'name': statList['people'][i]['name'], 'week' :statList['people'][i]['qa']['1week']['bibisected'], 'month' :statList['people'][i]['qa']['1month']['bibisected'], - '3month':statList['people'][i]['qa']['1month']['bibisected']} + '3month':statList['people'][i]['qa']['3month']['bibisected']} top10bibisected.append(x) if len(top10bibisected) >= 10: break @@ -499,7 +520,7 @@ def report_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): 'name': statList['people'][i]['name'], 'week' :statList['people'][i]['qa']['1week']['regression'], 'month' :statList['people'][i]['qa']['1month']['regression'], - '3month':statList['people'][i]['qa']['1month']['regression']} + '3month':statList['people'][i]['qa']['3month']['regression']} top10regression.append(x) if len(top10regression) >= 10: break @@ -519,7 +540,7 @@ def report_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): 'name': statList['people'][i]['name'], 'week' :statList['people'][i]['qa']['1week']['backtrace'], 'month' :statList['people'][i]['qa']['1month']['backtrace'], - '3month':statList['people'][i]['qa']['1month']['backtrace']} + '3month':statList['people'][i]['qa']['3month']['backtrace']} top10backtrace.append(x) if len(top10backtrace) >= 10: break commit a9292fd0082d0b0fea01b6bfac156bb5e41cb2f3 Author: Xisco Fauli <aniste...@gmail.com> Date: Sun Dec 11 23:14:47 2016 +0100 List people who added haveBacktrace diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index b856fe3..7c16aec 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -122,10 +122,14 @@ def util_create_person_gerrit(person, email): '3month': {'owner': 0, 'reviewer': 0, 'total': 0}, '1month': {'owner': 0, 'reviewer': 0, 'total': 0}, '1week': {'owner': 0, 'reviewer': 0, 'total': 0}}, - 'qa': {'1year': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, 'bisected': 0, 'total': 0}, - '3month': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, 'bisected': 0, 'total': 0}, - '1month': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, 'bisected': 0, 'total': 0}, - '1week': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, 'bisected': 0, 'total': 0}}, + 'qa': {'1year': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, + 'bisected': 0, 'backtrace': 0, 'total': 0}, + '3month': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, + 'bisected': 0, 'backtrace': 0, 'total': 0}, + '1month': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, + 'bisected': 0, 'backtrace': 0, 'total': 0}, + '1week': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, + 'bisected': 0, 'backtrace': 0, 'total': 0}}, 'isCommitter': False, 'isContributor': False, 'hasLicense': False, @@ -423,6 +427,8 @@ def analyze_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): util_build_period_stat(cfg, statList, xDate, email, '', 'bibisected', base='qa') if keyword == 'regression': util_build_period_stat(cfg, statList, xDate, email, '', 'regression', base='qa') + if keyword == 'haveBacktrace': + util_build_period_stat(cfg, statList, xDate, email, '', 'backtrace', base='qa') for change in row['comments']: email = util_check_mail('*UNKNOWN*', change['creator'], statList, cfg['contributor']['combine-email']) diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index d457e56..ae8f694 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -510,6 +510,26 @@ def report_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): print(' {} added \'regression\' to {} bugs in 1 week, {} bugs in 1 month and {} bugs in 3 months'.format( i['name'], i['week'], i['month'], i['3month']), file=fp) + tmpClist = sorted(statList['people'], key=lambda k: (statList['people'][k]['qa']['1week']['backtrace']), reverse=True) + top10backtrace = [] + for i in tmpClist: + if i != 'qa-ad...@libreoffice.org' and i != 'libreoffice-comm...@lists.freedesktop.org' and \ + statList['people'][i]['qa']['1week']['backtrace'] > 0: + x = {'mail': i, + 'name': statList['people'][i]['name'], + 'week' :statList['people'][i]['qa']['1week']['backtrace'], + 'month' :statList['people'][i]['qa']['1month']['backtrace'], + '3month':statList['people'][i]['qa']['1month']['backtrace']} + top10backtrace.append(x) + if len(top10backtrace) >= 10: + break + + print("\n + Done by:", file=fp) + xRow = [] + for i in top10backtrace: + print(' {} added a backtrace to {} bugs in 1 week, {} bugs in 1 month and {} bugs in 3 months'.format( + i['name'], i['week'], i['month'], i['3month']), file=fp) + fp.close() return None commit d8f97f132e57843785754f743c511355baa238e2 Author: Xisco Fauli <aniste...@gmail.com> Date: Sun Dec 11 23:06:40 2016 +0100 List people who added regression and bibisected diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 28339c6..b856fe3 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -122,10 +122,10 @@ def util_create_person_gerrit(person, email): '3month': {'owner': 0, 'reviewer': 0, 'total': 0}, '1month': {'owner': 0, 'reviewer': 0, 'total': 0}, '1week': {'owner': 0, 'reviewer': 0, 'total': 0}}, - 'qa': {'1year': {'owner': 0, 'reviewer': 0, 'bisected': 0, 'total': 0}, - '3month': {'owner': 0, 'reviewer': 0, 'bisected': 0, 'total': 0}, - '1month': {'owner': 0, 'reviewer': 0, 'bisected': 0, 'total': 0}, - '1week': {'owner': 0, 'reviewer': 0, 'bisected': 0, 'total': 0}}, + 'qa': {'1year': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, 'bisected': 0, 'total': 0}, + '3month': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, 'bisected': 0, 'total': 0}, + '1month': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, 'bisected': 0, 'total': 0}, + '1week': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, 'bisected': 0, 'total': 0}}, 'isCommitter': False, 'isContributor': False, 'hasLicense': False, @@ -419,6 +419,10 @@ def analyze_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): for keyword in keywordsAdded: if keyword == 'bisected': util_build_period_stat(cfg, statList, xDate, email, '', 'bisected', base='qa') + if keyword == 'bibisected': + util_build_period_stat(cfg, statList, xDate, email, '', 'bibisected', base='qa') + if keyword == 'regression': + util_build_period_stat(cfg, statList, xDate, email, '', 'regression', base='qa') for change in row['comments']: email = util_check_mail('*UNKNOWN*', change['creator'], statList, cfg['contributor']['combine-email']) diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index cfe397d..d457e56 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -462,12 +462,54 @@ def report_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): if len(top10bisected) >= 10: break - print("\n + Bisected by:", file=fp) + print("\n + Done by:", file=fp) xRow = [] for i in top10bisected: print(' {} bisected {} bugs in 1 week, {} bugs in 1 month and {} bugs in 3 months'.format( i['name'], i['week'], i['month'], i['3month']), file=fp) + + tmpClist = sorted(statList['people'], key=lambda k: (statList['people'][k]['qa']['1week']['bibisected']), reverse=True) + top10bibisected = [] + for i in tmpClist: + if i != 'qa-ad...@libreoffice.org' and i != 'libreoffice-comm...@lists.freedesktop.org' and \ + statList['people'][i]['qa']['1week']['bibisected'] > 0: + x = {'mail': i, + 'name': statList['people'][i]['name'], + 'week' :statList['people'][i]['qa']['1week']['bibisected'], + 'month' :statList['people'][i]['qa']['1month']['bibisected'], + '3month':statList['people'][i]['qa']['1month']['bibisected']} + top10bibisected.append(x) + if len(top10bibisected) >= 10: + break + + print("\n + Done by:", file=fp) + xRow = [] + for i in top10bibisected: + print(' {} bibisected {} bugs in 1 week, {} bugs in 1 month and {} bugs in 3 months'.format( + i['name'], i['week'], i['month'], i['3month']), file=fp) + + + tmpClist = sorted(statList['people'], key=lambda k: (statList['people'][k]['qa']['1week']['regression']), reverse=True) + top10regression = [] + for i in tmpClist: + if i != 'qa-ad...@libreoffice.org' and i != 'libreoffice-comm...@lists.freedesktop.org' and \ + statList['people'][i]['qa']['1week']['regression'] > 0: + x = {'mail': i, + 'name': statList['people'][i]['name'], + 'week' :statList['people'][i]['qa']['1week']['regression'], + 'month' :statList['people'][i]['qa']['1month']['regression'], + '3month':statList['people'][i]['qa']['1month']['regression']} + top10regression.append(x) + if len(top10regression) >= 10: + break + + print("\n + Done by:", file=fp) + xRow = [] + for i in top10regression: + print(' {} added \'regression\' to {} bugs in 1 week, {} bugs in 1 month and {} bugs in 3 months'.format( + i['name'], i['week'], i['month'], i['3month']), file=fp) + fp.close() return None commit acd2c722ddac79ce659bff47c6afd73878d44a9b Author: Xisco Fauli <aniste...@gmail.com> Date: Sun Dec 11 22:55:06 2016 +0100 List people who bisect bugs diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index e2713ff..28339c6 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -85,15 +85,16 @@ def util_build_period_stat(cfg, statList, xDate, email, status, pstatus, base = if email is not None: statList['people'][email][base][i][pstatus] += 1 statList['people'][email][base][i]['total'] += 1 - if base != 'gerrit' : - statList['data'][base][i][status] += 1 - statList['data'][base][i]['total'] += 1 - elif statList['people'][email]['isCommitter']: - statList['data'][base]['committer'][i][status] += 1 - statList['data'][base]['committer'][i]['total'] += 1 - else: - statList['data'][base]['contributor'][i]['total'] += 1 - statList['data'][base]['contributor'][i][status] += 1 + if status: + if base != 'gerrit' : + statList['data'][base][i][status] += 1 + statList['data'][base][i]['total'] += 1 + elif statList['people'][email]['isCommitter']: + statList['data'][base]['committer'][i][status] += 1 + statList['data'][base]['committer'][i]['total'] += 1 + else: + statList['data'][base]['contributor'][i]['total'] += 1 + statList['data'][base]['contributor'][i][status] += 1 @@ -121,10 +122,10 @@ def util_create_person_gerrit(person, email): '3month': {'owner': 0, 'reviewer': 0, 'total': 0}, '1month': {'owner': 0, 'reviewer': 0, 'total': 0}, '1week': {'owner': 0, 'reviewer': 0, 'total': 0}}, - 'qa': {'1year': {'owner': 0, 'reviewer': 0, 'total': 0}, - '3month': {'owner': 0, 'reviewer': 0, 'total': 0}, - '1month': {'owner': 0, 'reviewer': 0, 'total': 0}, - '1week': {'owner': 0, 'reviewer': 0,'total': 0}}, + 'qa': {'1year': {'owner': 0, 'reviewer': 0, 'bisected': 0, 'total': 0}, + '3month': {'owner': 0, 'reviewer': 0, 'bisected': 0, 'total': 0}, + '1month': {'owner': 0, 'reviewer': 0, 'bisected': 0, 'total': 0}, + '1week': {'owner': 0, 'reviewer': 0, 'bisected': 0, 'total': 0}}, 'isCommitter': False, 'isContributor': False, 'hasLicense': False, @@ -409,6 +410,16 @@ def analyze_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): util_build_period_stat(cfg, statList, creationDate, email, row['status'], 'owner', base='qa') + for change in row['history']: + email = util_check_mail('*UNKNOWN*', change['who'], statList, cfg['contributor']['combine-email']) + xDate = datetime.datetime.strptime(change['when'], "%Y-%m-%dT%H:%M:%SZ") + for entry in change['changes']: + if entry['field_name'] == 'keywords': + keywordsAdded = entry['added'].split(", ") + for keyword in keywordsAdded: + if keyword == 'bisected': + util_build_period_stat(cfg, statList, xDate, email, '', 'bisected', base='qa') + for change in row['comments']: email = util_check_mail('*UNKNOWN*', change['creator'], statList, cfg['contributor']['combine-email']) xDate = datetime.datetime.strptime(change['creation_time'], "%Y-%m-%dT%H:%M:%SZ") diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index a2c7a7b..cfe397d 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -389,18 +389,6 @@ def report_ui(statList, openhubData, gerritData, gitData, bugzillaData, cfg): def report_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): - tmpClist = sorted(statList['people'], key=lambda k: (statList['people'][k]['qa']['1week']['owner']), reverse=True) - top10list = [] - for i in tmpClist: - if i != 'qa-ad...@libreoffice.org' and i != 'libreoffice-comm...@lists.freedesktop.org': - x = {'mail': i, - 'name': statList['people'][i]['name'], - 'week' :statList['people'][i]['qa']['1week']['owner'], - 'month' :statList['people'][i]['qa']['1month']['owner'], - '3month':statList['people'][i]['qa']['1month']['owner']} - top10list.append(x) - if len(top10list) >= 10: - break fp = open('/tmp/esc_qa_report.txt', 'w', encoding='utf-8') print('ESC QA report, generated {} based on stats.json from {}'.format( @@ -441,11 +429,45 @@ def report_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): {'db': 'trendQA', 'tag': '100+', 'text': '100+'}] print(util_build_matrix('distribution', xRow, None, statList), end='', file=fp) + tmpClist = sorted(statList['people'], key=lambda k: (statList['people'][k]['qa']['1week']['owner']), reverse=True) + top10reporters = [] + for i in tmpClist: + if i != 'qa-ad...@libreoffice.org' and i != 'libreoffice-comm...@lists.freedesktop.org': + x = {'mail': i, + 'name': statList['people'][i]['name'], + 'week' :statList['people'][i]['qa']['1week']['owner'], + 'month' :statList['people'][i]['qa']['1month']['owner'], + '3month':statList['people'][i]['qa']['1month']['owner']} + top10reporters.append(x) + if len(top10reporters) >= 10: + break + print("\n + top 10 bugs reporters:", file=fp) xRow = [] - for i in range(0, 10): + for i in top10reporters: print(' {} reported {} bugs in 1 week, {} bugs in 1 month and {} bugs in 3 months'.format( - top10list[i]['name'], top10list[i]['week'], top10list[i]['month'], top10list[i]['3month']), file=fp) + i['name'], i['week'], i['month'], i['3month']), file=fp) + + tmpClist = sorted(statList['people'], key=lambda k: (statList['people'][k]['qa']['1week']['bisected']), reverse=True) + top10bisected = [] + for i in tmpClist: + if i != 'qa-ad...@libreoffice.org' and i != 'libreoffice-comm...@lists.freedesktop.org' and \ + statList['people'][i]['qa']['1week']['bisected'] > 0: + x = {'mail': i, + 'name': statList['people'][i]['name'], + 'week' :statList['people'][i]['qa']['1week']['bisected'], + 'month' :statList['people'][i]['qa']['1month']['bisected'], + '3month':statList['people'][i]['qa']['1month']['bisected']} + top10bisected.append(x) + if len(top10bisected) >= 10: + break + + print("\n + Bisected by:", file=fp) + xRow = [] + for i in top10bisected: + print(' {} bisected {} bugs in 1 week, {} bugs in 1 month and {} bugs in 3 months'.format( + i['name'], i['week'], i['month'], i['3month']), file=fp) + fp.close() return None _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits