checkram#
- checkram(unit='mb', fmt='0.2f', start=0, to_string=True)[source]#
Measure actual memory usage, typically at different points throughout execution.
Note on the different functions:
sc.memload()
checks current total system memory consumptionsc.checkram()
checks RAM (virtual memory) used by the current Python processsc.checkmem()
checks memory consumption by a given object
Example:
import sciris as sc import numpy as np start = sc.checkram(to_string=False) a = np.random.random((1_000, 10_000)) print(sc.checkram(start=start))
New in version 1.0.0.