use of com.netflix.spectator.atlas.AtlasConfig in project micrometer by micrometer-metrics.
the class SpectatorTimerTest method timerMax.
@Test
void timerMax() {
AtlasConfig atlasConfig = k -> null;
AtlasMeterRegistry registry = new AtlasMeterRegistry(atlasConfig, new MockClock());
Timer timer = registry.timer("timer");
timer.record(1, TimeUnit.SECONDS);
clock(registry).add(atlasConfig.step());
assertThat(timer.max(TimeUnit.MILLISECONDS)).isEqualTo(1000);
}
use of com.netflix.spectator.atlas.AtlasConfig in project iep by Netflix.
the class AtlasRegistryServiceTest method validTagCharacters.
@Test
public void validTagCharacters() throws Exception {
AtlasRegistryService service = new AtlasRegistryService();
AtlasRegistry registry = (AtlasRegistry) service.getRegistry();
AtlasConfig config = (AtlasConfig) registry.config();
Assert.assertEquals("-._A-Za-z0-9", config.validTagCharacters());
Assert.assertEquals("-._A-Za-z0-9^~", config.validTagValueCharacters().get("nf.cluster"));
Assert.assertEquals("-._A-Za-z0-9^~", config.validTagValueCharacters().get("nf.asg"));
Assert.assertNull(config.validTagValueCharacters().get("nf.zone"));
service.stop();
}
Aggregations