mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
feat(diagnostics): add pprof profiling (#1627)
* feat(tracing): enable tracing * of course the squash didn't work. * gah. always nice when there's 40 csets. * might as well. * refactor: tracing to diagnostics * feat: add note about the magic methods from pprof --------- Co-authored-by: ze0s <ze0s@riseup.net>
This commit is contained in:
parent
5ae4ed3604
commit
65d25c56c9
4 changed files with 63 additions and 0 deletions
|
@ -14,6 +14,7 @@ import (
|
|||
"github.com/autobrr/autobrr/internal/auth"
|
||||
"github.com/autobrr/autobrr/internal/config"
|
||||
"github.com/autobrr/autobrr/internal/database"
|
||||
"github.com/autobrr/autobrr/internal/diagnostics"
|
||||
"github.com/autobrr/autobrr/internal/download_client"
|
||||
"github.com/autobrr/autobrr/internal/events"
|
||||
"github.com/autobrr/autobrr/internal/feed"
|
||||
|
@ -64,6 +65,8 @@ func main() {
|
|||
// init dynamic config
|
||||
cfg.DynamicReload(log)
|
||||
|
||||
diagnostics.SetupProfiling(cfg.Config.ProfilingEnabled, cfg.Config.ProfilingHost, cfg.Config.ProfilingPort)
|
||||
|
||||
// setup server-sent-events
|
||||
serverEvents := sse.New()
|
||||
serverEvents.CreateStreamWithOpts("logs", sse.StreamOpts{MaxEntries: 1000, AutoReplay: true})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue