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

Benchmark failed #35

Closed
redseabay opened this issue Feb 10, 2019 · 1 comment
Closed

Benchmark failed #35

redseabay opened this issue Feb 10, 2019 · 1 comment

Comments

@redseabay
Copy link

redseabay commented Feb 10, 2019

I add log line before b.fai
b.Logf("%s: error when i==%d", funcName, i)

and i noticed most i is 742, some is 178

if i change benchmarkItemCount to 512 (1<<9), i change to 385 390 403... seems it is not very random

CPU: amd ryzen 2600, ram 16G, os windows 7 64bit

BTW: race detect has no problem

my first log with an error log line:

benchmark_test.go:88: BenchmarkReadHashMapUint: error when i:742 j: %!d(<nil>)

goos: windows
goarch: amd64
pkg: github.com/cornelk/hashmap
--- FAIL: BenchmarkReadHashMapWithWritesUint-12
benchmark_test.go:114: BenchmarkReadHashMapWithWritesUint: error when i:742 j:%!d()
benchmark_test.go:114: BenchmarkReadHashMapWithWritesUint: error when i:742 j:%!d()
benchmark_test.go:114: BenchmarkReadHashMapWithWritesUint: error when i:742 j:%!d()
benchmark_test.go:114: BenchmarkReadHashMapWithWritesUint: error when i:742 j:%!d()
benchmark_test.go:114: BenchmarkReadHashMapWithWritesUint: error when i:742 j:%!d()
benchmark_test.go:114: BenchmarkReadHashMapWithWritesUint: error when i:742 j:%!d()
benchmark_test.go:114: BenchmarkReadHashMapWithWritesUint: error when i:742 j:%!d()
benchmark_test.go:114: BenchmarkReadHashMapWithWritesUint: error when i:742 j:%!d()
benchmark_test.go:114: BenchmarkReadHashMapWithWritesUint: error when i:742 j:%!d()
benchmark_test.go:114: BenchmarkReadHashMapWithWritesUint: error when i:742 j:%!d()
benchmark_test.go:114: BenchmarkReadHashMapWithWritesUint: error when i:178 j:%!d()
benchmark_test.go:114: BenchmarkReadHashMapWithWritesUint: error when i:742 j:%!d()
benchmark_test.go:114: BenchmarkReadHashMapWithWritesUint: error when i:178 j:%!d()
benchmark_test.go:114: BenchmarkReadHashMapWithWritesUint: error when i:178 j:%!d()

benchmarkItemCount changed to 512
--- FAIL: BenchmarkReadHashMapUint-12
benchmark_test.go:109: BenchmarkReadHashMapUint: error when i==390
benchmark_test.go:109: BenchmarkReadHashMapUint: error when i==390
benchmark_test.go:109: BenchmarkReadHashMapUint: error when i==390
benchmark_test.go:109: BenchmarkReadHashMapUint: error when i==390
benchmark_test.go:109: BenchmarkReadHashMapUint: error when i==390

@cornelk
Copy link
Owner

cornelk commented Aug 9, 2022

I am not able to reproduce this.

@cornelk cornelk closed this as completed Aug 9, 2022
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

No branches or pull requests

2 participants