Commit f69a4550 authored by 张振华's avatar 张振华

update

parent c5ee6a7b
...@@ -51,8 +51,8 @@ func main() { ...@@ -51,8 +51,8 @@ func main() {
Height: 0} Height: 0}
var hashes [][]byte var hashes [][]byte
blocks := 5000000 blocks := 50000
times := 1000000 times := 10000
start1 := time.Now() start1 := time.Now()
for i := 0; i < blocks; i++ { for i := 0; i < blocks; i++ {
datas.Height = int64(i) datas.Height = int64(i)
...@@ -78,6 +78,8 @@ func main() { ...@@ -78,6 +78,8 @@ func main() {
if i < times { if i < times {
hashes = append(hashes, hash) hashes = append(hashes, hash)
} }
fmt.Println("Block number:", i)
} }
end1 := time.Now() end1 := time.Now()
...@@ -90,6 +92,7 @@ func main() { ...@@ -90,6 +92,7 @@ func main() {
for i := 0; i < times; i++ { for i := 0; i < times; i++ {
getData.StateHash = hashes[i] getData.StateHash = hashes[i]
store.Get(getData) store.Get(getData)
fmt.Println("read times:", i, " kv numbers:", i * 20)
} }
end := time.Now() end := time.Now()
fmt.Println("kvmvcc BenchmarkStoreGetKvsFor100million MemSet&Commit cost time is ", end1.Sub(start1), "blocks is", blocks) fmt.Println("kvmvcc BenchmarkStoreGetKvsFor100million MemSet&Commit cost time is ", end1.Sub(start1), "blocks is", blocks)
......
...@@ -52,8 +52,8 @@ func main() { ...@@ -52,8 +52,8 @@ func main() {
Height: 0} Height: 0}
var hashes [][]byte var hashes [][]byte
blocks := 5000000 blocks := 50000
times := 1000000 times := 10000
start1 := time.Now() start1 := time.Now()
for i := 0; i < blocks; i++ { for i := 0; i < blocks; i++ {
datas.Height = int64(i) datas.Height = int64(i)
...@@ -92,6 +92,7 @@ func main() { ...@@ -92,6 +92,7 @@ func main() {
for i := 0; i < times; i++ { for i := 0; i < times; i++ {
getData.StateHash = hashes[i] getData.StateHash = hashes[i]
store.Get(getData) store.Get(getData)
fmt.Println("read times:", i, " kv numbers:", i * 20)
} }
end := time.Now() end := time.Now()
fmt.Println("mavl BenchmarkStoreGetKvsFor100million MemSet&Commit cost time is ", end1.Sub(start1), "blocks is", blocks) fmt.Println("mavl BenchmarkStoreGetKvsFor100million MemSet&Commit cost time is ", end1.Sub(start1), "blocks is", blocks)
......
...@@ -51,8 +51,8 @@ func main() { ...@@ -51,8 +51,8 @@ func main() {
Height: 0} Height: 0}
var hashes [][]byte var hashes [][]byte
blocks := 5000000 blocks := 50000
times := 1000000 times := 10000
start1 := time.Now() start1 := time.Now()
for i := 0; i < blocks; i++ { for i := 0; i < blocks; i++ {
datas.Height = int64(i) datas.Height = int64(i)
...@@ -91,6 +91,7 @@ func main() { ...@@ -91,6 +91,7 @@ func main() {
for i := 0; i < times; i++ { for i := 0; i < times; i++ {
getData.StateHash = hashes[i] getData.StateHash = hashes[i]
store.Get(getData) store.Get(getData)
fmt.Println("read times:", i, " kv numbers:", i * 20)
} }
end := time.Now() end := time.Now()
fmt.Println("mpt BenchmarkStoreGetKvsFor100million MemSet&Commit cost time is ", end1.Sub(start1), "blocks is", blocks) fmt.Println("mpt BenchmarkStoreGetKvsFor100million MemSet&Commit cost time is ", end1.Sub(start1), "blocks is", blocks)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment