Skip to content

Commit

Permalink
Merge pull request #92 from behouba/fix-dump-stats-tree-output
Browse files Browse the repository at this point in the history
fix: remove `us` for pages scanned and pages written
  • Loading branch information
rst0git authored Jul 20, 2023
2 parents 5d84ffa + c413683 commit b88a99f
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 b88a99f

Please sign in to comment.