@@ -83,7 +83,8 @@ func TestSMK6(t *testing.T) {
83
83
"probe_http_error_code" ,
84
84
"probe_http_got_expected_response" ,
85
85
"probe_http_info" ,
86
- "probe_http_requests_failed_total" ,
86
+ "probe_http_requests_failed" , // Original rate.
87
+ "probe_http_requests_failed_total" , // Computed counter.
87
88
"probe_http_requests_total" ,
88
89
"probe_http_ssl" ,
89
90
"probe_http_status_code" ,
@@ -107,7 +108,7 @@ func TestSMK6(t *testing.T) {
107
108
108
109
unwantedMetrics := []string {
109
110
"probe_checks" ,
110
- "probe_http_reqs" , "probe_http_req_failed" ,
111
+ "probe_http_reqs" , "probe_http_req_failed" , // Renamed s/req/requests.
111
112
"probe_data_sent" , "probe_data_received" ,
112
113
"probe_http_req_duration" , "probe_iteration_duration" ,
113
114
"probe_http_req_blocked" , "probe_http_req_connecting" , "probe_http_req_receiving" , "probe_http_req_sending" , "probe_http_req_tls_handshaking" , "probe_http_req_waiting" ,
@@ -282,9 +283,28 @@ func TestSMK6(t *testing.T) {
282
283
assertValue : equals (0 ),
283
284
},
284
285
{
285
- name : "Total requests for each url" ,
286
- metricName : "probe_http_requests_total" ,
287
- assertValue : equals (1 ),
286
+ name : "Total requests for a URL accessed once" ,
287
+ metricName : "probe_http_requests_total" ,
288
+ metricLabels : map [string ]string {"url" : "https://test-api.k6.io/public/crocodiles/" },
289
+ assertValue : equals (1 ),
290
+ },
291
+ {
292
+ name : "Total requests for a URL accessed twice" ,
293
+ metricName : "probe_http_requests_total" ,
294
+ metricLabels : map [string ]string {"url" : "https://test-api.k6.io/public/crocodiles4/" },
295
+ assertValue : equals (2 ),
296
+ },
297
+ {
298
+ name : "HTTP requests failed rate" ,
299
+ metricName : "probe_http_requests_failed" ,
300
+ metricLabels : map [string ]string {"url" : "https://test-api.k6.io/public/crocodiles4/" },
301
+ assertValue : equals (1 ),
302
+ },
303
+ {
304
+ name : "HTTP requests failed ttoal" ,
305
+ metricName : "probe_http_requests_failed_total" ,
306
+ metricLabels : map [string ]string {"url" : "https://test-api.k6.io/public/crocodiles4/" },
307
+ assertValue : equals (2 ),
288
308
},
289
309
{
290
310
name : "HTTP version" ,
0 commit comments