Skip to content

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

Merged
kevincobain2000 merged 5 commits intomasterfrom
feature/bench
Apr 7, 2024
Merged

(feat) added benchmarks for a simple Go installation#191
kevincobain2000 merged 5 commits intomasterfrom
feature/bench

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.

@kevincobain2000 kevincobain2000 requested a review from juev as a code owner April 6, 2024 10:16
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

@github-actions
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

@github-actions
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

@github-actions
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

@github-actions
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

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

@github-actions
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
@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.

2 participants