代码拉取完成,页面将自动刷新
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package deliver
import (
"github.com/hyperledger/fabric/common/metrics"
)
var (
streamsOpened = metrics.CounterOpts{
Namespace: "deliver",
Name: "streams_opened",
Help: "The number of GRPC streams that have been opened for the deliver service.",
}
streamsClosed = metrics.CounterOpts{
Namespace: "deliver",
Name: "streams_closed",
Help: "The number of GRPC streams that have been closed for the deliver service.",
}
requestsReceived = metrics.CounterOpts{
Namespace: "deliver",
Name: "requests_received",
Help: "The number of deliver requests that have been received.",
LabelNames: []string{"channel", "filtered"},
StatsdFormat: "%{#fqname}.%{channel}.%{filtered}",
}
requestsCompleted = metrics.CounterOpts{
Namespace: "deliver",
Name: "requests_completed",
Help: "The number of deliver requests that have been completed.",
LabelNames: []string{"channel", "filtered", "success"},
StatsdFormat: "%{#fqname}.%{channel}.%{filtered}.%{success}",
}
blocksSent = metrics.CounterOpts{
Namespace: "deliver",
Name: "blocks_sent",
Help: "The number of blocks sent by the deliver service.",
LabelNames: []string{"channel", "filtered"},
StatsdFormat: "%{#fqname}.%{channel}.%{filtered}",
}
)
type Metrics struct {
StreamsOpened metrics.Counter
StreamsClosed metrics.Counter
RequestsReceived metrics.Counter
RequestsCompleted metrics.Counter
BlocksSent metrics.Counter
}
func NewMetrics(p metrics.Provider) *Metrics {
return &Metrics{
StreamsOpened: p.NewCounter(streamsOpened),
StreamsClosed: p.NewCounter(streamsClosed),
RequestsReceived: p.NewCounter(requestsReceived),
RequestsCompleted: p.NewCounter(requestsCompleted),
BlocksSent: p.NewCounter(blocksSent),
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。