Skip to content

Commit

Permalink
Skip stats under error conditions. (#218)
Browse files Browse the repository at this point in the history
Signed-off-by: Ajay Lotan Thakur <[email protected]>
  • Loading branch information
thakurajayL authored Sep 1, 2024
1 parent fa77601 commit b8b7a4a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions stats/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ func readStats() {
case AUTH_REQ_IN:
logger.StatsLog.Infoln("Received Event: AUTH_REQ_IN: ", m)
t := popTrans(m.Id) // remove MSG in trans but use the time msg was received
if t == nil {
continue
}
m.T = t.T
ue := getUe(m.Supi)
ue.CReg.AuthReqInTime = m.T
Expand All @@ -190,6 +193,9 @@ func readStats() {
case SECM_CMD_IN:
logger.StatsLog.Infoln("Received Event: SECM_CMD_IN: ", m)
t := popTrans(m.Id) // remove MSG in trans but use the time msg was received
if t == nil {
continue
}
m.T = t.T
ue := getUe(m.Supi)
ue.CReg.SecMCmdInTime = m.T
Expand All @@ -202,6 +208,9 @@ func readStats() {
case ICS_REQ_IN:
logger.StatsLog.Infoln("Received Event: ICS_REQ_IN: ", m)
t := popTrans(m.Id) // remove MSG in trans but use the time msg was received
if t == nil {
continue
}
m.T = t.T
ue := getUe(m.Supi)
ue.CReg.ICSReqInTime = m.T
Expand All @@ -217,6 +226,9 @@ func readStats() {
case PDU_SESS_ACC_IN:
logger.StatsLog.Infoln("Received Event: PDU_SESS_ACC_IN: ", m)
t := popTrans(m.Id) // remove MSG in trans but use the time msg was received
if t == nil {
continue
}
m.T = t.T
ue := getUe(m.Supi)
ue.CPdu.PduSessAcceptIn = m.T
Expand All @@ -235,6 +247,8 @@ func readStats() {
case UE_CTX_CMD_IN:
logger.StatsLog.Infoln("Received Event: UE_CTX_CMD_IN: ", m)
t := popTrans(m.Id) // remove MSG in trans but use the time msg was received
if t == nil {
}
m.T = t.T
ue := getUe(m.Supi)
ue.CCtxrel.CtxRelCmdInTime = m.T
Expand All @@ -252,6 +266,9 @@ func readStats() {
case DEREG_ACC_IN:
logger.StatsLog.Infoln("Received Event: DEREG_ACC_IN: ", m)
t := popTrans(m.Id) // remove MSG in trans but use the time msg was received
if t == nil {
continue
}
m.T = t.T
ue := getUe(m.Supi)
ue.CDreg.DeregAccInTime = m.T
Expand All @@ -267,6 +284,9 @@ func readStats() {
case SVC_ACCEPT_IN:
logger.StatsLog.Infoln("Received Event: SVC_ACCEPT_IN: ", m)
t := popTrans(m.Id) // remove MSG in trans but use the time msg was received
if t == nil {
continue
}
m.T = t.T
ue := getUe(m.Supi)
ue.CSvc.ServiceAccInTime = m.T
Expand Down

0 comments on commit b8b7a4a

Please sign in to comment.