Skip to content
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

[gui][server] Statistics #2897

Merged
merged 4 commits into from
Sep 9, 2020
Merged

Conversation

csordasmarton
Copy link
Contributor

  • Show statistics in separate tabs.
  • Component statistics.
  • Compare statistics.
  • Improve compare queries by using subqueries.

Copy link
Contributor

@gyorb gyorb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default sorting could be based on the severity of the checkers in the component statistics view too.

Also please check travis, the tests did not run.

I did not found any tests for the api changes, or for the new UI features.

@@ -349,6 +347,81 @@ def process_report_filter(session, report_filter):
return filter_expr


def get_outstanding_reports_filter(tbl=Report):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was renamed to open reports right?

what is the tbl=Report expression, Report is a type right?

web/server/codechecker_server/api/report_server.py Outdated Show resolved Hide resolved
web/server/codechecker_server/api/report_server.py Outdated Show resolved Hide resolved
or_(report_cnt_q.c.fixed_at.is_(None),
report_cnt_q.c.fixed_at >=
RunHistory.time))) \
.filter(get_outstanding_reports_filter(report_cnt_q.c)) \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

open reports filter? Shouldn't the query from the other PR be used when that is merged?

Copy link
Contributor

@gyorb gyorb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please resolve the merge conflict

- Show the number of reports based on the compare to (newcheck) section
when diffing statistics and show the number of resolved and new reports
beside it. Show these numbers as links so the user can jump and see the
reports.
- Hide diff type on statistics view.
If compare data was set on the server side the queries were really slow
because we queried the bug hashes first, then we used these hashes in an
IN clause. This patch will use subqueries to filter the results. It will
drastically improve the performance.
@gyorb
Copy link
Contributor

gyorb commented Sep 8, 2020

Codacy Here is an overview of what got changed by this pull request:

Issues
======
+ Solved 1
- Added 41
           

Complexity increasing per file
==============================
- web/server/vue-cli/src/components/Statistics/StatisticsHelper.js  3
         

Complexity decreasing per file
==============================
+ web/server/codechecker_server/api/report_server.py  -2
         

Clones removed
==============
+ web/server/codechecker_server/api/report_server.py  -11
         

See the complete overview on Codacy

Copy link
Contributor

@gyorb gyorb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested some use cases and found some interesting behavior.

click on the statistics/component statistics tab and there is let's say 2 confirmed bugs for a component.
click on the number 2
the UI jumps to the reports tab but the reports are not filtered based on the checker name the review status and the source component, I see much more results not just the 2 which were expected.
Is this behavior known and will be resolved in #2913?

@csordasmarton
Copy link
Contributor Author

@gyorb Yes, this problem will be solved in #2913.

@csordasmarton csordasmarton requested a review from gyorb September 9, 2020 06:53
@gyorb gyorb merged commit ff0b8c9 into Ericsson:master Sep 9, 2020
@csordasmarton csordasmarton deleted the refactore_statistics branch November 6, 2020 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants