stagemonitor
stagemonitor copied to clipboard
Performance optimization: eliminate redundant allocation of SimpleDateFormat instances in ElasticSearchReporter
The single line in StringUtils#getLogstashStyleDate(long) produces about 7-8% of total stagemonitor TLAB allocation (GC pressure) in my production system.
The optimizaton is pretty trivial: wrap stateful DateFormat instances into ThreadLocal that is safely initialized and accessed per thread.