{"action":"created","issue":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9611","repository_url":"https://api.github.com/repos/ManageIQ/manageiq","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9611/labels{/name}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9611/comments","events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9611/events","html_url":"https://github.com/ManageIQ/manageiq/pull/9611","id":163893528,"number":9611,"title":"Perf Capture timer - don't pull back tags or taggings","user":{"login":"kbrock","id":1930,"avatar_url":"https://avatars.githubusercontent.com/u/1930?v=3","gravatar_id":"","url":"https://api.github.com/users/kbrock","html_url":"https://github.com/kbrock","followers_url":"https://api.github.com/users/kbrock/followers","following_url":"https://api.github.com/users/kbrock/following{/other_user}","gists_url":"https://api.github.com/users/kbrock/gists{/gist_id}","starred_url":"https://api.github.com/users/kbrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbrock/subscriptions","organizations_url":"https://api.github.com/users/kbrock/orgs","repos_url":"https://api.github.com/users/kbrock/repos","events_url":"https://api.github.com/users/kbrock/events{/privacy}","received_events_url":"https://api.github.com/users/kbrock/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/darga/yes","name":"darga/yes","color":"000000"},{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/metrics","name":"metrics","color":"5319e7"},{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/performance","name":"performance","color":"fad8c7"}],"state":"open","locked":false,"assignee":{"login":"gtanzillo","id":76593,"avatar_url":"https://avatars.githubusercontent.com/u/76593?v=3","gravatar_id":"","url":"https://api.github.com/users/gtanzillo","html_url":"https://github.com/gtanzillo","followers_url":"https://api.github.com/users/gtanzillo/followers","following_url":"https://api.github.com/users/gtanzillo/following{/other_user}","gists_url":"https://api.github.com/users/gtanzillo/gists{/gist_id}","starred_url":"https://api.github.com/users/gtanzillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gtanzillo/subscriptions","organizations_url":"https://api.github.com/users/gtanzillo/orgs","repos_url":"https://api.github.com/users/gtanzillo/repos","events_url":"https://api.github.com/users/gtanzillo/events{/privacy}","received_events_url":"https://api.github.com/users/gtanzillo/received_events","type":"User","site_admin":false},"assignees":[{"login":"gtanzillo","id":76593,"avatar_url":"https://avatars.githubusercontent.com/u/76593?v=3","gravatar_id":"","url":"https://api.github.com/users/gtanzillo","html_url":"https://github.com/gtanzillo","followers_url":"https://api.github.com/users/gtanzillo/followers","following_url":"https://api.github.com/users/gtanzillo/following{/other_user}","gists_url":"https://api.github.com/users/gtanzillo/gists{/gist_id}","starred_url":"https://api.github.com/users/gtanzillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gtanzillo/subscriptions","organizations_url":"https://api.github.com/users/gtanzillo/orgs","repos_url":"https://api.github.com/users/gtanzillo/repos","events_url":"https://api.github.com/users/gtanzillo/events{/privacy}","received_events_url":"https://api.github.com/users/gtanzillo/received_events","type":"User","site_admin":false}],"milestone":null,"comments":9,"created_at":"2016-07-05T16:35:55Z","updated_at":"2016-07-07T21:19:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/9611","html_url":"https://github.com/ManageIQ/manageiq/pull/9611","diff_url":"https://github.com/ManageIQ/manageiq/pull/9611.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/9611.patch"},"body":"Purpose or Intent\r\n-----------------\r\nScheduled job `perf_capture_timer` is responsible for kicking off Cap&U for the system.\r\nIt is split up into 2 parts:\r\n\r\n1. Determine which resources (i.e.: `Host`, `Storage`, `Vm`) need Cap & U\r\n2. Submits them into the queue for further processing. **this pr** - building upon #9477\r\n\r\nThis process is taking a long time and timing out before completed. This is causing VMs to never have cap&u performed.\r\n\r\nThis PR focuses on **part 2** and the themes is to access `perf_capture_now?`. It aims to not pull back all taggings for al tags. Which are 90% of all the records brought back in this job.\r\n\r\nThis method is split up into 2 the two ways an alert can be associated with a resource:\r\n\r\n1. Alerts assigned to an individual resource. (e.g.: `/vm/tags/5`)\r\n2. Alerts linked to a resource via a common tag (e.g.: `/environment/production`)\r\n\r\nThose 2 parts have been refactored separately, and assigned a variable each.\r\n\r\nBefore, all the tags were looked up, downloaded, and each brought back tags of interest.\r\nAfter, the parents themselves are joined into tags to bring back the tags of interest.\r\n\r\nAnother pr #9588 added specs to try and avoid regressions.\r\n\r\n\r\n|       ms |   bytes | objects |    queries | query (ms) |     rows |`comments`\r\n|      ---:|     ---:|     ---:|     ---:|     ---:|      ---:| ---\r\n|  2,342.9 | 83,456,901* | 2,000,870 |     967 |   646.6 |   11,235 |`before-1`\r\n|  1,952.9 | 59,767,319* | 1,231,726 |     862 |   529.9 |    1,210 |`after-1`\r\n\r\nnote: * some objects were freed, so bytes used is not accurate but more of a guide. objects is more accurate.\r\n"},"comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments/231210578","html_url":"https://github.com/ManageIQ/manageiq/pull/9611#issuecomment-231210578","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9611","id":231210578,"user":{"login":"gtanzillo","id":76593,"avatar_url":"https://avatars.githubusercontent.com/u/76593?v=3","gravatar_id":"","url":"https://api.github.com/users/gtanzillo","html_url":"https://github.com/gtanzillo","followers_url":"https://api.github.com/users/gtanzillo/followers","following_url":"https://api.github.com/users/gtanzillo/following{/other_user}","gists_url":"https://api.github.com/users/gtanzillo/gists{/gist_id}","starred_url":"https://api.github.com/users/gtanzillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gtanzillo/subscriptions","organizations_url":"https://api.github.com/users/gtanzillo/orgs","repos_url":"https://api.github.com/users/gtanzillo/repos","events_url":"https://api.github.com/users/gtanzillo/events{/privacy}","received_events_url":"https://api.github.com/users/gtanzillo/received_events","type":"User","site_admin":false},"created_at":"2016-07-07T21:19:17Z","updated_at":"2016-07-07T21:19:17Z","body":"@kbrock and I verified that the tests in #9588 were merged into this PR and passed 🍰 "}}
{"actor":{"display_login":"gtanzillo"}}