MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / naive_source_size

Function naive_source_size

benchmarks/run_benchmarks.py:78–87  ·  view source on GitHub ↗
(root: str)

Source from the content-addressed store, hash-verified

76
77
78def naive_source_size(root: str) -> int:
79 total = 0
80 for dirpath, _dirs, files in os.walk(root):
81 for f in files:
82 if f.endswith(".py"):
83 try:
84 total += os.path.getsize(os.path.join(dirpath, f))
85 except OSError:
86 pass
87 return total
88
89
90# ---------------------------------------------------------------------------

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected