memory_usage_parser

Function memory_usage_parser 

Source
pub fn memory_usage_parser(arg: &str) -> Result<MemoryUsage>
Expand description

Parses a batch size.

This function accepts either a number (possibly followed by a SI or NIST multiplier k, M, G, T, P, ki, Mi, Gi, Ti, or Pi), or a percentage (followed by a %) that is interpreted as a percentage of the core memory. If the value ends with a b or B it is interpreted as a number of bytes, otherwise as a number of elements.