Example #1
0
 def handler(conn, cursor, statement, params, context, executemany):
     info = {"db": {"statement": statement, "params": params}}
     info['tracepoint_id'] = ''
     # # This gets the entire stack as the tracepoint_id
     # curframe = inspect.currentframe()
     # for parframe in inspect.getouterframes(curframe):
     #     info['tracepoint_id'] += '%s:%d:%s,' % parframe[1:4]
     profiler.start(name, info=info)
Example #2
0
 def test_start(self):
     p = profiler.init("secret", base_id="1", parent_id="2")
     p.start = mock.MagicMock()
     profiler.start("name", info="info")
     p.start.assert_called_once_with("name", info="info")
Example #3
0
 def test_start_not_inited(self):
     profiler._clean()
     profiler.start("name")
Example #4
0
 def handler(conn, cursor, statement, params, context, executemany):
     info = {"db": {"statement": statement, "params": params}}
     profiler.start(name, info=info)
Example #5
0
 def handler(conn, cursor, statement, params, context, executemany):
     info = {"db": {
         "statement": statement,
         "params": params}
     }
     profiler.start(name, info=info)