diff --git a/Jenkinsfile b/Jenkinsfile index 62e2652bcd..4a6388f600 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,6 +21,7 @@ pipeline { } steps { sh 'python3 progress.py -c >> /var/www/html/reports/progress.csv' + sh 'python3 progress.py -mc >> /var/www/html/reports/progress_matching.csv' } } } diff --git a/progress.py b/progress.py index 23d4f0ae6c..c7feb32ea4 100755 --- a/progress.py +++ b/progress.py @@ -2,9 +2,9 @@ import argparse import csv +import git import os import re -import time parser = argparse.ArgumentParser(description="Computes current progress throughout the whole project.") parser.add_argument("-m", "--matching", dest='matching', action='store_true', @@ -115,8 +115,12 @@ compiled_bytes = total bytesPerHeartPiece = compiled_bytes / 80 if args.csv: - timestamp = str(time.time()) - print(timestamp + "," + str(srcPct) + "," + str(asmPct) + "," + str(bootPct) + "," + str(codePct) + "," + str(ovlPct)) + version = 1 + git_object = git.Repo().head.object + timestamp = str(git_object.committed_date) + git_hash = git_object.hexsha + csv_list = [str(version), timestamp, git_hash, str(code), str(codeSize), str(boot), str(bootSize), str(ovl), str(ovlSize), str(src), str(asm), str(len(nonMatchingFunctions))] + print(",".join(csv_list)) else: adjective = "decompiled" if not args.matching else "matched"