Skip to content

Instantly share code, notes, and snippets.

@bloodeagle40234
Created July 19, 2016 09:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bloodeagle40234/f4c0cd267e085cc6224ffdc1b1822631 to your computer and use it in GitHub Desktop.
Save bloodeagle40234/f4c0cd267e085cc6224ffdc1b1822631 to your computer and use it in GitHub Desktop.
from pyeclib.ec_iface import ECDriver
import sys
import gc
def collect():
for x in range(3):
gc.collect(x)
if __name__ == '__main__':
first = sys.gettotalrefcount()
driver = ECDriver(ec_type='liberasurecode_rs_vand', k=6, m=3)
for x in range(1000):
info = driver.get_segment_info(1024*1024, 1024*1024)
info = None
collect()
last = sys.gettotalrefcount()
print "first count: %d, last count: %d, diff: %d" % (first, last, last - first)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment