X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=mc-core%2Fmc%2Fqueries%2Fhandovers.gsql;h=6773e708e9ea947afb66c16b9af78cac725e154d;hb=HEAD;hp=a899311d8fb43df24999188e1e2e04f0e74ac22a;hpb=6d6450ecce1ee0f937dd7f90f83451154abdf118;p=ric-app%2Fmc.git diff --git a/mc-core/mc/queries/handovers.gsql b/mc-core/mc/queries/handovers.gsql index a899311..6773e70 100644 --- a/mc-core/mc/queries/handovers.gsql +++ b/mc-core/mc/queries/handovers.gsql @@ -33,16 +33,16 @@ from handovers_join group by TB, gTP_TEID, gnb_id as GNB_ID ; -DEFINE{ query_name 'distinct_users'; +DEFINE{ query_name 'requests_per_gtp_teid'; max_lfta_disorder '1'; max_hfta_disorder '1'; - comment 'Number of users based on distinct gTP_TEIDs seen'; + comment 'Number of sgnb addition requests requests per gTP_TEID'; } PARAM{ window uint;} Select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval, - gnb_id as GNB_ID, - count(*) as num_users + gnb_id as GNB_ID, gTP_TEID, + count(*) as n_requests from SGNB_ADDITION_REQ.sgnb_addreq_gtp_teid -group by timestamp_ms/$window as tb, gnb_id +group by timestamp_ms/$window as tb, gnb_id, gTP_TEID ; DEFINE{query_name 'gnb_ueid_teid_map'; @@ -111,5 +111,29 @@ Select ($window*(TB+1))/1000 as TS, GNB_ID, gTP_TEID, sum(cnt) as n_handovers from ho_count_events_gtp_teid group by TB, GNB_ID, gTP_TEID +; + +DEFINE{query_name 'gtp_teid_pci_join'; + max_lfta_disorder '1'; max_hfta_disorder '1'; + comment 'Join erab_stats_join with gnb_ueid_cellid_map to create data stream for requests_per_gtp_teid_cell'; +} +PARAM{ window uint; } +select M.TB, M.GNB_ID, M.physCellId, g.gTP_TEID +INNER_JOIN from SGNB_ADDITION_REQ.sgnb_addreq_gtp_teid g, gnb_ueid_cellid_map M +Where g.gnb_id=M.GNB_ID and g.id_MeNB_UE_X2AP_ID=M.id_MeNB_UE_X2AP_ID + and g.timestamp_ms/$window=M.TB +; + +DEFINE{ query_name 'requests_per_gtp_teid_pci'; + max_lfta_disorder '1'; max_hfta_disorder '1'; + comment 'Number of sgnb addition requests requests per gTP_TEID'; +} +PARAM{ window uint;} +Select ($window*(TB+1))/1000 as TS, $window/1000.0 as measurementInterval, + GNB_ID, gTP_TEID, physCellId, + count(*) as n_requests +from gtp_teid_pci_join +group by TB, GNB_ID, gTP_TEID, physCellId +