()
| 43 | } |
| 44 | |
| 45 | func GroupRatio2JSONString() string { |
| 46 | groupRatioMutex.RLock() |
| 47 | defer groupRatioMutex.RUnlock() |
| 48 | |
| 49 | jsonBytes, err := json.Marshal(groupRatio) |
| 50 | if err != nil { |
| 51 | common.SysError("error marshalling model ratio: " + err.Error()) |
| 52 | } |
| 53 | return string(jsonBytes) |
| 54 | } |
| 55 | |
| 56 | func UpdateGroupRatioByJSONString(jsonStr string) error { |
| 57 | groupRatioMutex.Lock() |
no test coverage detected