User shuffle shard token.
(user, zone string, skip int)
| 4208 | |
| 4209 | // User shuffle shard token. |
| 4210 | func userToken(user, zone string, skip int) uint32 { |
| 4211 | r := rand.New(rand.NewSource(shard.ShuffleShardSeed(user, zone))) |
| 4212 | |
| 4213 | for ; skip > 0; skip-- { |
| 4214 | _ = r.Uint32() |
| 4215 | } |
| 4216 | return r.Uint32() |
| 4217 | } |
| 4218 | |
| 4219 | func TestUpdateMetrics(t *testing.T) { |
| 4220 | cfg := Config{ |
no test coverage detected