WangzJi commented on code in PR #7865:
URL: https://github.com/apache/incubator-seata/pull/7865#discussion_r2681054490


##########
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:
   Done in 
[575079d](https://github.com/apache/incubator-seata/pull/7865/commits/575079d736cb39f067c7408eb3d3329271b16024).



-- 
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