TimeUnit defaultDurationUnit = getConfigs().getTimeUnit(config, "defaultDurationUnit", TimeUnit.MILLISECONDS);
TimeUnit defaultRateUnit = getConfigs().getTimeUnit(config, "defaultRateUnit", TimeUnit.SECONDS);
Map<String, TimeUnit> durationUnits = Maps.newHashMap();
Config durationUnitsConfig = getConfigs().getConfig(config, "durationUnits", ConfigFactory.empty());
for (Map.Entry<String, Object> entry : new Configs().getEntrySet(durationUnitsConfig)) {
TimeUnit unit = new Configs().getTimeUnit(entry.getValue().toString());
durationUnits.put(entry.getKey(), unit);
}
Map<String, TimeUnit> rateUnits = Maps.newHashMap();
Config rateUnitsConfig = getConfigs().getConfig(config, "rateUnits", ConfigFactory.empty());
for (Map.Entry<String, Object> entry : new Configs().getEntrySet(rateUnitsConfig)) {
TimeUnit unit = new Configs().getTimeUnit(entry.getValue().toString());
rateUnits.put(entry.getKey(), unit);
}
this.domain = getConfigs().getString(config, "domain", "metrics");
validateArguments();