|
@@ -121,8 +121,61 @@ func TestSQLiteBasic(t *testing.T) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// GOMAXPROCS 1
|
|
|
|
+// Fields count 104
|
|
|
|
+// Empty Fields count 100
|
|
|
|
+// VarFields data length 32
|
|
|
|
+// Data count 10000
|
|
|
|
+// sqlite create table use time 1.6279ms
|
|
|
|
+// sqlite create index use time 0s
|
|
|
|
+// generate maps 10000 use time 1.1913207s
|
|
|
|
+// sqlite insert with transaction 10000 use time 1.9912916s
|
|
|
|
+// sqlite insert with transaction 10000 use time 1.9434772s
|
|
|
|
+// sqlite insert immediately prepare 10000 use time 2.0023365s
|
|
|
|
+// sqlite insert immediately 10000 use time 6.1372897s
|
|
|
|
+// sqlite select query all use time 746.4µs
|
|
|
|
+// sqlite fetch data 40000 use time 9.9554222s
|
|
|
|
+// put id-data maps 10000 use time 17.2197ms
|
|
|
|
+// fetch maps data ids 10000 use time 6.8757ms
|
|
|
|
+// fetch maps data 10000 use time 1.0318ms
|
|
|
|
+//
|
|
|
|
+// GOMAXPROCS 4
|
|
|
|
+// Fields count 104
|
|
|
|
+// Empty Fields count 100
|
|
|
|
+// VarFields data length 32
|
|
|
|
+// Data count 10000
|
|
|
|
+// sqlite create table use time 2.6123ms
|
|
|
|
+// sqlite create index use time 0s
|
|
|
|
+// generate maps 10000 use time 932.7881ms
|
|
|
|
+// sqlite insert with transaction 10000 use time 1.9001722s
|
|
|
|
+// sqlite insert with transaction 10000 use time 1.887692s
|
|
|
|
+// sqlite insert immediately prepare 10000 use time 2.0469167s
|
|
|
|
+// sqlite insert immediately 10000 use time 3.6564142s
|
|
|
|
+// sqlite select query all use time 432.8µs
|
|
|
|
+// sqlite fetch data 40000 use time 8.4194779s
|
|
|
|
+// put id-data maps 10000 use time 15.1188ms
|
|
|
|
+// fetch maps data ids 10000 use time 5.1524ms
|
|
|
|
+// fetch maps data 10000 use time 167.9µs
|
|
|
|
+//
|
|
|
|
+// GOMAXPROCS 8
|
|
|
|
+// Fields count 104
|
|
|
|
+// Empty Fields count 100
|
|
|
|
+// VarFields data length 32
|
|
|
|
+// Data count 10000
|
|
|
|
+// sqlite create table use time 2.1335ms
|
|
|
|
+// sqlite create index use time 0s
|
|
|
|
+// generate maps 10000 use time 874.8548ms
|
|
|
|
+// sqlite insert with transaction 10000 use time 1.8495912s
|
|
|
|
+// sqlite insert with transaction 10000 use time 1.773086s
|
|
|
|
+// sqlite insert immediately prepare 10000 use time 1.9181581s
|
|
|
|
+// sqlite insert immediately 10000 use time 3.2221547s
|
|
|
|
+// sqlite select query all use time 235.7µs
|
|
|
|
+// sqlite fetch data 40000 use time 7.541716s
|
|
|
|
+// put id-data maps 10000 use time 14.8666ms
|
|
|
|
+// fetch maps data ids 10000 use time 5.7673ms
|
|
|
|
+// fetch maps data 10000 use time 81.5µs
|
|
func TestSQLiteProfmance(t *testing.T) {
|
|
func TestSQLiteProfmance(t *testing.T) {
|
|
- runtime.GOMAXPROCS(1)
|
|
|
|
|
|
+ runtime.GOMAXPROCS(4)
|
|
println("GOMAXPROCS ", runtime.GOMAXPROCS(0))
|
|
println("GOMAXPROCS ", runtime.GOMAXPROCS(0))
|
|
varfieldscount := 100
|
|
varfieldscount := 100
|
|
println("Fields count ", varfieldscount+4)
|
|
println("Fields count ", varfieldscount+4)
|