(w http.ResponseWriter, r *http.Request)
| 20 | ) |
| 21 | |
| 22 | func getPythonStatus(w http.ResponseWriter, r *http.Request) { |
| 23 | w.Header().Set("Content-Type", "application/json") |
| 24 | pyStats, err := python.GetPythonInterpreterMemoryUsage() |
| 25 | if err != nil { |
| 26 | log.Warnf("Error getting python stats: %s\n", err) // or something like this |
| 27 | http.Error(w, err.Error(), 500) |
| 28 | } |
| 29 | |
| 30 | j, _ := json.Marshal(pyStats) |
| 31 | w.Write(j) |
| 32 | } |
no test coverage detected
searching dependent graphs…