Added thread statistics.
Merge pull request #228 from forklessanon/thread-stats

Added thread statistics.