Functions | Variables
ManagerTest Namespace Reference

Functions

def leak_check (rss_start, rss_end)
 memory leak check More...
 
def mem_rss ()
 
def print_file_and_cons (out_data, out_flag=0)
 file and console out More...
 

Variables

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

Function Documentation

def ManagerTest.leak_check (   rss_start,
  rss_end 
)

memory leak check

Definition at line 51 of file ManagerTest.py.

def ManagerTest.mem_rss ( )

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

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

Definition at line 23 of file ManagerTest.py.

string ManagerTest.fodat = "=== "



fodat = "shutdown()" print_file_and_cons(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)

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.

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

Definition at line 61 of file ManagerTest.py.

int ManagerTest.loop_cnt = 1000

Definition at line 66 of file ManagerTest.py.

ManagerTest.manager = naming.resolve(mgr_name)._narrow(RTM.Manager)

Definition at line 26 of file ManagerTest.py.

string ManagerTest.mgr_name = socket.gethostname()+".host_cxt/manager.mgr"

Definition at line 24 of file ManagerTest.py.

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

Definition at line 25 of file ManagerTest.py.

int ManagerTest.rss0 = 0

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.

ManagerTest.rss1 = i

Definition at line 79 of file ManagerTest.py.

ManagerTest.rssEnd = mem_rss()

Definition at line 85 of file ManagerTest.py.

ManagerTest.rssStart

Definition at line 76 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 Jun 6 2019 19:26:03