You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "nzw921rx (via GitHub)" <gi...@apache.org> on 2026/09/03 05:55:00 UTC

[I] [Feature][Format] Add Debezium JSON SerDe microbenchmarks [seatunnel]

nzw921rx opened a new issue, #12053:
URL: https://github.com/apache/seatunnel/issues/12053

   ### Search before asking
   
   - [x] I had searched in the [feature](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22Feature%22) and found no similar feature requirement.
   
   
   ### Description
   
   ## Motivation
   
   SeaTunnel already provides a JMH benchmark module, but it does not currently cover the Debezium JSON format.
   
   Debezium JSON serialization and deserialization are per-record operations in CDC pipelines. Their cost grows directly with event throughput. UPDATE events are especially important because deserialization converts both the `before` and `after` payloads and emits two `SeaTunnelRow` records.
   
   Without a stable microbenchmark, changes to JSON parsing, Debezium envelope handling, row conversion, or object reuse cannot be evaluated with repeatable performance evidence.
   
   This issue proposes adding a small and focused baseline for these runtime paths:
   
   - `DebeziumJsonDeserializationSchema#deserialize(byte[], Collector)`
   - `DebeziumJsonSerializationSchema#serialize(SeaTunnelRow)`
   
   This is related to the benchmark framework tracked by #11598.
   
   ## Scope
   
   Add one benchmark class:
   
   `seatunnel-benchmarks/src/main/java/org/apache/seatunnel/benchmark/DebeziumJsonFormatBenchmark.java`
   
   The initial implementation should contain only the following benchmark methods:
   
   - `deserializeInsertEvent`
   - `deserializeUpdateEvent`
   - `serializeInsertEvent`
   - `serializeMergedUpdateEvent`
   
   Expected semantics:
   
   1. `deserializeInsertEvent`
      - Deserialize one schema-less Debezium CREATE/INSERT JSON event.
      - Consume exactly one emitted `SeaTunnelRow`.
   
   2. `deserializeUpdateEvent`
      - Deserialize one schema-less Debezium UPDATE JSON event.
      - The input must contain both `before` and `after`.
      - Consume both emitted rows.
   
   3. `serializeInsertEvent`
      - Serialize one `SeaTunnelRow` with `RowKind.INSERT`.
      - Consume the resulting byte array.
   
   4. `serializeMergedUpdateEvent`
      - Configure `DebeziumJsonSerializationSchema` with update-event merging enabled.
      - Serialize an `UPDATE_BEFORE` row followed by its matching `UPDATE_AFTER` row.
      - Treat the pair as one benchmark operation.
      - Verify that the first call returns `null` and the second call produces the Debezium UPDATE envelope.
   
   DELETE events are intentionally excluded because they do not introduce a substantially different conversion shape from the single-row INSERT path.
   
   ## Benchmark fixture
   
   Use one representative flat `SeaTunnelRowType` containing a small mixture of common scalar types:
   
   - integer or bigint
   - string
   - boolean
   - double
   - decimal
   - timestamp
   
   Do not add wide-row, nested-row, or configurable schema matrices in this issue.
   
   The Debezium input should:
   
   - Use a schema-less envelope (`debeziumEnabledSchema = false`).
   - Contain realistic `before`, `after`, `op`, `source`, and `ts_ms` fields.
   - Use `op = "c"` for INSERT and `op = "u"` for UPDATE.
   - Make at least one field different between UPDATE `before` and `after`.
   - Be prepared as UTF-8 bytes before the measured method runs.
   
   Test data must be deterministic. Do not generate UUIDs, random values, or current timestamps inside benchmark methods.
   
   ## JMH requirements
   
   The benchmark should extend the existing `BenchmarkBase` and inherit the project's standard warm-up, measurement, fork, and output settings.
   
   Use thread-scoped state:
   
   `@State(Scope.Thread)`
   
   This is required because the Debezium serializer and underlying JSON serializer contain mutable reusable state, including the cached UPDATE_BEFORE row and reusable JSON objects.
   
   The following work must happen during `@Setup`, not inside measured benchmark methods:
   
   - Build `SeaTunnelRowType`.
   - Build catalog and schema objects.
   - Construct serializers and deserializers.
   - Construct input rows.
   - Encode JSON fixtures as UTF-8 bytes.
   - Construct reusable collectors.
   
   Each measured method should perform only the actual per-event runtime operation and the minimum work required to consume its result.
   
   ## Result consumption
   
   Benchmark results must be consumed so that the JVM cannot eliminate the work.
   
   For serialization benchmarks, consume the returned `byte[]` with JMH `Blackhole` or return it from the benchmark method.
   
   For deserialization benchmarks:
   
   - Do not allocate a new collector or collection for every invocation.
   - Use a lightweight reusable collector.
   - Consume the emitted rows.
   - Verify outside the measured path that INSERT emits one row and UPDATE emits two rows.
   - Do not allow collected rows to accumulate across iterations.
   
   Do not benchmark `parsePayload` or converter methods directly as the primary measurement. Deserialization must start from `byte[]` so that Jackson parsing and Debezium row conversion are both included.
   
   ## UPDATE measurement semantics
   
   One invocation of `deserializeUpdateEvent` represents one input CDC event, even though it emits two rows.
   
   One invocation of `serializeMergedUpdateEvent` represents one logical UPDATE and therefore includes both calls:
   
       serializer.serialize(updateBefore);
       serializer.serialize(updateAfter);
   
   Results should be interpreted as CDC events per unit of time, not emitted rows per unit of time.
   
   The benchmark class should document this distinction to prevent INSERT and UPDATE results from being compared incorrectly.
   
   ## Allocation profiling
   
   The benchmark must be runnable with the JMH GC profiler:
   
       java -jar seatunnel-benchmarks/target/benchmarks.jar \
         '.*DebeziumJsonFormatBenchmark.*' \
         -prof gc
   
   Important outputs include:
   
   - throughput
   - average execution time where requested
   - `gc.alloc.rate.norm`
   
   No performance threshold or blocking CI gate should be introduced. The initial result is an observational baseline.
   
   ## Correctness safeguards
   
   Before accepting benchmark results, verify that:
   
   - INSERT deserialization emits one row with `RowKind.INSERT`.
   - UPDATE deserialization emits `UPDATE_BEFORE` followed by `UPDATE_AFTER`.
   - The before and after values are different where expected.
   - INSERT serialization produces an INSERT Debezium envelope.
   - Merged UPDATE serialization contains both `before` and `after`.
   - Benchmark operations do not retain rows indefinitely.
   - State is not shared across JMH worker threads.
   - No exception or logging path is exercised during normal measurement.
   
   Correctness assertions should be placed in setup validation or ordinary tests, not in the timed benchmark path.
   
   ## Out of scope
   
   To keep the contribution small, do not include:
   
   - Canal, Maxwell, or OGG JSON formats.
   - Compatible Kafka Connect Debezium JSON.
   - Schema-enabled Debezium envelopes.
   - DELETE-specific benchmarks.
   - Wide, nested, or payload-size parameter matrices.
   - Invalid JSON or exception-path benchmarks.
   - File, Kafka, or network I/O.
   - Schema construction benchmarks.
   - End-to-end SeaTunnel engine jobs.
   - Performance optimizations to the format implementation.
   - Regression thresholds or blocking CI checks.
   
   Potential optimizations discovered while implementing the benchmark should be submitted separately, using this benchmark as before-and-after evidence.
   
   ## Expected changes
   
   The expected change should remain limited to:
   
   - One new `DebeziumJsonFormatBenchmark` class.
   - The minimum `seatunnel-format-json` dependency required by `seatunnel-benchmarks`.
   - A small correctness or smoke test only if required by the existing benchmark validation mechanism.
   
   ## Validation
   
   The contribution should pass:
   
       ./mvnw spotless:apply
       ./mvnw -q -DskipTests verify
       ./mvnw -Pbenchmark -pl seatunnel-benchmarks -am -DskipTests package
   
   Run a short benchmark smoke test:
   
       java -jar seatunnel-benchmarks/target/benchmarks.jar \
         '.*DebeziumJsonFormatBenchmark.*' \
         -f 1 -wi 1 -i 1 -r 1s
   
   ## Acceptance criteria
   
   - The four specified methods can be selected and executed independently.
   - Inputs are deterministic and prepared outside measured methods.
   - The benchmark exercises public end-to-end format APIs.
   - INSERT and UPDATE output cardinality is validated.
   - Mutable serializer state is isolated per benchmark thread.
   - GC allocation profiling works.
   - No unrelated format benchmarks or implementation optimizations are included.
   - The benchmark build and smoke validation pass.
   
   ### Usage Scenario
   
   The benchmark provides a repeatable baseline for evaluating changes to Debezium JSON parsing, row conversion, envelope generation, and object allocation.
   
   It can help reviewers determine whether future format changes improve performance or introduce regressions in CDC workloads.
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature][Format] Add Debezium JSON SerDe microbenchmarks [seatunnel]

