提交 da23d114 authored 作者: Mohammad Pezeshki's avatar Mohammad Pezeshki

docstrings added.

上级 57516d63
...@@ -295,6 +295,8 @@ class ProfileStats(object): ...@@ -295,6 +295,8 @@ class ProfileStats(object):
return rval return rval
def fill_node_total_time(self, node, total_times): def fill_node_total_time(self, node, total_times):
"""node -> fill total time icluding its parents (returns nothing)"""
# timing is stored by node, we compute total time on demand
total = self.apply_time[node] total = self.apply_time[node]
for parent in node.get_parents(): for parent in node.get_parents():
if parent.owner in self.apply_time.keys(): if parent.owner in self.apply_time.keys():
...@@ -304,6 +306,7 @@ class ProfileStats(object): ...@@ -304,6 +306,7 @@ class ProfileStats(object):
total_times[node] = total total_times[node] = total
def compute_total_times(self): def compute_total_times(self):
"""dict op -> total time icluding the time for parents"""
rval = {} rval = {}
for node in self.apply_time.keys(): for node in self.apply_time.keys():
if node not in rval: if node not in rval:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论