MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / digest

Function digest

tools/materialize-bench/run.py:43–48  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

41
42
43def digest(path):
44 value = hashlib.sha256()
45 with path.open('rb') as stream:
46 for block in iter(lambda: stream.read(1024 * 1024), b''):
47 value.update(block)
48 return value.hexdigest()
49
50
51def source_fingerprint():

Callers 3

mainFunction · 0.90
mainFunction · 0.70
mainFunction · 0.50

Calls 3

openMethod · 0.45
readMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected