The case BenchmarkRange seems has some problem ?
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 40/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- testing
Research direction
Look at the benchmark code in the issue; the map is empty because the setup function is nil. Find the benchmark file (likely in the repository root or a test directory) and examine the BenchmarkRange test. Check how the map is populated before the timer starts. The fix is to add proper setup to fill the map with data before b.ResetTimer(). Run the benchmark to verify the results are realistic.
Written by the indexing model from the issue text.
Description
// syncmap code:
b.Run(fmt.Sprintf("%T", &IntMap{}), func(b *testing.B) {
m := &IntMap{}
// setup:
// reset:
b.ResetTimer()
// perG:
perG := func(b *testing.B, pb *testing.PB, i int, m *IntMap) {
for ; pb.Next(); i++ {
m.Range(func(_, _ int) bool { return true })
}
}
var i int64
b.RunParallel(func(pb *testing.PB) {
id := int(atomic.AddInt64(&i, 1) - 1)
perG(b, pb, id*b.N, m)
})
})
seems the setup function is nil, then the map is empy, so at the benrchmark result, it seems vary fast
- Dominant language
- Go
- Stars
- 257
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from a8m/syncmap
-
Fails with errorOpen
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
GetValues & GetKeysOpen
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
prime-radiant-inc/evener#3873 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
pion/interceptor#479 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
yetone/magpie#1035 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
slavakurilyak/awesome-ai-agents#710 ·
Maintainers usually reply within 1 day
-
`renderLinkedIssues` overshoots its byte budget: unresolved and omitted lists are never boundedOpenagent-butler-finding agent-research-recommend bug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
jordansmall/spindrift#4614 · 1 comment ·
Maintainers usually reply within 1 day