[Go] Golang Adler32 Packet 2020-08-09 golang 1044 words 3 mins read 打包解包协议中应用adler32校验和 adler32 介绍 Adler-32是Mark Adler发明的校验和算法,和32位CRC校验算法一样,都是保护数据防 Read more...
[MySQL] MySQL 连接数和状态查看 2020-08-09 mysql 955 words 2 mins read MySQL 连接数和状态查看 mysql的最大连接数默认是100, 最大可以达到16384 查看mysql服务器最大连接数 1 2 mysql> show variables like '%max_connections%'; mysql> select @@max_connections; 设置mysql Read more...
[MySQL] 使用Sysbench对MySQL数据库性能压测 2020-08-08 mysql 2408 words 5 mins read MySQL 基准测试 sysbench介绍 sysbench 是一个模块化的、跨平台、多线程基准测试工具,主要用于评估测试各种不同系统参数下的数据库负载情况。 它主要包括以 Read more...
[Go] Golang Context 2020-08-08 golang 2371 words 5 mins read Golang Context Context 接口 1 2 3 4 5 6 7 8 9 type Context interface { Deadline() (deadline time.Time, ok bool) Done() <-chan struct{} Err() error Value(key interface{}) interface{} } context包提供暴露Context接口可以在多个Goroutine共享数 Read more...
[Go] Golang Channel 2020-08-08 golang 1897 words 4 mins read Don’t communicate by sharing memory, share memory by communicating. 介绍 channel是GO语言级别提供的goroutine间的通信方式,channel是类型相关的,需要在声明channel Read more...