add metric in mode

v4
vinllen 6 years ago
parent caec047d10
commit bf187cf9fc
  1. 5
      src/redis-shake/metric/variables.go

@ -34,7 +34,10 @@ type MetricRest struct {
} }
func NewMetricRest() []MetricRest { func NewMetricRest() []MetricRest {
detailMapList := runner.GetDetailedInfo().([]map[string]interface{}) var detailMapList []map[string]interface{}
if rawInfo := runner.GetDetailedInfo(); rawInfo != nil {
detailMapList = runner.GetDetailedInfo().([]map[string]interface{})
}
if detailMapList == nil || len(detailMapList) == 0 { if detailMapList == nil || len(detailMapList) == 0 {
return []MetricRest{ return []MetricRest{
{ {

Loading…
Cancel
Save