@@ -36,10 +36,10 @@ describe("aggregateCsv", () => {
3636
3737 it ( "should group by timestamp" , ( ) => {
3838 const csvFile = makeSparseCsv ( tmpDir , [
39- { timestamp_raw : "100" , "LTE. ServingCell.Rsrp" : "-95.0" } ,
40- { timestamp_raw : "100" , "LTE. ServingCell.RsSinr" : "14.0" } ,
41- { timestamp_raw : "101" , "LTE. ServingCell.Rsrp" : "-100.0" } ,
42- { timestamp_raw : "101" , "LTE. ServingCell.Rsrq" : "-9.0" } ,
39+ { timestamp_raw : "100" , "Radio.Lte. ServingCell[8] .Rsrp" : "-95.0" } ,
40+ { timestamp_raw : "100" , "Radio.Lte. ServingCell[8] .RsSinr" : "14.0" } ,
41+ { timestamp_raw : "101" , "Radio.Lte. ServingCell[8] .Rsrp" : "-100.0" } ,
42+ { timestamp_raw : "101" , "Radio.Lte. ServingCell[8] .Rsrq" : "-9.0" } ,
4343 ] ) ;
4444 const result = aggregateCsv ( csvFile ) ;
4545
@@ -56,14 +56,14 @@ describe("aggregateCsv", () => {
5656 const csvFile = makeSparseCsv ( tmpDir , [
5757 {
5858 timestamp_raw : "100" ,
59- "LTE. ServingCell.Rsrp" : "-95.0" ,
60- "LTE. ServingCell.Rsrq" : "-9.0" ,
61- "LTE. ServingCell.Rssi" : "-74.0" ,
62- "LTE. ServingCell.RsSinr" : "14.0" ,
63- "LTE. ServingCell.Pci" : "253" ,
64- "LTE. ServingCell.DL .Earfcn" : "3350" ,
65- "Common.DL .Throughput" : "500.0" ,
66- "Common.UL .Throughput" : "100.0" ,
59+ "Radio.Lte. ServingCell[8] .Rsrp" : "-95.0" ,
60+ "Radio.Lte. ServingCell[8] .Rsrq" : "-9.0" ,
61+ "Radio.Lte. ServingCell[8] .Rssi" : "-74.0" ,
62+ "Radio.Lte. ServingCell[8] .RsSinr" : "14.0" ,
63+ "Radio.Lte. ServingCell[8] .Pci" : "253" ,
64+ "Radio.Lte. ServingCell[8].Downlink .Earfcn" : "3350" ,
65+ "Pocket.Radio. Common.Downlink .Throughput" : "500.0" ,
66+ "Pocket.Radio. Common.Uplink .Throughput" : "100.0" ,
6767 "Location.Latitude" : "-34.035" ,
6868 "Location.Longitude" : "151.085" ,
6969 "Location.Altitude" : "73.7" ,
@@ -90,8 +90,8 @@ describe("aggregateCsv", () => {
9090 const csvFile = makeSparseCsv ( tmpDir , [
9191 {
9292 timestamp_raw : "100" ,
93- "MRDC. Cell.Rsrp" : "-103.0" ,
94- "MRDC. Cell.Sinr" : "12.0" ,
93+ "Radio.Common.Mrdc. Cell[64] .Rsrp" : "-103.0" ,
94+ "Radio.Common.Mrdc. Cell[64] .Sinr" : "12.0" ,
9595 } ,
9696 ] ) ;
9797 const result = aggregateCsv ( csvFile , undefined , { minFields : 1 } ) ;
@@ -103,7 +103,7 @@ describe("aggregateCsv", () => {
103103
104104 it ( "should filter by min_fields" , ( ) => {
105105 const csvFile = makeSparseCsv ( tmpDir , [
106- { timestamp_raw : "100" , "LTE. ServingCell.Rsrp" : "-95.0" } ,
106+ { timestamp_raw : "100" , "Radio.Lte. ServingCell[8] .Rsrp" : "-95.0" } ,
107107 { timestamp_raw : "101" } ,
108108 ] ) ;
109109
@@ -118,8 +118,8 @@ describe("aggregateCsv", () => {
118118 const csvFile = makeSparseCsv ( tmpDir , [
119119 {
120120 timestamp_raw : "100" ,
121- "LTE. ServingCell.Rsrp" : "-95.0" ,
122- "LTE. ServingCell.RsSinr" : "14.0" ,
121+ "Radio.Lte. ServingCell[8] .Rsrp" : "-95.0" ,
122+ "Radio.Lte. ServingCell[8] .RsSinr" : "14.0" ,
123123 } ,
124124 ] ) ;
125125 const output = join ( tmpDir , "output.csv" ) ;
@@ -137,7 +137,7 @@ describe("aggregateCsv", () => {
137137
138138 it ( "should handle empty input" , ( ) => {
139139 const csvFile = join ( tmpDir , "empty.csv" ) ;
140- writeFileSync ( csvFile , "timestamp_raw,LTE. ServingCell.Rsrp\n" ) ;
140+ writeFileSync ( csvFile , "timestamp_raw,Radio.Lte. ServingCell[8] .Rsrp\n" ) ;
141141 const result = aggregateCsv ( csvFile ) ;
142142 expect ( result ) . toEqual ( [ ] ) ;
143143 } ) ;
@@ -156,10 +156,13 @@ describe("aggregateToRfCsv", () => {
156156
157157 it ( "should write with extra fields" , ( ) => {
158158 const csvFile = join ( tmpDir , "sparse.csv" ) ;
159- writeFileSync ( csvFile , "timestamp_raw,LTE.ServingCell.Rsrp,Wifi.Cell.Rssi\n100,-95.0,-87\n" ) ;
159+ writeFileSync (
160+ csvFile ,
161+ "timestamp_raw,Radio.Lte.ServingCell[8].Rsrp,Radio.Wifi.Cell[64].Rssi\n100,-95.0,-87\n" ,
162+ ) ;
160163 const output = join ( tmpDir , "rf.csv" ) ;
161164 const result = aggregateToRfCsv ( csvFile , output , {
162- extraFields : { WIFI_RSSI : [ "Wifi.Cell.Rssi" ] } ,
165+ extraFields : { WIFI_RSSI : [ "Radio. Wifi.Cell[64] .Rssi" ] } ,
163166 } ) ;
164167
165168 expect ( result ) . toBe ( output ) ;
0 commit comments