From afb744693238f9a5388a3159b5159de7c874a02c Mon Sep 17 00:00:00 2001 From: sagewe Date: Fri, 11 Aug 2023 15:14:20 +0800 Subject: [PATCH] fix profile Signed-off-by: weiwee --- python/fate/arch/computing/_profile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/fate/arch/computing/_profile.py b/python/fate/arch/computing/_profile.py index 76050081aa..e0ed9ac1d1 100644 --- a/python/fate/arch/computing/_profile.py +++ b/python/fate/arch/computing/_profile.py @@ -76,7 +76,7 @@ def __init__(self, function_name: str, function_stack_list): self._start = time.time() function_stack = "\n".join(function_stack_list) - self._hash = hashlib.blake2b(function_stack.encode("utf-8"), digest_size=5).hexdigest() + self._hash = hashlib.blake2b(f"{function_name}#{function_stack}".encode("utf-8"), digest_size=5).hexdigest() if self._hash not in self._STATS: self._STATS[self._hash] = _ComputingTimerItem(function_name, function_stack)