Optional memory warnings on processor requests taking a lot of memory
Optional memory warnings on processor requests taking a lot of memory

Summary:
This is a rudimentary tool that can help finding a repro for a memory leak in Thrift, especially if it's introduced on the C++ side of things where Heapy can't help. Setting an environment variable called THRIFT_PER_REQUEST_MEMORY_WARNING to multiple megabytes will expose unexpectedly heavy requests.

Note that in case of multithreading use, there's sometimes going to be multiple requests reporting a single bump in memory usage. Look at the slowest request first (it will present the biggest bump).

Reviewed By: prologic

Differential Revision: D2830752

fb-gh-sync-id: 0610e48efd252af2e911d0ccc1c91a405d5366b4

SergeyMakarenko/fbthrift,LinusU/fbthrift,getyourguide/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,SergeyMakarenko/fbthrift,SergeyMakarenko/fbthrift,getyourguide/fbthrift,facebook/fbthrift,LinusU/fbthrift,getyourguide/fbthrift,SergeyMakarenko/fbthrift,facebook/fbthrift,SergeyMakarenko/fbthrift,getyourguide/fbthrift,LinusU/fbthrift,LinusU/fbthrift,facebook/fbthrift,getyourguide/fbthrift,SergeyMakarenko/fbthrift,LinusU/fbthrift,LinusU/fbthrift,getyourguide/fbthrift,SergeyMakarenko/fbthrift,getyourguide/fbthrift,LinusU/fbthrift,SergeyMakarenko/fbthrift,SergeyMakarenko/fbthrift,LinusU/fbthrift,facebook/fbthrift,getyourguide/fbthrift,facebook/fbthrift,getyourguide/fbthrift,facebook/fbthrift,getyourguide/fbthrift,getyourguide/fbthrift,LinusU/fbthrift,LinusU/fbthrift,SergeyMakarenko/fbthrift,LinusU/fbthrift,getyourguide/fbthrift,SergeyMakarenko/fbthrift,SergeyMakarenko/fbthrift