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)