build(deps): bump github.com/KimMachineGun/automemlimit (#8971)

Bumps [github.com/KimMachineGun/automemlimit](https://github.com/KimMachineGun/automemlimit) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/KimMachineGun/automemlimit/releases)
- [Commits](https://github.com/KimMachineGun/automemlimit/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: github.com/KimMachineGun/automemlimit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
dependabot[bot]
2024-04-26 09:00:40 +02:00
committed by GitHub
co-authored by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
parent 0b1da66838
commit d3415a8c92
7 changed files with 86 additions and 32 deletions
+3 -2
View File
@@ -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)