MCPcopy Create free account
hub / github.com/alibaba/bigcomputing / __init__

Method __init__

DIEN/wrap_time.py:26–42  ·  view source on GitHub ↗

Summary Args: func (TYPE): Description

(self, func)

Source from the content-addressed store, hash-verified

24 """
25
26 def __init__(self, func):
27 """Summary
28
29 Args:
30 func (TYPE): Description
31 """
32 # wraps(func)(self)
33 self.__name__ = func.__name__
34 self.__module__ = func.__module__
35 self.__doc__ = func.__doc__
36 self.func = func
37 self.class_name = ""
38
39 # used to calculate average run time
40 self.call_count = 0
41 self.acc_time = 0.0
42 self.freq = freq
43
44 def __call__(self, *args, **kwargs):
45 """Summary

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected