Commit a961638c authored by Denis Bilenko's avatar Denis Bilenko

greentest.py: add get_number_of_files() function

parent 9f7d591b
......@@ -420,3 +420,9 @@ def disabled_gc():
finally:
if was_enabled:
gc.enable()
def get_number_open_files():
if os.path.exists('/proc/'):
fd_directory = '/proc/%d/fd' % os.getpid()
return len(os.listdir(fd_directory))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment