Ejemplo n.º 1
0
    def test_ctor_with_default_ident(self):
        from slowlog.compat import get_ident

        client = object()
        obj = self._class(client, 123456789, 1.5)
        self.assertEqual(obj.report_at, 123456789)
        self.assertEqual(obj.interval, 1.5)
        self.assertEqual(obj.ident, get_ident())
Ejemplo n.º 2
0
    def test_ctor_with_default_ident(self):
        from slowlog.compat import get_ident

        client = object()
        obj = self._class(client, 123456789, 1.5)
        self.assertEqual(obj.report_at, 123456789)
        self.assertEqual(obj.interval, 1.5)
        self.assertEqual(obj.ident, get_ident())
Ejemplo n.º 3
0
 def __init__(self, tween, request, start, report_at, ident=None):
     self.tween = tween
     self.request = request
     self.start = start
     self.report_at = report_at
     if ident is None:
         ident = get_ident()
     self.ident = ident
     self.interval = tween.interval
Ejemplo n.º 4
0
 def __init__(self, client, report_at, interval, frame_limit=100,
              ident=None):
     self.client = client
     self.report_at = report_at
     self.interval = interval
     if ident is None:
         ident = get_ident()
     self.ident = ident
     self.frame_limit = frame_limit
Ejemplo n.º 5
0
 def __init__(self, app, environ, start, report_at, ident=None):
     self.app = app
     self.environ = environ
     self.start = start
     self.report_at = report_at
     if ident is None:
         ident = get_ident()
     self.ident = ident
     self.interval = app.interval
Ejemplo n.º 6
0
 def __init__(self, app, environ, start, report_at, ident=None):
     self.app = app
     self.environ = environ
     self.start = start
     self.report_at = report_at
     if ident is None:
         ident = get_ident()
     self.ident = ident
     self.interval = app.interval
Ejemplo n.º 7
0
 def __init__(self, tween, request, start, report_at, ident=None):
     self.tween = tween
     self.request = request
     self.start = start
     self.report_at = report_at
     if ident is None:
         ident = get_ident()
     self.ident = ident
     self.interval = tween.interval
Ejemplo n.º 8
0
 def __init__(self,
              client,
              report_at,
              interval,
              frame_limit=100,
              ident=None):
     self.client = client
     self.report_at = report_at
     self.interval = interval
     if ident is None:
         ident = get_ident()
     self.ident = ident
     self.frame_limit = frame_limit
Ejemplo n.º 9
0
 def test_ctor_with_default_ident(self):
     obj = self._make()
     from slowlog.compat import get_ident
     self.assertEqual(obj.ident, get_ident())
Ejemplo n.º 10
0
 def test_ctor_with_default_ident(self):
     obj = self._make()
     from slowlog.compat import get_ident
     self.assertEqual(obj.ident, get_ident())
Ejemplo n.º 11
0
 def run():
     start_queue.put(get_ident())
     end_queue.get()