summaryrefslogtreecommitdiff
path: root/pkg/inspect
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-02-19 08:40:43 -0600
committerAtomic Bot <atomic-devel@projectatomic.io>2018-02-20 21:54:32 +0000
commit4929e37507b530cb1d0e92cfcd252b0abefb4f2f (patch)
treeafb9e0ea7fb8e8ed09b77630bbb19260c3545188 /pkg/inspect
parentdf7bf04dc629686fc6741d0231bd28247fc47ee8 (diff)
downloadpodman-4929e37507b530cb1d0e92cfcd252b0abefb4f2f.tar.gz
podman-4929e37507b530cb1d0e92cfcd252b0abefb4f2f.tar.bz2
podman-4929e37507b530cb1d0e92cfcd252b0abefb4f2f.zip
Performance enhancement for podman images
Previous code was using slow routines to collect some of the information needed to output images. Specifically size was being calculated instead of using the cached, already known size already available. Also, straight- lined several of the code paths. Overall assessment is that these improvements cut the time for images in half. Signed-off-by: baude <bbaude@redhat.com> Closes: #365 Approved by: mheon
Diffstat (limited to 'pkg/inspect')
-rw-r--r--pkg/inspect/inspect.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/pkg/inspect/inspect.go b/pkg/inspect/inspect.go
index e523d4c4d..806692425 100644
--- a/pkg/inspect/inspect.go
+++ b/pkg/inspect/inspect.go
@@ -202,3 +202,18 @@ type NetworkSettings struct {
IPv6Gateway string `json:"IPv6Gateway"`
MacAddress string `json:"MacAddress"`
}
+
+// ImageResult is used for podman images for collection and output
+type ImageResult struct {
+ Tag string
+ Repository string
+ RepoDigests []string
+ RepoTags []string
+ ID string
+ Digest digest.Digest
+ ConfigDigest digest.Digest
+ Created time.Time
+ Size *uint64
+ Labels map[string]string
+ Dangling bool
+}