mirror of
https://github.com/zulip/zulip.git
synced 2025-11-20 14:38:46 +00:00
Bump slow query threshold to 1.2s
(imported from commit 8d97fc22d208274bc57b884828957dacf396348a)
This commit is contained in:
@@ -66,7 +66,7 @@ def format_timedelta(timedelta):
|
||||
return "%.0fms" % (timedelta_ms(timedelta),)
|
||||
|
||||
def is_slow_query(time_delta, path):
|
||||
if time_delta < 1:
|
||||
if time_delta < 1.2:
|
||||
return False
|
||||
is_exempt = \
|
||||
path in ["/activity", "/json/report_error",
|
||||
|
||||
@@ -204,7 +204,7 @@ API_KEYS = {}
|
||||
|
||||
class SlowQueryTest(TestCase):
|
||||
def test_is_slow_query(self):
|
||||
self.assertFalse(is_slow_query(0.9, '/some/random/url'))
|
||||
self.assertFalse(is_slow_query(1.1, '/some/random/url'))
|
||||
self.assertTrue(is_slow_query(2, '/some/random/url'))
|
||||
self.assertFalse(is_slow_query(2, '/activity'))
|
||||
self.assertFalse(is_slow_query(2, '/json/report_error'))
|
||||
|
||||
Reference in New Issue
Block a user