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
Page unresponsive when loading report of many repos with huge date gap #542 #596
Conversation
@reposense/stage1-reviewers Ready for review |
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.
It seems that you have added many startDate to the functions. Why is this necessary?
Which one? Is it in the If yes, it is because now we don't store empty commits per day but instead we only store meaningful commits. We need start date to count the variance. |
@reposense/stage1-reviewers if no one will review, I will proceed with requesting review from stage2-reviewers. I'll request for review from stage2 by 4pm (end of CS3282 class) |
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.
Some comments for now
"charlesgoh": 87747.24, | ||
"jeffreygohkw": 72073.97, | ||
"Esilocke": 419051.7, | ||
"wangyiming1019": 64918.33 |
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 is the variance changing though?
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.
@yamidark
I have investigated it.
I think it is float operation
Consider this arguments
--repo https://github.com/reposense/RepoSense.git --since 01/03/2019
The variance for the old implementation will be 2149.7754
The variance for the new implementation will be 2149.7756
I think the change is caused by the different order of evaluation of totalContribution
For the old implementation, the order will be as follow:
0 0 0 0 0 0 0 0 174 0 0 0 0
While for the new implementation, the order will be as follow:
0 174 0 0 0 0 0 0 0 0 0 0 0
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.
Fixed, I change implementation
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.
Those empty contributions that is not removed comes from
I do not investigate why so. I only uses what I get from |
From what I perceived, it seems to be that an empty contribution will be added to all authors for every commit. The commit should only be attributed to its author and not all the contributors in the repo. Can you look into it and fix this? |
Okay I think better to fix this at separate PR |
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.
minor nit
@@ -19,6 +19,9 @@ | |||
*/ | |||
public class CommitResultAggregator { | |||
|
|||
private static final int DAYS_IN_MS = 24 * 60 * 60 * 1000; | |||
private static Date lastDate = null; |
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 assumption that the lastDate can be a global variable here?
Perhaps make it a returning value in the methods through pointer etc.
20a93c2
to
6e53b45
Compare
@reposense/stage2-reviewers ready for review |
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.
minor nits, good to go from me after the fix
@reposense/stage2-reviewers fixed last nit spotted by Eugene |
Codecov Report
@@ Coverage Diff @@
## master #596 +/- ##
===========================================
+ Coverage 80.64% 80.84% +0.2%
- Complexity 537 541 +4
===========================================
Files 68 68
Lines 1767 1770 +3
Branches 185 189 +4
===========================================
+ Hits 1425 1431 +6
+ Misses 247 245 -2
+ Partials 95 94 -1
Continue to review full report at Codecov.
|
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.
Some nits, rest LGTM
Fix #542