mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
Address run/create performance issues
Fixed the logic where we observed different performance results when running an image by its fqname vs a shortname. In the case of the latter, we resolve the name without using the network. Signed-off-by: baude <bbaude@redhat.com> Closes: #37 Approved by: rhatdan
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
package libpod
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
)
|
||||
|
||||
// WriteFile writes a provided string to a provided path
|
||||
@ -32,3 +34,11 @@ func StringInSlice(s string, sl []string) bool {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// FuncTimer helps measure the execution time of a function
|
||||
// For debug purposes, do not leave in code
|
||||
// used like defer FuncTimer("foo")
|
||||
func FuncTimer(funcName string) {
|
||||
elapsed := time.Since(time.Now())
|
||||
fmt.Printf("%s executed in %d ms\n", funcName, elapsed)
|
||||
}
|
||||
|
Reference in New Issue
Block a user