Rack middleware for profiling