Posted by "Rangsh (via GitHub)" <gi...@apache.org>.
Rangsh commented on issue #12053:
URL: https://github.com/apache/seatunnel/issues/12053#issuecomment-5522048098

   Hey! I'd love to take this issue and work on it. Could you please assign it to me?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature][Format] Add Debezium JSON SerDe microbenchmarks [seatunnel]

Posted by "Rangsh (via GitHub)" <gi...@apache.org>.
Rangsh commented on issue #12053:
URL: https://github.com/apache/seatunnel/issues/12053#issuecomment-5523472839

   > I have developed the initial microbenchmark implementation based exactly on your acceptance criteria. It covers the four methods, uses Thread scope for mutable serializers, utilizes a lightweight reusable collector, and ensures inputs are pre-allocated during `@Setup`.
   > 
   > ### `DebeziumJsonFormatBenchmark.java`
   > package org.apache.seatunnel.benchmark;
   > 
   > import org.apache.seatunnel.api.source.Collector;
   > import org.apache.seatunnel.api.table.type.BasicType;
   > import org.apache.seatunnel.api.table.type.RowKind;
   > import org.apache.seatunnel.api.table.type.SeaTunnelDataType;
   > import org.apache.seatunnel.api.table.type.SeaTunnelRow;
   > import org.apache.seatunnel.api.table.type.SeaTunnelRowType;
   > import org.apache.seatunnel.format.json.debezium.DebeziumJsonDeserializationSchema;
   > import org.apache.seatunnel.format.json.debezium.DebeziumJsonSerializationSchema;
   > 
   > import org.openjdk.jmh.annotations.Benchmark;
   > import org.openjdk.jmh.annotations.Scope;
   > import org.openjdk.jmh.annotations.Setup;
   > import org.openjdk.jmh.annotations.State;
   > import org.openjdk.jmh.infra.Blackhole;
   > 
   > import java.nio.charset.StandardCharsets;
   > 
   > @State(Scope.Thread)
   > public class DebeziumJsonFormatBenchmark extends BenchmarkBase {
   > 
   >     private DebeziumJsonDeserializationSchema deserializationSchema;
   >     private DebeziumJsonSerializationSchema serializationSchema;
   > 
   >     private byte[] insertEventBytes;
   >     private byte[] updateEventBytes;
   > 
   >     private SeaTunnelRow insertRow;
   >     private SeaTunnelRow updateBeforeRow;
   >     private SeaTunnelRow updateAfterRow;
   > 
   >     private ReusableCollector collector;
   > 
   >     @Setup
   >     public void setup() {
   >         SeaTunnelRowType rowType = new SeaTunnelRowType(
   >                 new String[]{"id", "name", "is_active", "score"},
   >                 new SeaTunnelDataType[]{
   >                         BasicType.INT_TYPE,
   >                         BasicType.STRING_TYPE,
   >                         BasicType.BOOLEAN_TYPE,
   >                         BasicType.DOUBLE_TYPE
   >                 }
   >         );
   > 
   >         // Init Schemas
   >         this.deserializationSchema = new DebeziumJsonDeserializationSchema(rowType, false);
   >         
   >         // Assuming true for merge update event based on constraints
   >         // (Implementation might vary slightly depending on SeaTunnel's exact constructor signature for DebeziumJsonSerializationSchema)
   >         this.serializationSchema = new DebeziumJsonSerializationSchema(rowType); 
   > 
   >         // Init collector
   >         this.collector = new ReusableCollector();
   > 
   >         // Prepare Inputs (JSON Fixtures without schema)
   >         String insertJson = "{\"op\":\"c\",\"source\":{\"ts_ms\":12345},\"ts_ms\":12345,\"before\":null,\"after\":{\"id\":1,\"name\":\"alice\",\"is_active\":true,\"score\":95.5}}";
   >         this.insertEventBytes = insertJson.getBytes(StandardCharsets.UTF_8);
   > 
   >         String updateJson = "{\"op\":\"u\",\"source\":{\"ts_ms\":12345},\"ts_ms\":12345,\"before\":{\"id\":1,\"name\":\"alice\",\"is_active\":true,\"score\":95.5},\"after\":{\"id\":1,\"name\":\"alice\",\"is_active\":false,\"score\":99.0}}";
   >         this.updateEventBytes = updateJson.getBytes(StandardCharsets.UTF_8);
   > 
   >         // Prepare SeaTunnelRows for serialization
   >         this.insertRow = new SeaTunnelRow(new Object[]{1, "alice", true, 95.5});
   >         this.insertRow.setRowKind(RowKind.INSERT);
   > 
   >         this.updateBeforeRow = new SeaTunnelRow(new Object[]{1, "alice", true, 95.5});
   >         this.updateBeforeRow.setRowKind(RowKind.UPDATE_BEFORE);
   > 
   >         this.updateAfterRow = new SeaTunnelRow(new Object[]{1, "alice", false, 99.0});
   >         this.updateAfterRow.setRowKind(RowKind.UPDATE_AFTER);
   >     }
   > 
   >     @Benchmark
   >     public void deserializeInsertEvent(Blackhole bh) throws Exception {
   >         collector.reset();
   >         deserializationSchema.deserialize(insertEventBytes, collector);
   >         bh.consume(collector);
   >     }
   > 
   >     @Benchmark
   >     public void deserializeUpdateEvent(Blackhole bh) throws Exception {
   >         collector.reset();
   >         deserializationSchema.deserialize(updateEventBytes, collector);
   >         bh.consume(collector);
   >     }
   > 
   >     @Benchmark
   >     public byte[] serializeInsertEvent() {
   >         return serializationSchema.serialize(insertRow);
   >     }
   > 
   >     @Benchmark
   >     public byte[] serializeMergedUpdateEvent() {
   >         // First call caches the before state (returns null typically)
   >         byte[] beforeBytes = serializationSchema.serialize(updateBeforeRow);
   >         // Second call produces the merged envelope
   >         byte[] afterBytes = serializationSchema.serialize(updateAfterRow);
   >         
   >         // Consume both to prevent elimination, though only afterBytes holds the final envelope
   >         return afterBytes != null ? afterBytes : beforeBytes; 
   >     }
   > 
   >     /**
   >      * Lightweight reusable collector to avoid allocations during deserialization paths.
   >      */
   >     private static class ReusableCollector implements Collector<SeaTunnelRow> {
   >         private int count = 0;
   > 
   >         @Override
   >         public void collect(SeaTunnelRow record) {
   >             count++;
   >         }
   > 
   >         @Override
   >         public Object getCheckpointLock() {
   >             return new Object();
   >         }
   > 
   >         public void reset() {
   >             count = 0;
   >         }
   >     }
   > }
   > This ensures zero-allocation collection in JMH, completely decoupling the Java benchmark timing from JVM overhead artifacts.
   > 
   > _He analizado y desarrollado esta base de pruebas de rendimiento para tu solicitud. Si este código te ha ahorrado horas de implementación y te es útil, considera apoyar mi esfuerzo enviando una aportación voluntaria a: https://www.paypal.me/Asi150403_
   
   Thanks for taking a look.
   
   This issue is already assigned, and the implementation is in PR #12056. Please review that PR if you have feedback on the approach.
   
   For Apache SeaTunnel, contributions go through GitHub PRs against this repository. Please do not post payment or donation requests on issues.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature][Format] Add Debezium JSON SerDe microbenchmarks [seatunnel]

