mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-29 03:34:07 +00:00
Fix progress.py to not include files in asm/ (#893)
This commit is contained in:
parent
e34cb58640
commit
36d086877c
1 changed files with 6 additions and 14 deletions
20
progress.py
20
progress.py
|
@ -64,7 +64,6 @@ src = 0
|
||||||
code = 0
|
code = 0
|
||||||
boot = 0
|
boot = 0
|
||||||
ovl = 0
|
ovl = 0
|
||||||
asm = 0
|
|
||||||
|
|
||||||
for line in mapFile:
|
for line in mapFile:
|
||||||
lineSplit = list(filter(None, line.split(" ")))
|
lineSplit = list(filter(None, line.split(" ")))
|
||||||
|
@ -77,8 +76,6 @@ for line in mapFile:
|
||||||
if (section == ".text"):
|
if (section == ".text"):
|
||||||
if (objFile.startswith("build/src")):
|
if (objFile.startswith("build/src")):
|
||||||
src += size
|
src += size
|
||||||
elif (objFile.startswith("build/asm")):
|
|
||||||
asm += size
|
|
||||||
|
|
||||||
if (objFile.startswith("build/src/code") or objFile.startswith("build/src/libultra_code")):
|
if (objFile.startswith("build/src/code") or objFile.startswith("build/src/libultra_code")):
|
||||||
code += size
|
code += size
|
||||||
|
@ -89,37 +86,32 @@ for line in mapFile:
|
||||||
|
|
||||||
nonMatchingASM = GetNonMatchingSize("asm/non_matchings")
|
nonMatchingASM = GetNonMatchingSize("asm/non_matchings")
|
||||||
nonMatchingASMBoot = GetNonMatchingSize("asm/non_matchings/boot")
|
nonMatchingASMBoot = GetNonMatchingSize("asm/non_matchings/boot")
|
||||||
nonMatchingASMCode = GetNonMatchingSize("asm/non_matchings/code") + GetNonMatchingSize("asm/non_matchings/libultra_code")
|
nonMatchingASMCode = GetNonMatchingSize("asm/non_matchings/code")
|
||||||
nonMatchingASMOvl = GetNonMatchingSize("asm/non_matchings/overlays")
|
nonMatchingASMOvl = GetNonMatchingSize("asm/non_matchings/overlays")
|
||||||
|
|
||||||
src -= nonMatchingASM
|
src -= nonMatchingASM
|
||||||
code -= nonMatchingASMCode
|
code -= nonMatchingASMCode
|
||||||
boot -= nonMatchingASMBoot
|
boot -= nonMatchingASMBoot
|
||||||
ovl -= nonMatchingASMOvl
|
ovl -= nonMatchingASMOvl
|
||||||
asm += nonMatchingASM
|
|
||||||
|
|
||||||
bootSize = 31408 # decompilable code only
|
bootSize = 31408 # decompilable code only
|
||||||
codeSize = 1004128 # .text section except rsp bins (1.00mb)
|
codeSize = 1000000 # decompilable code only (1.00mb)
|
||||||
ovlSize = 2812000 # .text sections
|
ovlSize = 2812000 # .text sections
|
||||||
handwritten = 5840 # boot only
|
|
||||||
|
|
||||||
asm -= handwritten
|
total = src + nonMatchingASM
|
||||||
|
|
||||||
total = src + asm
|
|
||||||
srcPct = 100 * src / total
|
srcPct = 100 * src / total
|
||||||
asmPct = 100 * asm / total
|
|
||||||
codePct = 100 * code / codeSize
|
codePct = 100 * code / codeSize
|
||||||
bootPct = 100 * boot / bootSize
|
bootPct = 100 * boot / bootSize
|
||||||
ovlPct = 100 * ovl / ovlSize
|
ovlPct = 100 * ovl / ovlSize
|
||||||
compiled_bytes = total
|
|
||||||
bytesPerHeartPiece = compiled_bytes / 80
|
bytesPerHeartPiece = total / 80
|
||||||
|
|
||||||
if args.format == 'csv':
|
if args.format == 'csv':
|
||||||
version = 1
|
version = 1
|
||||||
git_object = git.Repo().head.object
|
git_object = git.Repo().head.object
|
||||||
timestamp = str(git_object.committed_date)
|
timestamp = str(git_object.committed_date)
|
||||||
git_hash = git_object.hexsha
|
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))]
|
csv_list = [str(version), timestamp, git_hash, str(code), str(codeSize), str(boot), str(bootSize), str(ovl), str(ovlSize), str(src), str(nonMatchingASM), str(len(nonMatchingFunctions))]
|
||||||
print(",".join(csv_list))
|
print(",".join(csv_list))
|
||||||
elif args.format == 'shield-json':
|
elif args.format == 'shield-json':
|
||||||
# https://shields.io/endpoint
|
# https://shields.io/endpoint
|
||||||
|
|
Loading…
Reference in a new issue