1 DEFINE{query_name 'dc_connect';
2 max_lfta_disorder '1'; max_hfta_disorder '1';
5 select timestamp_ms as timestamp,
7 UINT(id_MeNB_UE_X2AP_ID) as eUE_ID,
8 UINT(id_SgNB_UE_X2AP_ID) as gUE_ID,
10 from RECONCOMPLETE.reconfig_success
13 -- use id_New_eNB_UE_X2AP_ID for eUE_ID ???? Or take max to combine them
14 DEFINE{query_name 'dc_terminate';
15 max_lfta_disorder '1'; max_hfta_disorder '1';
18 select timestamp_ms as timestamp,
20 UINT(id_Old_eNB_UE_X2AP_ID) as eUE_ID,
21 id_SgNB_UE_X2AP_ID as gUE_ID,
23 from CONRELEASE.dc_release
26 DEFINE{query_name 'dc_events';}
28 merge p1.timestamp : p2.timestamp
29 from dc_connect p1, dc_terminate p2
32 DEFINE{query_name 'dc_events_gtp_teid';
33 comment 'tag dc_events with the gtp_teid';
34 max_lfta_disorder '1'; max_hfta_disorder '1';
37 Select M.TB, non_temporal(d.timestamp), d.gnb_id, d.eUE_ID, d.gUE_ID, d.event_type, M.gTP_TEID
38 LEFT_OUTER_JOIN from dc_events d, gnb_ueid_teid_map M
39 Where d.gnb_id=M.GNB_ID and d.gUE_ID=M.id_SgNB_UE_X2AP_ID
40 and d.timestamp/$window=M.TB
46 DEFINE{ query_name 'mc_connected_ues';
47 max_lfta_disorder '1'; max_hfta_disorder '1';
50 SELECT TB, UE_ID, GNB_ID,
51 ((TB+1)*$window-LAST(timestamp))/1000.0 as connected_time
53 GROUP BY timestamp / $window as TB, gUE_ID as UE_ID, gnb_id as GNB_ID
54 HAVING LAST(event_type) = 1
55 CLOSING_WHEN LAST(event_type) = 0 OR
56 ((TB+1)*$window-LAST(timestamp))/1000.0 >= 3600
59 DEFINE{ query_name 'mc_connected_cnt';
60 max_lfta_disorder '1'; max_hfta_disorder '1';
61 comment 'Number of dual connected users';
64 SELECT ($window*(TB+1))/1000 as TS, GNB_ID,
65 $window/1000.0 as measurementInterval, // standard_name
66 COUNT(*) as count_connected_ue
71 DEFINE{ query_name 'mc_disconnected_ues';
72 max_lfta_disorder '1'; max_hfta_disorder '1';
75 SELECT TB_1000, UE_ID, GNB_ID,
76 UINT((LAST(timestamp) - FIRST(timestamp))) as connected_time
78 GROUP BY timestamp / 1000 as TB_1000, gUE_ID as UE_ID, gnb_id as GNB_ID
79 HAVING LAST(event_type) = 0
80 CLOSING_WHEN LAST(event_type) = 0 OR
81 ((TB_1000+1)*1000-LAST(timestamp))/1000.0 >= 3600
86 DEFINE{ query_name 'mc_connection_stats';
87 max_lfta_disorder '1'; max_hfta_disorder '1';
88 comment 'statistics about the length of dual connected sessions by gnb';
91 SELECT ($window*(TB+1))/1000 as TS, GNB_ID,
92 $window/1000.0 as measurementInterval, // standard_name
93 MIN(connected_time)/1000.0 as min_connected_time,
94 MAX(connected_time)/1000.0 as max_connected_time,
95 AVG(connected_time)/1000.0 as avg_connected_time,
96 quantile_of(connected_time, .05)/1000.0 as pctl_05_connected_time,
97 quantile_of(connected_time, .95)/1000.0 as pctl_95_connected_time,
99 sum((connected_time/1000.0)*(connected_time/1000.0)) - sum(connected_time/1000.0)*sum(connected_time/1000.0)/count(*)
100 ) / count(*) as stddev_connected_time
101 FROM mc_disconnected_ues
102 GROUP BY (TB_1000 * 1000) / $window as TB, GNB_ID
105 DEFINE{ query_name 'mc_disconnected_gtp_teids';
106 max_lfta_disorder '1'; max_hfta_disorder '1';
108 PARAM{ window uint; }
109 Select m.TB, m.gTP_TEID, d.GNB_ID, d.connected_time
110 LEFT_OUTER_JOIN from mc_disconnected_ues d, gnb_ueid_teid_map m
111 where d.GNB_ID=m.GNB_ID and d.UE_ID=m.id_SgNB_UE_X2AP_ID and
112 (d.TB_1000 * 1000) / $window = m.TB
115 DEFINE{ query_name 'mc_connection_stats_gtp_teid';
116 max_lfta_disorder '1'; max_hfta_disorder '1';
117 comment 'statistics about the length of dual connected sessions, by gtp_teid';
119 PARAM{ window uint; }
120 SELECT ($window*(TB+1))/1000 as TS, GNB_ID, gTP_TEID,
121 $window/1000.0 as measurementInterval, // standard_name
122 MIN(connected_time)/1000.0 as min_connected_time,
123 MAX(connected_time)/1000.0 as max_connected_time,
124 AVG(connected_time)/1000.0 as avg_connected_time,
125 quantile_of(connected_time, .05)/1000.0 as pctl_05_connected_time,
126 quantile_of(connected_time, .95)/1000.0 as pctl_95_connected_time,
128 sum((connected_time/1000.0)*(connected_time/1000.0)) - sum(connected_time/1000.0)*sum(connected_time/1000.0)/count(*)
129 ) / count(*) as stddev_connected_time
130 FROM mc_disconnected_gtp_teids
131 GROUP BY TB, GNB_ID, gTP_TEID
137 DEFINE{ query_name 'mc_connects_cnt';
138 max_lfta_disorder '1'; max_hfta_disorder '1';
139 comment 'number of DC connection requests, by GNB';
141 PARAM{ window uint; }
142 SELECT ($window*(TB+1))/1000 as TS, GNB_ID,
143 $window/1000.0 as measurementInterval, // standard_name
144 COUNT(*) as count_ue_connects
147 GROUP BY timestamp / $window as TB, gnb_id as GNB_ID
150 DEFINE{ query_name 'mc_connects_cnt_gtp_teid';
151 max_lfta_disorder '1'; max_hfta_disorder '1';
152 comment 'number of DC connection requests by UE';
154 PARAM{ window uint; }
155 SELECT ($window*(TB+1))/1000 as TS, GNB_ID, gTP_TEID,
156 $window/1000.0 as measurementInterval, // standard_name
157 COUNT(*) as count_ue_connects
158 FROM dc_events_gtp_teid
160 GROUP BY TB, gnb_id as GNB_ID, gTP_TEID
163 DEFINE{ query_name 'mc_disconnects_cnt';
164 max_lfta_disorder '1'; max_hfta_disorder '1';
165 comment 'number of DC connection releases';
167 PARAM{ window uint; }
168 SELECT ($window*(TB+1))/1000 as TS, GNB_ID,
169 $window/1000.0 as measurementInterval, // standard_name
170 COUNT(*) as count_ue_disconnects
173 GROUP BY timestamp / $window as TB, gnb_id as GNB_ID
176 DEFINE{ query_name 'mc_unique_ues';
177 max_lfta_disorder '1'; max_hfta_disorder '1';
179 PARAM{ window uint; }
180 SELECT TB, UE_ID, GNB_ID
182 GROUP BY timestamp / $window as TB, gUE_ID as UE_ID, gnb_id as GNB_ID
185 DEFINE{ query_name 'mc_unique_ue_cnt';
186 max_lfta_disorder '1'; max_hfta_disorder '1';
187 comment 'Number of distinct UEs making a DC request or release';
189 PARAM{ window uint; }
190 SELECT ($window*(TB+1))/1000 as TS, GNB_ID,
191 $window/1000.0 as measurementInterval, // standard_name
192 COUNT(*) as count_unique_ue