Add more bench#3161
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3161 +/- ##
======================================
Coverage 34.9% 34.9%
======================================
Files 277 277
Lines 40108 40108
======================================
Hits 14000 14000
Misses 24059 24059
Partials 2049 2049
Continue to review full report at Codecov.
|
|
LGTM |
There was a problem hiding this comment.
Should these prints be removed (also line 113)?
There was a problem hiding this comment.
I think this can be simplified. Just make samples a list of repo IDs, and load the owner and repo in the main loop. We can get rid of the anonymous struct and this first loop.
for _, repoID := range repoIDs {
repo := models.AssertExistsAndLoadBean(b, &models.Repository{ID: repoID}).(*models.Repository)
owner := models.AssertExistsAndLoadBean(b, &models.User{ID: repo.OwnerID}).(*models.User)
... // run test
}
There was a problem hiding this comment.
branchName could begin with a slash, in which case it would not be a valid branch name
There was a problem hiding this comment.
Would "WebViewCommit" be a better name? The :owner/:repo/commit/:sha endpoint doesn't necessarily have anything to do with branches.
|
LGTM |
Add some bench for testing so I propose to add them.