如何检查 p4 中命令的命令结果计数?

How to check command results count for a command in p4?

使用 p4 命令(如 p4 sync)时,有时会达到 maxresults 限制并取消操作。我的第一个想法是 MaxResults 表示将同步的文件数,但结果计数有所不同。

Request too large (over 1800000); see 'p4 help maxresults'.

当我的命令超出限制时,我会收到消息。有没有办法检查不超过限制的命令的结果计数?

使用-Zdbstat 全局选项标志。例如:

C:\Perforce\test>p4 -Zdbstat sync -nq ...
--- db.counters
---   pages in+out+cached 3+0+2
---   locks read/write 0/0 rows get+pos+scan put+del 1+0+0 0+0
---   peek count 1 wait+held total/max 0ms+0ms/0ms+0ms
--- db.user
---   pages in+out+cached 3+0+2
---   locks read/write 1/0 rows get+pos+scan put+del 1+0+0 0+0
--- db.group
---   pages in+out+cached 3+0+2
---   locks read/write 1/0 rows get+pos+scan put+del 0+1+2 0+0
--- db.stream
---   pages in+out+cached 3+0+2
---   locks read/write 1/0 rows get+pos+scan put+del 0+3+3 0+0
--- db.domain
---   pages in+out+cached 3+0+2
---   locks read/write 1/0 rows get+pos+scan put+del 1+0+0 0+0
--- db.view
---   pages in+out+cached 3+0+2
---   locks read/write 1/0 rows get+pos+scan put+del 0+1+6 0+0
--- db.have
---   pages in+out+cached 7+0+6
---   locks read/write 0/0 rows get+pos+scan put+del 0+1+260 0+0
---   peek count 1 wait+held total/max 0ms+0ms/0ms+0ms
--- db.revdx
---   pages in+out+cached 3+0+2
---   locks read/write 1/0 rows get+pos+scan put+del 0+1+1 0+0
--- db.revhx
---   pages in+out+cached 12+0+11
---   locks read/write 1/0 rows get+pos+scan put+del 0+1+261 0+0
--- db.rev
---   pages in+out+cached 1+0+1
---   locks read/write 1/0 rows get+pos+scan put+del 0+0+0 0+0
--- db.revtx
---   pages in+out+cached 1+0+1
---   locks read/write 1/0 rows get+pos+scan put+del 0+0+0 0+0
--- db.working
---   pages in+out+cached 3+0+2
---   locks read/write 0/0 rows get+pos+scan put+del 0+1+2 0+0
---   peek count 1 wait+held total/max 0ms+0ms/0ms+0ms
--- db.trigger
---   pages in+out+cached 3+0+2
---   locks read/write 1/0 rows get+pos+scan put+del 0+1+1 0+0
--- db.protect
---   pages in+out+cached 3+0+2
---   locks read/write 1/0 rows get+pos+scan put+del 0+1+5 0+0
--- db.monitor
---   pages in+out+cached 4+4+2
---   locks read/write 0/2 rows get+pos+scan put+del 0+0+0 2+0

MaxResults 设置是对 Perforce 服务器内数据库查询返回结果的上限,而不是命令返回的最终结果。有关如何针对特定命令估算这些结果计数的详细信息,请参阅 p4 help maxresults