{"action":"created","issue":{"url":"https://api.github.com/repos/ismop/dap/issues/151","repository_url":"https://api.github.com/repos/ismop/dap","labels_url":"https://api.github.com/repos/ismop/dap/issues/151/labels{/name}","comments_url":"https://api.github.com/repos/ismop/dap/issues/151/comments","events_url":"https://api.github.com/repos/ismop/dap/issues/151/events","html_url":"https://github.com/ismop/dap/issues/151","id":172668558,"number":151,"title":"`threat_levels` REST API is extremally slow","user":{"login":"mkasztelnik","id":1265430,"avatar_url":"https://avatars.githubusercontent.com/u/1265430?v=3","gravatar_id":"","url":"https://api.github.com/users/mkasztelnik","html_url":"https://github.com/mkasztelnik","followers_url":"https://api.github.com/users/mkasztelnik/followers","following_url":"https://api.github.com/users/mkasztelnik/following{/other_user}","gists_url":"https://api.github.com/users/mkasztelnik/gists{/gist_id}","starred_url":"https://api.github.com/users/mkasztelnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkasztelnik/subscriptions","organizations_url":"https://api.github.com/users/mkasztelnik/orgs","repos_url":"https://api.github.com/users/mkasztelnik/repos","events_url":"https://api.github.com/users/mkasztelnik/events{/privacy}","received_events_url":"https://api.github.com/users/mkasztelnik/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ismop/dap/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"tbartynski","id":1744749,"avatar_url":"https://avatars.githubusercontent.com/u/1744749?v=3","gravatar_id":"","url":"https://api.github.com/users/tbartynski","html_url":"https://github.com/tbartynski","followers_url":"https://api.github.com/users/tbartynski/followers","following_url":"https://api.github.com/users/tbartynski/following{/other_user}","gists_url":"https://api.github.com/users/tbartynski/gists{/gist_id}","starred_url":"https://api.github.com/users/tbartynski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbartynski/subscriptions","organizations_url":"https://api.github.com/users/tbartynski/orgs","repos_url":"https://api.github.com/users/tbartynski/repos","events_url":"https://api.github.com/users/tbartynski/events{/privacy}","received_events_url":"https://api.github.com/users/tbartynski/received_events","type":"User","site_admin":false},"assignees":[{"login":"tbartynski","id":1744749,"avatar_url":"https://avatars.githubusercontent.com/u/1744749?v=3","gravatar_id":"","url":"https://api.github.com/users/tbartynski","html_url":"https://github.com/tbartynski","followers_url":"https://api.github.com/users/tbartynski/followers","following_url":"https://api.github.com/users/tbartynski/following{/other_user}","gists_url":"https://api.github.com/users/tbartynski/gists{/gist_id}","starred_url":"https://api.github.com/users/tbartynski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbartynski/subscriptions","organizations_url":"https://api.github.com/users/tbartynski/orgs","repos_url":"https://api.github.com/users/tbartynski/repos","events_url":"https://api.github.com/users/tbartynski/events{/privacy}","received_events_url":"https://api.github.com/users/tbartynski/received_events","type":"User","site_admin":false},{"login":"nowakowski","id":4568385,"avatar_url":"https://avatars.githubusercontent.com/u/4568385?v=3","gravatar_id":"","url":"https://api.github.com/users/nowakowski","html_url":"https://github.com/nowakowski","followers_url":"https://api.github.com/users/nowakowski/followers","following_url":"https://api.github.com/users/nowakowski/following{/other_user}","gists_url":"https://api.github.com/users/nowakowski/gists{/gist_id}","starred_url":"https://api.github.com/users/nowakowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nowakowski/subscriptions","organizations_url":"https://api.github.com/users/nowakowski/orgs","repos_url":"https://api.github.com/users/nowakowski/repos","events_url":"https://api.github.com/users/nowakowski/events{/privacy}","received_events_url":"https://api.github.com/users/nowakowski/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-08-23T10:51:01Z","updated_at":"2016-08-23T11:12:27Z","closed_at":null,"body":"Test case:\r\n```\r\ntime curl https://dap-dev.moc.ismop.edu.pl/api/v1/threat_levels?private_token=XXX\r\n```\r\nresult:\r\n```\r\n0,12s user 0,05s system 0% cpu 42,818 total\r\n```\r\n\r\nThere is a lot of n+1 queries in DAP logs and additional bug connected with returning a loooong list of `threat_level_assessment_runs` elements."},"comment":{"url":"https://api.github.com/repos/ismop/dap/issues/comments/241699560","html_url":"https://github.com/ismop/dap/issues/151#issuecomment-241699560","issue_url":"https://api.github.com/repos/ismop/dap/issues/151","id":241699560,"user":{"login":"mkasztelnik","id":1265430,"avatar_url":"https://avatars.githubusercontent.com/u/1265430?v=3","gravatar_id":"","url":"https://api.github.com/users/mkasztelnik","html_url":"https://github.com/mkasztelnik","followers_url":"https://api.github.com/users/mkasztelnik/followers","following_url":"https://api.github.com/users/mkasztelnik/following{/other_user}","gists_url":"https://api.github.com/users/mkasztelnik/gists{/gist_id}","starred_url":"https://api.github.com/users/mkasztelnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkasztelnik/subscriptions","organizations_url":"https://api.github.com/users/mkasztelnik/orgs","repos_url":"https://api.github.com/users/mkasztelnik/repos","events_url":"https://api.github.com/users/mkasztelnik/events{/privacy}","received_events_url":"https://api.github.com/users/mkasztelnik/received_events","type":"User","site_admin":false},"created_at":"2016-08-23T11:12:27Z","updated_at":"2016-08-23T11:12:27Z","body":"I'm aware about this drop, but the main problem here is connected with n+1 queries and most probably with bug in number of returned `treat_level_assesment_runs`."}}
{"actor":{"display_login":"mkasztelnik"}}