replace some fmt.Sprintfs with strconv
Teeny-tiny optimizations:
BenchmarkSprintf-10 37735996 32.31 ns/op 0 B/op 0 allocs/op
BenchmarkItoa-10 591945836 2.031 ns/op 0 B/op 0 allocs/op
BenchmarkFormatUint-10 593701444 2.014 ns/op 0 B/op 0 allocs/op
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -602,7 +602,7 @@ func (tc *nriTest) setup() {
|
||||
tc.prefix = strings.ToLower(tc.name)
|
||||
}
|
||||
if tc.namespace == "" {
|
||||
tc.namespace = tc.prefix + "-" + fmt.Sprintf("%d", os.Getpid())
|
||||
tc.namespace = tc.prefix + "-" + strconv.Itoa(os.Getpid())
|
||||
}
|
||||
|
||||
tc.sbCfg = make(map[string]*runtime.PodSandboxConfig)
|
||||
|
||||
Reference in New Issue
Block a user