X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=mc-core%2Fmc%2Fqueries%2Fthroughput.gsql;h=c55993748d5c208eda6be71432d9ca14cf9efd1b;hb=1d09ce755485acb017fab3c6cb3f794720b12836;hp=7f40ffe43558ac961d6ac1c9492e61b5443c9042;hpb=6d6450ecce1ee0f937dd7f90f83451154abdf118;p=ric-app%2Fmc.git diff --git a/mc-core/mc/queries/throughput.gsql b/mc-core/mc/queries/throughput.gsql index 7f40ffe..c559937 100644 --- a/mc-core/mc/queries/throughput.gsql +++ b/mc-core/mc/queries/throughput.gsql @@ -1,7 +1,7 @@ -DEFINE{query_name 'throughput_ue'; +DEFINE{query_name 'throughput_session'; extra_keys 'TS'; max_lfta_disorder '1'; max_hfta_disorder '1'; - comment 'throughput experienced by UE over a measurement interval. *Active* throughput is throughput while actively downloading, *average* averages bytes transfered over the measurement interval'; + comment 'throughput experienced by UE session over a measurement interval. *Active* throughput is throughput while actively downloading, *average* averages bytes transfered over the measurement interval'; } PARAM{ window uint; } select ($window*(TB+1))/1000 as TS, e_RAB_ID, UE_ID, GNB_ID, @@ -36,9 +36,9 @@ from RATDATAUSAGE.rat_data_usage group by id_SgNB_UE_X2AP_ID as GNB_UE_ID, gnb_id as GNB_ID, e_RAB_ID, timestamp_ms/$window as TB ; -DEFINE{query_name 'throughput_ue_gtp_teid_join'; +DEFINE{query_name 'throughput_session_gtp_teid_join'; max_lfta_disorder '1'; max_hfta_disorder '1'; - comment 'Join throughput_ue with gnb_ueid_teid_map to get the gtp_teid, a followup query will reaggregate'; + comment 'Join throughput_session with gnb_ueid_teid_map to get the gtp_teid, a followup query will reaggregate'; } PARAM{ window uint; } select T.TB, T.GNB_UE_ID, T.GNB_ID, T.e_RAB_ID, M.gTP_TEID, @@ -60,10 +60,39 @@ select ($window*(TB+1))/1000 as TS, gTP_TEID, GNB_ID, sum(sum_usageCountDL) / UMAX( max(max_end_ts) - min(min_start_ts), 1) as average_throughput, min( min_throughput ) as min_throughput, max( max_throughput ) as max_throughput -from throughput_ue_gtp_teid_join +from throughput_session_gtp_teid_join group by GNB_ID, gTP_TEID, TB ; +DEFINE{query_name 'throughput_session_pci_join'; + max_lfta_disorder '1'; max_hfta_disorder '1'; + comment 'Join throughput_session with gnb_ueid_teid_map to get the gtp_teid, a followup query will reaggregate'; +} +PARAM{ window uint; } +select T.TB, T.GNB_UE_ID, T.GNB_ID, T.e_RAB_ID, M.physCellId, + T.sum_usageCountDL, T.sum_duration, T.max_end_ts, T.min_start_ts, + T.min_throughput, max_throughput +INNER_JOIN from prelim_throughput_gtp_teid T, gnb_ueid_cellid_map M +Where T.GNB_ID=M.GNB_ID and T.GNB_UE_ID=M.id_SgNB_UE_X2AP_ID and T.TB=M.TB +; + +DEFINE{query_name 'throughput_pci'; + extra_keys 'TS'; + max_lfta_disorder '1'; max_hfta_disorder '1'; + comment 'throughput experienced by UE, as determined by the gtp_teid, over a measurement interval. *Active* throughput is throughput while actively downloading, *average* averages bytes transfered over the measurement interval'; +} +PARAM{ window uint; } +select ($window*(TB+1))/1000 as TS, physCellId, GNB_ID, + $window/1000.0 as measurementInterval, + sum(sum_usageCountDL) / UMAX( sum(sum_duration), 1) as active_throughput, + sum(sum_usageCountDL) / UMAX( max(max_end_ts) - min(min_start_ts), 1) as average_throughput, + min( min_throughput ) as min_throughput, + max( max_throughput ) as max_throughput +from throughput_session_pci_join +group by GNB_ID, physCellId, TB +; + + DEFINE{query_name 'throughput_gtp_teid_bearer'; extra_keys 'TS'; max_lfta_disorder '1'; max_hfta_disorder '1'; @@ -76,7 +105,7 @@ select ($window*(TB+1))/1000 as TS, gTP_TEID, GNB_ID, e_RAB_ID, sum(sum_usageCountDL) / UMAX( max(max_end_ts) - min(min_start_ts), 1) as average_throughput, min( min_throughput ) as min_throughput, max( max_throughput ) as max_throughput -from throughput_ue_gtp_teid_join +from throughput_session_gtp_teid_join group by GNB_ID, gTP_TEID, e_RAB_ID, TB ; @@ -153,13 +182,13 @@ CLOSING_WHEN ((TB+1)*$window-LAST(timestamp_ms))/1000.0 >= 3600 -- CLOSING_WHEN ((TB+1)*$window-LAST(timestamp_ms))/1000.0 >= 3600 -- ; -DEFINE{query_name 'throughput_ue_userclass_join'; +DEFINE{query_name 'throughput_session_userclass_join'; max_lfta_disorder '1'; max_hfta_disorder '1'; - comment 'Join throughput_ue with gnb_ueid_teid_map to get the gtp_tied, a followup query will reaggregate'; + comment 'Join throughput_session with gnb_ueid_teid_map to get the gtp_tied, a followup query will reaggregate'; } PARAM{ window uint; } -select T.TB, T.GNB_UE_ID, T.GNB_ID, - EQ(qCI, 9)*EQ(M.ARP, 15) + 2*EQ(qCI, 8)*EQ(M.ARP, 15) as class, +select T.TB, T.GNB_UE_ID, T.GNB_ID, M.qCI, M.ARP, M.id_SgNB_UE_X2AP_ID, + EQ(qCI, 9)*EQ(M.ARP, 15) + 2*EQ(qCI, 9)*EQ(M.ARP, 14) as class, T.sum_usageCountDL, T.sum_duration, T.max_end_ts, T.min_start_ts, T.min_throughput, max_throughput INNER_JOIN from prelim_throughput_gtp_teid T, gnb_ueid_qci_arp_map M @@ -179,11 +208,38 @@ select ($window*(TB+1))/1000 as TS, GNB_ID, class as CLASS, sum(sum_usageCountDL) / UMAX( max(max_end_ts) - min(min_start_ts), 1) as average_throughput, min( min_throughput ) as min_throughput, max( max_throughput ) as max_throughput -from throughput_ue_userclass_join -//where class>0 +from throughput_session_userclass_join +-- where class>0 group by TB, GNB_ID, class ; +DEFINE{query_name 'throughput_group_pci_join'; + max_lfta_disorder '1'; max_hfta_disorder '1'; + comment 'Join throughput_session with gnb_ueid_teid_map to get the gtp_teid, a followup query will reaggregate'; +} +PARAM{ window uint; } +select T.TB, T.GNB_UE_ID, T.GNB_ID, T.qCI, T.ARP, M.physCellId, + T.sum_usageCountDL, T.sum_duration, T.max_end_ts, T.min_start_ts, + T.min_throughput, max_throughput +INNER_JOIN from throughput_session_userclass_join T, gnb_ueid_cellid_map M +Where T.GNB_ID=M.GNB_ID and T.GNB_UE_ID=M.id_SgNB_UE_X2AP_ID and T.TB=M.TB +; + +DEFINE{query_name 'throughput_userclass_pci'; + extra_keys 'TS'; + max_lfta_disorder '1'; max_hfta_disorder '1'; + comment 'throughput experienced by UE, rolled up into user classes, over a measurement interval. Class A (qci=9, arp=15) is class=1 and Class B (qci=8, arp=15) is class=2. *Active* throughput is throughput while actively downloading, *average* averages bytes transfered over the measurement interval'; +} +PARAM{ window uint; } +select ($window*(TB+1))/1000 as TS, GNB_ID, physCellId, qCI, ARP, + $window/1000.0 as measurementInterval, + sum(sum_usageCountDL) / UMAX( sum(sum_duration), 1) as active_throughput, + sum(sum_usageCountDL) / UMAX( max(max_end_ts) - min(min_start_ts), 1) as average_throughput, + min( min_throughput ) as min_throughput, + max( max_throughput ) as max_throughput +from throughput_group_pci_join +group by TB, GNB_ID, physCellId, qCI, ARP +; DEFINE{query_name 'throughput_rollup'; @@ -203,7 +259,7 @@ select TS, e_RAB_ID, GNB_ID, quantile_of( UINT(active_throughput), .50) as active_throughput_percentile_50, avg( active_throughput) as average_active_throughput, quantile_of( UINT(active_throughput), .95) as active_throughput_percentile_95 -from throughput_ue +from throughput_session group by TS, e_RAB_ID, GNB_ID ; @@ -231,3 +287,4 @@ from RATDATAUSAGE.rat_data_usage group by e_RAB_ID, gnb_id as GNB_ID, timestamp_ms/$window as TB +