![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
go 进阶
根据项目问题,排查问题,使用更高效的工具
湫然Quin
这个作者很懒,什么都没留下…
展开
-
go-sql映射成非基本类型
sql: Scan error on column index 1, name \"foo\": unsupported Scan, storing driver.Value type []uint8 into type *[]string原创 2022-12-06 10:30:42 · 387 阅读 · 0 评论 -
golang unmarshal & marshal 导致 cup 内存占用率过高
每次分发任务时,都会查询所有任务,导致 Unmarshal。结合线上内存分析工具 ppor 显示,当 cup 过高时,marshal & unmarshal 都会各自达到 30% 左右。有效的缩短了运行时长,但是内存使用情况,并没有优化。使用中间价保存任务信息(redis 等内存数据库)且分发任务执行次数频率较高,每分钟执行一次。当任务过多时,导致中控 cup 100%。使用分页查询,限制查询数据大小。优化数据字段,保存较少数据。原创 2023-03-27 16:10:56 · 806 阅读 · 0 评论