Skip to content

Commit

Permalink
GEODE-2644: Remove log level from MonitorQueryUnderContentionBenchmark
Browse files Browse the repository at this point in the history
Remove log level manipulation from benchmark. The internal API that was
being used has been deleted and it only altered the log level of one
logger: Cache.getLogger, so the impact of this is neglible.
  • Loading branch information
kirklund committed Nov 13, 2018
1 parent 688f58a commit 6691d31
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import org.openjdk.jmh.annotations.TearDown;

import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.internal.logging.LogService;

@State(Scope.Thread)
@Fork(1)
Expand Down Expand Up @@ -88,14 +87,9 @@ public class MonitorQueryUnderContentionBenchmark {
private DefaultQuery query;
private Random random;
private ScheduledThreadPoolExecutor loadGenerationExecutorService;
private org.apache.logging.log4j.Level originalBaseLogLevel;

@Setup(Level.Trial)
public void trialSetup() throws InterruptedException {

originalBaseLogLevel = LogService.getBaseLogLevel();
LogService.setBaseLogLevel(org.apache.logging.log4j.Level.OFF);

queryMonitor =
new QueryMonitor((ScheduledThreadPoolExecutor) Executors.newScheduledThreadPool(1),
mock(InternalCache.class), QUERY_MAX_EXECUTION_TIME);
Expand Down Expand Up @@ -134,8 +128,6 @@ public void trialSetup() throws InterruptedException {
public void trialTeardown() {
loadGenerationExecutorService.shutdownNow();
queryMonitor.stopMonitoring();

LogService.setBaseLogLevel(originalBaseLogLevel);
}

@Benchmark
Expand Down

0 comments on commit 6691d31

Please sign in to comment.