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

Issue 2593093003: [Predator] Add flag manager and flag manager test. (Closed)

Created:
4 years ago by Sharu Jiang
Modified:
3 years, 11 months ago
CC:
chromium-reviews, infra-reviews+infra_chromium.org, inferno
Target Ref:
refs/heads/master
Project:
infra
Visibility:
Public.

Description

[Predator] Add flag manager and flag manager test. Flag manager is a class to track all the flags during the stacktrace parsing. During the stacktrace parsing, some flags are needed to determine priorities of callstack or whether a frame of a stack should be filtered or not. For example, if 'fatal_java_exception' flag is on, the first java callstack we detected with this flag should have high priority. BUG= Review-Url: https://codereview.chromium.org/2593093003 Committed: https://chromium.googlesource.com/infra/infra/+/cb4c9bdf1f73ecca55f275d5c8190c53cb13258f

Patch Set 1 #

Total comments: 30

Patch Set 2 : Fix nits. #

Total comments: 34

Patch Set 3 : Fix nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+289 lines, -0 lines) Patch
A appengine/findit/crash/flag_manager.py View 1 2 1 chunk +163 lines, -0 lines 0 comments Download
A appengine/findit/crash/test/flag_manager_test.py View 1 2 1 chunk +126 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (7 generated)
Sharu Jiang
PTAL.
4 years ago (2016-12-21 19:01:17 UTC) #2
wrengr
a bunch of nits, but should be good once they're done. https://codereview.chromium.org/2593093003/diff/1/appengine/findit/crash/flag_manager.py File appengine/findit/crash/flag_manager.py (right): ...
4 years ago (2016-12-22 22:31:11 UTC) #3
Sharu Jiang
https://codereview.chromium.org/2593093003/diff/1/appengine/findit/crash/flag_manager.py File appengine/findit/crash/flag_manager.py (right): https://codereview.chromium.org/2593093003/diff/1/appengine/findit/crash/flag_manager.py#newcode5 appengine/findit/crash/flag_manager.py:5: """Module handles flags while doing stream parsing.""" On 2016/12/22 ...
3 years, 12 months ago (2016-12-27 23:48:04 UTC) #5
wrengr
lgtm with nits https://codereview.chromium.org/2593093003/diff/40001/appengine/findit/crash/flag_manager.py File appengine/findit/crash/flag_manager.py (right): https://codereview.chromium.org/2593093003/diff/40001/appengine/findit/crash/flag_manager.py#newcode7 appengine/findit/crash/flag_manager.py:7: ``ParsingFlag`` has name, a condition function ...
3 years, 11 months ago (2016-12-28 23:34:10 UTC) #7
Sharu Jiang
https://codereview.chromium.org/2593093003/diff/40001/appengine/findit/crash/flag_manager.py File appengine/findit/crash/flag_manager.py (right): https://codereview.chromium.org/2593093003/diff/40001/appengine/findit/crash/flag_manager.py#newcode7 appengine/findit/crash/flag_manager.py:7: ``ParsingFlag`` has name, a condition function which returns boolean ...
3 years, 11 months ago (2016-12-29 18:20:22 UTC) #10
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/2593093003/60001
3 years, 11 months ago (2016-12-29 18:20:26 UTC) #11
commit-bot: I haz the power
Committed patchset #3 (id:60001) as https://chromium.googlesource.com/infra/infra/+/cb4c9bdf1f73ecca55f275d5c8190c53cb13258f
3 years, 11 months ago (2016-12-29 18:30:27 UTC) #14
wrengr
https://codereview.chromium.org/2593093003/diff/40001/appengine/findit/crash/flag_manager.py File appengine/findit/crash/flag_manager.py (right): https://codereview.chromium.org/2593093003/diff/40001/appengine/findit/crash/flag_manager.py#newcode81 appengine/findit/crash/flag_manager.py:81: if not self._value and self._condition and self._condition(line): On 2016/12/29 ...
3 years, 11 months ago (2016-12-29 19:56:25 UTC) #15
Sharu Jiang
3 years, 11 months ago (2017-01-03 22:13:27 UTC) #16
Message was sent while issue was closed.
https://codereview.chromium.org/2593093003/diff/40001/appengine/findit/crash/...
File appengine/findit/crash/flag_manager.py (right):

https://codereview.chromium.org/2593093003/diff/40001/appengine/findit/crash/...
appengine/findit/crash/flag_manager.py:81: if not self._value and
self._condition and self._condition(line):
On 2016/12/29 19:56:25, wrengr wrote:
> On 2016/12/29 18:20:22, Sharu Jiang wrote:
> > On 2016/12/28 23:34:09, wrengr wrote:
> > > is there a reason to check ``bool(self._condition)`` here, rather than
> > checking
> > > it once in the constructor and if it's falsy then setting
``self._condition
> =
> > > lambda _: False`` ?
> > 
> > No, but I think the performance should be the same?
> 
> Performance would be marginally better (since you only check two bools rather
> than three), but not that much difference. I was concerned more about
> cleanliness/simplicity of the code.

Will address this in another cl

Powered by Google App Engine
This is Rietveld 408576698