I want to get statistics about "idle in transaction" connections. 

This statistics should be a part of performance tests results and it can reveal some bugs in the tested system.

What can I use to gather this statistics?