esc-reporting/esc-analyze.py | 10 +++++++--- esc-reporting/esc-collect.py | 26 +++++++------------------- esc-reporting/esc-report.py | 5 ++++- 3 files changed, 18 insertions(+), 23 deletions(-)
New commits: commit 21c25bb0bf6e26200bfdfc4a98f2eeb0e6fae792 Author: jan Iversen <j...@libreoffice.org> Date: Sun May 7 21:12:36 2017 +0200 esc-report, added crashtest to esc-prototype diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 3f6bfd9..42c966e 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -477,7 +477,7 @@ def analyze_qa(): def analyze_esc(): - global cfg, statList, bugzillaData, bugzillaESCData, weekList + global cfg, statList, bugzillaData, bugzillaESCData, crashData, weekList print("esc: analyze bugzilla", flush=True) @@ -561,6 +561,8 @@ def analyze_esc(): for id, row in bugzillaESCData['ESC_COMPONENT_UPDATE']['os'].items(): statList['data']['esc']['component']['os'][id] = row['count'] + statList['data']['esc']['crashtest'] = {'import': crashData['crashtest']['crashlog'], + 'export': crashData['crashtest']['exportCrash']} @@ -821,7 +823,7 @@ def loadCfg(platform): def runAnalyze(): - global cfg, statList, openhubData, bugzillaData, bugzillaESCData, gerritData, gitData, weekList + global cfg, statList, openhubData, bugzillaData, bugzillaESCData, gerritData, gitData, crashData, weekList x = (cfg['nowDate'] - datetime.timedelta(days=7)).strftime('%Y-%m-%d') weekList = util_load_file(cfg['homedir'] + 'archive/stats_' + x + '.json') @@ -831,6 +833,7 @@ def runAnalyze(): bugzillaESCData = util_load_data_file(cfg['homedir'] + 'dump/bugzilla_esc_dump.json') gerritData = util_load_data_file(cfg['homedir'] + 'dump/gerrit_dump.json') gitData = util_load_data_file(cfg['homedir'] + 'dump/git_dump.json') + crashData = util_load_data_file(cfg['homedir'] + 'dump/crash_dump.json') statList = util_create_statList() try: runLoadCSV() @@ -875,7 +878,7 @@ def runAnalyze(): def runUpgrade(args): - global cfg, statList, openhubData, bugzillaData, bugzillaESCData, gerritData, gitData, weekList + global cfg, statList, openhubData, bugzillaData, bugzillaESCData, gerritData, gitData, crashData, weekList args = args[1:] openhubData = util_load_data_file(cfg['homedir'] + 'dump/openhub_dump.json') @@ -883,6 +886,7 @@ def runUpgrade(args): bugzillaESCData = util_load_data_file(cfg['homedir'] + 'dump/bugzilla_esc_dump.json') gerritData = util_load_data_file(cfg['homedir'] + 'dump/gerrit_dump.json') gitData = util_load_data_file(cfg['homedir'] + 'dump/git_dump.json') + crashData = util_load_data_file(cfg['homedir'] + 'dump/crash_dump.json') statList = util_create_statList() runLoadCSV() csvList = statList diff --git a/esc-reporting/esc-collect.py b/esc-reporting/esc-collect.py index 3a954c2..74c1883 100755 --- a/esc-reporting/esc-collect.py +++ b/esc-reporting/esc-collect.py @@ -662,9 +662,8 @@ def get_git(cfg): def get_crash(cfg): fileName = cfg['homedir'] + 'dump/crash_dump.json' - searchDate, rawList = util_load_data_file(cfg, fileName, 'crash', {'crashtest': {}, 'crashreport': {}}) - - print("Updating crashtest dump from " + rawList['newest-entry']) + rawList = {'crashtest': {}, 'crashreport': {}} + print("Updating crashtest dump") dirList = util_load_url('http://dev-builds.libreoffice.org/crashtest/?C=M;O=D', useRaw=True) inx = dirList.find('alt="[DIR]"', 0) if inx == -1: @@ -675,22 +674,11 @@ def get_crash(cfg): end = dirList.find('"', inx) url = 'http://dev-builds.libreoffice.org/crashtest/' + dirList[inx:end] - for type in 'exportCrashes', 'importCrash', 'validationErrors': - tmp = util_load_url(url + type + '.csv', useRaw=True).replace('\r', '').split('\n') - csv = [] - for line in tmp: - csv.append(line.split(',')) - for line in csv[1:]: - for inx, item in enumerate(line): - if item == '': - line[inx] = 0 - else: - line[inx] = int(item) - rawList['crashtest'][type] = {} - rawList['crashtest'][type]['title'] = csv[0] - rawList['crashtest'][type]['data'] = csv[1:] - - print("Updating crashreport dump from " + rawList['newest-entry']) + for type in 'crashlog', 'exportCrash': + tmp = util_load_url(url + type + '.txt', useRaw=True).split('\n') + rawList['crashtest'][type] = len(tmp) -1 + + print("Updating crashreport dump") print(".....talk with moggi, about REST API") diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index e769c87..7d6d5a3 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -308,9 +308,12 @@ def report_esc_prototype(): txt += ' closed:\n' for id, title in statList['escList']['MostPressingBugs']['closed']['list'].items(): txt += ' {} "{}"\n'.format(id, title) - escPrototype = escPrototype.replace('$<ESC_MOST_PRESSING_BUGS>', txt) + txt = ' + {}({:+d}) import failure, {}({:+d}) export failures'.format( + statList['data']['esc']['crashtest']['import'], statList['diff']['esc']['crashtest']['import'], + statList['data']['esc']['crashtest']['export'], statList['diff']['esc']['crashtest']['export']) + escPrototype = escPrototype.replace('$<ESC_CRASHTEST_UPDATE>', txt) fp = open('/tmp/esc_prototype_report.txt', 'w', encoding='utf-8') print('ESC prototype report, generated {} based on stats.json from {}\n\n\n'.format( _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits