X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=mc-core%2Fmc%2Fqueries%2Frrcx_stats.gsql;h=cc32a69e52fe9058279eb19a8fc7b62923afd191;hb=6d6450ecce1ee0f937dd7f90f83451154abdf118;hp=5629680752cd65dcb7db1ae1fb59c19a20595cb4;hpb=31d238a2cba18b87e05a7d9b4820db2c5186c658;p=ric-app%2Fmc.git diff --git a/mc-core/mc/queries/rrcx_stats.gsql b/mc-core/mc/queries/rrcx_stats.gsql index 5629680..cc32a69 100644 --- a/mc-core/mc/queries/rrcx_stats.gsql +++ b/mc-core/mc/queries/rrcx_stats.gsql @@ -1,26 +1,32 @@ -DEFINE{ query_name 'rrcx_stats_neigh_cell'; } +DEFINE{ query_name 'rrcx_stats_serv_beam_cell'; + max_lfta_disorder '1'; max_hfta_disorder '1'; + comment 'statistics on ssb RSRP on the beams of serving cells, aggregated by gbn_id / cell ID, computed using rrc transfer'; +} PARAM{ window uint;} // rsrp, rsrq, sinr ranges are 0 .. 127 // to convert rsrp to dbm, subtract 157 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval, - physCellId as CELL_ID, + physCellId as CELL_ID, gnb_id as GNB_ID, count(*) as cnt, INT(min(rsrp))-INT(157) as min_rsrp, INT(quantile_of(rsrp, .05)) - INT(157) as pctl_05_rsrp, INT(median_of(rsrp)) - INT(157) as median_rsrp, INT(quantile_of(rsrp, .95)) - INT(157) as pctl_95_rsrp, sqrt( - sum( (FLOAT(rsrp)-157)*(FLOAT(rsrp)-157)) - - sum( (FLOAT(rsrp)-157) )*sum( (FLOAT(rsrp)-157) )/count(*) + sum( (rsrp-157.0)*(rsrp-157.0)) - + sum( rsrp-157.0 )*sum( rsrp-157.0 )/count(*) ) / count(*) as stddev_rsrp, INT(max(rsrp))-INT(157) as max_rsrp -from RRCXFER.neighbor_beam_csi -where schemaId = 5 and rsrp<128 -group by timestamp_ms/$window as tb, physCellId +from RRCXFER.serv_cell_beam_ssb +where rsrp<128 +group by timestamp_ms/$window as tb, physCellId, gnb_id ; -DEFINE{ query_name 'rrcx_stats_neigh_gnb'; } +DEFINE{ query_name 'rrcx_stats_serv_beam_gnb'; + max_lfta_disorder '1'; max_hfta_disorder '1'; + comment 'statistics on ssb RSRP on the beams of serving cells, aggregated by gbn_id / cell ID, computed using rrc transfer'; +} PARAM{ window uint;} // rsrp, rsrq, sinr ranges are 0 .. 127 // to convert rsrp to dbm, subtract 157 @@ -33,39 +39,122 @@ select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval, INT(median_of(rsrp)) - INT(157) as median_rsrp, INT(quantile_of(rsrp, .95)) - INT(157) as pctl_95_rsrp, sqrt( - sum( (FLOAT(rsrp)-157)*(FLOAT(rsrp)-157)) - - sum( (FLOAT(rsrp)-157) )*sum( (FLOAT(rsrp)-157) )/count(*) + sum( (rsrp-157.0)*(rsrp-157.0)) - + sum( rsrp-157.0 )*sum( rsrp-157.0 )/count(*) ) / count(*) as stddev_rsrp, INT(max(rsrp))-INT(157) as max_rsrp -from RRCXFER.neighbor_beam_csi -where schemaId = 5 and rsrp<128 +from RRCXFER.serv_cell_beam_ssb +where rsrp<128 group by timestamp_ms/$window as tb, gnb_id ; -DEFINE{ query_name 'rrcx_stats_serv_cell'; } +DEFINE{ query_name 'rrcx_stats_neighbor_beam_cell'; + max_lfta_disorder '1'; max_hfta_disorder '1'; + comment 'statistics on ssb RSRP on the beams of neighboring cells, aggregated by gbn_id / cell ID, computed using rrc transfer'; +} PARAM{ window uint;} // rsrp, rsrq, sinr ranges are 0 .. 127 // to convert rsrp to dbm, subtract 157 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval, - physCellId as CELL_ID, + physCellId as CELL_ID, gnb_id as GNB_ID, count(*) as cnt, INT(min(rsrp))-INT(157) as min_rsrp, INT(quantile_of(rsrp, .05)) - INT(157) as pctl_05_rsrp, INT(median_of(rsrp)) - INT(157) as median_rsrp, INT(quantile_of(rsrp, .95)) - INT(157) as pctl_95_rsrp, sqrt( - sum( (FLOAT(rsrp)-157)*(FLOAT(rsrp)-157)) - - sum( (FLOAT(rsrp)-157) )*sum( (FLOAT(rsrp)-157) )/count(*) + sum( (rsrp-157.0)*(rsrp-157.0)) - + sum( rsrp-157.0 )*sum( rsrp-157.0 )/count(*) + ) / count(*) as stddev_rsrp, + INT(max(rsrp))-INT(157) as max_rsrp +from RRCXFER.neighbor_beam_ssb +where rsrp<128 +group by timestamp_ms/$window as tb, physCellId, gnb_id +; + +DEFINE{ query_name 'rrcx_stats_neighbor_beam_gnb'; + max_lfta_disorder '1'; max_hfta_disorder '1'; + comment 'statistics on ssb RSRP on the beams of nrighboring cells, aggregated by gNB, computed using rrc transfer'; +} +PARAM{ window uint;} +// rsrp, rsrq, sinr ranges are 0 .. 127 +// to convert rsrp to dbm, subtract 157 + +select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval, + gnb_id as GNB_ID, + count(*) as cnt, + INT(min(rsrp))-INT(157) as min_rsrp, + INT(quantile_of(rsrp, .05)) - INT(157) as pctl_05_rsrp, + INT(median_of(rsrp)) - INT(157) as median_rsrp, + INT(quantile_of(rsrp, .95)) - INT(157) as pctl_95_rsrp, + sqrt( + sum( (rsrp-157.0)*(rsrp-157.0)) - + sum( rsrp-157.0 )*sum( rsrp-157.0 )/count(*) + ) / count(*) as stddev_rsrp, + INT(max(rsrp))-INT(157) as max_rsrp +from RRCXFER.neighbor_beam_ssb +where rsrp<128 +group by timestamp_ms/$window as tb, gnb_id +; + + +DEFINE{ query_name 'rrcx_stats_serv_cell'; + max_lfta_disorder '1'; max_hfta_disorder '1'; + comment 'statistics on the ssb rsrp of the serving cell, aggregated by gnb_id / cell id, computed using rrc transfer'; +} +PARAM{ window uint;} +// rsrp, rsrq, sinr ranges are 0 .. 127 +// to convert rsrp to dbm, subtract 157 + +select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval, + physCellId as CELL_ID, gnb_id as GNB_ID, + count(*) as cnt, + INT(min(rsrp))-INT(157) as min_rsrp, + INT(quantile_of(rsrp, .05)) - INT(157) as pctl_05_rsrp, + INT(median_of(rsrp)) - INT(157) as median_rsrp, + INT(quantile_of(rsrp, .95)) - INT(157) as pctl_95_rsrp, + sqrt( + sum( (rsrp-157.0)*(rsrp-157.0) ) - + sum( rsrp-157.0 )*sum( rsrp-157.0 )/count(*) ) / count(*) as stddev_rsrp, INT(max(rsrp))-INT(157) as max_rsrp from RRCXFER.serv_nr_cell -where schemaId = 1 and rsrp<128 -group by timestamp_ms/$window as tb, physCellId +where rsrp<128 +group by timestamp_ms/$window as tb, physCellId, gnb_id ; -DEFINE{ query_name 'rrcx_stats_serv_gnb'; } +DEFINE{ query_name 'rrcx_stats_neighbor_cell'; + max_lfta_disorder '1'; max_hfta_disorder '1'; + comment 'statistics on the ssb rsrp of the neighbor cells, aggregated by gnb_id / cell id, computed using rrc transfer'; +} +PARAM{ window uint;} +// rsrp, rsrq, sinr ranges are 0 .. 127 +// to convert rsrp to dbm, subtract 157 + +select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval, + physCellId as CELL_ID, gnb_id as GNB_ID, + count(*) as cnt, + INT(min(rsrp))-INT(157) as min_rsrp, + INT(quantile_of(rsrp, .05)) - INT(157) as pctl_05_rsrp, + INT(median_of(rsrp)) - INT(157) as median_rsrp, + INT(quantile_of(rsrp, .95)) - INT(157) as pctl_95_rsrp, + sqrt( + sum( (rsrp-157.0)*(rsrp-157.0)) - + sum( rsrp-157.0 )*sum( rsrp-157.0 )/count(*) + ) / count(*) as stddev_rsrp, + INT(max(rsrp))-INT(157) as max_rsrp +from RRCXFER.nr_neighbor +where rsrp<128 +group by timestamp_ms/$window as tb, physCellId, gnb_id +; + + +DEFINE{ query_name 'rrcx_stats_serv_gnb'; + max_lfta_disorder '1'; max_hfta_disorder '1'; + comment 'statistics on the ssb srp of the serving cell, aggregated by gNB, computed using rrc transfer'; +} PARAM{ window uint;} // rsrp, rsrq, sinr ranges are 0 .. 127 // to convert rsrp to dbm, subtract 157 @@ -78,11 +167,37 @@ select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval, INT(median_of(rsrp)) - INT(157) as median_rsrp, INT(quantile_of(rsrp, .95)) - INT(157) as pctl_95_rsrp, sqrt( - sum( (FLOAT(rsrp)-157)*(FLOAT(rsrp)-157)) - - sum( (FLOAT(rsrp)-157) )*sum( (FLOAT(rsrp)-157) )/count(*) + sum( (rsrp-157.0)*(rsrp-157.0)) - + sum( rsrp-157.0 )*sum( rsrp-157.0 )/count(*) ) / count(*) as stddev_rsrp, INT(max(rsrp))-INT(157) as max_rsrp from RRCXFER.serv_nr_cell -where schemaId = 1 and rsrp<128 +where rsrp<128 +group by timestamp_ms/$window as tb, gnb_id +; + +DEFINE{ query_name 'rrcx_stats_neighbor_gnb'; + max_lfta_disorder '1'; max_hfta_disorder '1'; + comment 'statistics on the ssb rsrp of the neighbor cells, aggregated by gNB, computed using rrc transfer'; +} +PARAM{ window uint;} +// rsrp, rsrq, sinr ranges are 0 .. 127 +// to convert rsrp to dbm, subtract 157 + +select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval, + gnb_id as GNB_ID, + count(*) as cnt, + INT(min(rsrp))-INT(157) as min_rsrp, + INT(quantile_of(rsrp, .05)) - INT(157) as pctl_05_rsrp, + INT(median_of(rsrp)) - INT(157) as median_rsrp, + INT(quantile_of(rsrp, .95)) - INT(157) as pctl_95_rsrp, + sqrt( + sum( (rsrp-157.0)*(rsrp-157.0)) - + sum( rsrp-157.0 )*sum( rsrp-157.0 )/count(*) + ) / count(*) as stddev_rsrp, + INT(max(rsrp))-INT(157) as max_rsrp +from RRCXFER.nr_neighbor +//where schemaId = 4 and rsrp<128 +where rsrp<128 group by timestamp_ms/$window as tb, gnb_id