** 性能测试 | 基准测试 */
(b *testing.B)
| 189 | */ |
| 190 | |
| 191 | func BenchmarkRuntimeStore_SessionRead_1(b *testing.B) { |
| 192 | testStore := NewRuntimeStore(NewDefaultRuntimeConfig()) |
| 193 | testValue := make(map[interface{}]interface{}) |
| 194 | testValue["foo"] = "bar" |
| 195 | testStore.SessionUpdate(NewSessionState(testStore, "session_read", testValue)) |
| 196 | |
| 197 | for i := 0; i < b.N; i++ { |
| 198 | testStore.SessionRead("session_read") |
| 199 | } |
| 200 | b.ReportAllocs() |
| 201 | } |
| 202 | |
| 203 | func BenchmarkRuntimeStore_SessionRead_Parallel(b *testing.B) { |
| 204 | testStore := NewRuntimeStore(NewDefaultRuntimeConfig()) |
nothing calls this directly
no test coverage detected