org.openjdk.jmh.annotations.TearDown Java Examples
The following examples show how to use
org.openjdk.jmh.annotations.TearDown.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BenchMarkOzoneManager.java From hadoop-ozone with Apache License 2.0 | 6 votes |
@TearDown(Level.Trial) public static void tearDown() { try { lock.lock(); if (scm != null) { scm.stop(); scm.join(); scm = null; om.stop(); om.join(); om = null; FileUtil.fullyDelete(new File(testDir)); } } finally { lock.unlock(); } }
Example #2
Source File: TransportBenchmark.java From grpc-nebula-java with Apache License 2.0 | 6 votes |
@TearDown public void tearDown() throws Exception { channel.shutdown(); server.shutdown(); channel.awaitTermination(1, TimeUnit.SECONDS); server.awaitTermination(1, TimeUnit.SECONDS); if (!channel.isTerminated()) { throw new Exception("failed to shut down channel"); } if (!server.isTerminated()) { throw new Exception("failed to shut down server"); } if (groupToShutdown != null) { Future<?> unused = groupToShutdown.shutdownGracefully(0, 1, TimeUnit.SECONDS); groupToShutdown.awaitTermination(1, TimeUnit.SECONDS); if (!groupToShutdown.isTerminated()) { throw new Exception("failed to shut down event loop group."); } } }
Example #3
Source File: BenchmarkSpatialJoin.java From presto with Apache License 2.0 | 5 votes |
@TearDown(Level.Invocation) public void dropPointsTable() { queryRunner.inTransaction(queryRunner.getDefaultSession(), transactionSession -> { Metadata metadata = queryRunner.getMetadata(); Optional<TableHandle> tableHandle = metadata.getTableHandle(transactionSession, QualifiedObjectName.valueOf("memory.default.points")); assertTrue(tableHandle.isPresent(), "Table memory.default.points does not exist"); metadata.dropTable(transactionSession, tableHandle.get()); return null; }); }
Example #4
Source File: RheaKVGetBenchmark.java From sofa-jraft with Apache License 2.0 | 5 votes |
@TearDown public void tearDown() { try { super.shutdown(); } catch (final IOException e) { e.printStackTrace(); } }
Example #5
Source File: BenchMarkSCM.java From hadoop-ozone with Apache License 2.0 | 5 votes |
@TearDown(Level.Trial) public static void tearDown() { try { lock.lock(); if (scm != null) { scm.stop(); scm.join(); scm = null; FileUtil.fullyDelete(new File(testDir)); } } finally { lock.unlock(); } }
Example #6
Source File: FlowControlledMessagesPerSecondBenchmark.java From grpc-nebula-java with Apache License 2.0 | 5 votes |
/** * Stop the running calls then stop the server and client channels. */ @Override @TearDown(Level.Trial) public void teardown() throws Exception { completed.set(true); if (!latch.await(5, TimeUnit.SECONDS)) { logger.warning("Failed to shutdown all calls."); } super.teardown(); }
Example #7
Source File: SingleThreadBlockingQpsBenchmark.java From grpc-nebula-java with Apache License 2.0 | 5 votes |
/** * Stop the server and client channels. */ @Override @TearDown(Level.Trial) public void teardown() throws Exception { Thread.sleep(5000); super.teardown(); }
Example #8
Source File: StreamingResponseBandwidthBenchmark.java From grpc-nebula-java with Apache License 2.0 | 5 votes |
/** * Stop the running calls then stop the server and client channels. */ @Override @TearDown(Level.Trial) public void teardown() throws Exception { completed.set(true); if (!latch.await(5, TimeUnit.SECONDS)) { System.err.println("Failed to shutdown all calls."); } super.teardown(); }
Example #9
Source File: UnaryCallResponseBandwidthBenchmark.java From grpc-nebula-java with Apache License 2.0 | 5 votes |
/** * Stop the running calls then stop the server and client channels. */ @Override @TearDown(Level.Trial) public void teardown() throws Exception { completed.set(true); Thread.sleep(5000); super.teardown(); }
Example #10
Source File: UnaryCallQpsBenchmark.java From grpc-nebula-java with Apache License 2.0 | 5 votes |
/** * Stop the running calls then stop the server and client channels. */ @Override @TearDown(Level.Trial) public void teardown() throws Exception { completed.set(true); Thread.sleep(5000); super.teardown(); }
Example #11
Source File: StreamingPingPongsPerSecondBenchmark.java From grpc-nebula-java with Apache License 2.0 | 5 votes |
/** * Stop the running calls then stop the server and client channels. */ @Override @TearDown(Level.Trial) public void teardown() throws Exception { completed.set(true); if (!latch.await(5, TimeUnit.SECONDS)) { logger.warning("Failed to shutdown all calls."); } super.teardown(); }
Example #12
Source File: Benchmarks.java From sdn-rx with Apache License 2.0 | 5 votes |
@TearDown public void tearDown() { this.applicationContext.close(); if (neo4jContainer != null) { this.neo4jContainer.stop(); } }
Example #13
Source File: Benchmarks.java From sdn-rx with Apache License 2.0 | 5 votes |
@TearDown public void tearDown() { this.applicationContext.close(); if (neo4jContainer != null) { this.neo4jContainer.stop(); } }
Example #14
Source File: Benchmarks.java From sdn-rx with Apache License 2.0 | 5 votes |
@TearDown public void tearDown() { this.applicationContext.close(); if (neo4jContainer != null) { this.neo4jContainer.stop(); } }
Example #15
Source File: Benchmarks.java From sdn-rx with Apache License 2.0 | 5 votes |
@TearDown public void tearDown() { this.applicationContext.close(); if (neo4jContainer != null) { this.neo4jContainer.stop(); } }
Example #16
Source File: ByteBufUtilBenchmark.java From netty-4.1.22 with Apache License 2.0 | 5 votes |
@TearDown public void tearDown() { buffer.release(); wrapped.release(); asciiBuffer.release(); utf8Buffer.release(); }
Example #17
Source File: RheaKVPutBenchmark.java From sofa-jraft with Apache License 2.0 | 5 votes |
@TearDown public void tearDown() { try { super.shutdown(); } catch (final IOException e) { e.printStackTrace(); } }
Example #18
Source File: DistkvStrBenchmark.java From distkv with BSD 3-Clause "New" or "Revised" License | 4 votes |
@TearDown public void close() { asyncClient.disconnect(); client.disconnect(); TestUtil.stopProcess(TestUtil.getProcess()); }
Example #19
Source File: IcebergSourceFlatParquetDataFilterBenchmark.java From iceberg with Apache License 2.0 | 4 votes |
@TearDown public void tearDownBenchmark() throws IOException { tearDownSpark(); cleanupFiles(); }
Example #20
Source File: ScanBenchmark.java From Oak with Apache License 2.0 | 4 votes |
@TearDown public void closeOak() { oakMap.close(); }
Example #21
Source File: PropagatorContextInjectBenchmark.java From opentelemetry-java with Apache License 2.0 | 4 votes |
@TearDown(Level.Iteration) public void tearDown() { this.contextToTest = spanContexts.get(++iteration % spanContexts.size()); }
Example #22
Source File: DefaultTracerBenchmarks.java From opentelemetry-java with Apache License 2.0 | 4 votes |
@TearDown(Level.Iteration) public void tearDown() { if (span != null) { span.end(); } }
Example #23
Source File: CompressionUtilsBenchmark.java From mantis with Apache License 2.0 | 4 votes |
@TearDown(Level.Trial) public void doTearDown() { System.out.println("Do TearDown"); }
Example #24
Source File: PropagatorContextExtractBenchmark.java From opentelemetry-java with Apache License 2.0 | 4 votes |
@TearDown(Level.Iteration) public void tearDown() { this.carrier.putAll(getHeaders().get(++iteration % getHeaders().size())); }
Example #25
Source File: RedisStrBenchmark.java From distkv with BSD 3-Clause "New" or "Revised" License | 4 votes |
@TearDown public void close() { jedis.close(); }
Example #26
Source File: SimpleQuery.java From micronaut-data with Apache License 2.0 | 4 votes |
@TearDown public void cleanup() { applicationContext.close(); }
Example #27
Source File: HeapByteBufBenchmark.java From netty-4.1.22 with Apache License 2.0 | 4 votes |
@TearDown public void destroy() { unsafeBuffer.release(); buffer.release(); }
Example #28
Source File: ProfilerBenchmark.java From apm-agent-java with Apache License 2.0 | 4 votes |
@TearDown public void tearDownProfilerBenchmark() throws Exception { samplingProfiler.stop(); }
Example #29
Source File: UnparkVsCondvar.java From jmh-playground with Apache License 2.0 | 4 votes |
@TearDown public void teardown() { canDie = true; }
Example #30
Source File: IcebergSourceFlatAvroDataReadBenchmark.java From iceberg with Apache License 2.0 | 4 votes |
@TearDown public void tearDownBenchmark() throws IOException { tearDownSpark(); cleanupFiles(); }