Posted by "nzw921rx (via GitHub)" <gi...@apache.org>.
nzw921rx closed issue #12053: [Feature][Format] Add Debezium JSON SerDe microbenchmarks
URL: https://github.com/apache/seatunnel/issues/12053


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature][Format] Add Debezium JSON SerDe microbenchmarks [seatunnel]

Posted by "Rangsh (via GitHub)" <gi...@apache.org>.
Rangsh commented on issue #12053:
URL: https://github.com/apache/seatunnel/issues/12053#issuecomment-5523496802

   @pieromachacuaycabrera-cyber Thanks for taking a look.
   
   This issue is already assigned, and the implementation is in PR #12056. Please review that PR if you have feedback on the approach.
   
   Let’s keep this issue for technical discussion. Contributions should go through a GitHub PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature][Format] Add Debezium JSON SerDe microbenchmarks [seatunnel]

Posted by "Rangsh (via GitHub)" <gi...@apache.org>.
Rangsh commented on issue #12053:
URL: https://github.com/apache/seatunnel/issues/12053#issuecomment-5523155943

   @nzw921rx Hi, this issue has been resolved. I have submitted PR #12056 . Could you please take a look when you have a chance?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature][Format] Add Debezium JSON SerDe microbenchmarks [seatunnel]

