File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,24 @@ func benchSyncViews(views ...View) func(*testing.B) {
9696 }
9797 }()))
9898
99+ iGauge , err := meter .Int64Gauge ("int64-gauge" )
100+ assert .NoError (b , err )
101+ b .Run ("Int64Gauge" , benchMeasAttrs (func () measF {
102+ return func (s attribute.Set ) func () {
103+ o := []metric.RecordOption {metric .WithAttributeSet (s )}
104+ return func () { iGauge .Record (b .Context (), 1 , o ... ) }
105+ }
106+ }()))
107+
108+ fGauge , err := meter .Float64Gauge ("float64-gauge" )
109+ assert .NoError (b , err )
110+ b .Run ("Float64Gauge" , benchMeasAttrs (func () measF {
111+ return func (s attribute.Set ) func () {
112+ o := []metric.RecordOption {metric .WithAttributeSet (s )}
113+ return func () { fGauge .Record (b .Context (), 1 , o ... ) }
114+ }
115+ }()))
116+
99117 iHist , err := meter .Int64Histogram ("int64-histogram" )
100118 assert .NoError (b , err )
101119 b .Run ("Int64Histogram" , benchMeasAttrs (func () measF {
You can’t perform that action at this time.
0 commit comments