funky-eyes commented on code in PR #7865:
URL: https://github.com/apache/incubator-seata/pull/7865#discussion_r2676510988


##########
test-suite/seata-benchmark-cli/src/main/java/org/apache/seata/benchmark/executor/AbstractTransactionExecutor.java:
##########
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.seata.benchmark.executor;
+
+import org.apache.seata.benchmark.config.BenchmarkConfig;
+import org.apache.seata.benchmark.constant.BenchmarkConstants;
+import org.apache.seata.benchmark.model.TransactionRecord;
+import org.apache.seata.core.exception.TransactionException;
+import org.apache.seata.core.model.GlobalStatus;
+import org.apache.seata.tm.api.GlobalTransaction;
+import org.apache.seata.tm.api.GlobalTransactionContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.concurrent.ThreadLocalRandom;
+
+/**
+ * Abstract base class for transaction executors implementing common 
transaction handling logic
+ */
+public abstract class AbstractTransactionExecutor implements 
TransactionExecutor {
+
+    private static final Logger LOGGER = 
LoggerFactory.getLogger(AbstractTransactionExecutor.class);
+
+    protected final BenchmarkConfig config;
+
+    protected AbstractTransactionExecutor(BenchmarkConfig config) {
+        this.config = config;
+    }
+
+    /**
+     * Get the transaction name for this executor
+     *
+     * @return transaction name
+     */
+    protected abstract String getTransactionName();
+
+    /**
+     * Get the number of branches for this transaction
+     *
+     * @return number of branches
+     */
+    protected abstract int getBranchCount();
+
+    /**
+     * Execute the business logic for this transaction
+     *
+     * @throws Exception if execution fails
+     */
+    protected abstract void executeBusinessLogic() throws Exception;
+
+    /**
+     * Get the logger for the concrete executor class
+     *
+     * @return logger instance
+     */
+    protected abstract Logger getLogger();
+
+    @Override
+    public final TransactionRecord execute() {
+        GlobalTransaction tx = GlobalTransactionContext.getCurrentOrCreate();

Review Comment:
   I’d recommend using the `TransactionalTemplate#execute` template method to 
handle transactions instead. This approach aligns much more closely with how 
users typically work with Seata in their daily development when using the 
annotation-based `@GlobalTransactional` pattern.



##########
test-suite/seata-benchmark-cli/src/main/java/org/apache/seata/benchmark/executor/SagaModeExecutor.java:
##########
@@ -0,0 +1,332 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.seata.benchmark.executor;
+
+import org.apache.seata.benchmark.config.BenchmarkConfig;
+import org.apache.seata.benchmark.model.TransactionRecord;
+import org.apache.seata.benchmark.saga.BenchmarkServiceInvoker;
+import org.apache.seata.benchmark.saga.InventorySagaService;
+import org.apache.seata.benchmark.saga.OrderSagaService;
+import org.apache.seata.benchmark.saga.PaymentSagaService;
+import org.apache.seata.benchmark.saga.SimpleSpelExpressionFactory;
+import org.apache.seata.core.exception.TransactionException;
+import org.apache.seata.core.model.GlobalStatus;
+import org.apache.seata.saga.engine.StateMachineEngine;
+import org.apache.seata.saga.engine.config.AbstractStateMachineConfig;
+import org.apache.seata.saga.engine.expression.ExpressionFactoryManager;
+import org.apache.seata.saga.engine.impl.ProcessCtrlStateMachineEngine;
+import org.apache.seata.saga.statelang.domain.DomainConstants;
+import org.apache.seata.saga.statelang.domain.ExecutionStatus;
+import org.apache.seata.saga.statelang.domain.StateMachineInstance;
+import org.apache.seata.tm.api.GlobalTransaction;
+import org.apache.seata.tm.api.GlobalTransactionContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.ThreadLocalRandom;
+import java.util.concurrent.atomic.AtomicLong;
+
+import static 
org.apache.seata.benchmark.constant.BenchmarkConstants.STATUS_COMMITTED;
+import static 
org.apache.seata.benchmark.constant.BenchmarkConstants.STATUS_COMPENSATED;
+import static 
org.apache.seata.benchmark.constant.BenchmarkConstants.STATUS_COMPENSATION_FAILED;
+import static 
org.apache.seata.benchmark.constant.BenchmarkConstants.STATUS_FAILED;
+import static 
org.apache.seata.benchmark.constant.BenchmarkConstants.STATUS_UNKNOWN;
+
+/**
+ * Saga mode transaction executor supporting both mock and real modes
+ * - branches == 0: Mock mode (simplified Saga simulation without state 
machine)
+ * - branches > 0: Real mode (state machine engine with compensation support)
+ */
+public class SagaModeExecutor implements TransactionExecutor {

Review Comment:
   Saga mode can only be load-tested on its own and must not be mixed with 
other transaction modes; we should implement safeguards to prevent users from 
doing so.



##########
test-suite/seata-benchmark-cli/src/main/java/org/apache/seata/benchmark/executor/ATModeExecutor.java:
##########
@@ -0,0 +1,249 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.seata.benchmark.executor;
+
+import com.zaxxer.hikari.HikariConfig;
+import com.zaxxer.hikari.HikariDataSource;
+import org.apache.seata.benchmark.config.BenchmarkConfig;
+import org.apache.seata.benchmark.constant.BenchmarkConstants;
+import org.apache.seata.rm.datasource.DataSourceProxy;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.testcontainers.containers.MySQLContainer;
+import org.testcontainers.utility.DockerImageName;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.concurrent.ThreadLocalRandom;
+
+/**
+ * AT mode transaction executor supporting both empty and real transaction 
modes
+ * - branches == 0: Empty transaction mode (pure Seata protocol overhead 
testing)
+ * - branches > 0: Real mode with MySQL database (via Testcontainers)
+ */
+public class ATModeExecutor extends AbstractTransactionExecutor {
+
+    private static final Logger LOGGER = 
LoggerFactory.getLogger(ATModeExecutor.class);
+
+    private MySQLContainer<?> mysqlContainer;
+    private HikariDataSource rawDataSource;
+    private DataSourceProxy dataSourceProxy;
+
+    public ATModeExecutor(BenchmarkConfig config) {
+        super(config);
+    }
+
+    private boolean isRealMode() {
+        return config.getBranches() > 0;
+    }
+
+    @Override
+    public void init() {
+        if (isRealMode()) {
+            LOGGER.info("Initializing AT mode executor (MySQL via 
Testcontainers)");
+            initRealMode();
+        } else {
+            LOGGER.info("AT mode executor initialized (empty transaction 
mode)");
+        }
+    }
+
+    private void initRealMode() {
+        // Start MySQL container
+        startMySQLContainer();
+
+        // Create HikariCP connection pool
+        createDataSource();
+
+        // Initialize database schema and data
+        initDatabase();
+
+        // Wrap with Seata DataSourceProxy for AT mode
+        dataSourceProxy = new DataSourceProxy(rawDataSource);
+
+        LOGGER.info("DataSourceProxy initialized, dbType: {}", 
dataSourceProxy.getDbType());
+        LOGGER.info("Real AT mode executor initialized with {} accounts", 
BenchmarkConstants.ACCOUNT_COUNT);
+    }
+
+    private void startMySQLContainer() {
+        LOGGER.info("Starting MySQL container...");
+        mysqlContainer = new 
MySQLContainer<>(DockerImageName.parse("mysql:8.0"))
+                .withDatabaseName("benchmark")
+                .withUsername("test")
+                .withPassword("test")
+                .withCommand("--character-set-server=utf8mb4", 
"--collation-server=utf8mb4_unicode_ci");
+
+        mysqlContainer.start();
+
+        LOGGER.info("MySQL container started: {}", 
mysqlContainer.getJdbcUrl());
+    }
+
+    private void createDataSource() {
+        HikariConfig hikariConfig = new HikariConfig();
+        hikariConfig.setJdbcUrl(mysqlContainer.getJdbcUrl());
+        hikariConfig.setUsername(mysqlContainer.getUsername());
+        hikariConfig.setPassword(mysqlContainer.getPassword());
+        hikariConfig.setDriverClassName("com.mysql.cj.jdbc.Driver");
+        hikariConfig.setMaximumPoolSize(config.getThreads() * 2);
+        hikariConfig.setMinimumIdle(config.getThreads());
+        hikariConfig.setConnectionTimeout(30000);
+        hikariConfig.setIdleTimeout(600000);
+        hikariConfig.setMaxLifetime(1800000);
+
+        rawDataSource = new HikariDataSource(hikariConfig);
+        LOGGER.info("HikariCP DataSource created");
+    }
+
+    private void initDatabase() {
+        try (Connection conn = rawDataSource.getConnection();
+                Statement stmt = conn.createStatement()) {
+
+            // Create accounts table
+            stmt.execute("CREATE TABLE IF NOT EXISTS accounts ("
+                    + "id BIGINT PRIMARY KEY, "
+                    + "balance INT NOT NULL, "
+                    + "updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON 
UPDATE CURRENT_TIMESTAMP"
+                    + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4");
+
+            // Create undo_log table for Seata AT mode (MySQL syntax)
+            stmt.execute("CREATE TABLE IF NOT EXISTS undo_log ("
+                    + "branch_id BIGINT NOT NULL, "
+                    + "xid VARCHAR(128) NOT NULL, "
+                    + "context VARCHAR(128) NOT NULL, "
+                    + "rollback_info LONGBLOB NOT NULL, "
+                    + "log_status INT NOT NULL, "
+                    + "log_created DATETIME(6) NOT NULL, "
+                    + "log_modified DATETIME(6) NOT NULL, "
+                    + "UNIQUE KEY ux_undo_log (xid, branch_id)"
+                    + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4");
+
+            // Insert test data
+            stmt.execute("TRUNCATE TABLE accounts");
+            try (PreparedStatement pstmt = conn.prepareStatement("INSERT INTO 
accounts (id, balance) VALUES (?, ?)")) {
+                for (int i = 1; i <= BenchmarkConstants.ACCOUNT_COUNT; i++) {
+                    pstmt.setLong(1, i);
+                    pstmt.setInt(2, BenchmarkConstants.INITIAL_BALANCE);
+                    pstmt.addBatch();
+                    if (i % 100 == 0) {
+                        pstmt.executeBatch();
+                    }
+                }
+                pstmt.executeBatch();
+            }
+
+            LOGGER.info(
+                    "Database initialized: {} accounts with balance {}",
+                    BenchmarkConstants.ACCOUNT_COUNT,
+                    BenchmarkConstants.INITIAL_BALANCE);
+
+        } catch (SQLException e) {
+            throw new RuntimeException("Failed to initialize database", e);
+        }
+    }
+
+    @Override
+    protected String getTransactionName() {
+        return isRealMode() ? "benchmark-real-at-tx" : "benchmark-at-tx";
+    }
+
+    @Override
+    protected int getBranchCount() {
+        return config.getBranches();
+    }
+
+    @Override
+    protected void executeBusinessLogic() throws Exception {
+        if (isRealMode()) {
+            executeBranchOperations(config.getBranches());
+        }
+        // Empty mode: do nothing (pure Seata protocol overhead testing)
+    }
+
+    private void executeBranchOperations(int branchCount) throws SQLException {
+        // Execute N branch operations (simulating distributed transaction 
branches)
+        for (int i = 0; i < branchCount; i++) {
+            executeSingleBranch();
+        }
+    }
+
+    @SuppressWarnings("lgtm[java/insecure-randomness]")
+    private void executeSingleBranch() throws SQLException {
+        // Use DataSourceProxy connection to enable AT mode
+        try (Connection conn = dataSourceProxy.getConnection()) {
+            conn.setAutoCommit(false);
+
+            // Transfer between two random accounts
+            long fromAccount = 
(ThreadLocalRandom.current().nextInt(BenchmarkConstants.ACCOUNT_COUNT) + 1);
+            long toAccount = 
(ThreadLocalRandom.current().nextInt(BenchmarkConstants.ACCOUNT_COUNT) + 1);
+            while (toAccount == fromAccount) {

Review Comment:
   Wouldn't it be much simpler to just add or subtract a small random number 
when the values are equal?



##########
test-suite/seata-benchmark-cli/pom.xml:
##########
@@ -0,0 +1,249 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <parent>
+        <groupId>org.apache.seata</groupId>
+        <artifactId>seata-parent</artifactId>
+        <version>${revision}</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    
+    <artifactId>seata-benchmark-cli</artifactId>
+    <packaging>jar</packaging>
+    <name>seata-benchmark-cli ${project.version}</name>
+    <description>Command-line benchmark tool for Seata transaction 
modes</description>
+
+    <properties>
+        <picocli.version>4.7.5</picocli.version>
+        <lanterna.version>3.1.2</lanterna.version>
+        <testcontainers.version>1.19.3</testcontainers.version>
+    </properties>
+
+    <dependencies>
+        <!-- Seata Dependencies -->
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>seata-tm</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>seata-saga-annotation</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>seata-saga-engine</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>seata-saga-statelang</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>seata-saga-processctrl</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <!-- Fastjson for Saga state machine JSON parsing -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+        </dependency>
+        <!-- Spring Expression for Saga state machine -->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-expression</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>seata-rm-datasource</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>seata-sqlparser-druid</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>seata-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>seata-metrics-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>seata-serializer-all</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>seata-compressor-all</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <!-- CLI Framework -->
+        <dependency>
+            <groupId>info.picocli</groupId>
+            <artifactId>picocli</artifactId>
+            <version>${picocli.version}</version>
+        </dependency>
+
+        <!-- Rate Limiting -->
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+        </dependency>
+
+        <!-- YAML Configuration (optional for future use) -->
+        <dependency>
+            <groupId>org.yaml</groupId>
+            <artifactId>snakeyaml</artifactId>
+            <version>${snakeyaml.version}</version>
+        </dependency>
+
+        <!-- Logging -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+        </dependency>
+
+        <!-- Testcontainers for Real AT Mode -->
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>testcontainers</artifactId>
+            <version>${testcontainers.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>mysql</artifactId>
+            <version>${testcontainers.version}</version>
+        </dependency>
+
+        <!-- MySQL JDBC Driver -->
+        <dependency>
+            <groupId>com.mysql</groupId>
+            <artifactId>mysql-connector-j</artifactId>
+            <version>8.0.33</version>
+        </dependency>
+
+        <!-- Commons IO, Compress and Codec (required by Testcontainers) -->
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-compress</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+            <version>1.16.0</version>
+        </dependency>
+
+        <!-- HikariCP Connection Pool -->
+        <dependency>
+            <groupId>com.zaxxer</groupId>
+            <artifactId>HikariCP</artifactId>
+        </dependency>
+
+        <!-- Test Dependencies -->
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <!-- Maven Compiler Plugin -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>8</source>

Review Comment:
   I recommend using JDK 25, and in the future, providing GraalVM AOT-compiled 
artifacts along with corresponding benchmarks. This would make it much more 
convenient for users to run performance tests.



##########
test-suite/seata-benchmark-cli/README.md:
##########
@@ -0,0 +1,434 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+# Seata Benchmark CLI Tool
+
+A command-line benchmark tool for stress testing Seata transaction modes.
+
+## Features
+
+- Support for **AT**, **TCC**, and **SAGA** transaction modes
+- **Dual execution modes**:
+  - **Empty mode** (`--branches 0`): Pure Seata protocol overhead testing
+  - **Real mode** (`--branches N`): Actual distributed transaction execution
+- **Configurable TPS** (Transactions Per Second) control
+- **Multi-threaded** workload generation
+- **Fault injection** with configurable rollback percentage
+- **Window-based progress reporting** (every 10 seconds)
+- Performance metrics collection (latency percentiles, success rate, TPS)
+- **CSV export** for post-analysis
+- **Warmup support** (exclude initial ramp-up from final statistics)
+- **YAML configuration file** support
+
+## Prerequisites
+
+- JDK 8 or higher
+- Maven 3.6+
+- Running Seata Server
+- Docker (required for real mode with Testcontainers)
+
+## Build
+
+```bash
+cd test-suite/seata-benchmark-cli
+../../mvnw clean package
+```
+
+The executable JAR will be created at `target/seata-benchmark-cli.jar`
+
+## Usage
+
+### Basic Usage
+
+```bash
+# AT mode benchmark (empty transaction)
+java -jar seata-benchmark-cli.jar \
+  --server 127.0.0.1:8091 \
+  --mode AT \
+  --tps 100 \
+  --duration 60
+
+# TCC mode benchmark
+java -jar seata-benchmark-cli.jar \
+  --server 127.0.0.1:8091 \
+  --mode TCC \
+  --tps 200 \
+  --threads 20 \
+  --duration 120
+
+# SAGA mode benchmark (empty transaction)
+java -jar seata-benchmark-cli.jar \
+  --server 127.0.0.1:8091 \
+  --mode SAGA \
+  --tps 100 \
+  --duration 60
+```
+
+### Real Mode (with actual database operations)
+
+```bash
+# AT mode with real MySQL transactions (via Testcontainers)
+java -jar seata-benchmark-cli.jar \
+  --server 127.0.0.1:8091 \
+  --mode AT \
+  --tps 100 \
+  --duration 60 \
+  --branches 3
+
+# SAGA mode with state machine engine
+java -jar seata-benchmark-cli.jar \
+  --server 127.0.0.1:8091 \
+  --mode SAGA \
+  --tps 100 \
+  --duration 60 \
+  --branches 3 \
+  --rollback-percentage 5
+```
+
+### Advanced Options
+
+```bash
+java -jar seata-benchmark-cli.jar \
+  --server 127.0.0.1:8091 \
+  --mode AT \
+  --tps 500 \
+  --threads 50 \

Review Comment:
   I believe that constant TPS and a fixed number of threads should not be used 
at the same time in performance testing. You should either run tests with a 
constant target TPS, or control the test by fixing the number of concurrent 
threads — and then observe the resulting TPS and response time metrics.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to