add pprof
Some checks are pending
CI / Lint (push) Waiting to run
CI / Test (push) Waiting to run
CI / End-to-End (push) Waiting to run
CI / Publish Docker (push) Blocked by required conditions
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-09-16 12:02:14 +10:00
parent 32e3bc6e66
commit cfa9c45e56
2 changed files with 2 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import (
"context" "context"
"fmt" "fmt"
"log/slog" "log/slog"
_ "net/http/pprof"
"os" "os"
"runtime" "runtime"
"time" "time"

View File

@@ -64,6 +64,7 @@ func (h *Handler) VmDelete(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusInternalServerError) w.WriteHeader(http.StatusInternalServerError)
fmt.Fprintf(w, "Delete Request unsuccessful %s\n", err) fmt.Fprintf(w, "Delete Request unsuccessful %s\n", err)
} else { } else {
h.Logger.Debug("Processed VM Deletion event successfully")
w.WriteHeader(http.StatusOK) w.WriteHeader(http.StatusOK)
// TODO - return some JSON // TODO - return some JSON
fmt.Fprintf(w, "Processed VM Deletion event successfully") fmt.Fprintf(w, "Processed VM Deletion event successfully")