This commit is contained in:
@@ -14,5 +14,5 @@
|
||||
"logLevel": 0,
|
||||
"port": "80",
|
||||
"sessionName": "HOTIME",
|
||||
"tpt": "tpt"
|
||||
"tpt": "example/tpt"
|
||||
}
|
||||
+16
-1
@@ -10,6 +10,21 @@ import (
|
||||
|
||||
func main() {
|
||||
|
||||
x:=hotime.CacheMemory{}
|
||||
x.Cache("x",123)
|
||||
|
||||
for i:=0;i<10000000 ;i++ {
|
||||
go func() {
|
||||
x.Cache("y",i)
|
||||
fmt.Println(x.Cache("y"))
|
||||
fmt.Println(x.Cache("y",nil))
|
||||
|
||||
}()
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
appIns := hotime.Application{}
|
||||
i := 0
|
||||
|
||||
@@ -21,7 +36,7 @@ func main() {
|
||||
})
|
||||
|
||||
//手动模式,
|
||||
appIns.SetConfig()
|
||||
appIns.SetConfig("example/config/config.json")
|
||||
appIns.SetConnectDB(func(err ...*hotime.Error) *sql.DB {
|
||||
query := appIns.Config.GetString("dbUser") + ":" + appIns.Config.GetString("dbPwd") +
|
||||
"@tcp(" + appIns.Config.GetString("dbHost") + ":" + appIns.Config.GetString("dbPort") + ")/" + appIns.Config.GetString("dbName") + "?charset=utf8"
|
||||
|
||||
Reference in New Issue
Block a user