-
Notifications
You must be signed in to change notification settings - Fork 36
Conversation
Thank you for submitting this PR!
Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment.
We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution. |
3d591e3
to
11498f4
Compare
11498f4
to
80e1a84
Compare
arc_cache_test.go
Outdated
case <-t.ctx.Done(): | ||
return | ||
default: | ||
idx := rand.Intn(t.numBlocks - 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: give each goroutine it's own rand.Source
. The package level functions like rand.Intn
use a shared source with a mutex.
@frrist : this was from your tribute week, right? Should this get published (non draft) so it can then be merged? |
arc_cache_test.go
Outdated
@@ -259,3 +352,187 @@ func TestPutManyCaches(t *testing.T) { | |||
trap("PunMany has hit datastore", cd, t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's not actually in the diff, but I happen to see a typo here.
(And it's the best typo.)
I'm a little worried with the way the thrash tests interact with the golang benchmark system. Example output (from #66) is:
The trouble here is A) (minor) it's hard to read without doing additional math on the side, and B) (potentially major) the amount of time taken per "op" is causing the benchmarking system to scale down the run count all the way to one, which means the result could be quite random. Also, big plus-one to iand's comment about shared sources of randomness introducing other mutexing which could be throwing off results in interesting ways. |
closing in favor of #70 |
Based on v1.0.0
What
Setup for work for completing #64. Adds simple benchmarks for putting and getting blocks from the arc cache.
TODO