54 try: |
54 try: |
55 cache = open(self.timingCache, 'rb') |
55 cache = open(self.timingCache, 'rb') |
56 timings = marshal.load(cache) # secok |
56 timings = marshal.load(cache) # secok |
57 if isinstance(timings, dict): |
57 if isinstance(timings, dict): |
58 self.timings = timings |
58 self.timings = timings |
59 except Exception: # secok |
59 except (EnvironmentError, EOFError, ValueError, TypeError): |
60 pass |
60 pass |
61 finally: |
61 finally: |
62 cache.close() |
62 cache.close() |
63 |
63 |
64 def save(self): |
64 def save(self): |
67 """ |
67 """ |
68 # dump the raw timing data |
68 # dump the raw timing data |
69 try: |
69 try: |
70 cache = open(self.timingCache, 'wb') |
70 cache = open(self.timingCache, 'wb') |
71 marshal.dump(self.timings, cache) |
71 marshal.dump(self.timings, cache) |
72 except Exception: # secok |
72 except EnvironmentError: |
73 pass |
73 pass |
74 finally: |
74 finally: |
75 cache.close() |
75 cache.close() |
76 |
76 |
77 # dump the profile data |
77 # dump the profile data |
176 "c_call": profile.Profile.trace_dispatch_c_call, |
176 "c_call": profile.Profile.trace_dispatch_c_call, |
177 "c_exception": profile.Profile.trace_dispatch_return, |
177 "c_exception": profile.Profile.trace_dispatch_return, |
178 # the C function returned |
178 # the C function returned |
179 "c_return": profile.Profile.trace_dispatch_return, |
179 "c_return": profile.Profile.trace_dispatch_return, |
180 } |
180 } |
181 |
|
182 # |
|
183 # eflag: noqa = M702 |
|