From facc009ca070085bb1c32f146f77c2a0a62090b0 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Tue, 26 Apr 2022 13:31:10 +0200 Subject: benchmarks: add more image benchmarks Add more benchmarks for the most common and performance-critical image commands. Benchmarks for `podman build` should go into a separate section. Signed-off-by: Valentin Rothberg --- hack/podman-registry-go/registry.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'hack/podman-registry-go') diff --git a/hack/podman-registry-go/registry.go b/hack/podman-registry-go/registry.go index 143a83fa1..095f6fb18 100644 --- a/hack/podman-registry-go/registry.go +++ b/hack/podman-registry-go/registry.go @@ -9,10 +9,10 @@ import ( ) const ( - imageKey = "PODMAN_REGISTRY_IMAGE" - userKey = "PODMAN_REGISTRY_USER" - passKey = "PODMAN_REGISTRY_PASS" - portKey = "PODMAN_REGISTRY_PORT" + ImageKey = "PODMAN_REGISTRY_IMAGE" + UserKey = "PODMAN_REGISTRY_USER" + PassKey = "PODMAN_REGISTRY_PASS" + PortKey = "PODMAN_REGISTRY_PORT" ) var binary = "podman-registry" @@ -52,13 +52,13 @@ func Start() (*Registry, error) { key := spl[0] val := strings.TrimSuffix(strings.TrimPrefix(spl[1], "\""), "\"") switch key { - case imageKey: + case ImageKey: registry.Image = val - case userKey: + case UserKey: registry.User = val - case passKey: + case PassKey: registry.Password = val - case portKey: + case PortKey: registry.Port = val default: logrus.Errorf("Unexpected podman-registry output: %q", s) @@ -67,16 +67,16 @@ func Start() (*Registry, error) { // Extra sanity check. if registry.Image == "" { - return nil, errors.Errorf("unexpected output %q: %q missing", out, imageKey) + return nil, errors.Errorf("unexpected output %q: %q missing", out, ImageKey) } if registry.User == "" { - return nil, errors.Errorf("unexpected output %q: %q missing", out, userKey) + return nil, errors.Errorf("unexpected output %q: %q missing", out, UserKey) } if registry.Password == "" { - return nil, errors.Errorf("unexpected output %q: %q missing", out, passKey) + return nil, errors.Errorf("unexpected output %q: %q missing", out, PassKey) } if registry.Port == "" { - return nil, errors.Errorf("unexpected output %q: %q missing", out, portKey) + return nil, errors.Errorf("unexpected output %q: %q missing", out, PortKey) } registry.running = true -- cgit v1.2.3-54-g00ecf