()
| 404 | } |
| 405 | |
| 406 | func CompletionRatio2JSONString() string { |
| 407 | CompletionRatioMutex.RLock() |
| 408 | defer CompletionRatioMutex.RUnlock() |
| 409 | |
| 410 | jsonBytes, err := json.Marshal(CompletionRatio) |
| 411 | if err != nil { |
| 412 | common.SysError("error marshalling completion ratio: " + err.Error()) |
| 413 | } |
| 414 | return string(jsonBytes) |
| 415 | } |
| 416 | |
| 417 | func UpdateCompletionRatioByJSONString(jsonStr string) error { |
| 418 | CompletionRatioMutex.Lock() |
no test coverage detected