Functions | Variables
ManagerTest Namespace Reference

Functions

def leak_check
 memory leak check
def mem_rss
def print_file_and_cons
 file and console out

Variables

tuple env = RtmEnv(sys.argv, ["localhost:9898"])
string fodat = "=== "
tuple fout = open(test_case + ".log", 'w')
int loop_cnt = 1000
tuple manager = naming.resolve(mgr_name)
tuple mgr_name = socket.gethostname()
tuple naming = CorbaNaming(env.orb,"localhost:9898")
tuple rss0 = mem_rss()
 Manager::get_loadable_modules();.
tuple rss1 = mem_rss()
tuple rssEnd = mem_rss()
string test_case = "ManagerTest"
 file out setting

Function Documentation

def ManagerTest.leak_check (   rss_start,
  rss_end 
)

memory leak check

Definition at line 51 of file ManagerTest.py.

Definition at line 30 of file ManagerTest.py.

def ManagerTest.print_file_and_cons (   out_data,
  out_flag = 0 
)

file and console out

Definition at line 35 of file ManagerTest.py.


Variable Documentation

tuple ManagerTest::env = RtmEnv(sys.argv, ["localhost:9898"])

Definition at line 23 of file ManagerTest.py.

string ManagerTest::fodat = "=== "

-----------------------------------------------------------------------------

----------------------------------------------------------------------------- fodat = "get_owner()" print_file_and_cons(fodat)

for i in range(loop_cnt): ## Manager::get_owner(); manager.get_owner()

if i == 0: rss0 = mem_rss() ; j0 = 0 ; rssStart = rss0 fodat = " %05d: %s KB start" % (1, rss0) print_file_and_cons(fodat,1) rss1 = mem_rss() ; j1 = i if rss0 != rss1: fodat = " %05d: %s KB -> %d KB. count diff -> %d" % (i+1, rss1,int(rss1)-int(rss0),int(j1)-int(j0) ) print_file_and_cons(fodat,1) rss0 = rss1 ; j0 = j1

rssEnd = mem_rss() fodat = " %05d: %s KB end" % (i+1, rssEnd) print_file_and_cons(fodat,1) leak_check(rssStart, rssEnd) ----------------------------------------------------------------------------- fodat = "set_owner()" print_file_and_cons(fodat)

for i in range(loop_cnt): ## Manager::set_owner(in Manager mgr); manager.set_owner(manager)

if i == 0: rss0 = mem_rss() ; j0 = 0 ; rssStart = rss0 fodat = " %05d: %s KB start" % (1, rss0) print_file_and_cons(fodat,1) rss1 = mem_rss() ; j1 = i if rss0 != rss1: fodat = " %05d: %s KB -> %d KB. count diff -> %d" % (i+1, rss1,int(rss1)-int(rss0),int(j1)-int(j0) ) print_file_and_cons(fodat,1) rss0 = rss1 ; j0 = j1

rssEnd = mem_rss() fodat = " %05d: %s KB end" % (i+1, rssEnd) print_file_and_cons(fodat,1) leak_check(rssStart, rssEnd) ----------------------------------------------------------------------------- fodat = "get_child()" print_file_and_cons(fodat)

for i in range(loop_cnt): ## Manager::get_child(); manager.get_child()

if i == 0: rss0 = mem_rss() ; j0 = 0 ; rssStart = rss0 fodat = " %05d: %s KB start" % (1, rss0) print_file_and_cons(fodat,1) rss1 = mem_rss() ; j1 = i if rss0 != rss1: fodat = " %05d: %s KB -> %d KB. count diff -> %d" % (i+1, rss1,int(rss1)-int(rss0),int(j1)-int(j0) ) print_file_and_cons(fodat,1) rss0 = rss1 ; j0 = j1

rssEnd = mem_rss() fodat = " %05d: %s KB end" % (i+1, rssEnd) print_file_and_cons(fodat,1) leak_check(rssStart, rssEnd) ----------------------------------------------------------------------------- fodat = "set_child()" print_file_and_cons(fodat)

for i in range(loop_cnt): ## Manager::set_child(in Manager mgr); manager.set_child(manager)

if i == 0: rss0 = mem_rss() ; j0 = 0 ; rssStart = rss0 fodat = " %05d: %s KB start" % (1, rss0) print_file_and_cons(fodat,1) rss1 = mem_rss() ; j1 = i if rss0 != rss1: fodat = " %05d: %s KB -> %d KB. count diff -> %d" % (i+1, rss1,int(rss1)-int(rss0),int(j1)-int(j0) ) print_file_and_cons(fodat,1) rss0 = rss1 ; j0 = j1

rssEnd = mem_rss() fodat = " %05d: %s KB end" % (i+1, rssEnd) print_file_and_cons(fodat,1) leak_check(rssStart, rssEnd) -----------------------------------------------------------------------------

----------------------------------------------------------------------------- fodat = "shutdown()" print_file_and_cons(fodat)

for i in range(loop_cnt): ## Manager::shutdown(); ###manager.shutdown() # can't test, because manager is destroyed.

if i == 0: rss0 = mem_rss() ; j0 = 0 ; rssStart = rss0 fodat = " %05d: %s KB start" % (1, rss0) print_file_and_cons(fodat,1) rss1 = mem_rss() ; j1 = i if rss0 != rss1: fodat = " %05d: %s KB -> %d KB. count diff -> %d" % (i+1, rss1,int(rss1)-int(rss0),int(j1)-int(j0) ) print_file_and_cons(fodat,1) rss0 = rss1 ; j0 = j1

rssEnd = mem_rss() fodat = " %05d: %s KB end" % (i+1, rssEnd) print_file_and_cons(fodat,1) leak_check(rssStart, rssEnd) -----------------------------------------------------------------------------

Definition at line 63 of file ManagerTest.py.

tuple ManagerTest::fout = open(test_case + ".log", 'w')

Definition at line 61 of file ManagerTest.py.

Definition at line 66 of file ManagerTest.py.

tuple ManagerTest::manager = naming.resolve(mgr_name)

Definition at line 26 of file ManagerTest.py.

tuple ManagerTest::mgr_name = socket.gethostname()

Definition at line 24 of file ManagerTest.py.

tuple ManagerTest::naming = CorbaNaming(env.orb,"localhost:9898")

Definition at line 25 of file ManagerTest.py.

Manager::get_loadable_modules();.

Manager::get_service(in string name);.

Manager::restart();.

Manager::fork();.

Manager::set_configuration(in string name, in string value);.

Manager::get_configuration();.

Manager::get_profile();.

Manager::get_component_profiles();.

Manager::get_components();.

Manager::get_factory_profiles();.

Manager::get_loaded_modules();.

Definition at line 76 of file ManagerTest.py.

Definition at line 79 of file ManagerTest.py.

Definition at line 85 of file ManagerTest.py.

string ManagerTest::test_case = "ManagerTest"

file out setting

Definition at line 60 of file ManagerTest.py.



openrtm_aist
Author(s): Noriaki Ando
autogenerated on Thu Aug 27 2015 14:16:40