WSGI middleware for scales and memory debugging