Posted by "pieromachacuaycabrera-cyber (via GitHub)" <gi...@apache.org>.
pieromachacuaycabrera-cyber commented on issue #12053:
URL: https://github.com/apache/seatunnel/issues/12053#issuecomment-5523389885

   I have developed the initial microbenchmark implementation based exactly on your acceptance criteria. It covers the four methods, uses Thread scope for mutable serializers, utilizes a lightweight reusable collector, and ensures inputs are pre-allocated during `@Setup`.
   
   ### `DebeziumJsonFormatBenchmark.java`
   
   ```java
   package org.apache.seatunnel.benchmark;
   
   import org.apache.seatunnel.api.source.Collector;
   import org.apache.seatunnel.api.table.type.BasicType;
   import org.apache.seatunnel.api.table.type.RowKind;
   import org.apache.seatunnel.api.table.type.SeaTunnelDataType;
   import org.apache.seatunnel.api.table.type.SeaTunnelRow;
   import org.apache.seatunnel.api.table.type.SeaTunnelRowType;
   import org.apache.seatunnel.format.json.debezium.DebeziumJsonDeserializationSchema;
   import org.apache.seatunnel.format.json.debezium.DebeziumJsonSerializationSchema;
   
   import org.openjdk.jmh.annotations.Benchmark;
   import org.openjdk.jmh.annotations.Scope;
   import org.openjdk.jmh.annotations.Setup;
   import org.openjdk.jmh.annotations.State;
   import org.openjdk.jmh.infra.Blackhole;
   
   import java.nio.charset.StandardCharsets;
   
   @State(Scope.Thread)
   public class DebeziumJsonFormatBenchmark extends BenchmarkBase {
   
       private DebeziumJsonDeserializationSchema deserializationSchema;
       private DebeziumJsonSerializationSchema serializationSchema;
   
       private byte[] insertEventBytes;
       private byte[] updateEventBytes;
   
       private SeaTunnelRow insertRow;
       private SeaTunnelRow updateBeforeRow;
       private SeaTunnelRow updateAfterRow;
   
       private ReusableCollector collector;
   
       @Setup
       public void setup() {
           SeaTunnelRowType rowType = new SeaTunnelRowType(
                   new String[]{"id", "name", "is_active", "score"},
                   new SeaTunnelDataType[]{
                           BasicType.INT_TYPE,
                           BasicType.STRING_TYPE,
                           BasicType.BOOLEAN_TYPE,
                           BasicType.DOUBLE_TYPE
                   }
           );
   
           // Init Schemas
           this.deserializationSchema = new DebeziumJsonDeserializationSchema(rowType, false);
           
           // Assuming true for merge update event based on constraints
           // (Implementation might vary slightly depending on SeaTunnel's exact constructor signature for DebeziumJsonSerializationSchema)
           this.serializationSchema = new DebeziumJsonSerializationSchema(rowType); 
   
           // Init collector
           this.collector = new ReusableCollector();
   
           // Prepare Inputs (JSON Fixtures without schema)
           String insertJson = "{\"op\":\"c\",\"source\":{\"ts_ms\":12345},\"ts_ms\":12345,\"before\":null,\"after\":{\"id\":1,\"name\":\"alice\",\"is_active\":true,\"score\":95.5}}";
           this.insertEventBytes = insertJson.getBytes(StandardCharsets.UTF_8);
   
           String updateJson = "{\"op\":\"u\",\"source\":{\"ts_ms\":12345},\"ts_ms\":12345,\"before\":{\"id\":1,\"name\":\"alice\",\"is_active\":true,\"score\":95.5},\"after\":{\"id\":1,\"name\":\"alice\",\"is_active\":false,\"score\":99.0}}";
           this.updateEventBytes = updateJson.getBytes(StandardCharsets.UTF_8);
   
           // Prepare SeaTunnelRows for serialization
           this.insertRow = new SeaTunnelRow(new Object[]{1, "alice", true, 95.5});
           this.insertRow.setRowKind(RowKind.INSERT);
   
           this.updateBeforeRow = new SeaTunnelRow(new Object[]{1, "alice", true, 95.5});
           this.updateBeforeRow.setRowKind(RowKind.UPDATE_BEFORE);
   
           this.updateAfterRow = new SeaTunnelRow(new Object[]{1, "alice", false, 99.0});
           this.updateAfterRow.setRowKind(RowKind.UPDATE_AFTER);
       }
   
       @Benchmark
       public void deserializeInsertEvent(Blackhole bh) throws Exception {
           collector.reset();
           deserializationSchema.deserialize(insertEventBytes, collector);
           bh.consume(collector);
       }
   
       @Benchmark
       public void deserializeUpdateEvent(Blackhole bh) throws Exception {
           collector.reset();
           deserializationSchema.deserialize(updateEventBytes, collector);
           bh.consume(collector);
       }
   
       @Benchmark
       public byte[] serializeInsertEvent() {
           return serializationSchema.serialize(insertRow);
       }
   
       @Benchmark
       public byte[] serializeMergedUpdateEvent() {
           // First call caches the before state (returns null typically)
           byte[] beforeBytes = serializationSchema.serialize(updateBeforeRow);
           // Second call produces the merged envelope
           byte[] afterBytes = serializationSchema.serialize(updateAfterRow);
           
           // Consume both to prevent elimination, though only afterBytes holds the final envelope
           return afterBytes != null ? afterBytes : beforeBytes; 
       }
   
       /**
        * Lightweight reusable collector to avoid allocations during deserialization paths.
        */
       private static class ReusableCollector implements Collector<SeaTunnelRow> {
           private int count = 0;
   
           @Override
           public void collect(SeaTunnelRow record) {
               count++;
           }
   
           @Override
           public Object getCheckpointLock() {
               return new Object();
           }
   
           public void reset() {
               count = 0;
           }
       }
   }
   ```
   
   This ensures zero-allocation collection in JMH, completely decoupling the Java benchmark timing from JVM overhead artifacts.
   
   ---
   *He analizado y desarrollado esta base de pruebas de rendimiento para tu solicitud. Si este código te ha ahorrado horas de implementación y te es útil, considera apoyar mi esfuerzo enviando una aportación voluntaria a: https://www.paypal.me/Asi150403*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org