Skip to content

Commit

Permalink
Merge pull request #64 from gab-arrobo/gofmt-report-card
Browse files Browse the repository at this point in the history
Address gofmt lint issue and added GO report card
  • Loading branch information
gab-arrobo authored May 30, 2024
2 parents aff920b + 316ab12 commit 9f58903
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SPDX-FileCopyrightText: 2022-present Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

[![Go Report Card](https://goreportcard.com/badge/github.com/omec-project/metricfunc)](https://goreportcard.com/report/github.com/omec-project/metricfunc)

# Metric Function

Expand Down Expand Up @@ -34,4 +34,4 @@ For more details about the Grafana Dashboard, please refer- https://docs.aetherp

For more details about the Metric-Function, please refer- https://docs.sd-core.opennetworking.org/master/design/design-metricfunc.html


6 changes: 3 additions & 3 deletions api/apiserver/api_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ func GetNfStatusAll(c *gin.Context) {
c.JSON(http.StatusNotFound, gin.H{})
}

//Gives summary stats for any service
// Gives summary stats for any service
func GetNfServiceStatsSummary(c *gin.Context) {

}

//Gives detail stats of any service
// Gives detail stats of any service
func GetNfServiceStatsDetail(c *gin.Context) {
nfType := c.Params.ByName("type")

Expand All @@ -112,7 +112,7 @@ func GetNfServiceStatsDetail(c *gin.Context) {
c.JSON(http.StatusNotFound, gin.H{})
}

//Gives summary of all services
// Gives summary of all services
func GetNfServiceStatsAll(c *gin.Context) {
}

Expand Down
4 changes: 2 additions & 2 deletions internal/promclient/promclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (ps *PromStats) register() error {
return nil
}

//PushCoreSubData increments message level stats
// PushCoreSubData increments message level stats
func PushCoreSubData(imsi, ip_addr, state, smf_ip, dnn, slice, upf string) {
logger.PromLog.Debugf("adding subscriber data [%v, %v, %v, %v, %v, %v %v ]", imsi, ip_addr, state, smf_ip, dnn, slice, upf)
promStats.coreSub.WithLabelValues(imsi, "", state, smf_ip, dnn, slice, upf).Inc()
Expand All @@ -108,7 +108,7 @@ func DeleteCoreSubData(imsi, ip_addr, state, smf_ip, dnn, slice, upf string) {
promStats.coreSub.DeleteLabelValues(imsi, "", state, smf_ip, dnn, slice, upf)
}

//SetSessStats maintains Session level stats
// SetSessStats maintains Session level stats
func SetSmfSessStats(smfIp, slice, dnn, upf string, count uint64) {
logger.PromLog.Debugf("setting smf session count [%v] with labels [smfIp:%v, slice:%v, dnn:%v, upf:%v ]", count, smfIp, slice, dnn, upf)
promStats.smfSessions.WithLabelValues("", "", "", "").Set(float64(count))
Expand Down

0 comments on commit 9f58903

Please sign in to comment.