|
@@ -12,7 +12,7 @@ import (
|
|
|
"time"
|
|
"time"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
-const N = 10_000_000
|
|
|
|
|
|
|
+const N = 1_000_000
|
|
|
|
|
|
|
|
// ======================== 计时工具 ========================
|
|
// ======================== 计时工具 ========================
|
|
|
|
|
|
|
@@ -115,9 +115,9 @@ func main() {
|
|
|
section("2. 批量插入 (增)")
|
|
section("2. 批量插入 (增)")
|
|
|
t0 := time.Now()
|
|
t0 := time.Now()
|
|
|
insertOK := int64(0)
|
|
insertOK := int64(0)
|
|
|
- reportInterval := N / 20
|
|
|
|
|
- if reportInterval < 100000 {
|
|
|
|
|
- reportInterval = 100000
|
|
|
|
|
|
|
+ reportInterval := N / 10
|
|
|
|
|
+ if reportInterval < 50000 {
|
|
|
|
|
+ reportInterval = 50000
|
|
|
}
|
|
}
|
|
|
for i := 0; i < N; i++ {
|
|
for i := 0; i < N; i++ {
|
|
|
nameBytes := make([]byte, 32)
|
|
nameBytes := make([]byte, 32)
|