Skip to content

Commit

Permalink
feat[timer]use timer counter
Browse files Browse the repository at this point in the history
  • Loading branch information
serfend committed Mar 30, 2023
1 parent 3911a40 commit a011932
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pydumpck/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__description__ = "pydumpck is a multi-threads tool for decompile exe,elf,pyz,pyc packed by python which is base on pycdc and uncompyle6.sometimes its py-file result not exactly right ,maybe could use uncompyle6."
__keywords__ = ['pydumpck', 'decomplier', 'pe', 'elf', 'pyc', 'pyz']
__url__ = "https://github.com/serfend/pydumpck"
__version__ = "1.15.17"
__version__ = "1.15.18"
__author__ = "serfend"
__author_email__ = "serfend@foxmail.com"
__license__ = "MIT Licence"
Expand Down
9 changes: 4 additions & 5 deletions pydumpck/py_common_dump/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,12 @@ def filter_plugin(p):
time.sleep(3)

def statistics_status(self, is_end: bool = False):
from sgtpyutils import timer
if is_end:
g = self.global_start_time
cost = time.time() - g
cost = math.ceil(cost*1e3)
logger.info(f'completed,cost {cost}ms with result:{self.result}')
t = self.global_start_time
logger.info(f'completed,cost {math.ceil(t.spent * 1000)}ms with result:{self.result}')
return
self.global_start_time = time.time()
self.global_start_time = timer.create_timer()

def main(self, target_file: str, output_directory: str, thread: int = 0, timeout: int = 10, target_file_type: str = None, session_timeout: int = 120, plugin: List = [], decompile_file: List = None, struct_headers: str = None, **args):
self.statistics_status()
Expand Down

0 comments on commit a011932

Please sign in to comment.