Created
March 20, 2018 15:22
-
-
Save jkschneider/9cb172883c9c8a53907022de13b47eca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Slack320 { | |
public static void main(String[] args) { | |
MeterRegistry registry = SampleRegistries.graphite(); | |
Counter counter = registry.counter("serviceName", "client", | |
"token", "statistic", "timeout_connect"); | |
RandomEngine r = new MersenneTwister64(0); | |
Normal dist = new Normal(0, 1, r); | |
Flux.interval(Duration.ofMillis(10)) | |
.doOnEach(d -> { | |
if (dist.nextDouble() + 0.1 > 0) { | |
counter.increment(); | |
} | |
}) | |
.blockLast(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment