l81893521 commented on issue #7646: URL: https://github.com/apache/incubator-seata/issues/7646#issuecomment-3536384166
> > 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 > > > > 1. Create Benchmark Module > > > > > > * Add benchmark module to root pom.xml > > * Create benchmark/pom.xml with dependencies: server, core, metrics, JCommander > > * Set up package structure > > > > > > 2. 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 > > > > > > 3. 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 > > > > > > 4. 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 > > > > > > 5. 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) > > > > > > 6. 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? -- 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]
