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 ac08fc751b
commit 71fdd7e891
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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