Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Issue 2650683007: Dashboard - Remove pre-hook logic from alert.py. (Closed)

Created:
3 years, 11 months ago by shatch
Modified:
3 years, 10 months ago
Reviewers:
sullivan
CC:
catapult-reviews_chromium.org, perf-dashboard-reviews_chromium.org, eakuefner
Target Ref:
refs/heads/master
Project:
catapult
Visibility:
Public.

Description

Previously alert.py has some pre-hook logic to update associated groups. This involved several sync gets + query, with some potential puts and deletes. The newer implementation strips the pre-hook out in favour of heavily batching async calls when alerts are updated. So ran through StackDriver re-triaging a bug with 53 alerts (did the new one first so that any memcache boosts would benefit the old one not the new one), gathered these timings: Demo: https://dev-simonhatch-66cc9519-dot-chromeperf.appspot.com/ Old: @479 ms https://monorail-prod.appspot.com/_ah/api/monorail/v1/projects/chromium/issues?alt=json&sendEmail=true <Modify Alerts> @10,430 ms https://monorail-prod.appspot.com/_ah/api/monorail/v1/projects/chromium/issues/685469/comments?alt=json&sendEmail=true @11,354 ms https://cr-buildbucket.appspot.com/api/discovery/v1/apis/buildbucket/v1/rest?userIp=2620%3A0%3A1000%3A1409%3A4c33%3Ac669%3A2634%3Af3bd New: @770 ms https://monorail-prod.appspot.com/_ah/api/monorail/v1/projects/chromium/issues?alt=json&sendEmail=true <Modify Alerts> @2,072 ms https://monorail-prod.appspot.com/_ah/api/monorail/v1/projects/chromium/issues/685468/comments?alt=json&sendEmail=true @3,121 ms https://cr-buildbucket.appspot.com/api/discovery/v1/apis/buildbucket/v1/rest?userIp=2620%3A0%3A1000%3A1409%3A4c33%3Ac669%3A2634%3Af3bd This would put the old implementation at about 9951 ms vs 1302 ms in this particular run if I'm understanding these traces correctly. Could probably make some of these endpoints faster by returning futures from alert_group.ModifyAlertsAndAssociatedGroups() and weaving in with the surrounding functions (like in /file_bug we could theoretically async the issue_tracker stuff). Also might want to file an issue after to refactor some of this Alert/AlertGroup code. Seems a bit brittle that you have these associated groups that need to be updated whenever attributes on an alert are modified. BUG=catapult:#2771 Review-Url: https://codereview.chromium.org/2650683007 Committed: https://chromium.googlesource.com/external/github.com/catapult-project/catapult/+/20c5e0b31c76cfbcf8ee0f629fe4c3069367f3c4 Review-Url: https://codereview.chromium.org/2650683007 Committed: https://chromium.googlesource.com/external/github.com/catapult-project/catapult/+/289d83a49d829f8bbf490667f53bb20077c5f5b7

Patch Set 1 #

Total comments: 10

Patch Set 2 : Addressed comments. #

Patch Set 3 : Fix race in delete. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+216 lines, -127 lines) Patch
M dashboard/dashboard/associate_alerts.py View 2 chunks +2 lines, -3 lines 0 comments Download
M dashboard/dashboard/edit_anomalies.py View 4 chunks +16 lines, -19 lines 0 comments Download
M dashboard/dashboard/file_bug.py View 2 chunks +3 lines, -3 lines 0 comments Download
M dashboard/dashboard/models/alert.py View 1 chunk +0 lines, -82 lines 0 comments Download
M dashboard/dashboard/models/alert_group.py View 1 2 1 chunk +128 lines, -1 line 0 comments Download
M dashboard/dashboard/models/alert_group_test.py View 5 chunks +63 lines, -16 lines 0 comments Download
M dashboard/dashboard/update_bug_with_results.py View 2 chunks +4 lines, -3 lines 0 comments Download

Messages

Total messages: 60 (50 generated)
shatch
https://codereview.chromium.org/2650683007/diff/220001/dashboard/dashboard/models/alert_group_test.py File dashboard/dashboard/models/alert_group_test.py (left): https://codereview.chromium.org/2650683007/diff/220001/dashboard/dashboard/models/alert_group_test.py#oldcode64 dashboard/dashboard/models/alert_group_test.py:64: # Add these anomalies to groups and put them ...
3 years, 10 months ago (2017-01-30 19:17:20 UTC) #20
sullivan
lgtm I wrote out my thoughts on tradeoffs between approaches as I was reading, but ...
3 years, 10 months ago (2017-02-02 01:02:29 UTC) #21
shatch
https://codereview.chromium.org/2650683007/diff/220001/dashboard/dashboard/models/alert_group.py File dashboard/dashboard/models/alert_group.py (right): https://codereview.chromium.org/2650683007/diff/220001/dashboard/dashboard/models/alert_group.py#newcode84 dashboard/dashboard/models/alert_group.py:84: # value to set and using kwargs let's us ...
3 years, 10 months ago (2017-02-02 16:10:42 UTC) #22
sullivan
lgtm +eakuefner since he's interested in these performance discussions. But I think you made the ...
3 years, 10 months ago (2017-02-02 17:01:30 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2650683007/240001
3 years, 10 months ago (2017-02-03 14:38:13 UTC) #29
commit-bot: I haz the power
Committed patchset #2 (id:240001) as https://chromium.googlesource.com/external/github.com/catapult-project/catapult/+/20c5e0b31c76cfbcf8ee0f629fe4c3069367f3c4
3 years, 10 months ago (2017-02-03 14:39:55 UTC) #32
shatch
A revert of this CL (patchset #2 id:240001) has been created in https://codereview.chromium.org/2670003006/ by simonhatch@chromium.org. ...
3 years, 10 months ago (2017-02-03 16:57:46 UTC) #33
shatch
On 2017/02/03 16:57:46, shatch wrote: > A revert of this CL (patchset #2 id:240001) has ...
3 years, 10 months ago (2017-02-03 20:30:32 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2650683007/260001
3 years, 10 months ago (2017-02-03 20:30:55 UTC) #57
commit-bot: I haz the power
3 years, 10 months ago (2017-02-03 20:32:37 UTC) #60
Message was sent while issue was closed.
Committed patchset #3 (id:260001) as
https://chromium.googlesource.com/external/github.com/catapult-project/catapu...

Powered by Google App Engine
This is Rietveld 408576698