public void registerAll ( String prefix , MetricSet metrics ) throws IllegalArgumentException { for ( Map . Entry < String , Metric > entry : metrics . getMetrics ( ) . entrySet ( ) ) { if ( entry . getValue ( ) instanceof MetricSet ) { registerAll ( name ( prefix , entry . getKey ( ) ) , ( MetricSet ) entry . getValue ( ) ) ; } else { register ( name ( prefix , entry . getKey ( ) ) , entry . getValue ( ) ) ; } } }
Given a metric set registers them with the given prefix prepended to their names .