AlexStocks commented on code in PR #3502: URL: https://github.com/apache/dubbo-go/pull/3502#discussion_r3662226959
########## tools/benchmark/README.md: ########## @@ -0,0 +1,300 @@ +# Dubbo-Go Benchmark Suite + +English | [中文](README_CN.md) + +Performance benchmark suite for comparing **Dubbo-Go / Dubbo-Java / gRPC** frameworks. + +## Environment Requirements + +- **Go**: 1.23+ +- **Java**: 8+ +- **Maven**: 3.6+ +- **protoc**: 3.0+ + +## Default Port Configuration + +| Framework | Default Port | +|-----------|-------------| +| Dubbo-Go | 20000 | +| Dubbo-Java | 20001 | +| gRPC | 50051 | + +## Directory Structure + +``` +tools/benchmark +├── client/ # Benchmark client +│ ├── main.go # Entry point +│ ├── clients/ # Client implementations +│ │ ├── dubbo_client.go # Dubbo-Go client +│ │ └── grpc_client.go # gRPC client +│ ├── engine/ # Benchmark engine +│ │ ├── engine.go # Engine logic +│ │ ├── statistics.go # Statistics calculation +│ │ └── metrics.go # Metrics collection +│ ├── monitor/ # System monitor +│ │ └── system_monitor.go # CPU/Memory monitor +│ └── payload/ # Payload generator +│ └── payload.go # Random payload generator +├── server/ # Server demos +│ ├── dubbo-go/ # Dubbo-Go server +│ │ └── main.go +│ ├── dubbo-java/ # Dubbo-Java server +│ │ └── pom.xml +│ └── grpc/ # gRPC server +│ └── main.go +├── proto/ # Protocol definitions and generated code +│ ├── benchmark.proto # Protobuf definition +│ ├── benchmark.pb.go # Generated Go code +│ ├── benchmark_grpc.pb.go # Generated gRPC code +│ └── benchmark.triple.go # Generated Triple code +├── scripts/ # Automation scripts +│ ├── gen_code.sh # Protobuf code generation +│ ├── run_all.sh # Run all benchmarks +│ └── run_single.sh # Run single benchmark +├── config.yaml # Benchmark configuration +├── go.mod/go.sum # Go dependencies Review Comment: [P2] go.mod/go.sum 实际未包含在本 PR 本 PR 的 30 个文件中不存在 tools/benchmark/go.mod/go.sum,但 README 目录结构在此行列出 go.mod/go.sum。仓库 tools/ 下其余子工具(dubbogo-cli、imports-formatter、protoc-gen-go-triple、protoc-gen-triple-openapi)均为独立 Go 模块。缺 go.mod 使 benchmark 并入根模块参与 go build ./...(RISC-V CI 虽通过),但与同级工具约定不一致且 README 与事实不符。建议补 module dubbo.apache.org/dubbo-go/v3/tools/benchmark 并 replace dubbo.apache.org/dubbo-go/v3 => ../../..,或从 README 移除该行。 -- 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]
