Search in sources :

Example 16 with Transaction

use of co.elastic.apm.impl.transaction.Transaction in project apm-agent-java by elastic.

the class ObjectPoolBenchmark method testRingBufferObjectPool.

@Benchmark
@Threads(8)
public Transaction testRingBufferObjectPool() {
    Transaction transaction = ringBufferObjectPool.createInstance();
    ringBufferObjectPool.recycle(transaction);
    return transaction;
}
Also used : Transaction(co.elastic.apm.impl.transaction.Transaction) Threads(org.openjdk.jmh.annotations.Threads) Benchmark(org.openjdk.jmh.annotations.Benchmark)

Example 17 with Transaction

use of co.elastic.apm.impl.transaction.Transaction in project apm-agent-java by elastic.

the class ObjectPoolBenchmark method testBlockingQueueObjectPool.

// @Benchmark
@Threads(8)
public Transaction testBlockingQueueObjectPool() {
    Transaction transaction = blockingQueueObjectPool.createInstance();
    blockingQueueObjectPool.recycle(transaction);
    return transaction;
}
Also used : Transaction(co.elastic.apm.impl.transaction.Transaction) Threads(org.openjdk.jmh.annotations.Threads)

Aggregations

Transaction (co.elastic.apm.impl.transaction.Transaction)17 Test (org.junit.jupiter.api.Test)6 Threads (org.openjdk.jmh.annotations.Threads)4 Span (co.elastic.apm.impl.transaction.Span)2 Nonnull (javax.annotation.Nonnull)2 Benchmark (org.openjdk.jmh.annotations.Benchmark)2 ElasticApmTracer (co.elastic.apm.impl.ElasticApmTracer)1 ErrorCapture (co.elastic.apm.impl.error.ErrorCapture)1 Agent (co.elastic.apm.impl.payload.Agent)1 Framework (co.elastic.apm.impl.payload.Framework)1 Language (co.elastic.apm.impl.payload.Language)1 ProcessInfo (co.elastic.apm.impl.payload.ProcessInfo)1 RuntimeInfo (co.elastic.apm.impl.payload.RuntimeInfo)1 Service (co.elastic.apm.impl.payload.Service)1 SystemInfo (co.elastic.apm.impl.payload.SystemInfo)1 TransactionPayload (co.elastic.apm.impl.payload.TransactionPayload)1 ApmServerReporter (co.elastic.apm.report.ApmServerReporter)1 ReporterConfiguration (co.elastic.apm.report.ReporterConfiguration)1 IOException (java.io.IOException)1 ServletException (javax.servlet.ServletException)1