Documentation
¶
Overview ¶
Package timelimit parses the values accepted by the Slurm job time limit annotation into the whole minutes that Slurm's TimeLimit field expects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
Parse converts a time limit into whole minutes. Three notations are accepted:
- a bare integer, read as minutes ("30")
- a unit-suffixed duration, as understood by Prometheus ("90s", "10m", "2h", "1d", "1w", "1h30m")
- one of Slurm's --time formats ("MM:SS", "HH:MM:SS", "D-HH", "D-HH:MM", "D-HH:MM:SS"), so a manifest can mirror an equivalent sbatch invocation
A non-zero value shorter than a minute rounds up to one minute rather than down to zero, which Slurm reads as no limit at all.
Types ¶
This section is empty.