From 526b6db1c27412c9ad02857c067c51d70b810c08 Mon Sep 17 00:00:00 2001 From: Tory Wheelwright Date: Thu, 28 Mar 2024 06:40:41 -0400 Subject: [PATCH 1/3] Add pprof endpoints --- main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.go b/main.go index bcc67a47..0d96e844 100644 --- a/main.go +++ b/main.go @@ -6,6 +6,7 @@ import ( "encoding/json" stdlog "log" "net/http" + "net/http/pprof" "os" "os/signal" "strings" @@ -257,5 +258,11 @@ func makeHTTPServer(clients []redis.UniversalClient, mongo *mongo.Client) *http. mux.Handle("/metrics", promhttp.Handler()) + mux.HandleFunc("/debug/pprof/", pprof.Index) + mux.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline) + mux.HandleFunc("/debug/pprof/profile", pprof.Profile) + mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol) + mux.HandleFunc("/debug/pprof/trace", pprof.Trace) + return &http.Server{Addr: config.HTTPServerAddr(), Handler: mux} } From 7cf963983f9dff57e36fac04531a707595a3f108 Mon Sep 17 00:00:00 2001 From: Tory Wheelwright Date: Thu, 28 Mar 2024 09:48:26 -0400 Subject: [PATCH 2/3] empty From 8bba4f87fae714ca9ffe34d2499cb42696f4eca1 Mon Sep 17 00:00:00 2001 From: Tory Wheelwright Date: Thu, 28 Mar 2024 10:30:23 -0400 Subject: [PATCH 3/3] bump version --- default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/default.nix b/default.nix index b827de30..bd1dc4ab 100644 --- a/default.nix +++ b/default.nix @@ -2,7 +2,7 @@ buildGoModule { pname = "oplogtoredis"; - version = "3.1.0"; + version = "3.2.0"; src = builtins.path { path = ./.; }; postInstall = '' @@ -10,7 +10,7 @@ buildGoModule { # update: set value to an empty string and run `nix build`. This will download Go, fetch the dependencies and calculates their hash. vendorHash = "sha256-ceToA2DC1bhmg9WIeNSAfoNoU7sk9PrQqgqt5UbpivQ="; - + nativeBuildInputs = [ installShellFiles ]; doCheck = false; doInstallCheck = false;