summaryrefslogtreecommitdiff
path: root/libpod/oci.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-11-15 16:17:37 +0100
committerGitHub <noreply@github.com>2021-11-15 16:17:37 +0100
commitd40736fef1c0cbfc57ed39678bf95c016a13b512 (patch)
tree9f7e04744f409421916abf2c444ecda54b653550 /libpod/oci.go
parentcca6df428cb9ce187ae1341740ac1137c7a67a75 (diff)
parentd28b39a90d1b4733ff3144450a280afed8661924 (diff)
downloadpodman-d40736fef1c0cbfc57ed39678bf95c016a13b512.tar.gz
podman-d40736fef1c0cbfc57ed39678bf95c016a13b512.tar.bz2
podman-d40736fef1c0cbfc57ed39678bf95c016a13b512.zip
Merge pull request #12257 from adrianreber/2021-11-10-print-stats
Add optional checkpoint/restore statistics
Diffstat (limited to 'libpod/oci.go')
-rw-r--r--libpod/oci.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/libpod/oci.go b/libpod/oci.go
index c92d9a077..f45c1a105 100644
--- a/libpod/oci.go
+++ b/libpod/oci.go
@@ -23,7 +23,10 @@ type OCIRuntime interface {
Path() string
// CreateContainer creates the container in the OCI runtime.
- CreateContainer(ctr *Container, restoreOptions *ContainerCheckpointOptions) error
+ // The returned int64 contains the microseconds needed to restore
+ // the given container if it is a restore and if restoreOptions.PrintStats
+ // is true. In all other cases the returned int64 is 0.
+ CreateContainer(ctr *Container, restoreOptions *ContainerCheckpointOptions) (int64, error)
// UpdateContainerStatus updates the status of the given container.
UpdateContainerStatus(ctr *Container) error
// StartContainer starts the given container.
@@ -101,8 +104,10 @@ type OCIRuntime interface {
// CheckpointContainer checkpoints the given container.
// Some OCI runtimes may not support this - if SupportsCheckpoint()
// returns false, this is not implemented, and will always return an
- // error.
- CheckpointContainer(ctr *Container, options ContainerCheckpointOptions) error
+ // error. If CheckpointOptions.PrintStats is true the first return parameter
+ // contains the number of microseconds the runtime needed to checkpoint
+ // the given container.
+ CheckpointContainer(ctr *Container, options ContainerCheckpointOptions) (int64, error)
// CheckConmonRunning verifies that the given container's Conmon
// instance is still running. Runtimes without Conmon, or systems where