Exemple #1
0
 def __init__(self,
              tracer_entries=1000000,
              max_stack_depth=-1,
              include_files=None,
              exclude_files=None,
              ignore_c_function=False,
              ignore_non_file=False,
              log_return_value=False,
              log_function_args=False,
              log_print=False,
              log_gc=False,
              novdb=False):
     self.buffer = []
     self.enable = False
     self.parsed = False
     self._tracer = snaptrace.Tracer(tracer_entries)
     self.tracer_entries = tracer_entries
     self.verbose = 0
     self.data = []
     self.max_stack_depth = max_stack_depth
     self.curr_stack_depth = 0
     self.include_files = include_files
     self.exclude_files = exclude_files
     self.ignore_c_function = ignore_c_function
     self.ignore_non_file = ignore_non_file
     self.log_return_value = log_return_value
     self.log_print = log_print
     self.log_gc = log_gc
     self.novdb = novdb
     self.log_function_args = log_function_args
     self.system_print = builtins.print
     self.total_entries = 0
     self.counters = {}
     self.gc_start_args = {}
Exemple #2
0
 def __init__(self,
              tracer_entries: int = 1000000,
              max_stack_depth: int = -1,
              include_files: Optional[Sequence[str]] = None,
              exclude_files: Optional[Sequence[str]] = None,
              ignore_c_function: bool = False,
              ignore_frozen: bool = False,
              log_func_retval: bool = False,
              log_func_args: bool = False,
              log_print: bool = False,
              log_gc: bool = False,
              log_async: bool = False,
              trace_self: bool = False,
              min_duration: float = 0,
              vdb: bool = False):
     self.enable = False
     self.parsed = False
     self._tracer = snaptrace.Tracer(tracer_entries)
     self.tracer_entries = tracer_entries
     self.verbose = 0
     self.data: Dict[str, Any] = {}
     self.max_stack_depth = max_stack_depth
     self.curr_stack_depth = 0
     self.include_files = include_files
     self.exclude_files = exclude_files
     self.ignore_c_function = ignore_c_function
     self.ignore_frozen = ignore_frozen
     self.log_func_retval = log_func_retval
     self.log_func_args = log_func_args
     self.log_print = log_print
     self.log_gc = log_gc
     self.log_async = log_async
     self.vdb = vdb
     self.trace_self = trace_self
     self.min_duration = min_duration
     self.system_print = builtins.print
     self.total_entries = 0
     self.gc_start_args: Dict[str, int] = {}