Expand description
Memory and CPU value parsers shared by the engine and tests. Memory and CPU value parsers shared by the engine and tests.
Functionsยง
- parse_
cpus - Parse a CPU count string like
"0.5","1","2.5"into nano-CPUs (1 CPU = 1_000_000_000 nano-CPUs). - parse_
duration_ nanos - Parse a duration like
5s,200ms,1m,1hinto nanoseconds (used by Docker healthcheck APIs). - parse_
duration_ secs - Parse a duration like
5s,200ms,1m,1hinto seconds (rounded down). - parse_
memory - Parse a memory string like
128m,1G,1024k,512b, or a bare number-of-bytes.