Merge "Add some tests for procstats, and fix some bugs that the tests uncovered." into nyc-dev