-
Notifications
You must be signed in to change notification settings - Fork 735
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
significant more API calls for same code #286
Comments
This seems to be in the issue code, making getCommitInfo a NOOP results in: 1.76 - without issues 1.72 - without issues |
More granularity: 1.72 1.76 This with the following code:
|
seems to be related to: The call to getCommitShortInfo in 1.72 seemed to return an already populated value whereas in 1.76 it does another API call. This explains why the number of calls went up by exactly the number of commits. |
@kohsuke I'm wondering if the commit I mentioned is correct. It doesn't seem like the pre-caching it does is important to getCommitShortInfo. This is limiting the use of your library at Netflix and I wanted to know if I should submit a PR to reverse the previous change. |
List commit API (https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository) already populates short info, and so populate() call could be excessive. It's possible that the short info is always available and therefore there's never a need to call populate(), but that assumption is hard to test, so I'm leaving that in
Thanks for the great detective work! Indeed that was a problem. I fixed that in 1.77. My apologies for the delay. |
Thanks. Confirmed fix and updated Netflix osstracker. @kohsuke |
I'm researching deeper, but with 1.72 I get:
remaining calls 4364
about to look up repo EVCache
2016-06-28 21:28:20 INFO GithubAccess:53 - repo = EVCache, forks = 82, stars = 314
2016-06-28 21:28:20 DEBUG GithubAccess:56 - openIssues = 0, openPullRequests = 0
2016-06-28 21:28:22 DEBUG GithubAccess:107 - daysSinceLastCommit = 0
2016-06-28 21:28:23 DEBUG GithubAccess:111 - numContribitors = 16, contributorEmails = ArrayBuffer(smadappa, senugula, jkschneider, vuzilla, ScottMansfield, rspieldenner, elandau, gitter-badger, rdegnan, nadavc, aspyker, trigan-d, pauloricardomg, kedargsm, quidryan, Randgalt)
2016-06-28 21:28:24 DEBUG GithubAccess:146 - avg days to close 14 issues = 357 days
2016-06-28 21:28:24 DEBUG GithubAccess:128 - avg days to close 13 pull requests = 185 days
2016-06-28 21:28:24 DEBUG GithubAccess:96 - repo json = {"asOfISO":"2016-06-29T04:27:43Z","asOfYYYYMMDD":"2016-06-29","repo_name":"EVCache","public":true,"osslifecycle":"UNKNOWN","forks":82,"stars":314,"numContributors":16,"issues":{"openCount":0,"closedCount":14,"avgTimeToCloseInDays":357},"pullRequests":{"openCount":0,"closedCount":13,"avgTimeToCloseInDays":185},"commits":{"daysSinceLastCommit":0},"contributors":["smadappa","senugula","jkschneider","vuzilla","ScottMansfield","rspieldenner","elandau","gitter-badger","rdegnan","nadavc","aspyker","trigan-d","pauloricardomg","kedargsm","quidryan","Randgalt"]}
remaining calls 4341
resulting in 23 API calls
with 1.76, I get:
remaining calls 4640
about to look up repo EVCache
2016-06-28 21:22:22 INFO GithubAccess:53 - repo = EVCache, forks = 82, stars = 314
2016-06-28 21:22:22 DEBUG GithubAccess:56 - openIssues = 0, openPullRequests = 0
2016-06-28 21:23:01 DEBUG GithubAccess:107 - daysSinceLastCommit = 0
2016-06-28 21:23:03 DEBUG GithubAccess:111 - numContribitors = 16, contributorEmails = ArrayBuffer(smadappa, senugula, jkschneider, vuzilla, ScottMansfield, rspieldenner, elandau, gitter-badger, rdegnan, nadavc, aspyker, trigan-d, pauloricardomg, kedargsm, quidryan, Randgalt)
2016-06-28 21:23:04 DEBUG GithubAccess:146 - avg days to close 14 issues = 357 days
2016-06-28 21:23:04 DEBUG GithubAccess:128 - avg days to close 13 pull requests = 185 days
2016-06-28 21:23:04 DEBUG GithubAccess:96 - repo json = {"asOfISO":"2016-06-29T04:20:26Z","asOfYYYYMMDD":"2016-06-29","repo_name":"EVCache","public":true,"osslifecycle":"UNKNOWN","forks":82,"stars":314,"numContributors":16,"issues":{"openCount":0,"closedCount":14,"avgTimeToCloseInDays":357},"pullRequests":{"openCount":0,"closedCount":13,"avgTimeToCloseInDays":185},"commits":{"daysSinceLastCommit":0},"contributors":["smadappa","senugula","jkschneider","vuzilla","ScottMansfield","rspieldenner","elandau","gitter-badger","rdegnan","nadavc","aspyker","trigan-d","pauloricardomg","kedargsm","quidryan","Randgalt"]}
remaining calls 4409
resulting in 231 API calls
This is running this code:
https://github.com/Netflix/osstracker/blob/master/osstracker-scraper/src/main/scala/com/netflix/oss/tools/osstrackerscraper/GithubAccess.scala#L52
The text was updated successfully, but these errors were encountered: