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

(feat) added benchmarks for a simple Go installation #191

Merged
merged 5 commits into from Apr 7, 2024

Conversation

kevincobain2000
Copy link
Owner

@kevincobain2000 kevincobain2000 commented Apr 6, 2024

Woah, we have a lot of allocs. Thanks to your new mock tests we can now measure them.

@@ -41,6 +41,13 @@ jobs:
type: unit-test-run-time
command: go test -race -v ./... -count=1 -coverprofile=coverage.out
record: runtime
- name: Benchmark Test
Copy link
Owner Author

Choose a reason for hiding this comment

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

╰─$ 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

Copy link

github-actions bot commented Apr 6, 2024

CoverItUp Report

Type master feature/bench afee1c5 from 2feeae8
coverage 60.5% 59.2% 📉
build-time 3sec 0sec 📉
go-binary-size 6.1kKB 9.0kKB 📈
go-mod-dependencies 29 28 📉
go-sec-issues 6 5 📉
unit-test-run-time 18sec 19sec 📈
allocs-per-op 0alloc 0alloc
Comparisons Chart - master from feature/bench

base vs branchbase vs branchbase vs branchbase vs branchbase vs branchbase vs branchbase vs branch

Commits History

Upto 2feeae8 for #191
commit historycommit historycommit historycommit historycommit historycommit historycommit history

Users History

Upto 2feeae8 for #191
user historyuser historyuser historyuser historyuser historyuser historyuser history

Embed README.md

Copy link

github-actions bot commented Apr 6, 2024

CoverItUp Report

Comparison Table - 7 Types 📉
Type master feature/bench afee1c5 from c85378c
coverage 60.5% 59.2% 📉
build-time 3sec 1sec 📉
go-binary-size 6.1kKB 9.0kKB 📈
go-mod-dependencies 29 28 📉
go-sec-issues 6 5 📉
unit-test-run-time 18sec 19sec 📈
allocs-per-op 0alloc 0alloc
Comparisons Chart - master from feature/bench

base vs branchbase vs branchbase vs branchbase vs branchbase vs branchbase vs branchbase vs branch

Commits History

Upto c85378c for #191
commit historycommit historycommit historycommit historycommit historycommit historycommit history

Users History

Upto c85378c for #191
user historyuser historyuser historyuser historyuser historyuser historyuser history

Embed README.md

Copy link

github-actions bot commented Apr 6, 2024

CoverItUp Report

Comparison Table - 7 Types 📉
Type master feature/bench afee1c5 from 3cf90bc
coverage 60.5% 59.2% 📉
build-time 3sec 0sec 📉
go-binary-size 6.1kKB 9.0kKB 📈
go-mod-dependencies 29 28 📉
go-sec-issues 6 5 📉
unit-test-run-time 18sec 18sec
allocs-per-op 0alloc 19.8kalloc 📈
Comparisons Chart - master from feature/bench

base vs branchbase vs branchbase vs branchbase vs branchbase vs branchbase vs branchbase vs branch

Commits History

Upto 3cf90bc for #191
commit historycommit historycommit historycommit historycommit historycommit historycommit history

Users History

Upto 3cf90bc for #191
user historyuser historyuser historyuser historyuser historyuser historyuser history

Embed README.md

Copy link

github-actions bot commented Apr 6, 2024

CoverItUp Report

Comparison Table - 7 Types 📉
Type master feature/bench afee1c5 from a8c26b4
coverage 60.5% 59.2% 📉
build-time 3sec 1sec 📉
go-binary-size 6.1kKB 9.0kKB 📈
go-mod-dependencies 29 28 📉
go-sec-issues 6 5 📉
unit-test-run-time 18sec 19sec 📈
allocs-per-op 0alloc 19.8kalloc 📈
Comparisons Chart - master from feature/bench

base vs branchbase vs branchbase vs branchbase vs branchbase vs branchbase vs branchbase vs branch

Commits History

Upto a8c26b4 for #191
commit historycommit historycommit historycommit historycommit historycommit historycommit history

Users History

Upto a8c26b4 for #191
user historyuser historyuser historyuser historyuser historyuser historyuser history

Embed README.md

gobrew_test.go Outdated
@@ -25,6 +25,17 @@ func setupGobrew(t *testing.T, ts *httptest.Server) GoBrew {
return gb
}

func BenchmarkInstallGo(t *testing.B) {
for i := 0; i < t.N; i++ {
ts := httptest.NewServer(http.FileServer(http.Dir("testdata")))
Copy link
Collaborator

Choose a reason for hiding this comment

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

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.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Ah. Thanks!!

Copy link
Collaborator

@juev juev left a comment

Choose a reason for hiding this comment

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

I think we need to correct the test

Copy link

github-actions bot commented Apr 6, 2024

CoverItUp Report

Comparison Table - 7 Types 📉
Type master feature/bench afee1c5 from 467b444
coverage 60.5% 59.2% 📉
build-time 3sec 0sec 📉
go-binary-size 6.1kKB 9.0kKB 📈
go-mod-dependencies 29 28 📉
go-sec-issues 6 5 📉
unit-test-run-time 18sec 19sec 📈
allocs-per-op 0alloc 19.2kalloc 📈
Comparisons Chart - master from feature/bench

base vs branchbase vs branchbase vs branchbase vs branchbase vs branchbase vs branchbase vs branch

Commits History

Upto 467b444 for #191
commit historycommit historycommit historycommit historycommit historycommit historycommit history

Users History

Upto 467b444 for #191
user historyuser historyuser historyuser historyuser historyuser historyuser history

Embed README.md

@kevincobain2000 kevincobain2000 merged commit a14e160 into master Apr 7, 2024
14 checks passed
@kevincobain2000 kevincobain2000 deleted the feature/bench branch April 7, 2024 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants