-
Notifications
You must be signed in to change notification settings - Fork 385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add bug path length column to Bug overview #1209
Conversation
api/v6/report_server.thrift
Outdated
@@ -156,7 +157,8 @@ struct ReportData { | |||
9: i64 column, // column number of the report main section (not part of the path). | |||
10: Severity severity, // Checker severity. | |||
11: ReviewData reviewData, // Bug review status information. | |||
12: DetectionStatus detectionStatus // State of the bug (see the enum constant values). | |||
12: DetectionStatus detectionStatus, // State of the bug (see the enum constant values). | |||
13: i64 bugPathLength, // Length of the bug path. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the policy on commas after the last item?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we add a new item to this type, we don't have to modify the last item to place a comma at the end.
|
||
reportData.bugPathLength = { | ||
length : reportData.bugPathLength, | ||
max : maxBugPathLength |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need the max here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We set a background color for each bug path length. We calculate this background color by using this maximum value (maximum length will be red). For more information see: generateRedGreenGradientColor
in util.js
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But do we need this inside all report? Or no better place to put this? Also, this is the max on the displayed page or max in the run? In case the former, I wonder if that is the behavior the users are expecting.
@csordasmarton Migration script is merged. |
@@ -248,6 +270,7 @@ function (declare, dom, Deferred, ObjectStore, Store, QueryResults, topic, | |||
{ name : 'Message', field : 'checkerMsg', width : '100%', formatter : checkerMessageFormatter }, | |||
{ name : 'Checker name', field : 'checkerId', width : '50%', formatter: checkerNameFormatter }, | |||
{ name : 'Severity', field : 'severity', cellClasses : 'severity', width : '15%', formatter : severityFormatter }, | |||
{ name : 'Bug path length', field : 'bugPathLength', cellClasses : 'bug-path-length', width : '15%', formatter : bugPathLengthFormatter }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should find a shorter name for this column. Isn't Length
enough? When the header for the column is longer than the value printed, something's not quite right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Difficulty
is much better. What do you think @whisperity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me.
I think making the gradient happen from min to max is a problem, as min, max and average are very very sensitive to a single outlier. Consider this example for bug path lenghts on three projects. That |
Coloring should not depend on the actual result list. I suggest using a color scale that uniformly shows longer (impossible to understand) bug paths as reddish and more easily shorter ones as light greenish. You could for example say that you limit the bug path color range between [1,50] (being 50 and above impossible to understand) going gradually from light green to dark red. |
63087b5
to
52589bf
Compare
Is it really required to introduce a new column? Isn't it efficient enough to use the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename the column to Length or "Path Length" instead of difficulty. Otherwise fine.
@@ -248,6 +265,7 @@ function (declare, dom, Deferred, ObjectStore, Store, QueryResults, topic, | |||
{ name : 'Message', field : 'checkerMsg', width : '100%', formatter : checkerMessageFormatter }, | |||
{ name : 'Checker name', field : 'checkerId', width : '50%', formatter: checkerNameFormatter }, | |||
{ name : 'Severity', field : 'severity', cellClasses : 'severity', width : '15%', formatter : severityFormatter }, | |||
{ name : 'Difficulty', field : 'bugPathLength', cellClasses : 'bug-path-length', width : '15%', formatter : bugPathLengthFormatter }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name it simply to Length or Bug Path length as it correctly expresses what the number means. "Difficulty" is not expressive enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Increase API version, since the thrift API has been updated
@@ -68,7 +68,8 @@ enum SortType { | |||
CHECKER_NAME, | |||
SEVERITY, | |||
REVIEW_STATUS, | |||
DETECTION_STATUS | |||
DETECTION_STATUS, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API version needs to be incremented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After Daniel's comments are resolved it LGTM!
@@ -68,7 +68,8 @@ enum SortType { | |||
CHECKER_NAME, | |||
SEVERITY, | |||
REVIEW_STATUS, | |||
DETECTION_STATUS | |||
DETECTION_STATUS, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the comment about "comma after last item" hold here? That would reduce the number of line changes in enums/structs too, assuming it's not a syntax error.
Add bug path length column to `Bug overview` table to indicate how long the report path is.
52589bf
to
487f800
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Add bug path length column to
Bug overview
table to indicate how long the report path is.Screenshot: