Seata Benchmark 1.0 Development Task
Check Ahead
-
[x] I have searched the issues of this repository and believe that this is not a duplicate.
-
[ ] I am willing to try to implement this feature myself.
Why you need it?
As a distributed transaction solution, Seata's performance across different transaction modes is a key concern for users. Currently, there lacks a simple, focused tool to stress test various transaction modes (AT, TCC, Saga, etc.) and display critical table data changes in real-time.
How it could be?
Develop a command-line version Benchmark tool capable of stress testing Seata's transaction modes and displaying key information changes from the global transaction table (global_table) and branch transaction table (branch_table) in real-time during testing, enabling visual observation of transaction state transitions and performance metrics
Other related information
No response
Create a standalone benchmark module with a CLI tool to stress test Seata transaction modes (AT, TCC, Saga, XA) and display real-time metrics from global_table and branch_table.
Implementation Steps
- Create Benchmark Module
- Add benchmark module to root pom.xml
- Create benchmark/pom.xml with dependencies: server, core, metrics, JCommander
- Set up package structure
- CLI Interface (JCommander)
- Command-line options:
- --mode: Transaction mode (AT/TCC/SAGA/XA/ALL)
- --storage: Storage mode (db/file/redis/raft)
- --threads: Number of concurrent threads
- --duration: Benchmark duration (seconds)
- --tps-target: Target transactions per second
- --config: Path to Seata configuration
- Transaction Simulator
- Mock GlobalSession and BranchSession creation
- Use TransactionStoreManager to write sessions
- Simulate transaction state transitions (Begin → Committing → Committed)
- Support different transaction modes with appropriate branch types
- Metrics Collection
- Track: TPS, Success Rate, Avg Latency, P95/P99 Latency
- Query global_table for: total count, status distribution
- Query branch_table for: total count, branch type distribution
- Monitor storage layer performance
- Real-time Console Display
- Live updating dashboard using ANSI escape codes
- Show:
- Current TPS and target TPS
- Transaction counts by status (Begin/Committing/Committed/Rollback)
- Branch counts by type (AT/TCC/SAGA/XA)
- Table statistics refresh every second
- Performance metrics (latency percentiles)
- Storage Adapter
- Abstract interface to work with all storage modes
- Use existing TransactionStoreManager implementations
- Handle configuration for each storage type
Key Technical Details
- Leverage existing classes: GlobalSession, BranchSession, TransactionStoreManager
- Use ServerTableColumnsName constants for table queries
- Support all BranchType enums: AT, TCC, SAGA, XA, SAGA_ANNOTATION
- Thread pool for concurrent transaction generation
- Graceful shutdown to ensure data consistency
This is a plan generated by AI. What do you think about it? If this issue is not urgent, I'd like to give it a try.
Create a standalone benchmark module with a CLI tool to stress test Seata transaction modes (AT, TCC, Saga, XA) and display real-time metrics from global_table and branch_table. Implementation Steps
- Create Benchmark Module
- Add benchmark module to root pom.xml
- Create benchmark/pom.xml with dependencies: server, core, metrics, JCommander
- Set up package structure
- CLI Interface (JCommander)
Command-line options:
- --mode: Transaction mode (AT/TCC/SAGA/XA/ALL)
- --storage: Storage mode (db/file/redis/raft)
- --threads: Number of concurrent threads
- --duration: Benchmark duration (seconds)
- --tps-target: Target transactions per second
- --config: Path to Seata configuration
- Transaction Simulator
- Mock GlobalSession and BranchSession creation
- Use TransactionStoreManager to write sessions
- Simulate transaction state transitions (Begin → Committing → Committed)
- Support different transaction modes with appropriate branch types
- Metrics Collection
- Track: TPS, Success Rate, Avg Latency, P95/P99 Latency
- Query global_table for: total count, status distribution
- Query branch_table for: total count, branch type distribution
- Monitor storage layer performance
- Real-time Console Display
Live updating dashboard using ANSI escape codes
Show:
- Current TPS and target TPS
- Transaction counts by status (Begin/Committing/Committed/Rollback)
- Branch counts by type (AT/TCC/SAGA/XA)
- Table statistics refresh every second
- Performance metrics (latency percentiles)
- Storage Adapter
- Abstract interface to work with all storage modes
- Use existing TransactionStoreManager implementations
- Handle configuration for each storage type
Key Technical Details
- Leverage existing classes: GlobalSession, BranchSession, TransactionStoreManager
- Use ServerTableColumnsName constants for table queries
- Support all BranchType enums: AT, TCC, SAGA, XA, SAGA_ANNOTATION
- Thread pool for concurrent transaction generation
- Graceful shutdown to ensure data consistency
This is a plan generated by AI. What do you think about it? If this issue is not urgent, I'd like to give it a try.
Thank you very much for your response. You are welcome to give it a try. Could you leave your contact information?