MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __init__

Method __init__

lib/sqlalchemy/testing/profiling.py:71–89  ·  view source on GitHub ↗
(self, filename, sort="cumulative", dump=None)

Source from the content-addressed store, hash-verified

69 """
70
71 def __init__(self, filename, sort="cumulative", dump=None):
72 self.force_write = (
73 config.options is not None and config.options.force_write_profiles
74 )
75 self.write = self.force_write or (
76 config.options is not None and config.options.write_profiles
77 )
78 self.fname = os.path.abspath(filename)
79 self.short_fname = os.path.split(self.fname)[-1]
80 self.data = collections.defaultdict(
81 lambda: collections.defaultdict(dict)
82 )
83 self.dump = dump
84 self.sort = sort
85 self._read()
86 if self.write:
87 # rewrite for the case where features changed,
88 # etc.
89 self._write()
90
91 @property
92 def platform_key(self):

Callers

nothing calls this directly

Calls 3

_readMethod · 0.95
_writeMethod · 0.95
splitMethod · 0.80

Tested by

no test coverage detected