aboutsummaryrefslogtreecommitdiff
path: root/hack/podman-registry-go
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@redhat.com>2022-04-26 13:31:10 +0200
committerValentin Rothberg <vrothberg@redhat.com>2022-04-26 14:25:17 +0200
commitfacc009ca070085bb1c32f146f77c2a0a62090b0 (patch)
tree6ebb7b822f1c8b9f12a6ec2440ed7af18e76afd7 /hack/podman-registry-go
parent913a3a813c168b47f982bb6851a0968858946f85 (diff)
downloadpodman-facc009ca070085bb1c32f146f77c2a0a62090b0.tar.gz
podman-facc009ca070085bb1c32f146f77c2a0a62090b0.tar.bz2
podman-facc009ca070085bb1c32f146f77c2a0a62090b0.zip
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 <vrothberg@redhat.com>
Diffstat (limited to 'hack/podman-registry-go')
-rw-r--r--hack/podman-registry-go/registry.go24
1 files changed, 12 insertions, 12 deletions
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