mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 09:07:10 +08:00
Add more runtime information to resource manager (#3706)
Some checks failed
CE Compile Job / ce_job_pre_check (push) Has been cancelled
CE Compile Job / print_ce_job_pre_check_outputs (push) Has been cancelled
CE Compile Job / FD-Clone-Linux (push) Has been cancelled
CE Compile Job / Show Code Archive Output (push) Has been cancelled
CE Compile Job / BUILD_SM8090 (push) Has been cancelled
CE Compile Job / BUILD_SM8689 (push) Has been cancelled
CE Compile Job / CE_UPLOAD (push) Has been cancelled
Deploy GitHub Pages / deploy (push) Has been cancelled
Some checks failed
CE Compile Job / ce_job_pre_check (push) Has been cancelled
CE Compile Job / print_ce_job_pre_check_outputs (push) Has been cancelled
CE Compile Job / FD-Clone-Linux (push) Has been cancelled
CE Compile Job / Show Code Archive Output (push) Has been cancelled
CE Compile Job / BUILD_SM8090 (push) Has been cancelled
CE Compile Job / BUILD_SM8689 (push) Has been cancelled
CE Compile Job / CE_UPLOAD (push) Has been cancelled
Deploy GitHub Pages / deploy (push) Has been cancelled
This commit is contained in:
@@ -366,10 +366,19 @@ class ResourceManager:
|
|||||||
Returns:
|
Returns:
|
||||||
str: resource manager info
|
str: resource manager info
|
||||||
"""
|
"""
|
||||||
|
total_block_number = self.total_block_number()
|
||||||
|
available_block_num = self.available_block_num()
|
||||||
|
used_block_num = total_block_number - available_block_num
|
||||||
|
block_usage = used_block_num / total_block_number * 100
|
||||||
|
total_batch_number = len(self.stop_flags)
|
||||||
|
available_batch_num = self.available_batch()
|
||||||
|
used_batch_num = total_batch_number - available_batch_num
|
||||||
|
batch_usage = used_batch_num / total_batch_number * 100
|
||||||
info = (
|
info = (
|
||||||
f"ResourceManager info, "
|
f"ResourceManager info, "
|
||||||
f"total_block_number: {self.total_block_number()}, total_batch_number: {len(self.stop_flags)}, "
|
f"total_block_number: {total_block_number}, total_batch_number: {total_batch_number}, "
|
||||||
f"available_block_num: {self.available_block_num()}, available_batch: {self.available_batch()}"
|
f"available_block_num: {available_block_num}, available_batch: {available_batch_num}\n"
|
||||||
|
f"running_reqs: {used_batch_num}, block_usage: {block_usage:.2f}%, batch_usage: {batch_usage:.2f}%"
|
||||||
)
|
)
|
||||||
return info
|
return info
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user