github.com/kaituanwang/hyperledger@v2.0.1+incompatible/common/metrics/gendoc/testdata/basic.go (about) 1 /* 2 Copyright IBM Corp. All Rights Reserved. 3 4 SPDX-License-Identifier: Apache-2.0 5 */ 6 7 package testdata 8 9 import ( 10 "time" 11 12 "github.com/hyperledger/fabric/common/metrics" 13 ) 14 15 // These variables should be discovered as valid metric options. 16 17 var ( 18 Counter = metrics.CounterOpts{ 19 Namespace: "fixtures", 20 Name: "counter", 21 Help: "This is some help text that is more than a few words long. It really can be quite long. Really long.", 22 LabelNames: []string{"label_one", "label_two", "missing_help"}, 23 LabelHelp: map[string]string{ 24 "label_one": "this is a really cool label that is the first of many", 25 "label_two": "short and sweet", 26 }, 27 StatsdFormat: "%{#fqname}.%{label_one}.%{label_two}", 28 } 29 30 Gauge = metrics.GaugeOpts{ 31 Namespace: "fixtures", 32 Name: "gauge", 33 Help: "This is some help text that is more than a few words long. It really can be quite long. Really long. This is some help text that is more than a few words long. It really can be quite long. Really long.", 34 LabelNames: []string{"label_one", "label_two"}, 35 StatsdFormat: "%{#fqname}.%{label_one}.%{label_two}", 36 } 37 38 Histogram = metrics.HistogramOpts{ 39 Namespace: "fixtures", 40 Name: "histogram", 41 Help: "This is some help text", 42 LabelNames: []string{"label_one", "label_two"}, 43 LabelHelp: map[string]string{ 44 "label_one": "This is a very long help message for label_one, which could be really, really long, and it may never end...", 45 }, 46 StatsdFormat: "%{#fqname}.%{label_one}.%{label_two}", 47 } 48 49 ignoredStruct = struct{}{} 50 51 ignoredInt = 0 52 53 ignoredTime = time.Now() 54 )