Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/chaozh/MIT-6.824
/ randstring
Function
randstring
src/shardkv/config.go:20–25 ·
view source on GitHub ↗
(n int)
Source
from the content-addressed store, hash-verified
18
import
"time"
19
20
func
randstring(n int) string {
21
b := make([]byte, 2*n)
22
crand.Read(b)
23
s := base64.URLEncoding.EncodeToString(b)
24
return
s[0:n]
25
}
26
27
func
makeSeed() int64 {
28
max := big.NewInt(int64(1) << 62)
Callers
15
TestStaticShards
Function · 0.70
TestJoinLeave
Function · 0.70
TestSnapshot
Function · 0.70
TestMissChange
Function · 0.70
TestConcurrent1
Function · 0.70
TestConcurrent2
Function · 0.70
TestConcurrent3
Function · 0.70
TestUnreliable1
Function · 0.70
TestUnreliable2
Function · 0.70
TestUnreliable3
Function · 0.70
TestChallenge1Delete
Function · 0.70
makeClient
Method · 0.70
Calls
1
Read
Method · 0.80
Tested by
11
TestStaticShards
Function · 0.56
TestJoinLeave
Function · 0.56
TestSnapshot
Function · 0.56
TestMissChange
Function · 0.56
TestConcurrent1
Function · 0.56
TestConcurrent2
Function · 0.56
TestConcurrent3
Function · 0.56
TestUnreliable1
Function · 0.56
TestUnreliable2
Function · 0.56
TestUnreliable3
Function · 0.56
TestChallenge1Delete
Function · 0.56