@@ -25,7 +25,7 @@ var fixtures = []fixture{
25
25
unit : "seconds" ,
26
26
err : "" ,
27
27
},
28
- d : " Desc{fqName: \ " pg_settings_seconds_fixture_metric_seconds\ " , help: \ " Foo foo foo [Units converted to seconds.]\ " , constLabels: {}, variableLabels: []}" ,
28
+ d : ` Desc{fqName: "pg_settings_seconds_fixture_metric_seconds", help: "Foo foo foo [Units converted to seconds.]", constLabels: {}, variableLabels: [` + serverLabelName + `]}` ,
29
29
v : 5 ,
30
30
},
31
31
{
@@ -41,7 +41,7 @@ var fixtures = []fixture{
41
41
unit : "seconds" ,
42
42
err : "" ,
43
43
},
44
- d : " Desc{fqName: \ " pg_settings_milliseconds_fixture_metric_seconds\ " , help: \ " Foo foo foo [Units converted to seconds.]\ " , constLabels: {}, variableLabels: []}" ,
44
+ d : ` Desc{fqName: "pg_settings_milliseconds_fixture_metric_seconds", help: "Foo foo foo [Units converted to seconds.]", constLabels: {}, variableLabels: [` + serverLabelName + `]}` ,
45
45
v : 5 ,
46
46
},
47
47
{
@@ -57,7 +57,7 @@ var fixtures = []fixture{
57
57
unit : "bytes" ,
58
58
err : "" ,
59
59
},
60
- d : " Desc{fqName: \ " pg_settings_eight_kb_fixture_metric_bytes\ " , help: \ " Foo foo foo [Units converted to bytes.]\ " , constLabels: {}, variableLabels: []}" ,
60
+ d : ` Desc{fqName: "pg_settings_eight_kb_fixture_metric_bytes", help: "Foo foo foo [Units converted to bytes.]", constLabels: {}, variableLabels: [` + serverLabelName + `]}` ,
61
61
v : 139264 ,
62
62
},
63
63
{
@@ -73,7 +73,7 @@ var fixtures = []fixture{
73
73
unit : "bytes" ,
74
74
err : "" ,
75
75
},
76
- d : " Desc{fqName: \ " pg_settings_16_kb_real_fixture_metric_bytes\ " , help: \ " Foo foo foo [Units converted to bytes.]\ " , constLabels: {}, variableLabels: []}" ,
76
+ d : ` Desc{fqName: "pg_settings_16_kb_real_fixture_metric_bytes", help: "Foo foo foo [Units converted to bytes.]", constLabels: {}, variableLabels: [` + serverLabelName + `]}` ,
77
77
v : 49152 ,
78
78
},
79
79
{
@@ -89,7 +89,7 @@ var fixtures = []fixture{
89
89
unit : "bytes" ,
90
90
err : "" ,
91
91
},
92
- d : " Desc{fqName: \ " pg_settings_16_mb_real_fixture_metric_bytes\ " , help: \ " Foo foo foo [Units converted to bytes.]\ " , constLabels: {}, variableLabels: []}" ,
92
+ d : ` Desc{fqName: "pg_settings_16_mb_real_fixture_metric_bytes", help: "Foo foo foo [Units converted to bytes.]", constLabels: {}, variableLabels: [` + serverLabelName + `]}` ,
93
93
v : 5.0331648e+07 ,
94
94
},
95
95
{
@@ -105,7 +105,7 @@ var fixtures = []fixture{
105
105
unit : "bytes" ,
106
106
err : "" ,
107
107
},
108
- d : " Desc{fqName: \ " pg_settings_32_mb_real_fixture_metric_bytes\ " , help: \ " Foo foo foo [Units converted to bytes.]\ " , constLabels: {}, variableLabels: []}" ,
108
+ d : ` Desc{fqName: "pg_settings_32_mb_real_fixture_metric_bytes", help: "Foo foo foo [Units converted to bytes.]", constLabels: {}, variableLabels: [` + serverLabelName + `]}` ,
109
109
v : 1.00663296e+08 ,
110
110
},
111
111
{
@@ -121,7 +121,7 @@ var fixtures = []fixture{
121
121
unit : "bytes" ,
122
122
err : "" ,
123
123
},
124
- d : " Desc{fqName: \ " pg_settings_64_mb_real_fixture_metric_bytes\ " , help: \ " Foo foo foo [Units converted to bytes.]\ " , constLabels: {}, variableLabels: []}" ,
124
+ d : ` Desc{fqName: "pg_settings_64_mb_real_fixture_metric_bytes", help: "Foo foo foo [Units converted to bytes.]", constLabels: {}, variableLabels: [` + serverLabelName + `]}` ,
125
125
v : 2.01326592e+08 ,
126
126
},
127
127
{
@@ -137,7 +137,7 @@ var fixtures = []fixture{
137
137
unit : "" ,
138
138
err : "" ,
139
139
},
140
- d : " Desc{fqName: \ " pg_settings_bool_on_fixture_metric\ " , help: \ " Foo foo foo\ " , constLabels: {}, variableLabels: []}" ,
140
+ d : ` Desc{fqName: "pg_settings_bool_on_fixture_metric", help: "Foo foo foo", constLabels: {}, variableLabels: [` + serverLabelName + `]}` ,
141
141
v : 1 ,
142
142
},
143
143
{
@@ -153,7 +153,7 @@ var fixtures = []fixture{
153
153
unit : "" ,
154
154
err : "" ,
155
155
},
156
- d : " Desc{fqName: \ " pg_settings_bool_off_fixture_metric\ " , help: \ " Foo foo foo\ " , constLabels: {}, variableLabels: []}" ,
156
+ d : ` Desc{fqName: "pg_settings_bool_off_fixture_metric", help: "Foo foo foo", constLabels: {}, variableLabels: [` + serverLabelName + `]}` ,
157
157
v : 0 ,
158
158
},
159
159
{
@@ -169,7 +169,7 @@ var fixtures = []fixture{
169
169
unit : "seconds" ,
170
170
err : "" ,
171
171
},
172
- d : " Desc{fqName: \ " pg_settings_special_minus_one_value_seconds\ " , help: \ " foo foo foo [Units converted to seconds.]\ " , constLabels: {}, variableLabels: []}" ,
172
+ d : ` Desc{fqName: "pg_settings_special_minus_one_value_seconds", help: "foo foo foo [Units converted to seconds.]", constLabels: {}, variableLabels: [` + serverLabelName + `]}` ,
173
173
v : - 1 ,
174
174
},
175
175
{
@@ -185,7 +185,7 @@ var fixtures = []fixture{
185
185
unit : "" ,
186
186
err : "" ,
187
187
},
188
- d : " Desc{fqName: \ " pg_settings_rds_rds_superuser_reserved_connections\ " , help: \ " Sets the number of connection slots reserved for rds_superusers.\ " , constLabels: {}, variableLabels: []}" ,
188
+ d : ` Desc{fqName: "pg_settings_rds_rds_superuser_reserved_connections", help: "Sets the number of connection slots reserved for rds_superusers.", constLabels: {}, variableLabels: [` + serverLabelName + `]}` ,
189
189
v : 2 ,
190
190
},
191
191
{
@@ -233,7 +233,7 @@ func (s *PgSettingSuite) TestMetric(c *C) {
233
233
234
234
for _ , f := range fixtures {
235
235
d := & dto.Metric {}
236
- m := f .p .metric ()
236
+ m := f .p .metric ("" )
237
237
m .Write (d ) // nolint: errcheck
238
238
239
239
c .Check (m .Desc ().String (), Equals , f .d )
0 commit comments