gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject cvs commit: jakarta-gump/python/gump/utils __init__.py
Date Mon, 23 Feb 2004 23:29:39 GMT
ajack       2004/02/23 15:29:39

  Modified:    python/gump/utils __init__.py
  Log:
  Tweak to give memory usage, as well as rest, at 'info' level.
  
  Revision  Changes    Path
  1.23      +26 -7     jakarta-gump/python/gump/utils/__init__.py
  
  Index: __init__.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/utils/__init__.py,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- __init__.py	23 Feb 2004 23:11:22 -0000	1.22
  +++ __init__.py	23 Feb 2004 23:29:39 -0000	1.23
  @@ -371,11 +371,30 @@
           if not message:
               message=''
               
  -        resources=resource.getrusage(resource.RUSAGE_SELF)
  -        log.debug('My Resources ' + message + ' ' + `resources`)
  +        myresources=resource.getrusage(resource.RUSAGE_SELF)
  +        
  +        # Extract the pieces
  +        (my_ru_utime, my_ru_stime, my_ru_maxrss, \
  +            my_ru_ixrss, my_ru_idrss, my_ru_isrss, 	\
  +            my_ru_minflt, my_ru_majflt, my_ru_nswap, \
  +            my_ru_inblock, my_ru_oublock, my_ru_msgsnd, \
  +            my_ru_msgrcv, my_ru_nsignals, my_ru_nvcsw, 	\
  +            my_ru_nivcsw)=myresources
       
  -        resources=resource.getrusage(resource.RUSAGE_CHILDREN)
  -        log.debug('Child Resources ' + message + ' ' + `resources`)        
  +        kidresources=resource.getrusage(resource.RUSAGE_CHILDREN)
  +        
  +        # Extract the pieces
  +        (kid_ru_utime, kid_ru_stime, kid_ru_maxrss, \
  +            kid_ru_ixrss, kid_ru_idrss, kid_ru_isrss, 	\
  +            kid_ru_minflt, kid_ru_majflt, kid_ru_nswap, \
  +            kid_ru_inblock, kid_ru_oublock, kid_ru_msgsnd, \
  +            kid_ru_msgrcv, kid_ru_nsignals, kid_ru_nvcsw, 	\
  +            kid_ru_nivcsw)=kidresources
  +            
  +        log.info('My Memory ' + message + ' ' + `my_ru_maxrss`)
  +        log.info('My Resources ' + message + ' ' + `myresources`)
  +        log.info('Child Memory ' + message + ' ' + `kid_ru_maxrss`)
  +        log.info('Child Resources ' + message + ' ' + `kidresources`)        
       
           #resources=resource.getrusage(resource.RUSAGE_BOTH)
           #log.debug('All Resources ' + message  + ' ' + `resources`)
  
  
  

Mime
View raw message