Add build time tracking to Vertex class
This commit is contained in:
parent
0ff3e49eb6
commit
04b98ba36e
1 changed files with 8 additions and 0 deletions
|
|
@ -57,6 +57,14 @@ class Vertex:
|
|||
self.is_interface_component = False
|
||||
|
||||
self.use_result = False
|
||||
self.build_times: List[float] = []
|
||||
|
||||
@property
|
||||
def avg_build_time(self):
|
||||
return sum(self.build_times) / len(self.build_times) if self.build_times else 0
|
||||
|
||||
def add_build_time(self, time):
|
||||
self.build_times.append(time)
|
||||
|
||||
# Build a result dict for each edge
|
||||
# like so: {edge.target.id: {edge.target_param: self._built_object}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue