Andrey Smirnov bdcc9321b6
fix: reduce memory dashboard usage
Many small changes, memory reduction measured to be aroun -20MiB.

Reduce cgroup memory limit.

Changes:

* limit updates to 2fps
* batch log updates
* reuse/maps slices to reduce allocations

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-04-17 19:27:24 +04:00

25 lines
550 B
Go

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package dashboard
import (
"context"
"log"
"github.com/siderolabs/go-debug"
)
func runDebugServer(ctx context.Context) {
const debugAddr = ":9984"
debugLogFunc := func(msg string) {
log.Print(msg)
}
if err := debug.ListenAndServe(ctx, debugAddr, debugLogFunc); err != nil {
log.Fatalf("failed to start debug server: %s", err)
}
}