Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add '--print-stats' option #12

Merged

Conversation

adrianreber
Copy link
Member

Using the information written by CRIU checkpointctl could be extended to display dump statistics if Podman would include them (not yet). With this PR the option --print-stats is added which would extend the out to look like this:

# ./checkpointctl show -t /tmp/1  --print-stats 

Displaying container checkpoint data from /tmp/1

+-----------------+------------------------------------------+--------------+---------+----------------------+--------+------------+-------------------+
|    CONTAINER    |                  IMAGE                   |      ID      | RUNTIME |       CREATED        | ENGINE | CHKPT SIZE | ROOT FS DIFF SIZE |
+-----------------+------------------------------------------+--------------+---------+----------------------+--------+------------+-------------------+
| gifted_mahavira | quay.io/adrianreber/wildfly-hello:latest | 1f3face90bec | crun    | 2021-10-27T06:35:26Z | Podman | 346.7 MiB  | 178.0 KiB         |
+-----------------+------------------------------------------+--------------+---------+----------------------+--------+------------+-------------------+
CRIU dump statistics
+---------------+-------------+--------------+---------------+---------------+---------------+
| FREEZING TIME | FROZEN TIME | MEMDUMP TIME | MEMWRITE TIME | PAGES SCANNED | PAGES WRITTEN |
+---------------+-------------+--------------+---------------+---------------+---------------+
| 105405 us     | 1376964 us  | 504399 us    | 446571 us     |        492153 |         88689 |
+---------------+-------------+--------------+---------------+---------------+---------------+

@rst0git what do you think? Something like this? Or should it look differently. If this is okay, I would make a go-criu release and include a released version in go.mod of go-criu.

Signed-off-by: Adrian Reber <areber@redhat.com>
@codecov-commenter
Copy link

Codecov Report

Merging #12 (a0d79b5) into main (f505167) will increase coverage by 1.88%.
The diff coverage is 84.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #12      +/-   ##
==========================================
+ Coverage   56.18%   58.06%   +1.88%     
==========================================
  Files           4        4              
  Lines         550      589      +39     
==========================================
+ Hits          309      342      +33     
- Misses        206      210       +4     
- Partials       35       37       +2     
Impacted Files Coverage Δ
lib/metadata.go 54.08% <ø> (ø)
container.go 68.75% <81.81%> (+3.88%) ⬆️
checkpointctl.go 53.12% <100.00%> (+0.99%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f505167...a0d79b5. Read the comment docs.

@rst0git
Copy link
Member

rst0git commented Nov 3, 2021

what do you think? Something like this?

Looks good to me.

@adrianreber adrianreber marked this pull request as ready for review November 4, 2021 09:49
@adrianreber
Copy link
Member Author

Waiting on checkpoint-restore/go-criu#59 and the 5.2.0 go-criu release.

Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
@adrianreber adrianreber merged commit 7ab6709 into checkpoint-restore:main Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants