Skip to content

Commit

Permalink
fix: remove us for pages scanned and pages written
Browse files Browse the repository at this point in the history
This commit removes the 'us' unit for 'pages scanned' and
'pages written' in the dump statistics tree node.

Signed-off-by: Kouame Behouba Manasse <[email protected]>
  • Loading branch information
behouba committed Jul 20, 2023
1 parent 5d84ffa commit c413683
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/checkpointctl.bats
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ function teardown() {
[ "$status" -eq 0 ]
[[ ${lines[8]} == *"CRIU dump statistics"* ]]
[[ ${lines[12]} == *"Memwrite time"* ]]
[[ ${lines[13]} =~ [1-9]+" us" ]]
[[ ${lines[13]} =~ [1-9] ]]
}

@test "Run checkpointctl inspect with tar file and --mounts and valid spec.dump" {
Expand Down Expand Up @@ -356,7 +356,7 @@ function teardown() {
[ "$status" -eq 0 ]
[[ ${lines[8]} == *"CRIU dump statistics"* ]]
[[ ${lines[12]} == *"Memwrite time"* ]]
[[ ${lines[13]} =~ [1-9]+" us" ]]
[[ ${lines[13]} =~ [1-9] ]]
[[ ${lines[15]} == *"Process tree"* ]]
[[ ${lines[16]} == *"piggie"* ]]
[[ ${lines[17]} == *"[REG 0]"* ]]
Expand Down
4 changes: 2 additions & 2 deletions tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ func addDumpStatsToTree(tree treeprint.Tree, dumpStats *stats_pb.DumpStatsEntry)
statsTree.AddBranch(fmt.Sprintf("Frozen time: %d us", dumpStats.GetFrozenTime()))
statsTree.AddBranch(fmt.Sprintf("Memdump time: %d us", dumpStats.GetMemdumpTime()))
statsTree.AddBranch(fmt.Sprintf("Memwrite time: %d us", dumpStats.GetMemwriteTime()))
statsTree.AddBranch(fmt.Sprintf("Pages scanned: %d us", dumpStats.GetPagesScanned()))
statsTree.AddBranch(fmt.Sprintf("Pages written: %d us", dumpStats.GetPagesWritten()))
statsTree.AddBranch(fmt.Sprintf("Pages scanned: %d", dumpStats.GetPagesScanned()))
statsTree.AddBranch(fmt.Sprintf("Pages written: %d", dumpStats.GetPagesWritten()))
}

func addPsTreeToTree(tree treeprint.Tree, psTree *crit.PsTree) error {
Expand Down

0 comments on commit c413683

Please sign in to comment.