()
| 15 | var ModelRequestRateLimitMutex sync.RWMutex |
| 16 | |
| 17 | func ModelRequestRateLimitGroup2JSONString() string { |
| 18 | ModelRequestRateLimitMutex.RLock() |
| 19 | defer ModelRequestRateLimitMutex.RUnlock() |
| 20 | |
| 21 | jsonBytes, err := json.Marshal(ModelRequestRateLimitGroup) |
| 22 | if err != nil { |
| 23 | common.SysError("error marshalling model ratio: " + err.Error()) |
| 24 | } |
| 25 | return string(jsonBytes) |
| 26 | } |
| 27 | |
| 28 | func UpdateModelRequestRateLimitGroupByJSONString(jsonStr string) error { |
| 29 | ModelRequestRateLimitMutex.RLock() |
no test coverage detected