Skip to content

Commit

Permalink
Remove instrumentation from ExecutorService in StreamRouter
Browse files Browse the repository at this point in the history
The ExecutorService is only used for the TimeLimiter in StreamRouter and the acquired
metrics are basically useless (or derivates of other metrics). Removing the instrumentation
from this particular ExecutorService prevents the instantiation of quite some
InstrumentedRunnables which in turn helps to get some pressure off the GC.
  • Loading branch information
Jochen Schalanda committed Dec 23, 2014
1 parent ac5ae2b commit 74a6d88
Showing 1 changed file with 1 addition and 5 deletions.
Expand Up @@ -16,7 +16,6 @@
*/
package org.graylog2.streams;

import com.codahale.metrics.InstrumentedExecutorService;
import com.codahale.metrics.Meter;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.Timer;
Expand Down Expand Up @@ -95,10 +94,7 @@ private ExecutorService executorService() {
.setNameFormat("stream-router-%d")
.setDaemon(true)
.build();
return new InstrumentedExecutorService(
Executors.newCachedThreadPool(threadFactory),
metricRegistry,
name(this.getClass(), "executor-service"));
return Executors.newCachedThreadPool(threadFactory);
}

private AtomicInteger getFaultCount(String streamId) {
Expand Down

1 comment on commit 74a6d88

@joschi
Copy link
Contributor

@joschi joschi commented on 74a6d88 Dec 23, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refs #800

Please sign in to comment.