Commit | Line | Data |
---|---|---|
d4e2e87c | 1 | package org.lttng.ust.agent.benchmarks.jul.handler.builtin; |
7ac7128a AM |
2 | |
3 | import java.io.IOException; | |
9368bd5e AM |
4 | import java.nio.file.Files; |
5 | import java.nio.file.Path; | |
7ac7128a AM |
6 | import java.util.logging.FileHandler; |
7 | import java.util.logging.SimpleFormatter; | |
8 | ||
9368bd5e | 9 | import org.junit.After; |
7ac7128a | 10 | import org.junit.Before; |
d4e2e87c | 11 | import org.lttng.ust.agent.benchmarks.jul.handler.JulHandlerBenchmarkBase; |
7ac7128a | 12 | |
d4e2e87c | 13 | public class FileHandlerBenchmark extends JulHandlerBenchmarkBase { |
7ac7128a | 14 | |
9368bd5e AM |
15 | private Path outputFile; |
16 | ||
7ac7128a AM |
17 | @Before |
18 | public void testSetup() throws SecurityException, IOException { | |
9368bd5e AM |
19 | outputFile = Files.createTempFile(this.getClass().getSimpleName(), null); |
20 | ||
21 | handler = new FileHandler(outputFile.toString(), false); | |
7ac7128a AM |
22 | handler.setFormatter(new SimpleFormatter()); |
23 | } | |
9368bd5e AM |
24 | |
25 | @After | |
26 | public void testTeardown() throws IOException { | |
27 | Files.deleteIfExists(outputFile); | |
28 | } | |
7ac7128a | 29 | } |