Fetch the repository succeeded.
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package broadcast
import "github.com/hyperledger/fabric/common/metrics"
var (
validateDuration = metrics.HistogramOpts{
Namespace: "broadcast",
Name: "validate_duration",
Help: "The time to validate a transaction in seconds.",
LabelNames: []string{"channel", "type", "status"},
StatsdFormat: "%{#fqname}.%{channel}.%{type}.%{status}",
}
enqueueDuration = metrics.HistogramOpts{
Namespace: "broadcast",
Name: "enqueue_duration",
Help: "The time to enqueue a transaction in seconds.",
LabelNames: []string{"channel", "type", "status"},
StatsdFormat: "%{#fqname}.%{channel}.%{type}.%{status}",
}
processedCount = metrics.CounterOpts{
Namespace: "broadcast",
Name: "processed_count",
Help: "The number of transactions processed.",
LabelNames: []string{"channel", "type", "status"},
StatsdFormat: "%{#fqname}.%{channel}.%{type}.%{status}",
}
)
type Metrics struct {
ValidateDuration metrics.Histogram
EnqueueDuration metrics.Histogram
ProcessedCount metrics.Counter
}
func NewMetrics(p metrics.Provider) *Metrics {
return &Metrics{
ValidateDuration: p.NewHistogram(validateDuration),
EnqueueDuration: p.NewHistogram(enqueueDuration),
ProcessedCount: p.NewCounter(processedCount),
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。