core: use faster concatenation for alloc name generation. (#17591)

This commit is contained in:
James Rasell
2023-06-22 08:46:28 +02:00
committed by GitHub
parent f4c7182873
commit c19253215b

View File

@@ -382,7 +382,7 @@ func DenormalizeAllocationJobs(job *Job, allocs []*Allocation) {
// AllocName returns the name of the allocation given the input.
func AllocName(job, group string, idx uint) string {
return fmt.Sprintf("%s.%s[%d]", job, group, idx)
return job + "." + group + "[" + strconv.FormatUint(uint64(idx), 10) + "]"
}
// AllocSuffix returns the alloc index suffix that was added by the AllocName