add getMetric convenience methods to MetricImpl; add test-apps/chunkPartition and refactor some common test classes.