mirror of
https://github.com/kataras/iris.git
synced 2025-02-02 15:30:36 +01:00
Former-commit-id: 5659b6ca274bb51d7de0d079b0e87c0c513540a6
This commit is contained in:
parent
20e2dd694f
commit
7989a2fd72
|
@ -227,7 +227,7 @@ Bombarding http://localhost:5000/api/values/5 with 1000000 requests using 125 co
|
||||||
1000000 / 1000000 [=======================================================================================] 100.00% 1m25s
|
1000000 / 1000000 [=======================================================================================] 100.00% 1m25s
|
||||||
Done!
|
Done!
|
||||||
Statistics Avg Stdev Max
|
Statistics Avg Stdev Max
|
||||||
Reqs/sec 11665.30 628.41 21978
|
Reqs/sec 11665.30 628.41 21978
|
||||||
Latency 10.72ms 1.45ms 112.10ms
|
Latency 10.72ms 1.45ms 112.10ms
|
||||||
HTTP codes:
|
HTTP codes:
|
||||||
1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0
|
1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0
|
||||||
|
|
|
@ -49,22 +49,20 @@ func (db *Database) Load(sid string) (storeDB sessions.RemoteStore) {
|
||||||
|
|
||||||
// fetch the values from this session id and copy-> store them
|
// fetch the values from this session id and copy-> store them
|
||||||
storeMaybe, err := db.redis.Get(sid)
|
storeMaybe, err := db.redis.Get(sid)
|
||||||
if err != nil {
|
// exists
|
||||||
golog.Errorf("error while trying to load session values(%s) from redis: %v", sid, err)
|
if err == nil {
|
||||||
return
|
storeB, ok := storeMaybe.([]byte)
|
||||||
}
|
if !ok {
|
||||||
|
golog.Errorf("something wrong, store should be stored as []byte but stored as %#v", storeMaybe)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
storeB, ok := storeMaybe.([]byte)
|
storeDB, err = sessions.DecodeRemoteStore(storeB) // decode the whole value, as a remote store
|
||||||
if !ok {
|
if err != nil {
|
||||||
golog.Errorf("something wrong, store should be stored as []byte but stored as %#v", storeMaybe)
|
golog.Errorf(`error while trying to load session values(%s) from redis:
|
||||||
return
|
the retrieved value is not a sessions.RemoteStore type, please report that as bug, that should never occur: %v`,
|
||||||
}
|
sid, err)
|
||||||
|
}
|
||||||
storeDB, err = sessions.DecodeRemoteStore(storeB) // decode the whole value, as a remote store
|
|
||||||
if err != nil {
|
|
||||||
golog.Errorf(`error while trying to load session values(%s) from redis:
|
|
||||||
the retrieved value is not a sessions.RemoteStore type, please report that as bug, that should never occur`,
|
|
||||||
sid)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue
Block a user