Implement a simple performance counter.

Add TeamCity logging for testing.