only index when there are modules registered.
Do not track index-write metrics in DiscoveryWriter.
Track index batch sizes and how long they take.

Track sizes, even when they are zero.
But only write track duration when there is stuff to index.