[hg] galaxy 3269: Backed out changeset 72020a46127e. Removes me...
details: http://www.bx.psu.edu/hg/galaxy/rev/76f6e26fd4f6 changeset: 3269:76f6e26fd4f6 user: Nate Coraor <nate@bx.psu.edu> date: Tue Jan 26 10:20:46 2010 -0500 description: Backed out changeset 72020a46127e. Removes memory logging and PSI dependency. diffstat: eggs.ini | 2 -- lib/galaxy/web/buildapp.py | 7 +------ lib/galaxy/web/framework/base.py | 5 +---- lib/galaxy/web/framework/memdebug.py | 26 -------------------------- 4 files changed, 2 insertions(+), 38 deletions(-) diffs (89 lines): diff -r 72020a46127e -r 76f6e26fd4f6 eggs.ini --- a/eggs.ini Fri Oct 02 09:36:07 2009 -0400 +++ b/eggs.ini Tue Jan 26 10:20:46 2010 -0500 @@ -23,7 +23,6 @@ python_lzo = 1.08 threadframe = 0.2 guppy = 0.1.8 -PSI = 0.3b1.1 [eggs:noplatform] amqplib = 0.6.1 @@ -87,7 +86,6 @@ Paste = http://cheeseshop.python.org/packages/source/P/Paste/Paste-1.5.1.tar.gz PasteDeploy = http://cheeseshop.python.org/packages/source/P/PasteDeploy/PasteDeploy-1.3.1... PasteScript = http://cheeseshop.python.org/packages/source/P/PasteScript/PasteScript-1.3.6... -PSI = http://pypi.python.org/packages/source/P/PSI/PSI-0.3b1.1.tar.gz Routes = http://pypi.python.org/packages/source/R/Routes/Routes-1.6.3.tar.gz simplejson = http://cheeseshop.python.org/packages/source/s/simplejson/simplejson-1.5.tar... SQLAlchemy = http://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-0.4.7p1.tar.g... diff -r 72020a46127e -r 76f6e26fd4f6 lib/galaxy/web/buildapp.py --- a/lib/galaxy/web/buildapp.py Fri Oct 02 09:36:07 2009 -0400 +++ b/lib/galaxy/web/buildapp.py Tue Jan 26 10:20:46 2010 -0500 @@ -64,12 +64,7 @@ sys.exit( 1 ) atexit.register( app.shutdown ) # Create the universe WSGI application - if app.config.log_memory_usage: - from galaxy.web.framework.memdebug import MemoryLoggingWebApplication - webapp = MemoryLoggingWebApplication( app, session_cookie='galaxysession' ) - else: - webapp = galaxy.web.framework.WebApplication( app, session_cookie='galaxysession' ) - # Find controllers + webapp = galaxy.web.framework.WebApplication( app, session_cookie='galaxysession' ) add_controllers( webapp, app ) # Force /history to go to /root/history -- needed since the tests assume this webapp.add_route( '/history', controller='root', action='history' ) diff -r 72020a46127e -r 76f6e26fd4f6 lib/galaxy/web/framework/base.py --- a/lib/galaxy/web/framework/base.py Fri Oct 02 09:36:07 2009 -0400 +++ b/lib/galaxy/web/framework/base.py Tue Jan 26 10:20:46 2010 -0500 @@ -122,7 +122,7 @@ # Special key for AJAX debugging, remove to avoid confusing methods kwargs.pop( '_', None ) try: - body = self.call_body_method( method, trans, kwargs ) + body = method( trans, **kwargs ) except Exception, e: body = self.handle_controller_exception( e, trans, **kwargs ) if not body: @@ -140,9 +140,6 @@ trans.response.wsgi_headeritems() ) return self.make_body_iterable( trans, body ) - def call_body_method( self, method, trans, kwargs ): - return method( trans, **kwargs ) - def make_body_iterable( self, trans, body ): if isinstance( body, ( types.GeneratorType, list, tuple ) ): # Recursively stream the iterable diff -r 72020a46127e -r 76f6e26fd4f6 lib/galaxy/web/framework/memdebug.py --- a/lib/galaxy/web/framework/memdebug.py Fri Oct 02 09:36:07 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -""" -Implementation of WebApplication that logs memory usage before and after -calling each controller method. -""" - -import pkg_resources -pkg_resources.require( "PSI" ) -import psi.process - -import os -import logging - -from galaxy.web.framework import WebApplication - -log = logging.getLogger( __name__ ) -pid = os.getpid() - -class MemoryLoggingWebApplication( WebApplication ): - def call_body_method( self, method, trans, kwargs ): - cls = method.im_class - process = psi.process.Process( pid ) - log.debug( "before controller=%s.%s method=%s rss=%d vsz=%d", cls.__module__, cls.__name__, method.__name__, process.rss, process.vsz ) - rval = method( trans, **kwargs ) - process = psi.process.Process( pid ) - log.debug( "after controller=%s.%s method=%s rss=%d vsz=%d", cls.__module__, cls.__name__, method.__name__, process.rss, process.vsz ) - return rval \ No newline at end of file
participants (1)
-
Greg Von Kuster