File tree 1 file changed +9
-1
lines changed 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1777,9 +1777,17 @@ def load_fine_grained_deps(self) -> Dict[str, Set[str]]:
1777
1777
def load_tree (self , temporary : bool = False ) -> None :
1778
1778
assert self .meta is not None , "Internal error: this method must be called only" \
1779
1779
" for cached modules"
1780
- data = json .loads (self .manager .metastore .read (self .meta .data_json ))
1780
+ t0 = time .time ()
1781
+ raw = self .manager .metastore .read (self .meta .data_json )
1782
+ t1 = time .time ()
1783
+ data = json .loads (raw )
1784
+ t2 = time .time ()
1781
1785
# TODO: Assert data file wasn't changed.
1782
1786
self .tree = MypyFile .deserialize (data )
1787
+ t3 = time .time ()
1788
+ self .manager .add_stats (data_read_time = t1 - t0 ,
1789
+ data_json_load_time = t2 - t1 ,
1790
+ deserialize_time = t3 - t2 )
1783
1791
if not temporary :
1784
1792
self .manager .modules [self .id ] = self .tree
1785
1793
self .manager .add_stats (fresh_trees = 1 )
You can’t perform that action at this time.
0 commit comments