Give higher threshold for webathena kerberos queries.

These are mostly out of our control, so they are not very actionable.

(imported from commit ef342ec1edbff0fa1a934413a7f19ed14817a502)
This commit is contained in:
Steve Howell 2013-12-26 09:20:59 -05:00
parent f61740551c
commit eb6868704f
2 changed files with 4 additions and 0 deletions

View File

@ -75,6 +75,8 @@ def is_slow_query(time_delta, path):
or path.startswith("/user_activity/")
if is_exempt:
return False
if 'webathena_kerberos' in path:
return time_delta >= 10
return True
def write_log_line(log_data, path, method, remote_ip, email, client_name,

View File

@ -211,6 +211,8 @@ class SlowQueryTest(TestCase):
self.assertFalse(is_slow_query(2, '/api/v1/deployments/report_error'))
self.assertFalse(is_slow_query(2, '/realm_activity/whatever'))
self.assertFalse(is_slow_query(2, '/user_activity/whatever'))
self.assertFalse(is_slow_query(9, '/accounts/webathena_kerberos_login/'))
self.assertTrue(is_slow_query(11, '/accounts/webathena_kerberos_login/'))
class DecoratorTestCase(TestCase):
def test_REQ_converter(self):