1 Star 0 Fork 0

陈文甲/fabric

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
metrics.go 809 Bytes
一键复制 编辑 原始数据 按行查看 历史
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package comm
import "github.com/hyperledger/fabric/common/metrics"
var (
openConnCounterOpts = metrics.CounterOpts{
Namespace: "grpc",
Subsystem: "comm",
Name: "conn_opened",
Help: "gRPC connections opened. Open minus closed is the active number of connections.",
}
closedConnCounterOpts = metrics.CounterOpts{
Namespace: "grpc",
Subsystem: "comm",
Name: "conn_closed",
Help: "gRPC connections closed. Open minus closed is the active number of connections.",
}
)
func NewServerStatsHandler(p metrics.Provider) *ServerStatsHandler {
return &ServerStatsHandler{
OpenConnCounter: p.NewCounter(openConnCounterOpts),
ClosedConnCounter: p.NewCounter(closedConnCounterOpts),
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/venjia/fabric.git
git@gitee.com:venjia/fabric.git
venjia
fabric
fabric
v1.4.4

搜索帮助