Search in sources :

Example 1 with TearDown

use of org.openjdk.jmh.annotations.TearDown in project logging-log4j2 by apache.

the class AsyncAppenderLog4j1Benchmark method down.

@TearDown(Level.Trial)
public void down() {
    LogManager.shutdown();
    new File("perftest.log").delete();
}
Also used : File(java.io.File) TearDown(org.openjdk.jmh.annotations.TearDown)

Example 2 with TearDown

use of org.openjdk.jmh.annotations.TearDown in project logging-log4j2 by apache.

the class AsyncAppenderLog4j1LocationBenchmark method down.

@TearDown(Level.Trial)
public void down() {
    LogManager.shutdown();
    new File("perftest.log").delete();
}
Also used : File(java.io.File) TearDown(org.openjdk.jmh.annotations.TearDown)

Example 3 with TearDown

use of org.openjdk.jmh.annotations.TearDown in project logging-log4j2 by apache.

the class AsyncAppenderLog4j2LocationBenchmark method down.

@TearDown(Level.Trial)
public void down() {
    ((LifeCycle) LogManager.getContext(false)).stop();
    new File("perftest.log").delete();
}
Also used : LifeCycle(org.apache.logging.log4j.core.LifeCycle) File(java.io.File) TearDown(org.openjdk.jmh.annotations.TearDown)

Example 4 with TearDown

use of org.openjdk.jmh.annotations.TearDown in project logging-log4j2 by apache.

the class AsyncAppenderLogbackLocationBenchmark method down.

@TearDown(Level.Trial)
public void down() {
    ((LifeCycle) LoggerFactory.getILoggerFactory()).stop();
    new File("perftest.log").delete();
}
Also used : LifeCycle(ch.qos.logback.core.spi.LifeCycle) File(java.io.File) TearDown(org.openjdk.jmh.annotations.TearDown)

Example 5 with TearDown

use of org.openjdk.jmh.annotations.TearDown in project logging-log4j2 by apache.

the class FormatterLoggerBenchmark method down.

@TearDown(Level.Trial)
public void down() {
    ((LifeCycle) LogManager.getContext(false)).stop();
    new File("perftest.log").delete();
}
Also used : LifeCycle(org.apache.logging.log4j.core.LifeCycle) File(java.io.File) TearDown(org.openjdk.jmh.annotations.TearDown)

Aggregations

TearDown (org.openjdk.jmh.annotations.TearDown)11 File (java.io.File)9 LifeCycle (org.apache.logging.log4j.core.LifeCycle)5 LifeCycle (ch.qos.logback.core.spi.LifeCycle)2 SQLException (java.sql.SQLException)2 Statement (java.sql.Statement)2 LoggerContext (org.apache.logging.log4j.core.LoggerContext)2