feat(cache): 优化缓存系统并重构数据库连接管理
- 将Redis连接方式改为连接池模式,提升连接复用效率 - 修复缓存注释错误,统一标识数据库缓存逻辑 - 添加数据检索结果非空验证,避免空指针异常 - 在数据库操作中添加读写锁保护,确保并发安全性 - 实现数据库查询和执行操作的重试机制,增强稳定性 - 更新配置文件中的缓存和数据库设置,优化缓存策略 - 重构README文档,补充框架特性和性能测试数据 - 添加示例路由配置,完善快速入门指南
This commit is contained in:
parent
3455fb0a1c
commit
b755519fc6
632
.cursor/debug.log
Normal file
632
.cursor/debug.log
Normal file
@ -0,0 +1,632 @@
|
||||
{"data":{"query":"SELECT TABLE_NAME as name,TABLE_COMMENT as label FROM INFORMATION_SCHEMA.TABLES WHERE `TABLE_SCHEMA` =? ;","table":"INFORMATION_SCHEMA.TABLES"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276211}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276221}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276224}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276228}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276231}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276234}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276238}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276241}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276244}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276245}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276248}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276250}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276254}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276256}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276260}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276263}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276265}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276268}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276270}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276274}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276276}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276280}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276284}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276287}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276291}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276294}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276297}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276301}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276304}
|
||||
{"data":{"query":"SELECT COLUMN_NAME AS name,COLUMN_TYPE AS type,COLUMN_COMMENT AS label,IS_NULLABLE AS must,COLUMN_DEFAULT AS dflt_value FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_NAME` =? AND `TABLE_SCHEMA` =? ORDER BY ORDINAL_POSITION ;","table":"INFORMATION_SCHEMA.COLUMNS"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025276307}
|
||||
{"data":{"concurrency":30,"iterations":10},"hypothesisId":"D","location":"main.go:db:start","message":"开始数据库并发测试","sessionId":"debug-session","timestamp":1769025282458}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282467}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282467}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282467}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282467}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282467}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282467}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282467}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282467}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282468}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282468}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282467}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282468}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282468}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282468}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282469}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282469}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282468}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282469}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282470}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282470}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282470}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282470}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282471}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282471}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282471}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282470}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282473}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282473}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282473}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282473}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282477}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282480}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282481}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282481}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282483}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282483}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282484}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282484}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282485}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282487}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282487}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282488}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282488}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282488}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282491}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282491}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282491}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282492}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282492}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282492}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282492}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282492}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282492}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282493}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282494}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282495}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282495}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282495}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282495}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282496}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282496}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282496}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282496}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282496}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282497}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282497}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282497}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282497}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282497}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282497}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282498}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282498}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282498}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282499}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282499}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282499}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282500}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282500}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282501}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282501}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282503}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282503}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282503}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282504}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282504}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282505}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282505}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282505}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282507}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282507}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282509}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282509}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282509}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282509}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282509}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282510}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282511}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282512}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282512}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282512}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282512}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282513}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282514}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282515}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282515}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282515}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282517}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282519}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282519}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282521}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282522}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282522}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282522}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282523}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282523}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282524}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282524}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282526}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282526}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282527}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282527}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282529}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282529}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282529}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282529}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282529}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282529}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282529}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282531}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282531}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282531}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282531}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282532}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282535}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282535}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282538}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282540}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282540}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282540}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282540}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282542}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282543}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282544}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282544}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282545}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282545}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282544}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282545}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282545}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282546}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282546}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282548}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282548}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282548}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282548}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282549}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282549}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282550}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282552}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282552}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282552}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282553}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282553}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282553}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282554}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282554}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282556}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282556}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282556}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282556}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282556}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282556}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282556}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282556}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282558}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282558}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282558}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282559}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282559}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282559}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282559}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282560}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282560}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282561}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282560}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282562}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282562}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282563}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282563}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282563}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282564}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282564}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282564}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282565}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282566}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282566}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282566}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282566}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282566}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282567}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282567}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282567}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282567}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282569}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282569}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282569}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282570}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282570}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282570}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282571}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282571}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282573}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282573}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282573}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282573}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282573}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282573}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282575}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282575}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282576}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282576}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282576}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282576}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282577}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282577}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282577}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282577}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282578}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282578}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282578}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282580}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282580}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282580}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282580}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282580}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282580}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282580}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282580}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282582}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282582}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282582}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282582}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282583}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282583}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282583}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282584}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282585}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282585}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282585}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282585}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282587}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282587}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282587}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282587}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282589}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282589}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282589}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282590}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282590}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282591}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282591}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282593}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282594}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282594}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282594}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282594}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282594}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282595}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282596}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282596}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282596}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282596}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282598}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282598}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282598}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282598}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282598}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282600}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282600}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282600}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282600}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282600}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282600}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282601}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282601}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282601}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282601}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282601}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282602}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282603}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282603}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282605}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282605}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282605}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282606}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282606}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282606}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282607}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282607}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282607}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282608}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282608}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282608}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282608}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282608}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282610}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282610}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282610}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282610}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282610}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282611}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282611}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282611}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282612}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282612}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282613}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282614}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282614}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282614}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282615}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282615}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282616}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282616}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282616}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282617}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282617}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282617}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282618}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282618}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282619}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282619}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282620}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282620}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282620}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282620}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282620}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282620}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282621}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282621}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282624}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282624}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282624}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282624}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282625}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282625}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282625}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282627}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282627}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282627}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282627}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282627}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282632}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282632}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282634}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282635}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282636}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282635}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282636}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282636}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282637}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282637}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282637}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282637}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282639}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282639}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282639}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282639}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282639}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282640}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282640}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282641}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282641}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282642}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282642}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282644}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282644}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282644}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282645}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282645}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282645}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282649}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282649}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282649}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282650}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282651}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282651}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282651}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282651}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282652}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282652}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282652}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282652}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282652}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282652}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282653}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282653}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282655}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282655}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282655}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282658}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282658}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282658}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282658}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282658}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282658}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282658}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282660}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282660}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282660}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282660}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282661}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282661}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282661}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282661}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282662}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282662}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282662}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282662}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282663}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282663}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282663}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282663}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282664}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282666}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282667}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282667}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282667}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282668}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282669}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282669}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282670}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282670}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282670}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282670}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282672}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282672}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282672}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282672}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282675}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282675}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282676}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282676}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282676}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282676}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282677}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282677}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282678}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282678}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282679}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282679}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282679}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282680}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282680}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282680}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282682}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282682}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282682}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282682}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282682}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282683}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282682}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282683}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282683}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282684}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282684}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282686}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282686}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282686}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282686}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282687}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282687}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282687}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282687}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282690}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282690}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282690}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282690}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282691}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282691}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282691}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282692}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282692}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282692}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282692}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282693}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282693}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282693}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282695}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282695}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282695}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282695}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282696}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282697}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282697}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282698}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282698}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282698}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282698}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282700}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282700}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282700}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282701}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282701}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282701}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282701}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282703}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282703}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282703}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282703}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282703}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282704}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282704}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282704}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282704}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282706}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282707}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282707}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282708}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282709}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282709}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282709}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282711}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282711}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282711}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282712}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282712}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282713}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282713}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282714}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282714}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282714}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282714}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282714}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282715}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282716}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282718}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282719}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282719}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282719}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282719}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282719}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282721}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282722}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282722}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282723}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282723}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282723}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282724}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282724}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282724}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282724}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282725}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282727}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282727}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282727}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282729}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282730}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282731}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282731}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282733}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282733}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282733}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282734}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282734}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282734}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282736}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282736}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282736}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282737}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282740}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282740}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282740}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282740}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282741}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282741}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282742}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282742}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282743}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282744}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282745}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282745}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282745}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282746}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282746}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282747}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282747}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282747}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282748}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282748}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282750}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282750}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282750}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282753}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282753}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282755}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282757}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282760}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282760}
|
||||
{"data":{"table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Insert:exec","message":"执行Insert","sessionId":"db-debug","timestamp":1769025282763}
|
||||
{"data":{"query":"SELECT * FROM `test_concurrent` WHERE `id` =? LIMIT 1 ;","table":"test_concurrent"},"hypothesisId":"J","location":"hotimedb.go:Select:db_query","message":"执行数据库查询","sessionId":"db-debug","timestamp":1769025282767}
|
||||
{"data":{"duration_ms":303,"errorCount":0,"successCount":300,"total":300},"hypothesisId":"D","location":"main.go:db:end","message":"数据库并发测试完成","sessionId":"debug-session","timestamp":1769025282770}
|
||||
168
.cursor/plans/集成请求参数获取方法_60cbd8aa.plan.md
Normal file
168
.cursor/plans/集成请求参数获取方法_60cbd8aa.plan.md
Normal file
@ -0,0 +1,168 @@
|
||||
---
|
||||
name: 集成请求参数获取方法
|
||||
overview: 在 context.go 中为 Context 结构体添加五个请求参数获取方法:ReqData(统一获取)、ReqDataParams(URL参数)、ReqDataJson(JSON Body)、ReqDataForm(表单数据)、ReqFile(获取上传文件)。
|
||||
todos:
|
||||
- id: add-imports
|
||||
content: 在 context.go 中添加 bytes、io、mime/multipart 包的导入
|
||||
status: completed
|
||||
- id: impl-params
|
||||
content: 实现 ReqParam/ReqParams 方法(获取 URL 参数,返回 *Obj)
|
||||
status: in_progress
|
||||
dependencies:
|
||||
- add-imports
|
||||
- id: impl-form
|
||||
content: 实现 ReqForm/ReqForms 方法(获取表单数据,返回 *Obj)
|
||||
status: pending
|
||||
dependencies:
|
||||
- add-imports
|
||||
- id: impl-json
|
||||
content: 实现 ReqJson/ReqJsons 方法(获取 JSON Body,返回 *Obj)
|
||||
status: pending
|
||||
dependencies:
|
||||
- add-imports
|
||||
- id: impl-file
|
||||
content: 实现 ReqFile/ReqFiles 方法(获取上传文件)
|
||||
status: pending
|
||||
dependencies:
|
||||
- add-imports
|
||||
- id: impl-reqdata
|
||||
content: 实现 ReqData/ReqDatas 方法(统一获取,返回 *Obj)
|
||||
status: pending
|
||||
dependencies:
|
||||
- impl-params
|
||||
- impl-form
|
||||
- impl-json
|
||||
---
|
||||
|
||||
# 集成请求参数获取方法
|
||||
|
||||
## 实现位置
|
||||
|
||||
在 [`context.go`](context.go) 中添加请求参数获取方法,**风格与 `Session("key")` 保持一致,返回 `*Obj` 支持链式调用**。
|
||||
|
||||
## 新增方法
|
||||
|
||||
### 1. ReqParam - 获取 URL 查询参数(返回 *Obj)
|
||||
|
||||
```go
|
||||
// 获取单个参数,支持链式调用
|
||||
func (that *Context) ReqParam(key string) *Obj {
|
||||
// that.ReqParam("id").ToStr()
|
||||
// that.ReqParam("id").ToInt()
|
||||
}
|
||||
|
||||
// 获取所有 URL 参数
|
||||
func (that *Context) ReqParams() Map
|
||||
```
|
||||
|
||||
### 2. ReqForm - 获取表单数据(返回 *Obj)
|
||||
|
||||
```go
|
||||
// 获取单个表单字段
|
||||
func (that *Context) ReqForm(key string) *Obj {
|
||||
// that.ReqForm("name").ToStr()
|
||||
}
|
||||
|
||||
// 获取所有表单数据
|
||||
func (that *Context) ReqForms() Map
|
||||
```
|
||||
|
||||
### 3. ReqJson - 获取 JSON Body(返回 *Obj)
|
||||
|
||||
```go
|
||||
// 获取 JSON 中的单个字段
|
||||
func (that *Context) ReqJson(key string) *Obj {
|
||||
// that.ReqJson("data").ToMap()
|
||||
// that.ReqJson("count").ToInt()
|
||||
}
|
||||
|
||||
// 获取完整 JSON Body
|
||||
func (that *Context) ReqJsons() Map
|
||||
```
|
||||
|
||||
### 4. ReqFile - 获取上传文件
|
||||
|
||||
```go
|
||||
func (that *Context) ReqFile(name string) (multipart.File, *multipart.FileHeader, error)
|
||||
func (that *Context) ReqFiles(name string) ([]*multipart.FileHeader, error)
|
||||
```
|
||||
|
||||
### 5. ReqData - 统一获取参数(返回 *Obj)
|
||||
|
||||
```go
|
||||
// 统一获取(JSON > Form > URL),支持链式调用
|
||||
func (that *Context) ReqData(key string) *Obj {
|
||||
// that.ReqData("id").ToStr()
|
||||
}
|
||||
|
||||
// 获取所有合并后的参数
|
||||
func (that *Context) ReqDatas() Map
|
||||
```
|
||||
|
||||
## 需要的导入
|
||||
|
||||
```go
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
"mime/multipart"
|
||||
)
|
||||
```
|
||||
|
||||
## 关键实现细节
|
||||
|
||||
1. **Body 只能读取一次的问题**:读取 Body 后需要用 `io.NopCloser(bytes.NewBuffer(body))` 恢复,以便后续代码(如其他中间件)还能再次读取
|
||||
|
||||
2. **废弃 API 替换**:使用 `io.ReadAll` 替代已废弃的 `ioutil.ReadAll`
|
||||
|
||||
3. **多值参数处理**:当同一参数有多个值时(如 `?id=1&id=2`),存储为 `Slice`;单值则直接存储字符串
|
||||
|
||||
## 使用示例
|
||||
|
||||
```go
|
||||
appIns.Run(Router{
|
||||
"app": {
|
||||
"user": {
|
||||
"info": func(that *Context) {
|
||||
// 链式调用获取单个参数(类似 Session 风格)
|
||||
id := that.ReqData("id").ToInt() // 统一获取
|
||||
name := that.ReqParam("name").ToStr() // URL 参数
|
||||
age := that.ReqForm("age").ToCeilInt() // 表单参数
|
||||
data := that.ReqJson("profile").ToMap() // JSON 字段
|
||||
|
||||
// 获取所有参数(返回 Map)
|
||||
allParams := that.ReqDatas() // 合并后的所有参数
|
||||
urlParams := that.ReqParams() // 所有 URL 参数
|
||||
formData := that.ReqForms() // 所有表单数据
|
||||
jsonBody := that.ReqJsons() // 完整 JSON Body
|
||||
|
||||
that.Display(0, Map{"id": id, "name": name})
|
||||
},
|
||||
"upload": func(that *Context) {
|
||||
// 获取单个上传文件
|
||||
file, header, err := that.ReqFile("avatar")
|
||||
if err == nil {
|
||||
defer file.Close()
|
||||
// header.Filename - 文件名
|
||||
// header.Size - 文件大小
|
||||
}
|
||||
|
||||
// 获取多个同名上传文件
|
||||
files, err := that.ReqFiles("images")
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
## 风格对比
|
||||
|
||||
| 旧方式(需要类型断言) | 新方式(链式调用) |
|
||||
|
||||
|------------------------|-------------------|
|
||||
|
||||
| `req["id"].(string) `| `that.ReqData("id").ToStr()` |
|
||||
|
||||
| `ObjToInt(req["id"]) `| `that.ReqData("id").ToInt()` |
|
||||
|
||||
| 需要手动处理 nil | `*Obj` 自动处理空值 |
|
||||
230
README.md
230
README.md
@ -1,6 +1,226 @@
|
||||
# hotime
|
||||
golang web服务框架
|
||||
支持数据库db:mysql、sqlite3
|
||||
支持缓存cache:redis,memory,数据库
|
||||
自带工具类,上下文,以及session等功能
|
||||
# HoTime
|
||||
|
||||
**高性能 Go Web 服务框架**
|
||||
|
||||
## 特性
|
||||
|
||||
- **高性能** - 单机 10万+ QPS,支持百万级并发用户
|
||||
- **多数据库支持** - MySQL、SQLite3,支持主从分离
|
||||
- **三级缓存系统** - Memory > Redis > DB,自动穿透与回填
|
||||
- **Session管理** - 内置会话管理,支持多种存储后端
|
||||
- **自动代码生成** - 根据数据库表自动生成 CRUD 接口
|
||||
- **丰富工具类** - 上下文管理、类型转换、加密解密等
|
||||
|
||||
## 快速开始
|
||||
|
||||
### 安装
|
||||
|
||||
```bash
|
||||
go get code.hoteas.com/golang/hotime
|
||||
```
|
||||
|
||||
### 最小示例
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
. "code.hoteas.com/golang/hotime"
|
||||
. "code.hoteas.com/golang/hotime/common"
|
||||
)
|
||||
|
||||
func main() {
|
||||
appIns := Init("config/config.json")
|
||||
|
||||
appIns.Run(Router{
|
||||
"app": {
|
||||
"test": {
|
||||
"hello": func(that *Context) {
|
||||
that.Display(0, Map{"message": "Hello World"})
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
访问: http://localhost:8081/app/test/hello
|
||||
|
||||
## 性能测试报告
|
||||
|
||||
### 测试环境
|
||||
|
||||
| 项目 | 配置 |
|
||||
|------|------|
|
||||
| CPU | 24 核心 |
|
||||
| 系统 | Windows 10 |
|
||||
| Go 版本 | 1.19.3 |
|
||||
|
||||
### 测试结果
|
||||
|
||||
| 并发数 | QPS | 成功率 | 平均延迟 | P99延迟 |
|
||||
|--------|-----|--------|----------|---------|
|
||||
| 500 | 99,960 | 100% | 5.0ms | 25.2ms |
|
||||
| **1000** | **102,489** | **100%** | **9.7ms** | **56.8ms** |
|
||||
| 2000 | 75,801 | 99.99% | 26.2ms | 127.7ms |
|
||||
| 5000 | 12,611 | 99.95% | 391.4ms | 781.4ms |
|
||||
|
||||
### 性能总结
|
||||
|
||||
```
|
||||
最高 QPS: 102,489 请求/秒
|
||||
最佳并发数: 1,000
|
||||
```
|
||||
|
||||
### 并发用户估算
|
||||
|
||||
| 使用场景 | 请求频率 | 可支持用户数 |
|
||||
|----------|----------|--------------|
|
||||
| 高频交互 | 1次/秒 | ~10万 |
|
||||
| 活跃用户 | 1次/5秒 | ~50万 |
|
||||
| 普通浏览 | 1次/10秒 | ~100万 |
|
||||
| 低频访问 | 1次/30秒 | ~300万 |
|
||||
|
||||
**生产环境建议**: 保留 30-50% 性能余量,安全并发用户数约 **50万 - 70万**
|
||||
|
||||
### 与主流框架性能对比
|
||||
|
||||
| 框架 | 典型QPS | 基础实现 | 性能评级 |
|
||||
|------|---------|----------|----------|
|
||||
| **HoTime** | **~100K** | net/http | 第一梯队 |
|
||||
| Fiber | ~100K+ | fasthttp | 第一梯队 |
|
||||
| Gin | ~60-80K | net/http | 第二梯队 |
|
||||
| Echo | ~60-80K | net/http | 第二梯队 |
|
||||
| Chi | ~50-60K | net/http | 第二梯队 |
|
||||
|
||||
## 框架对比
|
||||
|
||||
### 功能特性对比
|
||||
|
||||
| 特性 | HoTime | Gin | Echo | Fiber |
|
||||
|------|--------|-----|------|-------|
|
||||
| 性能 | 100K QPS | 70K QPS | 70K QPS | 100K QPS |
|
||||
| 内置ORM | ✅ | ❌ | ❌ | ❌ |
|
||||
| 内置缓存 | ✅ 三级缓存 | ❌ | ❌ | ❌ |
|
||||
| Session | ✅ 内置 | ❌ 需插件 | ❌ 需插件 | ❌ 需插件 |
|
||||
| 代码生成 | ✅ | ❌ | ❌ | ❌ |
|
||||
| 微信/支付集成 | ✅ 内置 | ❌ | ❌ | ❌ |
|
||||
| 路由灵活性 | 中等 | 优秀 | 优秀 | 优秀 |
|
||||
| 社区生态 | 较小 | 庞大 | 较大 | 较大 |
|
||||
|
||||
### HoTime 优势
|
||||
|
||||
1. **开箱即用** - 内置 ORM + 缓存 + Session,无需额外集成
|
||||
2. **三级缓存** - Memory > Redis > DB,自动穿透与回填
|
||||
3. **开发效率高** - 链式查询语法简洁,内置微信/云服务SDK
|
||||
4. **性能优异** - 100K QPS,媲美最快的 Fiber 框架
|
||||
|
||||
### 适用场景
|
||||
|
||||
| 场景 | 推荐度 | 说明 |
|
||||
|------|--------|------|
|
||||
| 中小型后台系统 | ⭐⭐⭐⭐⭐ | 完美适配,开发效率最高 |
|
||||
| 微信小程序后端 | ⭐⭐⭐⭐⭐ | 内置微信SDK |
|
||||
| 快速原型开发 | ⭐⭐⭐⭐⭐ | 代码生成 + 全功能集成 |
|
||||
| 高并发API服务 | ⭐⭐⭐⭐ | 性能足够 |
|
||||
| 大型微服务 | ⭐⭐⭐ | 建议用Gin/Echo |
|
||||
|
||||
### 总体评价
|
||||
|
||||
| 维度 | 评分 | 说明 |
|
||||
|------|------|------|
|
||||
| 性能 | 95分 | 第一梯队,媲美Fiber |
|
||||
| 功能集成 | 90分 | 远超主流框架 |
|
||||
| 开发效率 | 85分 | 适合快速开发 |
|
||||
| 生态/社区 | 50分 | 持续建设中 |
|
||||
|
||||
> **总结**: HoTime 是"小而全"的高性能框架,性能不输主流,集成度远超主流,适合独立开发者或小团队快速构建中小型项目。
|
||||
|
||||
---
|
||||
|
||||
## 数据库操作
|
||||
|
||||
### 基础 CRUD
|
||||
|
||||
```go
|
||||
// 查询单条
|
||||
user := that.Db.Get("user", "*", Map{"id": 1})
|
||||
|
||||
// 查询列表
|
||||
users := that.Db.Select("user", "*", Map{"status": 1, "ORDER": "id DESC"})
|
||||
|
||||
// 插入数据
|
||||
id := that.Db.Insert("user", Map{"name": "test", "age": 18})
|
||||
|
||||
// 更新数据
|
||||
rows := that.Db.Update("user", Map{"name": "new"}, Map{"id": 1})
|
||||
|
||||
// 删除数据
|
||||
rows := that.Db.Delete("user", Map{"id": 1})
|
||||
```
|
||||
|
||||
### 链式查询
|
||||
|
||||
```go
|
||||
users := that.Db.Table("user").
|
||||
LeftJoin("order", "user.id=order.user_id").
|
||||
And("status", 1).
|
||||
Order("id DESC").
|
||||
Page(1, 10).
|
||||
Select("*")
|
||||
```
|
||||
|
||||
### 条件语法
|
||||
|
||||
| 语法 | 说明 | 示例 |
|
||||
|------|------|------|
|
||||
| key | 等于 | "id": 1 |
|
||||
| key[>] | 大于 | "age[>]": 18 |
|
||||
| key[<] | 小于 | "age[<]": 60 |
|
||||
| key[!] | 不等于 | "status[!]": 0 |
|
||||
| key[~] | LIKE | "name[~]": "test" |
|
||||
| key[<>] | BETWEEN | "age[<>]": Slice{18, 60} |
|
||||
|
||||
## 缓存系统
|
||||
|
||||
三级缓存: **Memory > Redis > Database**
|
||||
|
||||
```go
|
||||
// 通用缓存
|
||||
that.Cache("key", value) // 设置
|
||||
data := that.Cache("key") // 获取
|
||||
that.Cache("key", nil) // 删除
|
||||
|
||||
// Session 缓存
|
||||
that.Session("user_id", 123) // 设置
|
||||
userId := that.Session("user_id") // 获取
|
||||
```
|
||||
|
||||
## 中间件
|
||||
|
||||
```go
|
||||
appIns.SetConnectListener(func(that *Context) bool {
|
||||
if that.Session("user_id").Data == nil {
|
||||
that.Display(2, "请先登录")
|
||||
return true // 终止请求
|
||||
}
|
||||
return false // 继续处理
|
||||
})
|
||||
```
|
||||
|
||||
## 扩展功能
|
||||
|
||||
- **微信支付/公众号/小程序** - dri/wechat/
|
||||
- **阿里云服务** - dri/aliyun/
|
||||
- **腾讯云服务** - dri/tencent/
|
||||
- **文件上传下载** - dri/upload/, dri/download/
|
||||
- **MongoDB** - dri/mongodb/
|
||||
- **RSA加解密** - dri/rsa/
|
||||
|
||||
## License
|
||||
|
||||
MIT License
|
||||
|
||||
---
|
||||
|
||||
**HoTime** - 让 Go Web 开发更简单、更高效
|
||||
|
||||
18
cache/cache.go
vendored
18
cache/cache.go
vendored
@ -1,8 +1,9 @@
|
||||
package cache
|
||||
|
||||
import (
|
||||
. "code.hoteas.com/golang/hotime/common"
|
||||
"errors"
|
||||
|
||||
. "code.hoteas.com/golang/hotime/common"
|
||||
)
|
||||
|
||||
// HoTimeCache 可配置memory,db,redis,默认启用memory,默认优先级为memory>redis>db,memory与数据库缓存设置项一致,
|
||||
@ -92,7 +93,7 @@ func (that *HoTimeCache) Db(key string, data ...interface{}) *Obj {
|
||||
}
|
||||
}
|
||||
|
||||
//redis缓存有
|
||||
//db缓存有
|
||||
if that.dbCache != nil && that.dbCache.DbSet {
|
||||
reData = that.dbCache.Cache(key, data...)
|
||||
if reData.Data != nil {
|
||||
@ -119,7 +120,7 @@ func (that *HoTimeCache) Db(key string, data ...interface{}) *Obj {
|
||||
if that.redisCache != nil && that.redisCache.DbSet {
|
||||
reData = that.redisCache.Cache(key, data...)
|
||||
}
|
||||
//redis缓存有
|
||||
//db缓存有
|
||||
if that.dbCache != nil && that.dbCache.DbSet {
|
||||
reData = that.dbCache.Cache(key, data...)
|
||||
}
|
||||
@ -132,7 +133,7 @@ func (that *HoTimeCache) Cache(key string, data ...interface{}) *Obj {
|
||||
//内存缓存有
|
||||
if that.memoryCache != nil {
|
||||
reData = that.memoryCache.Cache(key, data...)
|
||||
if reData != nil {
|
||||
if reData != nil && reData.Data != nil {
|
||||
return reData
|
||||
}
|
||||
}
|
||||
@ -140,8 +141,7 @@ func (that *HoTimeCache) Cache(key string, data ...interface{}) *Obj {
|
||||
//redis缓存有
|
||||
if that.redisCache != nil {
|
||||
reData = that.redisCache.Cache(key, data...)
|
||||
if reData.Data != nil {
|
||||
|
||||
if reData != nil && reData.Data != nil {
|
||||
if that.memoryCache != nil {
|
||||
that.memoryCache.Cache(key, reData.Data)
|
||||
}
|
||||
@ -149,10 +149,10 @@ func (that *HoTimeCache) Cache(key string, data ...interface{}) *Obj {
|
||||
}
|
||||
}
|
||||
|
||||
//redis缓存有
|
||||
//db缓存有
|
||||
if that.dbCache != nil {
|
||||
reData = that.dbCache.Cache(key, data...)
|
||||
if reData.Data != nil {
|
||||
if reData != nil && reData.Data != nil {
|
||||
if that.memoryCache != nil {
|
||||
that.memoryCache.Cache(key, reData.Data)
|
||||
}
|
||||
@ -174,7 +174,7 @@ func (that *HoTimeCache) Cache(key string, data ...interface{}) *Obj {
|
||||
if that.redisCache != nil {
|
||||
reData = that.redisCache.Cache(key, data...)
|
||||
}
|
||||
//redis缓存有
|
||||
//db缓存有
|
||||
if that.dbCache != nil {
|
||||
reData = that.dbCache.Cache(key, data...)
|
||||
}
|
||||
|
||||
154
cache/cache_redis.go
vendored
154
cache/cache_redis.go
vendored
@ -4,6 +4,7 @@ import (
|
||||
. "code.hoteas.com/golang/hotime/common"
|
||||
"github.com/garyburd/redigo/redis"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -14,10 +15,11 @@ type CacheRedis struct {
|
||||
Host string
|
||||
Pwd string
|
||||
Port int64
|
||||
conn redis.Conn
|
||||
pool *redis.Pool
|
||||
tag int64
|
||||
ContextBase
|
||||
*Error
|
||||
initOnce sync.Once
|
||||
}
|
||||
|
||||
func (that *CacheRedis) GetError() *Error {
|
||||
@ -39,83 +41,112 @@ func (that *CacheRedis) GetTag() int64 {
|
||||
return that.tag
|
||||
}
|
||||
|
||||
func (that *CacheRedis) reCon() bool {
|
||||
var err error
|
||||
that.conn, err = redis.Dial("tcp", that.Host+":"+ObjToStr(that.Port))
|
||||
if err != nil {
|
||||
that.conn = nil
|
||||
that.Error.SetError(err)
|
||||
return false
|
||||
}
|
||||
|
||||
if that.Pwd != "" {
|
||||
_, err = that.conn.Do("AUTH", that.Pwd)
|
||||
if err != nil {
|
||||
that.conn = nil
|
||||
that.Error.SetError(err)
|
||||
return false
|
||||
// initPool 初始化连接池(只执行一次)
|
||||
func (that *CacheRedis) initPool() {
|
||||
that.initOnce.Do(func() {
|
||||
that.pool = &redis.Pool{
|
||||
MaxIdle: 10, // 最大空闲连接数
|
||||
MaxActive: 100, // 最大活跃连接数,0表示无限制
|
||||
IdleTimeout: 5 * time.Minute, // 空闲连接超时时间
|
||||
Wait: true, // 当连接池耗尽时是否等待
|
||||
Dial: func() (redis.Conn, error) {
|
||||
conn, err := redis.Dial("tcp", that.Host+":"+ObjToStr(that.Port),
|
||||
redis.DialConnectTimeout(5*time.Second),
|
||||
redis.DialReadTimeout(3*time.Second),
|
||||
redis.DialWriteTimeout(3*time.Second),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if that.Pwd != "" {
|
||||
if _, err := conn.Do("AUTH", that.Pwd); err != nil {
|
||||
conn.Close()
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return conn, nil
|
||||
},
|
||||
TestOnBorrow: func(c redis.Conn, t time.Time) error {
|
||||
if time.Since(t) < time.Minute {
|
||||
return nil
|
||||
}
|
||||
_, err := c.Do("PING")
|
||||
return err
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
// getConn 从连接池获取连接
|
||||
func (that *CacheRedis) getConn() redis.Conn {
|
||||
that.initPool()
|
||||
if that.pool == nil {
|
||||
return nil
|
||||
}
|
||||
return that.pool.Get()
|
||||
}
|
||||
|
||||
func (that *CacheRedis) del(key string) {
|
||||
conn := that.getConn()
|
||||
if conn == nil {
|
||||
return
|
||||
}
|
||||
defer conn.Close()
|
||||
|
||||
del := strings.Index(key, "*")
|
||||
if del != -1 {
|
||||
val, err := redis.Strings(that.conn.Do("KEYS", key))
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
that.conn.Send("MULTI")
|
||||
for i, _ := range val {
|
||||
that.conn.Send("DEL", val[i])
|
||||
}
|
||||
that.conn.Do("EXEC")
|
||||
} else {
|
||||
_, err := that.conn.Do("DEL", key)
|
||||
val, err := redis.Strings(conn.Do("KEYS", key))
|
||||
if err != nil {
|
||||
that.Error.SetError(err)
|
||||
return
|
||||
}
|
||||
if len(val) == 0 {
|
||||
return
|
||||
}
|
||||
conn.Send("MULTI")
|
||||
for i := range val {
|
||||
conn.Send("DEL", val[i])
|
||||
}
|
||||
_, err = conn.Do("EXEC")
|
||||
if err != nil {
|
||||
that.Error.SetError(err)
|
||||
}
|
||||
} else {
|
||||
_, err := conn.Do("DEL", key)
|
||||
if err != nil {
|
||||
that.Error.SetError(err)
|
||||
_, err = that.conn.Do("PING")
|
||||
if err != nil {
|
||||
if that.reCon() {
|
||||
_, err = that.conn.Do("DEL", key)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// key value ,时间为时间戳
|
||||
func (that *CacheRedis) set(key string, value string, time int64) {
|
||||
_, err := that.conn.Do("SET", key, value, "EX", ObjToStr(time))
|
||||
if err != nil {
|
||||
func (that *CacheRedis) set(key string, value string, expireSeconds int64) {
|
||||
conn := that.getConn()
|
||||
if conn == nil {
|
||||
return
|
||||
}
|
||||
defer conn.Close()
|
||||
|
||||
_, err := conn.Do("SET", key, value, "EX", ObjToStr(expireSeconds))
|
||||
if err != nil {
|
||||
that.Error.SetError(err)
|
||||
_, err = that.conn.Do("PING")
|
||||
if err != nil {
|
||||
if that.reCon() {
|
||||
_, err = that.conn.Do("SET", key, value, "EX", ObjToStr(time))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (that *CacheRedis) get(key string) *Obj {
|
||||
reData := &Obj{}
|
||||
conn := that.getConn()
|
||||
if conn == nil {
|
||||
return reData
|
||||
}
|
||||
defer conn.Close()
|
||||
|
||||
var err error
|
||||
reData.Data, err = redis.String(that.conn.Do("GET", key))
|
||||
reData.Data, err = redis.String(conn.Do("GET", key))
|
||||
if err != nil {
|
||||
reData.Data = nil
|
||||
if !strings.Contains(err.Error(), "nil returned") {
|
||||
that.Error.SetError(err)
|
||||
_, err = that.conn.Do("PING")
|
||||
if err != nil {
|
||||
if that.reCon() {
|
||||
reData.Data, err = redis.String(that.conn.Do("GET", key))
|
||||
}
|
||||
}
|
||||
|
||||
return reData
|
||||
}
|
||||
}
|
||||
return reData
|
||||
@ -123,19 +154,13 @@ func (that *CacheRedis) get(key string) *Obj {
|
||||
|
||||
func (that *CacheRedis) Cache(key string, data ...interface{}) *Obj {
|
||||
reData := &Obj{}
|
||||
if that.conn == nil {
|
||||
re := that.reCon()
|
||||
if !re {
|
||||
return reData
|
||||
}
|
||||
}
|
||||
|
||||
//查询缓存
|
||||
if len(data) == 0 {
|
||||
|
||||
reData = that.get(key)
|
||||
return reData
|
||||
|
||||
}
|
||||
|
||||
tim := int64(0)
|
||||
//删除缓存
|
||||
if len(data) == 1 && data[0] == nil {
|
||||
@ -144,21 +169,17 @@ func (that *CacheRedis) Cache(key string, data ...interface{}) *Obj {
|
||||
}
|
||||
//添加缓存
|
||||
if len(data) == 1 {
|
||||
|
||||
if that.TimeOut == 0 {
|
||||
//that.Time = Config.GetInt64("cacheShortTime")
|
||||
}
|
||||
|
||||
tim += that.TimeOut
|
||||
}
|
||||
if len(data) == 2 {
|
||||
that.Error.SetError(nil)
|
||||
tempt := ObjToInt64(data[1], that.Error)
|
||||
if tempt > tim {
|
||||
|
||||
tim = tempt
|
||||
} else if that.GetError() == nil {
|
||||
|
||||
tim = tim + tempt
|
||||
}
|
||||
}
|
||||
@ -166,5 +187,4 @@ func (that *CacheRedis) Cache(key string, data ...interface{}) *Obj {
|
||||
that.set(key, ObjToStr(data[0]), tim)
|
||||
|
||||
return reData
|
||||
|
||||
}
|
||||
|
||||
@ -2,26 +2,28 @@ package common
|
||||
|
||||
import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"sync"
|
||||
)
|
||||
|
||||
// Error 框架层处理错误
|
||||
type Error struct {
|
||||
Logger *logrus.Logger
|
||||
error
|
||||
mu sync.RWMutex
|
||||
}
|
||||
|
||||
func (that *Error) GetError() error {
|
||||
|
||||
that.mu.RLock()
|
||||
defer that.mu.RUnlock()
|
||||
return that.error
|
||||
|
||||
}
|
||||
|
||||
func (that *Error) SetError(err error) {
|
||||
that.mu.Lock()
|
||||
that.error = err
|
||||
that.mu.Unlock()
|
||||
|
||||
if that.Logger != nil && err != nil {
|
||||
//that.Logger=log.GetLog("",false)
|
||||
that.Logger.Warn(err)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
100
db/db.go
Normal file
100
db/db.go
Normal file
@ -0,0 +1,100 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"code.hoteas.com/golang/hotime/cache"
|
||||
. "code.hoteas.com/golang/hotime/common"
|
||||
"database/sql"
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"github.com/sirupsen/logrus"
|
||||
"sync"
|
||||
)
|
||||
|
||||
// HoTimeDB 数据库操作核心结构体
|
||||
type HoTimeDB struct {
|
||||
*sql.DB
|
||||
ContextBase
|
||||
DBName string
|
||||
*cache.HoTimeCache
|
||||
Log *logrus.Logger
|
||||
Type string // 数据库类型: mysql, sqlite3, postgres
|
||||
Prefix string
|
||||
LastQuery string
|
||||
LastData []interface{}
|
||||
ConnectFunc func(err ...*Error) (*sql.DB, *sql.DB)
|
||||
LastErr *Error
|
||||
limit Slice
|
||||
*sql.Tx //事务对象
|
||||
SlaveDB *sql.DB // 从数据库
|
||||
Mode int // mode为0生产模式,1为测试模式,2为开发模式
|
||||
mu sync.RWMutex
|
||||
limitMu sync.Mutex
|
||||
Dialect Dialect // 数据库方言适配器
|
||||
}
|
||||
|
||||
// SetConnect 设置数据库配置连接
|
||||
func (that *HoTimeDB) SetConnect(connect func(err ...*Error) (master, slave *sql.DB), err ...*Error) {
|
||||
that.ConnectFunc = connect
|
||||
_ = that.InitDb(err...)
|
||||
}
|
||||
|
||||
// InitDb 初始化数据库连接
|
||||
func (that *HoTimeDB) InitDb(err ...*Error) *Error {
|
||||
if len(err) != 0 {
|
||||
that.LastErr = err[0]
|
||||
}
|
||||
that.DB, that.SlaveDB = that.ConnectFunc(that.LastErr)
|
||||
if that.DB == nil {
|
||||
return that.LastErr
|
||||
}
|
||||
e := that.DB.Ping()
|
||||
|
||||
that.LastErr.SetError(e)
|
||||
|
||||
if that.SlaveDB != nil {
|
||||
e := that.SlaveDB.Ping()
|
||||
that.LastErr.SetError(e)
|
||||
}
|
||||
|
||||
// 根据数据库类型初始化方言适配器
|
||||
if that.Dialect == nil {
|
||||
that.initDialect()
|
||||
}
|
||||
|
||||
return that.LastErr
|
||||
}
|
||||
|
||||
// initDialect 根据数据库类型初始化方言
|
||||
func (that *HoTimeDB) initDialect() {
|
||||
switch that.Type {
|
||||
case "postgres", "postgresql":
|
||||
that.Dialect = &PostgreSQLDialect{}
|
||||
case "sqlite3", "sqlite":
|
||||
that.Dialect = &SQLiteDialect{}
|
||||
default:
|
||||
that.Dialect = &MySQLDialect{}
|
||||
}
|
||||
}
|
||||
|
||||
// GetDialect 获取当前方言适配器
|
||||
func (that *HoTimeDB) GetDialect() Dialect {
|
||||
if that.Dialect == nil {
|
||||
that.initDialect()
|
||||
}
|
||||
return that.Dialect
|
||||
}
|
||||
|
||||
// SetDialect 设置方言适配器
|
||||
func (that *HoTimeDB) SetDialect(dialect Dialect) {
|
||||
that.Dialect = dialect
|
||||
}
|
||||
|
||||
// GetType 获取数据库类型
|
||||
func (that *HoTimeDB) GetType() string {
|
||||
return that.Type
|
||||
}
|
||||
|
||||
// GetPrefix 获取表前缀
|
||||
func (that *HoTimeDB) GetPrefix() string {
|
||||
return that.Prefix
|
||||
}
|
||||
249
db/dialect.go
Normal file
249
db/dialect.go
Normal file
@ -0,0 +1,249 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Dialect 数据库方言接口
|
||||
// 用于处理不同数据库之间的语法差异
|
||||
type Dialect interface {
|
||||
// Quote 对表名/字段名添加引号
|
||||
// MySQL 使用反引号 `name`
|
||||
// PostgreSQL 使用双引号 "name"
|
||||
// SQLite 使用双引号或方括号 "name" 或 [name]
|
||||
Quote(name string) string
|
||||
|
||||
// Placeholder 生成占位符
|
||||
// MySQL/SQLite 使用 ?
|
||||
// PostgreSQL 使用 $1, $2, $3...
|
||||
Placeholder(index int) string
|
||||
|
||||
// Placeholders 生成多个占位符,用逗号分隔
|
||||
Placeholders(count int, startIndex int) string
|
||||
|
||||
// SupportsLastInsertId 是否支持 LastInsertId
|
||||
// PostgreSQL 不支持,需要使用 RETURNING
|
||||
SupportsLastInsertId() bool
|
||||
|
||||
// ReturningClause 生成 RETURNING 子句(用于 PostgreSQL)
|
||||
ReturningClause(column string) string
|
||||
|
||||
// UpsertSQL 生成 Upsert 语句
|
||||
// MySQL: INSERT ... ON DUPLICATE KEY UPDATE ...
|
||||
// PostgreSQL: INSERT ... ON CONFLICT ... DO UPDATE SET ...
|
||||
// SQLite: INSERT OR REPLACE / INSERT ... ON CONFLICT ...
|
||||
UpsertSQL(table string, columns []string, uniqueKeys []string, updateColumns []string) string
|
||||
|
||||
// GetName 获取方言名称
|
||||
GetName() string
|
||||
}
|
||||
|
||||
// MySQLDialect MySQL 方言实现
|
||||
type MySQLDialect struct{}
|
||||
|
||||
func (d *MySQLDialect) GetName() string {
|
||||
return "mysql"
|
||||
}
|
||||
|
||||
func (d *MySQLDialect) Quote(name string) string {
|
||||
// 如果已经包含点号(表.字段)或空格(别名),不添加引号
|
||||
if strings.Contains(name, ".") || strings.Contains(name, " ") {
|
||||
return name
|
||||
}
|
||||
return "`" + name + "`"
|
||||
}
|
||||
|
||||
func (d *MySQLDialect) Placeholder(index int) string {
|
||||
return "?"
|
||||
}
|
||||
|
||||
func (d *MySQLDialect) Placeholders(count int, startIndex int) string {
|
||||
if count <= 0 {
|
||||
return ""
|
||||
}
|
||||
placeholders := make([]string, count)
|
||||
for i := 0; i < count; i++ {
|
||||
placeholders[i] = "?"
|
||||
}
|
||||
return strings.Join(placeholders, ",")
|
||||
}
|
||||
|
||||
func (d *MySQLDialect) SupportsLastInsertId() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (d *MySQLDialect) ReturningClause(column string) string {
|
||||
return "" // MySQL 不支持 RETURNING
|
||||
}
|
||||
|
||||
func (d *MySQLDialect) UpsertSQL(table string, columns []string, uniqueKeys []string, updateColumns []string) string {
|
||||
// INSERT INTO table (col1, col2) VALUES (?, ?)
|
||||
// ON DUPLICATE KEY UPDATE col1 = VALUES(col1), col2 = VALUES(col2)
|
||||
quotedCols := make([]string, len(columns))
|
||||
for i, col := range columns {
|
||||
quotedCols[i] = d.Quote(col)
|
||||
}
|
||||
|
||||
placeholders := d.Placeholders(len(columns), 1)
|
||||
|
||||
updateParts := make([]string, len(updateColumns))
|
||||
for i, col := range updateColumns {
|
||||
// 检查是否是 [#] 标记的直接 SQL
|
||||
if strings.HasSuffix(col, "[#]") {
|
||||
// 这种情况在调用处处理
|
||||
updateParts[i] = col
|
||||
} else {
|
||||
quotedCol := d.Quote(col)
|
||||
updateParts[i] = quotedCol + " = VALUES(" + quotedCol + ")"
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Sprintf("INSERT INTO %s (%s) VALUES (%s) ON DUPLICATE KEY UPDATE %s",
|
||||
d.Quote(table),
|
||||
strings.Join(quotedCols, ", "),
|
||||
placeholders,
|
||||
strings.Join(updateParts, ", "))
|
||||
}
|
||||
|
||||
// PostgreSQLDialect PostgreSQL 方言实现
|
||||
type PostgreSQLDialect struct{}
|
||||
|
||||
func (d *PostgreSQLDialect) GetName() string {
|
||||
return "postgres"
|
||||
}
|
||||
|
||||
func (d *PostgreSQLDialect) Quote(name string) string {
|
||||
// 如果已经包含点号(表.字段)或空格(别名),不添加引号
|
||||
if strings.Contains(name, ".") || strings.Contains(name, " ") {
|
||||
return name
|
||||
}
|
||||
return "\"" + name + "\""
|
||||
}
|
||||
|
||||
func (d *PostgreSQLDialect) Placeholder(index int) string {
|
||||
return fmt.Sprintf("$%d", index)
|
||||
}
|
||||
|
||||
func (d *PostgreSQLDialect) Placeholders(count int, startIndex int) string {
|
||||
if count <= 0 {
|
||||
return ""
|
||||
}
|
||||
placeholders := make([]string, count)
|
||||
for i := 0; i < count; i++ {
|
||||
placeholders[i] = fmt.Sprintf("$%d", startIndex+i)
|
||||
}
|
||||
return strings.Join(placeholders, ",")
|
||||
}
|
||||
|
||||
func (d *PostgreSQLDialect) SupportsLastInsertId() bool {
|
||||
return false // PostgreSQL 需要使用 RETURNING
|
||||
}
|
||||
|
||||
func (d *PostgreSQLDialect) ReturningClause(column string) string {
|
||||
return " RETURNING " + d.Quote(column)
|
||||
}
|
||||
|
||||
func (d *PostgreSQLDialect) UpsertSQL(table string, columns []string, uniqueKeys []string, updateColumns []string) string {
|
||||
// INSERT INTO table (col1, col2) VALUES ($1, $2)
|
||||
// ON CONFLICT (unique_key) DO UPDATE SET col1 = EXCLUDED.col1, col2 = EXCLUDED.col2
|
||||
quotedCols := make([]string, len(columns))
|
||||
for i, col := range columns {
|
||||
quotedCols[i] = d.Quote(col)
|
||||
}
|
||||
|
||||
placeholders := d.Placeholders(len(columns), 1)
|
||||
|
||||
quotedUniqueKeys := make([]string, len(uniqueKeys))
|
||||
for i, key := range uniqueKeys {
|
||||
quotedUniqueKeys[i] = d.Quote(key)
|
||||
}
|
||||
|
||||
updateParts := make([]string, len(updateColumns))
|
||||
for i, col := range updateColumns {
|
||||
if strings.HasSuffix(col, "[#]") {
|
||||
updateParts[i] = col
|
||||
} else {
|
||||
quotedCol := d.Quote(col)
|
||||
updateParts[i] = quotedCol + " = EXCLUDED." + quotedCol
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Sprintf("INSERT INTO %s (%s) VALUES (%s) ON CONFLICT (%s) DO UPDATE SET %s",
|
||||
d.Quote(table),
|
||||
strings.Join(quotedCols, ", "),
|
||||
placeholders,
|
||||
strings.Join(quotedUniqueKeys, ", "),
|
||||
strings.Join(updateParts, ", "))
|
||||
}
|
||||
|
||||
// SQLiteDialect SQLite 方言实现
|
||||
type SQLiteDialect struct{}
|
||||
|
||||
func (d *SQLiteDialect) GetName() string {
|
||||
return "sqlite3"
|
||||
}
|
||||
|
||||
func (d *SQLiteDialect) Quote(name string) string {
|
||||
// 如果已经包含点号(表.字段)或空格(别名),不添加引号
|
||||
if strings.Contains(name, ".") || strings.Contains(name, " ") {
|
||||
return name
|
||||
}
|
||||
return "\"" + name + "\""
|
||||
}
|
||||
|
||||
func (d *SQLiteDialect) Placeholder(index int) string {
|
||||
return "?"
|
||||
}
|
||||
|
||||
func (d *SQLiteDialect) Placeholders(count int, startIndex int) string {
|
||||
if count <= 0 {
|
||||
return ""
|
||||
}
|
||||
placeholders := make([]string, count)
|
||||
for i := 0; i < count; i++ {
|
||||
placeholders[i] = "?"
|
||||
}
|
||||
return strings.Join(placeholders, ",")
|
||||
}
|
||||
|
||||
func (d *SQLiteDialect) SupportsLastInsertId() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (d *SQLiteDialect) ReturningClause(column string) string {
|
||||
return "" // SQLite 3.35+ 支持 RETURNING,但为兼容性暂不使用
|
||||
}
|
||||
|
||||
func (d *SQLiteDialect) UpsertSQL(table string, columns []string, uniqueKeys []string, updateColumns []string) string {
|
||||
// INSERT INTO table (col1, col2) VALUES (?, ?)
|
||||
// ON CONFLICT (unique_key) DO UPDATE SET col1 = excluded.col1, col2 = excluded.col2
|
||||
quotedCols := make([]string, len(columns))
|
||||
for i, col := range columns {
|
||||
quotedCols[i] = d.Quote(col)
|
||||
}
|
||||
|
||||
placeholders := d.Placeholders(len(columns), 1)
|
||||
|
||||
quotedUniqueKeys := make([]string, len(uniqueKeys))
|
||||
for i, key := range uniqueKeys {
|
||||
quotedUniqueKeys[i] = d.Quote(key)
|
||||
}
|
||||
|
||||
updateParts := make([]string, len(updateColumns))
|
||||
for i, col := range updateColumns {
|
||||
if strings.HasSuffix(col, "[#]") {
|
||||
updateParts[i] = col
|
||||
} else {
|
||||
quotedCol := d.Quote(col)
|
||||
updateParts[i] = quotedCol + " = excluded." + quotedCol
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Sprintf("INSERT INTO %s (%s) VALUES (%s) ON CONFLICT (%s) DO UPDATE SET %s",
|
||||
d.Quote(table),
|
||||
strings.Join(quotedCols, ", "),
|
||||
placeholders,
|
||||
strings.Join(quotedUniqueKeys, ", "),
|
||||
strings.Join(updateParts, ", "))
|
||||
}
|
||||
142
db/hotimedb.go
142
db/hotimedb.go
@ -13,6 +13,7 @@ import (
|
||||
"reflect"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
)
|
||||
|
||||
type HoTimeDB struct {
|
||||
@ -31,6 +32,8 @@ type HoTimeDB struct {
|
||||
*sql.Tx //事务对象
|
||||
SlaveDB *sql.DB
|
||||
Mode int //mode为0生产模式,1、为测试模式、2为开发模式
|
||||
mu sync.RWMutex
|
||||
limitMu sync.Mutex
|
||||
}
|
||||
|
||||
type HotimeDBBuilder struct {
|
||||
@ -271,11 +274,25 @@ func (that *HoTimeDB) GetType() string {
|
||||
|
||||
// Action 事务,如果action返回true则执行成功;false则回滚
|
||||
func (that *HoTimeDB) Action(action func(db HoTimeDB) (isSuccess bool)) (isSuccess bool) {
|
||||
db := HoTimeDB{that.DB, that.ContextBase, that.DBName,
|
||||
that.HoTimeCache, that.Log, that.Type,
|
||||
that.Prefix, that.LastQuery, that.LastData,
|
||||
that.ConnectFunc, that.LastErr, that.limit, that.Tx,
|
||||
that.SlaveDB, that.Mode}
|
||||
db := HoTimeDB{
|
||||
DB: that.DB,
|
||||
ContextBase: that.ContextBase,
|
||||
DBName: that.DBName,
|
||||
HoTimeCache: that.HoTimeCache,
|
||||
Log: that.Log,
|
||||
Type: that.Type,
|
||||
Prefix: that.Prefix,
|
||||
LastQuery: that.LastQuery,
|
||||
LastData: that.LastData,
|
||||
ConnectFunc: that.ConnectFunc,
|
||||
LastErr: that.LastErr,
|
||||
limit: that.limit,
|
||||
Tx: that.Tx,
|
||||
SlaveDB: that.SlaveDB,
|
||||
Mode: that.Mode,
|
||||
mu: sync.RWMutex{},
|
||||
limitMu: sync.Mutex{},
|
||||
}
|
||||
|
||||
//tx, err := db.BeginTx(context.Background(), &sql.TxOptions{Isolation: sql.LevelReadCommitted})
|
||||
tx, err := db.Begin()
|
||||
@ -331,23 +348,33 @@ func (that *HoTimeDB) Page(page, pageRow int) *HoTimeDB {
|
||||
page = 1
|
||||
}
|
||||
|
||||
that.limitMu.Lock()
|
||||
that.limit = Slice{page, pageRow}
|
||||
that.limitMu.Unlock()
|
||||
return that
|
||||
}
|
||||
|
||||
func (that *HoTimeDB) PageSelect(table string, qu ...interface{}) []Map {
|
||||
that.limitMu.Lock()
|
||||
limit := that.limit
|
||||
that.limit = nil // 使用后清空,避免影响下次调用
|
||||
that.limitMu.Unlock()
|
||||
|
||||
if limit == nil {
|
||||
return that.Select(table, qu...)
|
||||
}
|
||||
|
||||
if len(qu) == 1 {
|
||||
qu = append(qu, Map{"LIMIT": that.limit})
|
||||
qu = append(qu, Map{"LIMIT": limit})
|
||||
}
|
||||
if len(qu) == 2 {
|
||||
temp := DeepCopyMap(qu[1]).(Map)
|
||||
temp["LIMIT"] = that.limit
|
||||
temp["LIMIT"] = limit
|
||||
qu[1] = temp
|
||||
}
|
||||
if len(qu) == 3 {
|
||||
temp := DeepCopyMap(qu[2]).(Map)
|
||||
temp["LIMIT"] = that.limit
|
||||
temp["LIMIT"] = limit
|
||||
qu[2] = temp
|
||||
}
|
||||
//fmt.Println(qu)
|
||||
@ -540,17 +567,28 @@ func (that *HoTimeDB) md5(query string, args ...interface{}) string {
|
||||
}
|
||||
|
||||
func (that *HoTimeDB) Query(query string, args ...interface{}) []Map {
|
||||
return that.queryWithRetry(query, false, args...)
|
||||
}
|
||||
|
||||
// queryWithRetry 内部查询方法,支持重试标记
|
||||
func (that *HoTimeDB) queryWithRetry(query string, retried bool, args ...interface{}) []Map {
|
||||
// 保存调试信息(加锁保护)
|
||||
that.mu.Lock()
|
||||
that.LastQuery = query
|
||||
that.LastData = args
|
||||
that.mu.Unlock()
|
||||
|
||||
defer func() {
|
||||
if that.Mode != 0 {
|
||||
that.mu.RLock()
|
||||
that.Log.Info("SQL:"+that.LastQuery, " DATA:", that.LastData, " ERROR:", that.LastErr.GetError())
|
||||
that.mu.RUnlock()
|
||||
}
|
||||
}()
|
||||
//fmt.Println(query)
|
||||
|
||||
var err error
|
||||
var resl *sql.Rows
|
||||
|
||||
that.LastQuery = query
|
||||
that.LastData = args
|
||||
//主从数据库切换,只有select语句有从数据库
|
||||
db := that.DB
|
||||
if that.SlaveDB != nil {
|
||||
@ -562,8 +600,15 @@ func (that *HoTimeDB) Query(query string, args ...interface{}) []Map {
|
||||
that.LastErr.SetError(err)
|
||||
return nil
|
||||
}
|
||||
for key, _ := range args {
|
||||
arg := args[key]
|
||||
|
||||
// 处理参数中的 slice 类型
|
||||
processedArgs := make([]interface{}, len(args))
|
||||
copy(processedArgs, args)
|
||||
for key := range processedArgs {
|
||||
arg := processedArgs[key]
|
||||
if arg == nil {
|
||||
continue
|
||||
}
|
||||
argType := reflect.ValueOf(arg).Type().String()
|
||||
if strings.Contains(argType, "[]") || strings.Contains(argType, "Slice") {
|
||||
argLis := ObjToSlice(arg)
|
||||
@ -576,29 +621,24 @@ func (that *HoTimeDB) Query(query string, args ...interface{}) []Map {
|
||||
argStr += ObjToStr(argLis[i]) + ","
|
||||
}
|
||||
}
|
||||
args[key] = argStr
|
||||
processedArgs[key] = argStr
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if that.Tx != nil {
|
||||
resl, err = that.Tx.Query(query, args...)
|
||||
resl, err = that.Tx.Query(query, processedArgs...)
|
||||
} else {
|
||||
resl, err = db.Query(query, args...)
|
||||
}
|
||||
|
||||
if err != nil && that.LastErr.GetError() != nil &&
|
||||
that.LastErr.GetError().Error() == err.Error() {
|
||||
return nil
|
||||
resl, err = db.Query(query, processedArgs...)
|
||||
}
|
||||
|
||||
that.LastErr.SetError(err)
|
||||
if err != nil {
|
||||
|
||||
if err = db.Ping(); err == nil {
|
||||
return that.Query(query, args...)
|
||||
// 如果还没重试过,尝试 Ping 后重试一次
|
||||
if !retried {
|
||||
if pingErr := db.Ping(); pingErr == nil {
|
||||
return that.queryWithRetry(query, true, args...)
|
||||
}
|
||||
}
|
||||
that.LastErr.SetError(err)
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -606,13 +646,25 @@ func (that *HoTimeDB) Query(query string, args ...interface{}) []Map {
|
||||
}
|
||||
|
||||
func (that *HoTimeDB) Exec(query string, args ...interface{}) (sql.Result, *Error) {
|
||||
defer func() {
|
||||
if that.Mode != 0 {
|
||||
that.Log.Info("SQL: "+that.LastQuery, " DATA: ", that.LastData, " ERROR: ", that.LastErr.GetError())
|
||||
}
|
||||
}()
|
||||
return that.execWithRetry(query, false, args...)
|
||||
}
|
||||
|
||||
// execWithRetry 内部执行方法,支持重试标记
|
||||
func (that *HoTimeDB) execWithRetry(query string, retried bool, args ...interface{}) (sql.Result, *Error) {
|
||||
// 保存调试信息(加锁保护)
|
||||
that.mu.Lock()
|
||||
that.LastQuery = query
|
||||
that.LastData = args
|
||||
that.mu.Unlock()
|
||||
|
||||
defer func() {
|
||||
if that.Mode != 0 {
|
||||
that.mu.RLock()
|
||||
that.Log.Info("SQL: "+that.LastQuery, " DATA: ", that.LastData, " ERROR: ", that.LastErr.GetError())
|
||||
that.mu.RUnlock()
|
||||
}
|
||||
}()
|
||||
|
||||
var e error
|
||||
var resl sql.Result
|
||||
|
||||
@ -622,8 +674,11 @@ func (that *HoTimeDB) Exec(query string, args ...interface{}) (sql.Result, *Erro
|
||||
return nil, that.LastErr
|
||||
}
|
||||
|
||||
for key, _ := range args {
|
||||
arg := args[key]
|
||||
// 处理参数中的 slice 类型
|
||||
processedArgs := make([]interface{}, len(args))
|
||||
copy(processedArgs, args)
|
||||
for key := range processedArgs {
|
||||
arg := processedArgs[key]
|
||||
argType := ""
|
||||
if arg != nil {
|
||||
argType = reflect.ValueOf(arg).Type().String()
|
||||
@ -640,29 +695,24 @@ func (that *HoTimeDB) Exec(query string, args ...interface{}) (sql.Result, *Erro
|
||||
argStr += ObjToStr(argLis[i]) + ","
|
||||
}
|
||||
}
|
||||
args[key] = argStr
|
||||
processedArgs[key] = argStr
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if that.Tx != nil {
|
||||
resl, e = that.Tx.Exec(query, args...)
|
||||
resl, e = that.Tx.Exec(query, processedArgs...)
|
||||
} else {
|
||||
resl, e = that.DB.Exec(query, args...)
|
||||
resl, e = that.DB.Exec(query, processedArgs...)
|
||||
}
|
||||
|
||||
if e != nil && that.LastErr.GetError() != nil &&
|
||||
that.LastErr.GetError().Error() == e.Error() {
|
||||
return resl, that.LastErr
|
||||
}
|
||||
that.LastErr.SetError(e)
|
||||
//判断是否连接断开了
|
||||
//判断是否连接断开了,如果还没重试过,尝试重试一次
|
||||
if e != nil {
|
||||
|
||||
if e = that.DB.Ping(); e == nil {
|
||||
return that.Exec(query, args...)
|
||||
if !retried {
|
||||
if pingErr := that.DB.Ping(); pingErr == nil {
|
||||
return that.execWithRetry(query, true, args...)
|
||||
}
|
||||
}
|
||||
that.LastErr.SetError(e)
|
||||
return resl, that.LastErr
|
||||
}
|
||||
|
||||
|
||||
414
example/benchmark/extreme_test.go
Normal file
414
example/benchmark/extreme_test.go
Normal file
@ -0,0 +1,414 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"runtime"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
)
|
||||
|
||||
// 压测配置
|
||||
type BenchConfig struct {
|
||||
URL string
|
||||
Concurrency int
|
||||
Duration time.Duration
|
||||
Timeout time.Duration
|
||||
}
|
||||
|
||||
// 压测结果
|
||||
type BenchResult struct {
|
||||
TotalRequests int64
|
||||
SuccessRequests int64
|
||||
FailedRequests int64
|
||||
TotalDuration time.Duration
|
||||
MinLatency int64 // 纳秒
|
||||
MaxLatency int64
|
||||
AvgLatency int64
|
||||
P50Latency int64 // 50分位
|
||||
P90Latency int64 // 90分位
|
||||
P99Latency int64 // 99分位
|
||||
QPS float64
|
||||
}
|
||||
|
||||
// 延迟收集器
|
||||
type LatencyCollector struct {
|
||||
latencies []int64
|
||||
mu sync.Mutex
|
||||
}
|
||||
|
||||
func (lc *LatencyCollector) Add(latency int64) {
|
||||
lc.mu.Lock()
|
||||
lc.latencies = append(lc.latencies, latency)
|
||||
lc.mu.Unlock()
|
||||
}
|
||||
|
||||
func (lc *LatencyCollector) GetPercentile(p float64) int64 {
|
||||
lc.mu.Lock()
|
||||
defer lc.mu.Unlock()
|
||||
|
||||
if len(lc.latencies) == 0 {
|
||||
return 0
|
||||
}
|
||||
|
||||
// 简单排序取百分位
|
||||
n := len(lc.latencies)
|
||||
idx := int(float64(n) * p)
|
||||
if idx >= n {
|
||||
idx = n - 1
|
||||
}
|
||||
|
||||
// 部分排序找第idx个元素
|
||||
return quickSelect(lc.latencies, idx)
|
||||
}
|
||||
|
||||
func quickSelect(arr []int64, k int) int64 {
|
||||
if len(arr) == 1 {
|
||||
return arr[0]
|
||||
}
|
||||
|
||||
pivot := arr[len(arr)/2]
|
||||
var left, right, equal []int64
|
||||
|
||||
for _, v := range arr {
|
||||
if v < pivot {
|
||||
left = append(left, v)
|
||||
} else if v > pivot {
|
||||
right = append(right, v)
|
||||
} else {
|
||||
equal = append(equal, v)
|
||||
}
|
||||
}
|
||||
|
||||
if k < len(left) {
|
||||
return quickSelect(left, k)
|
||||
} else if k < len(left)+len(equal) {
|
||||
return pivot
|
||||
}
|
||||
return quickSelect(right, k-len(left)-len(equal))
|
||||
}
|
||||
|
||||
func main() {
|
||||
// 最大化利用CPU
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
|
||||
fmt.Println("==========================================")
|
||||
fmt.Println(" 🔥 HoTime 极限压力测试 🔥")
|
||||
fmt.Println("==========================================")
|
||||
fmt.Printf("CPU 核心数: %d\n", runtime.NumCPU())
|
||||
fmt.Println()
|
||||
|
||||
// 极限测试配置
|
||||
configs := []BenchConfig{
|
||||
{URL: "http://127.0.0.1:8081/app/test/hello", Concurrency: 500, Duration: 15 * time.Second, Timeout: 10 * time.Second},
|
||||
{URL: "http://127.0.0.1:8081/app/test/hello", Concurrency: 1000, Duration: 15 * time.Second, Timeout: 10 * time.Second},
|
||||
{URL: "http://127.0.0.1:8081/app/test/hello", Concurrency: 2000, Duration: 15 * time.Second, Timeout: 10 * time.Second},
|
||||
{URL: "http://127.0.0.1:8081/app/test/hello", Concurrency: 5000, Duration: 15 * time.Second, Timeout: 10 * time.Second},
|
||||
{URL: "http://127.0.0.1:8081/app/test/hello", Concurrency: 10000, Duration: 15 * time.Second, Timeout: 10 * time.Second},
|
||||
}
|
||||
|
||||
// 检查服务
|
||||
fmt.Println("正在检查服务是否可用...")
|
||||
if !checkService(configs[0].URL) {
|
||||
fmt.Println("❌ 服务不可用,请先启动示例应用")
|
||||
return
|
||||
}
|
||||
fmt.Println("✅ 服务已就绪")
|
||||
fmt.Println()
|
||||
|
||||
// 预热
|
||||
fmt.Println("🔄 预热中 (5秒)...")
|
||||
warmup(configs[0].URL, 100, 5*time.Second)
|
||||
fmt.Println("✅ 预热完成")
|
||||
fmt.Println()
|
||||
|
||||
var maxQPS float64
|
||||
var maxConcurrency int
|
||||
|
||||
// 执行极限测试
|
||||
for i, config := range configs {
|
||||
fmt.Printf("══════════════════════════════════════════\n")
|
||||
fmt.Printf("【极限测试 %d】并发数: %d, 持续时间: %v\n", i+1, config.Concurrency, config.Duration)
|
||||
fmt.Printf("══════════════════════════════════════════\n")
|
||||
|
||||
result := runBenchmark(config)
|
||||
printResult(result)
|
||||
|
||||
if result.QPS > maxQPS {
|
||||
maxQPS = result.QPS
|
||||
maxConcurrency = config.Concurrency
|
||||
}
|
||||
|
||||
// 检查是否达到瓶颈
|
||||
successRate := float64(result.SuccessRequests) / float64(result.TotalRequests) * 100
|
||||
if successRate < 95 {
|
||||
fmt.Println("\n⚠️ 成功率低于95%,已达到服务极限!")
|
||||
break
|
||||
}
|
||||
|
||||
if result.AvgLatency > int64(100*time.Millisecond) {
|
||||
fmt.Println("\n⚠️ 平均延迟超过100ms,已达到服务极限!")
|
||||
break
|
||||
}
|
||||
|
||||
fmt.Println()
|
||||
|
||||
// 测试间隔
|
||||
if i < len(configs)-1 {
|
||||
fmt.Println("冷却 5 秒...")
|
||||
time.Sleep(5 * time.Second)
|
||||
fmt.Println()
|
||||
}
|
||||
}
|
||||
|
||||
// 最终报告
|
||||
fmt.Println()
|
||||
fmt.Println("══════════════════════════════════════════")
|
||||
fmt.Println(" 📊 极限测试总结")
|
||||
fmt.Println("══════════════════════════════════════════")
|
||||
fmt.Printf("最高 QPS: %.2f 请求/秒\n", maxQPS)
|
||||
fmt.Printf("最佳并发数: %d\n", maxConcurrency)
|
||||
fmt.Println()
|
||||
|
||||
// 并发用户估算
|
||||
estimateUsers(maxQPS)
|
||||
}
|
||||
|
||||
func checkService(url string) bool {
|
||||
client := &http.Client{Timeout: 3 * time.Second}
|
||||
resp, err := client.Get(url)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
return resp.StatusCode == 200
|
||||
}
|
||||
|
||||
func warmup(url string, concurrency int, duration time.Duration) {
|
||||
client := &http.Client{
|
||||
Timeout: 5 * time.Second,
|
||||
Transport: &http.Transport{
|
||||
MaxIdleConns: concurrency * 2,
|
||||
MaxIdleConnsPerHost: concurrency * 2,
|
||||
},
|
||||
}
|
||||
|
||||
done := make(chan struct{})
|
||||
var wg sync.WaitGroup
|
||||
|
||||
for i := 0; i < concurrency; i++ {
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
for {
|
||||
select {
|
||||
case <-done:
|
||||
return
|
||||
default:
|
||||
resp, err := client.Get(url)
|
||||
if err == nil {
|
||||
io.Copy(io.Discard, resp.Body)
|
||||
resp.Body.Close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
time.Sleep(duration)
|
||||
close(done)
|
||||
wg.Wait()
|
||||
}
|
||||
|
||||
func runBenchmark(config BenchConfig) BenchResult {
|
||||
var (
|
||||
totalRequests int64
|
||||
successRequests int64
|
||||
failedRequests int64
|
||||
totalLatency int64
|
||||
minLatency int64 = int64(time.Hour)
|
||||
maxLatency int64
|
||||
mu sync.Mutex
|
||||
)
|
||||
|
||||
collector := &LatencyCollector{
|
||||
latencies: make([]int64, 0, 100000),
|
||||
}
|
||||
|
||||
// 高性能HTTP客户端
|
||||
client := &http.Client{
|
||||
Timeout: config.Timeout,
|
||||
Transport: &http.Transport{
|
||||
MaxIdleConns: config.Concurrency * 2,
|
||||
MaxIdleConnsPerHost: config.Concurrency * 2,
|
||||
MaxConnsPerHost: config.Concurrency * 2,
|
||||
IdleConnTimeout: 90 * time.Second,
|
||||
DisableKeepAlives: false,
|
||||
DisableCompression: true,
|
||||
},
|
||||
}
|
||||
|
||||
done := make(chan struct{})
|
||||
var wg sync.WaitGroup
|
||||
|
||||
startTime := time.Now()
|
||||
|
||||
// 启动并发
|
||||
for i := 0; i < config.Concurrency; i++ {
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-done:
|
||||
return
|
||||
default:
|
||||
reqStart := time.Now()
|
||||
success := makeRequest(client, config.URL)
|
||||
latency := time.Since(reqStart).Nanoseconds()
|
||||
|
||||
atomic.AddInt64(&totalRequests, 1)
|
||||
atomic.AddInt64(&totalLatency, latency)
|
||||
|
||||
if success {
|
||||
atomic.AddInt64(&successRequests, 1)
|
||||
} else {
|
||||
atomic.AddInt64(&failedRequests, 1)
|
||||
}
|
||||
|
||||
// 采样收集延迟(每100个请求采样1个,减少内存开销)
|
||||
if atomic.LoadInt64(&totalRequests)%100 == 0 {
|
||||
collector.Add(latency)
|
||||
}
|
||||
|
||||
mu.Lock()
|
||||
if latency < minLatency {
|
||||
minLatency = latency
|
||||
}
|
||||
if latency > maxLatency {
|
||||
maxLatency = latency
|
||||
}
|
||||
mu.Unlock()
|
||||
}
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
time.Sleep(config.Duration)
|
||||
close(done)
|
||||
wg.Wait()
|
||||
|
||||
totalDuration := time.Since(startTime)
|
||||
|
||||
result := BenchResult{
|
||||
TotalRequests: totalRequests,
|
||||
SuccessRequests: successRequests,
|
||||
FailedRequests: failedRequests,
|
||||
TotalDuration: totalDuration,
|
||||
MinLatency: minLatency,
|
||||
MaxLatency: maxLatency,
|
||||
P50Latency: collector.GetPercentile(0.50),
|
||||
P90Latency: collector.GetPercentile(0.90),
|
||||
P99Latency: collector.GetPercentile(0.99),
|
||||
}
|
||||
|
||||
if totalRequests > 0 {
|
||||
result.AvgLatency = totalLatency / totalRequests
|
||||
result.QPS = float64(totalRequests) / totalDuration.Seconds()
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
func makeRequest(client *http.Client, url string) bool {
|
||||
resp, err := client.Get(url)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
if resp.StatusCode != 200 {
|
||||
return false
|
||||
}
|
||||
|
||||
var result map[string]interface{}
|
||||
if err := json.Unmarshal(body, &result); err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
if status, ok := result["status"].(float64); !ok || status != 0 {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func printResult(result BenchResult) {
|
||||
successRate := float64(result.SuccessRequests) / float64(result.TotalRequests) * 100
|
||||
|
||||
fmt.Printf("总请求数: %d\n", result.TotalRequests)
|
||||
fmt.Printf("成功请求: %d\n", result.SuccessRequests)
|
||||
fmt.Printf("失败请求: %d\n", result.FailedRequests)
|
||||
fmt.Printf("成功率: %.2f%%\n", successRate)
|
||||
fmt.Printf("总耗时: %v\n", result.TotalDuration.Round(time.Millisecond))
|
||||
fmt.Printf("QPS: %.2f 请求/秒\n", result.QPS)
|
||||
fmt.Println("------------------------------------------")
|
||||
fmt.Printf("最小延迟: %v\n", time.Duration(result.MinLatency).Round(time.Microsecond))
|
||||
fmt.Printf("平均延迟: %v\n", time.Duration(result.AvgLatency).Round(time.Microsecond))
|
||||
fmt.Printf("P50延迟: %v\n", time.Duration(result.P50Latency).Round(time.Microsecond))
|
||||
fmt.Printf("P90延迟: %v\n", time.Duration(result.P90Latency).Round(time.Microsecond))
|
||||
fmt.Printf("P99延迟: %v\n", time.Duration(result.P99Latency).Round(time.Microsecond))
|
||||
fmt.Printf("最大延迟: %v\n", time.Duration(result.MaxLatency).Round(time.Microsecond))
|
||||
|
||||
// 性能评级
|
||||
fmt.Print("\n性能评级: ")
|
||||
switch {
|
||||
case result.QPS >= 200000:
|
||||
fmt.Println("🏆 卓越 (QPS >= 200K)")
|
||||
case result.QPS >= 100000:
|
||||
fmt.Println("🚀 优秀 (QPS >= 100K)")
|
||||
case result.QPS >= 50000:
|
||||
fmt.Println("⭐ 良好 (QPS >= 50K)")
|
||||
case result.QPS >= 20000:
|
||||
fmt.Println("👍 中上 (QPS >= 20K)")
|
||||
case result.QPS >= 10000:
|
||||
fmt.Println("📊 中等 (QPS >= 10K)")
|
||||
default:
|
||||
fmt.Println("⚠️ 一般 (QPS < 10K)")
|
||||
}
|
||||
}
|
||||
|
||||
func estimateUsers(maxQPS float64) {
|
||||
fmt.Println("📈 并发用户数估算(基于不同使用场景):")
|
||||
fmt.Println("------------------------------------------")
|
||||
|
||||
scenarios := []struct {
|
||||
name string
|
||||
requestInterval float64 // 用户平均请求间隔(秒)
|
||||
}{
|
||||
{"高频交互(每秒1次请求)", 1},
|
||||
{"活跃用户(每5秒1次请求)", 5},
|
||||
{"普通浏览(每10秒1次请求)", 10},
|
||||
{"低频访问(每30秒1次请求)", 30},
|
||||
{"偶尔访问(每60秒1次请求)", 60},
|
||||
}
|
||||
|
||||
for _, s := range scenarios {
|
||||
users := maxQPS * s.requestInterval
|
||||
fmt.Printf("%-30s ~%d 用户\n", s.name, int(users))
|
||||
}
|
||||
|
||||
fmt.Println()
|
||||
fmt.Println("💡 实际生产环境建议保留 30-50% 性能余量")
|
||||
fmt.Printf(" 安全并发用户数: %d - %d (普通浏览场景)\n",
|
||||
int(maxQPS*10*0.5), int(maxQPS*10*0.7))
|
||||
}
|
||||
327
example/benchmark/main.go
Normal file
327
example/benchmark/main.go
Normal file
@ -0,0 +1,327 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"runtime"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
)
|
||||
|
||||
func main() {
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
|
||||
fmt.Println("==========================================")
|
||||
fmt.Println(" 🔥 HoTime 极限压力测试 🔥")
|
||||
fmt.Println("==========================================")
|
||||
fmt.Printf("CPU 核心数: %d\n", runtime.NumCPU())
|
||||
fmt.Println()
|
||||
|
||||
baseURL := "http://127.0.0.1:8081/app/test/hello"
|
||||
|
||||
// 检查服务
|
||||
fmt.Println("正在检查服务是否可用...")
|
||||
client := &http.Client{Timeout: 3 * time.Second}
|
||||
resp, err := client.Get(baseURL)
|
||||
if err != nil || resp.StatusCode != 200 {
|
||||
fmt.Println("❌ 服务不可用,请先启动示例应用")
|
||||
return
|
||||
}
|
||||
resp.Body.Close()
|
||||
fmt.Println("✅ 服务已就绪")
|
||||
fmt.Println()
|
||||
|
||||
// 预热
|
||||
fmt.Println("🔄 预热中 (5秒)...")
|
||||
doWarmup(baseURL, 100, 5*time.Second)
|
||||
fmt.Println("✅ 预热完成")
|
||||
fmt.Println()
|
||||
|
||||
// 极限测试配置
|
||||
concurrencyLevels := []int{500, 1000, 2000, 5000, 10000}
|
||||
testDuration := 15 * time.Second
|
||||
|
||||
var maxQPS float64
|
||||
var maxConcurrency int
|
||||
|
||||
for i, concurrency := range concurrencyLevels {
|
||||
fmt.Printf("══════════════════════════════════════════\n")
|
||||
fmt.Printf("【极限测试 %d】并发数: %d, 持续时间: %v\n", i+1, concurrency, testDuration)
|
||||
fmt.Printf("══════════════════════════════════════════\n")
|
||||
|
||||
total, success, failed, qps, minLat, avgLat, maxLat, p50, p90, p99 := doBenchmark(baseURL, concurrency, testDuration)
|
||||
|
||||
successRate := float64(success) / float64(total) * 100
|
||||
|
||||
fmt.Printf("总请求数: %d\n", total)
|
||||
fmt.Printf("成功请求: %d\n", success)
|
||||
fmt.Printf("失败请求: %d\n", failed)
|
||||
fmt.Printf("成功率: %.2f%%\n", successRate)
|
||||
fmt.Printf("QPS: %.2f 请求/秒\n", qps)
|
||||
fmt.Println("------------------------------------------")
|
||||
fmt.Printf("最小延迟: %v\n", time.Duration(minLat))
|
||||
fmt.Printf("平均延迟: %v\n", time.Duration(avgLat))
|
||||
fmt.Printf("P50延迟: %v\n", time.Duration(p50))
|
||||
fmt.Printf("P90延迟: %v\n", time.Duration(p90))
|
||||
fmt.Printf("P99延迟: %v\n", time.Duration(p99))
|
||||
fmt.Printf("最大延迟: %v\n", time.Duration(maxLat))
|
||||
|
||||
// 性能评级
|
||||
fmt.Print("\n性能评级: ")
|
||||
switch {
|
||||
case qps >= 200000:
|
||||
fmt.Println("🏆 卓越 (QPS >= 200K)")
|
||||
case qps >= 100000:
|
||||
fmt.Println("🚀 优秀 (QPS >= 100K)")
|
||||
case qps >= 50000:
|
||||
fmt.Println("⭐ 良好 (QPS >= 50K)")
|
||||
case qps >= 20000:
|
||||
fmt.Println("👍 中上 (QPS >= 20K)")
|
||||
case qps >= 10000:
|
||||
fmt.Println("📊 中等 (QPS >= 10K)")
|
||||
default:
|
||||
fmt.Println("⚠️ 一般 (QPS < 10K)")
|
||||
}
|
||||
|
||||
if qps > maxQPS {
|
||||
maxQPS = qps
|
||||
maxConcurrency = concurrency
|
||||
}
|
||||
|
||||
// 检查是否达到瓶颈
|
||||
if successRate < 95 {
|
||||
fmt.Println("\n⚠️ 成功率低于95%,已达到服务极限!")
|
||||
break
|
||||
}
|
||||
if avgLat > int64(100*time.Millisecond) {
|
||||
fmt.Println("\n⚠️ 平均延迟超过100ms,已达到服务极限!")
|
||||
break
|
||||
}
|
||||
|
||||
fmt.Println()
|
||||
if i < len(concurrencyLevels)-1 {
|
||||
fmt.Println("冷却 5 秒...")
|
||||
time.Sleep(5 * time.Second)
|
||||
fmt.Println()
|
||||
}
|
||||
}
|
||||
|
||||
// 最终报告
|
||||
fmt.Println()
|
||||
fmt.Println("══════════════════════════════════════════")
|
||||
fmt.Println(" 📊 极限测试总结")
|
||||
fmt.Println("══════════════════════════════════════════")
|
||||
fmt.Printf("最高 QPS: %.2f 请求/秒\n", maxQPS)
|
||||
fmt.Printf("最佳并发数: %d\n", maxConcurrency)
|
||||
fmt.Println()
|
||||
|
||||
// 并发用户估算
|
||||
fmt.Println("📈 并发用户数估算:")
|
||||
fmt.Println("------------------------------------------")
|
||||
fmt.Printf("高频交互(1秒/次): ~%d 用户\n", int(maxQPS*1))
|
||||
fmt.Printf("活跃用户(5秒/次): ~%d 用户\n", int(maxQPS*5))
|
||||
fmt.Printf("普通浏览(10秒/次): ~%d 用户\n", int(maxQPS*10))
|
||||
fmt.Printf("低频访问(30秒/次): ~%d 用户\n", int(maxQPS*30))
|
||||
fmt.Println()
|
||||
fmt.Println("💡 生产环境建议保留 30-50% 性能余量")
|
||||
fmt.Printf(" 安全并发用户数: %d - %d (普通浏览场景)\n",
|
||||
int(maxQPS*10*0.5), int(maxQPS*10*0.7))
|
||||
}
|
||||
|
||||
func doWarmup(url string, concurrency int, duration time.Duration) {
|
||||
client := &http.Client{
|
||||
Timeout: 5 * time.Second,
|
||||
Transport: &http.Transport{
|
||||
MaxIdleConns: concurrency * 2,
|
||||
MaxIdleConnsPerHost: concurrency * 2,
|
||||
},
|
||||
}
|
||||
|
||||
done := make(chan struct{})
|
||||
var wg sync.WaitGroup
|
||||
|
||||
for i := 0; i < concurrency; i++ {
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
for {
|
||||
select {
|
||||
case <-done:
|
||||
return
|
||||
default:
|
||||
resp, err := client.Get(url)
|
||||
if err == nil {
|
||||
io.Copy(io.Discard, resp.Body)
|
||||
resp.Body.Close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
time.Sleep(duration)
|
||||
close(done)
|
||||
wg.Wait()
|
||||
}
|
||||
|
||||
func doBenchmark(url string, concurrency int, duration time.Duration) (total, success, failed int64, qps float64, minLat, avgLat, maxLat, p50, p90, p99 int64) {
|
||||
var totalLatency int64
|
||||
minLat = int64(time.Hour)
|
||||
var mu sync.Mutex
|
||||
|
||||
// 采样收集器
|
||||
latencies := make([]int64, 0, 50000)
|
||||
var latMu sync.Mutex
|
||||
|
||||
client := &http.Client{
|
||||
Timeout: 10 * time.Second,
|
||||
Transport: &http.Transport{
|
||||
MaxIdleConns: concurrency * 2,
|
||||
MaxIdleConnsPerHost: concurrency * 2,
|
||||
MaxConnsPerHost: concurrency * 2,
|
||||
IdleConnTimeout: 90 * time.Second,
|
||||
DisableCompression: true,
|
||||
},
|
||||
}
|
||||
|
||||
done := make(chan struct{})
|
||||
var wg sync.WaitGroup
|
||||
startTime := time.Now()
|
||||
|
||||
for i := 0; i < concurrency; i++ {
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
for {
|
||||
select {
|
||||
case <-done:
|
||||
return
|
||||
default:
|
||||
reqStart := time.Now()
|
||||
ok := doRequest(client, url)
|
||||
lat := time.Since(reqStart).Nanoseconds()
|
||||
|
||||
atomic.AddInt64(&total, 1)
|
||||
atomic.AddInt64(&totalLatency, lat)
|
||||
|
||||
if ok {
|
||||
atomic.AddInt64(&success, 1)
|
||||
} else {
|
||||
atomic.AddInt64(&failed, 1)
|
||||
}
|
||||
|
||||
// 采样 (每50个采1个)
|
||||
if atomic.LoadInt64(&total)%50 == 0 {
|
||||
latMu.Lock()
|
||||
latencies = append(latencies, lat)
|
||||
latMu.Unlock()
|
||||
}
|
||||
|
||||
mu.Lock()
|
||||
if lat < minLat {
|
||||
minLat = lat
|
||||
}
|
||||
if lat > maxLat {
|
||||
maxLat = lat
|
||||
}
|
||||
mu.Unlock()
|
||||
}
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
time.Sleep(duration)
|
||||
close(done)
|
||||
wg.Wait()
|
||||
|
||||
totalDuration := time.Since(startTime)
|
||||
|
||||
if total > 0 {
|
||||
avgLat = totalLatency / total
|
||||
qps = float64(total) / totalDuration.Seconds()
|
||||
}
|
||||
|
||||
// 计算百分位
|
||||
if len(latencies) > 0 {
|
||||
p50 = getPercentile(latencies, 0.50)
|
||||
p90 = getPercentile(latencies, 0.90)
|
||||
p99 = getPercentile(latencies, 0.99)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func doRequest(client *http.Client, url string) bool {
|
||||
resp, err := client.Get(url)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
if resp.StatusCode != 200 {
|
||||
return false
|
||||
}
|
||||
|
||||
var result map[string]interface{}
|
||||
if err := json.Unmarshal(body, &result); err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
if status, ok := result["status"].(float64); !ok || status != 0 {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func getPercentile(arr []int64, p float64) int64 {
|
||||
n := len(arr)
|
||||
if n == 0 {
|
||||
return 0
|
||||
}
|
||||
|
||||
// 复制一份避免修改原数组
|
||||
tmp := make([]int64, n)
|
||||
copy(tmp, arr)
|
||||
|
||||
idx := int(float64(n) * p)
|
||||
if idx >= n {
|
||||
idx = n - 1
|
||||
}
|
||||
|
||||
return quickSelect(tmp, idx)
|
||||
}
|
||||
|
||||
func quickSelect(arr []int64, k int) int64 {
|
||||
if len(arr) == 1 {
|
||||
return arr[0]
|
||||
}
|
||||
|
||||
pivot := arr[len(arr)/2]
|
||||
var left, right, equal []int64
|
||||
|
||||
for _, v := range arr {
|
||||
if v < pivot {
|
||||
left = append(left, v)
|
||||
} else if v > pivot {
|
||||
right = append(right, v)
|
||||
} else {
|
||||
equal = append(equal, v)
|
||||
}
|
||||
}
|
||||
|
||||
if k < len(left) {
|
||||
return quickSelect(left, k)
|
||||
} else if k < len(left)+len(equal) {
|
||||
return pivot
|
||||
}
|
||||
return quickSelect(right, k-len(left)-len(equal))
|
||||
}
|
||||
262
example/benchmark_test.go
Normal file
262
example/benchmark_test.go
Normal file
@ -0,0 +1,262 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
)
|
||||
|
||||
// 压测配置
|
||||
type BenchConfig struct {
|
||||
URL string // 测试URL
|
||||
Concurrency int // 并发数
|
||||
Duration time.Duration // 持续时间
|
||||
Timeout time.Duration // 请求超时时间
|
||||
}
|
||||
|
||||
// 压测结果
|
||||
type BenchResult struct {
|
||||
TotalRequests int64 // 总请求数
|
||||
SuccessRequests int64 // 成功请求数
|
||||
FailedRequests int64 // 失败请求数
|
||||
TotalDuration time.Duration // 总耗时
|
||||
MinLatency time.Duration // 最小延迟
|
||||
MaxLatency time.Duration // 最大延迟
|
||||
AvgLatency time.Duration // 平均延迟
|
||||
QPS float64 // 每秒请求数
|
||||
}
|
||||
|
||||
func main() {
|
||||
fmt.Println("==========================================")
|
||||
fmt.Println(" HoTime 框架性能压力测试")
|
||||
fmt.Println("==========================================")
|
||||
fmt.Println()
|
||||
|
||||
// 测试配置
|
||||
configs := []BenchConfig{
|
||||
{
|
||||
URL: "http://127.0.0.1:8081/app/test/hello",
|
||||
Concurrency: 10,
|
||||
Duration: 10 * time.Second,
|
||||
Timeout: 5 * time.Second,
|
||||
},
|
||||
{
|
||||
URL: "http://127.0.0.1:8081/app/test/hello",
|
||||
Concurrency: 50,
|
||||
Duration: 10 * time.Second,
|
||||
Timeout: 5 * time.Second,
|
||||
},
|
||||
{
|
||||
URL: "http://127.0.0.1:8081/app/test/hello",
|
||||
Concurrency: 100,
|
||||
Duration: 10 * time.Second,
|
||||
Timeout: 5 * time.Second,
|
||||
},
|
||||
{
|
||||
URL: "http://127.0.0.1:8081/app/test/hello",
|
||||
Concurrency: 200,
|
||||
Duration: 10 * time.Second,
|
||||
Timeout: 5 * time.Second,
|
||||
},
|
||||
}
|
||||
|
||||
// 先检查服务是否可用
|
||||
fmt.Println("正在检查服务是否可用...")
|
||||
if !checkService(configs[0].URL) {
|
||||
fmt.Println("❌ 服务不可用,请先启动示例应用:")
|
||||
fmt.Println(" cd example && go run main.go")
|
||||
return
|
||||
}
|
||||
fmt.Println("✅ 服务已就绪")
|
||||
fmt.Println()
|
||||
|
||||
// 执行压测
|
||||
for i, config := range configs {
|
||||
fmt.Printf("【测试 %d】并发数: %d, 持续时间: %v\n", i+1, config.Concurrency, config.Duration)
|
||||
fmt.Println("------------------------------------------")
|
||||
|
||||
result := runBenchmark(config)
|
||||
printResult(result)
|
||||
fmt.Println()
|
||||
|
||||
// 测试间隔,让服务恢复
|
||||
if i < len(configs)-1 {
|
||||
fmt.Println("等待 3 秒后开始下一轮测试...")
|
||||
time.Sleep(3 * time.Second)
|
||||
fmt.Println()
|
||||
}
|
||||
}
|
||||
|
||||
fmt.Println("==========================================")
|
||||
fmt.Println(" 压力测试完成")
|
||||
fmt.Println("==========================================")
|
||||
}
|
||||
|
||||
// 检查服务是否可用
|
||||
func checkService(url string) bool {
|
||||
client := &http.Client{Timeout: 3 * time.Second}
|
||||
resp, err := client.Get(url)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
return resp.StatusCode == 200
|
||||
}
|
||||
|
||||
// 执行压测
|
||||
func runBenchmark(config BenchConfig) BenchResult {
|
||||
var (
|
||||
totalRequests int64
|
||||
successRequests int64
|
||||
failedRequests int64
|
||||
totalLatency int64 // 纳秒
|
||||
minLatency int64 = int64(time.Hour)
|
||||
maxLatency int64
|
||||
mu sync.Mutex
|
||||
)
|
||||
|
||||
// 创建HTTP客户端
|
||||
client := &http.Client{
|
||||
Timeout: config.Timeout,
|
||||
Transport: &http.Transport{
|
||||
MaxIdleConns: config.Concurrency * 2,
|
||||
MaxIdleConnsPerHost: config.Concurrency * 2,
|
||||
IdleConnTimeout: 90 * time.Second,
|
||||
},
|
||||
}
|
||||
|
||||
// 控制退出
|
||||
done := make(chan struct{})
|
||||
var wg sync.WaitGroup
|
||||
|
||||
startTime := time.Now()
|
||||
|
||||
// 启动并发goroutine
|
||||
for i := 0; i < config.Concurrency; i++ {
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-done:
|
||||
return
|
||||
default:
|
||||
reqStart := time.Now()
|
||||
success := makeRequest(client, config.URL)
|
||||
latency := time.Since(reqStart).Nanoseconds()
|
||||
|
||||
atomic.AddInt64(&totalRequests, 1)
|
||||
atomic.AddInt64(&totalLatency, latency)
|
||||
|
||||
if success {
|
||||
atomic.AddInt64(&successRequests, 1)
|
||||
} else {
|
||||
atomic.AddInt64(&failedRequests, 1)
|
||||
}
|
||||
|
||||
// 更新最小/最大延迟
|
||||
mu.Lock()
|
||||
if latency < minLatency {
|
||||
minLatency = latency
|
||||
}
|
||||
if latency > maxLatency {
|
||||
maxLatency = latency
|
||||
}
|
||||
mu.Unlock()
|
||||
}
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
// 等待指定时间
|
||||
time.Sleep(config.Duration)
|
||||
close(done)
|
||||
wg.Wait()
|
||||
|
||||
totalDuration := time.Since(startTime)
|
||||
|
||||
// 计算结果
|
||||
result := BenchResult{
|
||||
TotalRequests: totalRequests,
|
||||
SuccessRequests: successRequests,
|
||||
FailedRequests: failedRequests,
|
||||
TotalDuration: totalDuration,
|
||||
MinLatency: time.Duration(minLatency),
|
||||
MaxLatency: time.Duration(maxLatency),
|
||||
}
|
||||
|
||||
if totalRequests > 0 {
|
||||
result.AvgLatency = time.Duration(totalLatency / totalRequests)
|
||||
result.QPS = float64(totalRequests) / totalDuration.Seconds()
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
// 发起单个请求
|
||||
func makeRequest(client *http.Client, url string) bool {
|
||||
resp, err := client.Get(url)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
// 读取响应体
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
// 验证响应
|
||||
if resp.StatusCode != 200 {
|
||||
return false
|
||||
}
|
||||
|
||||
// 验证JSON格式
|
||||
var result map[string]interface{}
|
||||
if err := json.Unmarshal(body, &result); err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
// 验证返回状态
|
||||
if status, ok := result["status"].(float64); !ok || status != 0 {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// 打印结果
|
||||
func printResult(result BenchResult) {
|
||||
successRate := float64(result.SuccessRequests) / float64(result.TotalRequests) * 100
|
||||
|
||||
fmt.Printf("总请求数: %d\n", result.TotalRequests)
|
||||
fmt.Printf("成功请求: %d\n", result.SuccessRequests)
|
||||
fmt.Printf("失败请求: %d\n", result.FailedRequests)
|
||||
fmt.Printf("成功率: %.2f%%\n", successRate)
|
||||
fmt.Printf("总耗时: %v\n", result.TotalDuration.Round(time.Millisecond))
|
||||
fmt.Printf("QPS: %.2f 请求/秒\n", result.QPS)
|
||||
fmt.Printf("最小延迟: %v\n", result.MinLatency.Round(time.Microsecond))
|
||||
fmt.Printf("最大延迟: %v\n", result.MaxLatency.Round(time.Microsecond))
|
||||
fmt.Printf("平均延迟: %v\n", result.AvgLatency.Round(time.Microsecond))
|
||||
|
||||
// 性能评级
|
||||
fmt.Print("性能评级: ")
|
||||
switch {
|
||||
case result.QPS >= 10000:
|
||||
fmt.Println("🚀 优秀 (QPS >= 10000)")
|
||||
case result.QPS >= 5000:
|
||||
fmt.Println("⭐ 良好 (QPS >= 5000)")
|
||||
case result.QPS >= 2000:
|
||||
fmt.Println("👍 中等 (QPS >= 2000)")
|
||||
case result.QPS >= 1000:
|
||||
fmt.Println("📊 一般 (QPS >= 1000)")
|
||||
default:
|
||||
fmt.Println("⚠️ 需优化 (QPS < 1000)")
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,14 +1,22 @@
|
||||
{
|
||||
"cache": {
|
||||
"db": {
|
||||
"db": false,
|
||||
"db": true,
|
||||
"session": true,
|
||||
"timeout": 7200
|
||||
"timeout": 72000
|
||||
},
|
||||
"memory": {
|
||||
"db": true,
|
||||
"session": true,
|
||||
"timeout": 7200
|
||||
},
|
||||
"redis": {
|
||||
"db": true,
|
||||
"host": "127.0.0.1",
|
||||
"password": "",
|
||||
"port": 6379,
|
||||
"session": true,
|
||||
"timeout": 7200
|
||||
}
|
||||
},
|
||||
"codeConfig": [
|
||||
@ -24,7 +32,7 @@
|
||||
"db": {
|
||||
"mysql": {
|
||||
"host": "192.168.6.253",
|
||||
"name": "dgs-cms",
|
||||
"name": "dgs-cms260122",
|
||||
"password": "dasda8454456",
|
||||
"port": "3306",
|
||||
"user": "root"
|
||||
|
||||
@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
. "code.hoteas.com/golang/hotime"
|
||||
. "code.hoteas.com/golang/hotime/common"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@ -12,6 +13,13 @@ func main() {
|
||||
return isFinished
|
||||
})
|
||||
|
||||
appIns.Run(Router{})
|
||||
|
||||
appIns.Run(Router{
|
||||
"app": {
|
||||
"test": {
|
||||
"hello": func(that *Context) {
|
||||
that.Display(0, Map{"message": "Hello World"})
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
BIN
example/zctv2.exe
Normal file
BIN
example/zctv2.exe
Normal file
Binary file not shown.
58
session.go
58
session.go
@ -3,7 +3,7 @@ package hotime
|
||||
import (
|
||||
. "code.hoteas.com/golang/hotime/cache"
|
||||
. "code.hoteas.com/golang/hotime/common"
|
||||
//"sync"
|
||||
"sync"
|
||||
)
|
||||
|
||||
// session对象
|
||||
@ -12,52 +12,72 @@ type SessionIns struct {
|
||||
SessionId string
|
||||
Map
|
||||
ContextBase
|
||||
//mutex sync.Mutex
|
||||
mutex sync.RWMutex
|
||||
}
|
||||
|
||||
func (that *SessionIns) set() {
|
||||
that.HoTimeCache.Session(HEAD_SESSION_ADD+that.SessionId, that.Map)
|
||||
// set 保存 session 到缓存,必须在锁内调用或传入深拷贝的 map
|
||||
func (that *SessionIns) setWithCopy() {
|
||||
// 深拷贝 Map 防止并发修改
|
||||
that.mutex.RLock()
|
||||
copyMap := make(Map, len(that.Map))
|
||||
for k, v := range that.Map {
|
||||
copyMap[k] = v
|
||||
}
|
||||
that.mutex.RUnlock()
|
||||
|
||||
that.HoTimeCache.Session(HEAD_SESSION_ADD+that.SessionId, copyMap)
|
||||
}
|
||||
|
||||
func (that *SessionIns) Session(key string, data ...interface{}) *Obj {
|
||||
|
||||
that.mutex.Lock()
|
||||
if that.Map == nil {
|
||||
that.get()
|
||||
that.getWithoutLock()
|
||||
}
|
||||
that.mutex.Unlock()
|
||||
|
||||
if len(data) != 0 {
|
||||
that.mutex.Lock()
|
||||
if data[0] == nil {
|
||||
//that.mutex.Lock()
|
||||
delete(that.Map, key)
|
||||
//that.mutex.Unlock()
|
||||
that.set()
|
||||
} else {
|
||||
//that.mutex.Lock()
|
||||
that.Map[key] = data[0]
|
||||
//that.mutex.Unlock()
|
||||
that.set()
|
||||
}
|
||||
that.mutex.Unlock()
|
||||
|
||||
// 使用深拷贝版本保存,避免并发问题
|
||||
that.setWithCopy()
|
||||
return &Obj{Data: nil}
|
||||
}
|
||||
|
||||
return &Obj{Data: that.Map.Get(key)}
|
||||
|
||||
that.mutex.RLock()
|
||||
result := &Obj{Data: that.Map.Get(key)}
|
||||
that.mutex.RUnlock()
|
||||
return result
|
||||
}
|
||||
|
||||
func (that *SessionIns) get() {
|
||||
|
||||
// getWithoutLock 内部使用,调用前需要已持有锁
|
||||
func (that *SessionIns) getWithoutLock() {
|
||||
that.Map = that.HoTimeCache.Session(HEAD_SESSION_ADD + that.SessionId).ToMap()
|
||||
if that.Map != nil {
|
||||
return
|
||||
}
|
||||
|
||||
that.Map = Map{}
|
||||
that.HoTimeCache.Session(HEAD_SESSION_ADD+that.SessionId, that.Map)
|
||||
// 保存时也需要深拷贝
|
||||
copyMap := make(Map, len(that.Map))
|
||||
for k, v := range that.Map {
|
||||
copyMap[k] = v
|
||||
}
|
||||
that.HoTimeCache.Session(HEAD_SESSION_ADD+that.SessionId, copyMap)
|
||||
}
|
||||
|
||||
return
|
||||
func (that *SessionIns) get() {
|
||||
that.mutex.Lock()
|
||||
defer that.mutex.Unlock()
|
||||
that.getWithoutLock()
|
||||
}
|
||||
|
||||
func (that *SessionIns) Init(cache *HoTimeCache) {
|
||||
//that.mutex=sync.Mutex{}
|
||||
that.mutex = sync.RWMutex{}
|
||||
that.HoTimeCache = cache
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user