[bdg-utils-6] Migrating metrics collection code.
Merge pull request #8 from fnothaft/metrics

[bdg-utils-6] Migrates metrics code from ADAM