First you start profiler in remote mode
vprof -r
profiler.run(foo, 'cmh', args=(arg1, arg2), host='localhost', port=8000)
This will run profiler and send stats to server in JSON format.
First you start profiler in remote mode
and then use vprof.profiler.run function: (replace host and port if you run your webappp on another maching with address of machine you run "vprof -r" on).This will run profiler and send stats to server in JSON format.