mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-23 23:10:26 +08:00
实现基础的统计指标
This commit is contained in:
12
internal/db/models/metric_stat_model_ext.go
Normal file
12
internal/db/models/metric_stat_model_ext.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package models
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// DecodeKeys 解析Key
|
||||
func (this *MetricStat) DecodeKeys() []string {
|
||||
var result []string
|
||||
if len(this.Keys) > 0 {
|
||||
_ = json.Unmarshal([]byte(this.Keys), &result)
|
||||
}
|
||||
return result
|
||||
}
|
||||
Reference in New Issue
Block a user