Created
September 24, 2018 21:37
-
-
Save jkschneider/2e108a700601af22a8429b46d7a69184 to your computer and use it in GitHub Desktop.
StatsD memory problems?
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 CounterSample2 { | |
public static void main(String[] args) { | |
Logger logger = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME); | |
logger.setLevel(Level.INFO); | |
MeterRegistry registry = SampleRegistries.datadogStatsd(); | |
Counter counter = registry.counter("counter", "method", "actual"); | |
for(long i = 0;; i++) { | |
counter.increment(); | |
if(i % 100000 == 0) { | |
System.out.println(i); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment