lizining1231 commented on code in PR #3746: URL: https://github.com/apache/dubbo-go/pull/3746#discussion_r4062995818
########## tools/benchmark/stream_ab/main.go: ########## @@ -0,0 +1,219 @@ +/* + * 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. + */ + +// stream_ab is an independent streaming benchmark client. It talks straight to +// a real Triple (dubbo-go) server over cleartext HTTP/2 (h2c) using only +// triple_protocol.NewClient — no dubbo-go high-level client/reference machinery +// is involved. +// +// Each worker operation opens one stream, sends msgs small messages, closes the +// request side, then drains every response. The two arms differ only in whether +// triple_protocol.WithWriteBuffering() is passed (buffered) or not (baseline). +// All wire parameters (triple protocol, default gRPC wire encoding, no request +// compression, h2c cleartext) are identical so the comparison isolates the +// variable under study. +package main + +import ( + "context" + "crypto/rand" + "crypto/tls" + "errors" + "flag" + "fmt" + "io" + "net" + "net/http" + _ "net/http/pprof" Review Comment: done. profiling 不是压测客户端的职责,所以追加改动`net/http/pprof` 导入、`-pprof` /`-blockrate` 两个开关以及它们启动的服务都已从 main.go 移除 -- 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]
