@@ -107,7 +107,7 @@ non_existent_metrics(_Config) ->
107
107
assert_status (404 , request (<<" GET" >>, " /metrics/global/badMetric" )),
108
108
assert_status (404 , request (<<" GET" >>, " /metrics/host_type/badHostType" )),
109
109
assert_status (404 , request (<<" GET" >>,
110
- " /metrics/host_type/badHostType/c2s_element_out .stanza_count" )),
110
+ " /metrics/host_type/badHostType/xmpp_element_out.c2s .stanza_count" )),
111
111
assert_status (404 , request (<<" GET" >>, [" /metrics/" , HostType , " /" , GlobalMetricName ])),
112
112
assert_status (404 , request (<<" GET" >>, [" /metrics/" , HostType , " /badMetric" ])).
113
113
@@ -122,14 +122,14 @@ one_client_just_logs_in(Config) ->
122
122
(Config , metrics_helper :userspec (1 , Config ),
123
123
fun (_User1 ) -> end_of_story end ,
124
124
% % A list of metrics and their expected relative increase
125
- [{'c2s_element_in .iq_count' , 0 + user_alpha (2 )},
126
- {'c2s_element_out .iq_count' , 0 + user_alpha (2 )},
127
- {'c2s_element_in .message_count' , 0 },
128
- {'c2s_element_out .message_count' , 0 },
129
- {'c2s_element_in .presence_count' , 0 + user_alpha (1 )},
130
- {'c2s_element_out .presence_count' , 0 + user_alpha (1 )},
131
- {'c2s_element_in .stanza_count' , 0 + user_alpha (3 )},
132
- {'c2s_element_out .stanza_count' , 0 + user_alpha (3 )},
125
+ [{'xmpp_element_in.c2s .iq_count' , 0 + user_alpha (2 )},
126
+ {'xmpp_element_out.c2s .iq_count' , 0 + user_alpha (2 )},
127
+ {'xmpp_element_in.c2s .message_count' , 0 },
128
+ {'xmpp_element_out.c2s .message_count' , 0 },
129
+ {'xmpp_element_in.c2s .presence_count' , 0 + user_alpha (1 )},
130
+ {'xmpp_element_out.c2s .presence_count' , 0 + user_alpha (1 )},
131
+ {'xmpp_element_in.c2s .stanza_count' , 0 + user_alpha (3 )},
132
+ {'xmpp_element_out.c2s .stanza_count' , 0 + user_alpha (3 )},
133
133
{'sm_session.logins' , 0 + user_alpha (1 )},
134
134
{'sm_session.logouts' , 0 + user_alpha (1 )}
135
135
]).
@@ -138,14 +138,14 @@ two_clients_just_log_in(Config) ->
138
138
instrumented_story
139
139
(Config , metrics_helper :userspec (1 , 1 , Config ),
140
140
fun (_User1 , _User2 ) -> end_of_story end ,
141
- [{'c2s_element_in .iq_count' , 0 + user_alpha (4 )},
142
- {'c2s_element_out .iq_count' , 0 + user_alpha (4 )},
143
- {'c2s_element_in .message_count' , 0 },
144
- {'c2s_element_out .message_count' , 0 },
145
- {'c2s_element_in .presence_count' , 0 + user_alpha (2 )},
146
- {'c2s_element_out .presence_count' , 0 + user_alpha (2 )},
147
- {'c2s_element_in .stanza_count' , 0 + user_alpha (6 )},
148
- {'c2s_element_out .stanza_count' , 0 + user_alpha (6 )},
141
+ [{'xmpp_element_in.c2s .iq_count' , 0 + user_alpha (4 )},
142
+ {'xmpp_element_out.c2s .iq_count' , 0 + user_alpha (4 )},
143
+ {'xmpp_element_in.c2s .message_count' , 0 },
144
+ {'xmpp_element_out.c2s .message_count' , 0 },
145
+ {'xmpp_element_in.c2s .presence_count' , 0 + user_alpha (2 )},
146
+ {'xmpp_element_out.c2s .presence_count' , 0 + user_alpha (2 )},
147
+ {'xmpp_element_in.c2s .stanza_count' , 0 + user_alpha (6 )},
148
+ {'xmpp_element_out.c2s .stanza_count' , 0 + user_alpha (6 )},
149
149
{'sm_session.logins' , 0 + user_alpha (2 )},
150
150
{'sm_session.logouts' , 0 + user_alpha (2 )}
151
151
]).
@@ -158,8 +158,8 @@ one_message_sent(Config) ->
158
158
escalus_client :send (User1 , Chat ),
159
159
escalus_client :wait_for_stanza (User2 )
160
160
end ,
161
- [{'c2s_element_in .message_count' , 1 },
162
- {'c2s_element_out .message_count' , 1 }]).
161
+ [{'xmpp_element_in.c2s .message_count' , 1 },
162
+ {'xmpp_element_out.c2s .message_count' , 1 }]).
163
163
164
164
one_direct_presence_sent (Config ) ->
165
165
Userspec = metrics_helper :userspec (1 , 1 , Config ),
@@ -170,10 +170,10 @@ one_direct_presence_sent(Config) ->
170
170
escalus :send (User1 , Presence ),
171
171
escalus :wait_for_stanza (User2 )
172
172
end ,
173
- [{'c2s_element_in .presence_count' , 1 + user_alpha (2 )},
174
- {'c2s_element_out .presence_count' , 1 + user_alpha (2 )},
175
- {'c2s_element_in .stanza_count' , 1 + user_alpha (6 )},
176
- {'c2s_element_out .stanza_count' , 1 + user_alpha (6 )}]).
173
+ [{'xmpp_element_in.c2s .presence_count' , 1 + user_alpha (2 )},
174
+ {'xmpp_element_out.c2s .presence_count' , 1 + user_alpha (2 )},
175
+ {'xmpp_element_in.c2s .stanza_count' , 1 + user_alpha (6 )},
176
+ {'xmpp_element_out.c2s .stanza_count' , 1 + user_alpha (6 )}]).
177
177
178
178
one_iq_sent (Config ) ->
179
179
instrumented_story
@@ -183,11 +183,11 @@ one_iq_sent(Config) ->
183
183
escalus_client :send (User1 , RosterIq ),
184
184
escalus_client :wait_for_stanza (User1 )
185
185
end ,
186
- [{'c2s_element_in .iq_count' , 3 },
187
- {'c2s_element_out .iq_count' , 3 },
186
+ [{'xmpp_element_in.c2s .iq_count' , 3 },
187
+ {'xmpp_element_out.c2s .iq_count' , 3 },
188
188
{'mod_roster_get.count' , 1 },
189
- {'c2s_element_in .stanza_count' , 1 + user_alpha (3 )},
190
- {'c2s_element_out .stanza_count' , 1 + user_alpha (3 )}]).
189
+ {'xmpp_element_in.c2s .stanza_count' , 1 + user_alpha (3 )},
190
+ {'xmpp_element_out.c2s .stanza_count' , 1 + user_alpha (3 )}]).
191
191
192
192
one_message_error (Config ) ->
193
193
instrumented_story
@@ -198,10 +198,10 @@ one_message_error(Config) ->
198
198
escalus_client :send (User1 , Chat ),
199
199
escalus_client :wait_for_stanza (User1 )
200
200
end ,
201
- [{'c2s_element_out .error_count' , 1 },
202
- {'c2s_element_out .iq_error_count' , 0 },
203
- {'c2s_element_out .message_error_count' , 1 },
204
- {'c2s_element_out .presence_error_count' , 0 }]).
201
+ [{'xmpp_element_out.c2s .error_count' , 1 },
202
+ {'xmpp_element_out.c2s .iq_error_count' , 0 },
203
+ {'xmpp_element_out.c2s .message_error_count' , 1 },
204
+ {'xmpp_element_out.c2s .presence_error_count' , 0 }]).
205
205
206
206
one_iq_error (Config ) ->
207
207
instrumented_story
@@ -211,10 +211,10 @@ one_iq_error(Config) ->
211
211
escalus_client :send (User1 , BadIQ ),
212
212
escalus_client :wait_for_stanza (User1 )
213
213
end ,
214
- [{'c2s_element_out .error_count' , 1 },
215
- {'c2s_element_out .iq_error_count' , 1 },
216
- {'c2s_element_out .message_error_count' , 0 },
217
- {'c2s_element_out .presence_error_count' , 0 }]).
214
+ [{'xmpp_element_out.c2s .error_count' , 1 },
215
+ {'xmpp_element_out.c2s .iq_error_count' , 1 },
216
+ {'xmpp_element_out.c2s .message_error_count' , 0 },
217
+ {'xmpp_element_out.c2s .presence_error_count' , 0 }]).
218
218
219
219
one_presence_error (Config ) ->
220
220
instrumented_story
@@ -225,10 +225,10 @@ one_presence_error(Config) ->
225
225
escalus_client :send (User1 , BadPres ),
226
226
escalus_client :wait_for_stanza (User1 )
227
227
end ,
228
- [{'c2s_element_out .error_count' , 1 },
229
- {'c2s_element_out .iq_error_count' , 0 },
230
- {'c2s_element_out .message_error_count' , 0 },
231
- {'c2s_element_out .presence_error_count' , 1 }]).
228
+ [{'xmpp_element_out.c2s .error_count' , 1 },
229
+ {'xmpp_element_out.c2s .iq_error_count' , 0 },
230
+ {'xmpp_element_out.c2s .message_error_count' , 0 },
231
+ {'xmpp_element_out.c2s .presence_error_count' , 1 }]).
232
232
233
233
session_counters (Config ) ->
234
234
escalus :story
@@ -344,9 +344,9 @@ metrics_msg_flow(_Config) ->
344
344
user_alpha (NumberOfUsers ) ->
345
345
% % This represents the overhead of logging in N users via escalus:story/3
346
346
% % For each user,
347
- % % c2s_element_ (in|out).stanza_count
347
+ % % xmpp_element_ (in|out).c2s .stanza_count
348
348
% % and
349
- % % c2s_element_ (in|out).presence_count
349
+ % % xmpp_element_ (in|out).c2s .presence_count
350
350
% % will be bumped by +1 at login.
351
351
NumberOfUsers .
352
352
0 commit comments