diff options
| author | 2024-04-22 08:59:30 +0000 | |
|---|---|---|
| committer | 2024-04-22 08:59:30 +0000 | |
| commit | 0db9e34b69434baba9e24e41b2a3992cc191b418 (patch) | |
| tree | 06cd949499f57d0da2c4e947e97280bc7bc1cde1 /vendor/github.com/KimMachineGun/automemlimit/README.md | |
| parent | [bugfix] Fix incorrect field name for status source, add helpful message (#2854) (diff) | |
| download | gotosocial-0db9e34b69434baba9e24e41b2a3992cc191b418.tar.xz | |
[chore]: Bump github.com/KimMachineGun/automemlimit from 0.5.0 to 0.6.0 (#2859)
Diffstat (limited to 'vendor/github.com/KimMachineGun/automemlimit/README.md')
| -rw-r--r-- | vendor/github.com/KimMachineGun/automemlimit/README.md | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/github.com/KimMachineGun/automemlimit/README.md b/vendor/github.com/KimMachineGun/automemlimit/README.md index c0e66d2a7..fa6c628f1 100644 --- a/vendor/github.com/KimMachineGun/automemlimit/README.md +++ b/vendor/github.com/KimMachineGun/automemlimit/README.md @@ -28,7 +28,8 @@ go get github.com/KimMachineGun/automemlimit@latest package main // By default, it sets `GOMEMLIMIT` to 90% of cgroup's memory limit. -// You can find more details of its behavior from the doc comment of memlimit.SetGoMemLimitWithEnv. +// This is equivalent to `memlimit.SetGoMemLimitWithOpts(memlimit.WithLogger(slog.Default()))` +// To disable logging, use `memlimit.SetGoMemLimitWithOpts` directly. import _ "github.com/KimMachineGun/automemlimit" ``` @@ -43,6 +44,7 @@ func init() { memlimit.SetGoMemLimitWithOpts( memlimit.WithRatio(0.9), memlimit.WithProvider(memlimit.FromCgroup), + memlimit.WithLogger(slog.Default()), ) memlimit.SetGoMemLimitWithOpts( memlimit.WithRatio(0.9), @@ -53,7 +55,6 @@ func init() { ), ), ) - memlimit.SetGoMemLimitWithEnv() memlimit.SetGoMemLimit(0.9) memlimit.SetGoMemLimitWithProvider(memlimit.Limit(1024*1024), 0.9) memlimit.SetGoMemLimitWithProvider(memlimit.FromCgroup, 0.9) |
