(feat) added benchmarks for a simple Go installation#191
Merged
kevincobain2000 merged 5 commits intomasterfrom Apr 7, 2024
Merged
(feat) added benchmarks for a simple Go installation#191kevincobain2000 merged 5 commits intomasterfrom
kevincobain2000 merged 5 commits intomasterfrom
Conversation
kevincobain2000
commented
Apr 6, 2024
| type: unit-test-run-time | ||
| command: go test -race -v ./... -count=1 -coverprofile=coverage.out | ||
| record: runtime | ||
| - name: Benchmark Test |
Owner
Author
There was a problem hiding this comment.
╰─$ go test -count 2 -bench=. ./... -benchmem|grep "allocs"
145 8069938 ns/op 7360722 B/op 19794 allocs/op
152 8272545 ns/op 7370076 B/op 19794 allocs/op
CoverItUp Report
Commits HistoryUpto Users HistoryUpto |
CoverItUp ReportComparison Table - 7 Types 📉
Commits HistoryUpto Users HistoryUpto |
CoverItUp ReportComparison Table - 7 Types 📉
Commits HistoryUpto Users HistoryUpto |
CoverItUp ReportComparison Table - 7 Types 📉
Commits HistoryUpto Users HistoryUpto |
juev
reviewed
Apr 6, 2024
gobrew_test.go
Outdated
|
|
||
| func BenchmarkInstallGo(t *testing.B) { | ||
| for i := 0; i < t.N; i++ { | ||
| ts := httptest.NewServer(http.FileServer(http.Dir("testdata"))) |
Collaborator
There was a problem hiding this comment.
why do you include the launch of the web server in the performance test?
in my opinion, this should not be done in a loop, but at the very beginning of the function, after which we should reset the time counter.
in this case, the data will be correct.
juev
requested changes
Apr 6, 2024
Collaborator
juev
left a comment
There was a problem hiding this comment.
I think we need to correct the test
CoverItUp ReportComparison Table - 7 Types 📉
Commits HistoryUpto Users HistoryUpto |
juev
approved these changes
Apr 6, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Woah, we have a lot of allocs. Thanks to your new mock tests we can now measure them.