move multi into engine [pr] (#8778)

* move multi into engine [pr]

* all runtime is one sz
This commit is contained in:
George Hotz
2025-01-28 09:15:29 +09:00
committed by GitHub
parent 299fa8f37b
commit 62655e4999
5 changed files with 5 additions and 4 deletions

3
sz.py
View File

@@ -69,7 +69,8 @@ if __name__ == "__main__":
print("```")
else:
print(tabulate([headers] + sorted(table, key=lambda x: -x[1]), headers="firstrow", floatfmt=".1f")+"\n")
for dir_name, group in itertools.groupby(sorted([(x[0].rsplit("/", 1)[0], x[1], x[2]) for x in table]), key=lambda x:x[0]):
groups = sorted([('/'.join(x[0].rsplit("/", 1)[0].split("/")[0:2]), x[1], x[2]) for x in table])
for dir_name, group in itertools.groupby(groups, key=lambda x:x[0]):
print(f"{dir_name:30s} : {sum([x[1] for x in group]):6d}")
total_lines = sum([x[1] for x in table])
print(f"\ntotal line count: {total_lines}")