memory

package
v0.0.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2022 License: UPL-1.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const UnitG = 1024 * UnitM

UnitG is 1 Gigabyte

View Source
const UnitK = 1024

UnitK is 1 Kilobyte

View Source
const UnitM = 1024 * UnitK

UnitM is 1 Megabyte

Variables

This section is empty.

Functions

func FormatJvmHeapMinMax

func FormatJvmHeapMinMax(heap string) string

FormatJvmHeapMinMax returns the identical min and max JVM heap setting in the format Java expects like "-Xms2g -Xmx2g"

func FormatJvmHeapSize

func FormatJvmHeapSize(sizeB int64) string

FormatJvmHeapSize formats the string based on the size of the input value Return whole number (1200M not 1.2G) Return a minimum magnitude of K

func PodMemToJvmHeap

func PodMemToJvmHeap(size string) (string, error)

PodMemToJvmHeap converts a pod resource memory (.5Gi) to the JVM heap setting in the format java expects (e.g. 512m)

func PodMemToJvmHeapArgs

func PodMemToJvmHeapArgs(size, defaultValue string) (string, error)

PodMemToJvmHeapArgs converts a pod resource memory to the JVM heap setting with same min/max, e.g: "-Xms512m -Xmx512m"

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL