diff options
| author | Rusty Wagner <rusty@vector35.com> | 2017-04-27 00:40:07 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2017-04-27 00:40:17 -0400 |
| commit | 448097c6eca321519f2de88619afa804ad6d4ef9 (patch) | |
| tree | 427a61a553f57316898d8a9baf7b372dd0e246d9 /python | |
| parent | 5076356e33c52b45ccc9a0e794cae5cdd0234fdf (diff) | |
Adding an API for performance debugging
Diffstat (limited to 'python')
| -rw-r--r-- | python/function.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/python/function.py b/python/function.py index d54cf25a..2a0176c9 100644 --- a/python/function.py +++ b/python/function.py @@ -426,6 +426,16 @@ class Function(object): else: return Function._associated_data[handle.value] + @property + def analysis_performance_info(self): + count = ctypes.c_ulonglong() + info = core.BNGetFunctionAnalysisPerformanceInfo(self.handle, count) + result = {} + for i in xrange(0, count.value): + result[info[i].name] = info[i].seconds + core.BNFreeAnalysisPerformanceInfo(info, count.value) + return result + def __iter__(self): count = ctypes.c_ulonglong() blocks = core.BNGetFunctionBasicBlockList(self.handle, count) |
