Add some stats collection in debugging mode.

No good way to extract output yet.
1 file changed