mysqldriver-go:GC优化MySQL驱动程序

时间:2021-02-20 05:46:56
【文件属性】:
文件名称:mysqldriver-go:GC优化MySQL驱动程序
文件大小:19KB
文件格式:ZIP
更新时间:2021-02-20 05:46:56
Go mysqldriver-go 目录 动机 有许多实现接口MySQL驱动程序。 但是,使用此通用接口,尤其是在方法中,需要在堆中存储许多对象。 从数据库中读取大量记录会大大增加垃圾回收(GC)的暂停时间,这对于高吞吐量,低延迟的应用程序可能非常敏感。 由于上述原因以及对GC友好MySQL驱动程序的需求,我们决定不遵循接口并编写此驱动程序。 以下是使用Go 1.5.2在MacBook Pro (Retina, 13-inch, Late 2013), 2.8 GHz Intel Core i7, 16 GB 1600 MHz DDR3 : ➜ benchmarks git:(master) ✗ go run main.go mysqldriver: records read 100 HEAP 129 time 722.293µs go-sql-driver: records re
【文件预览】:
mysqldriver-go-master
----.travis.yml(100B)
----doc.go(2KB)
----helpers.go(453B)
----strconvutils.go(3KB)
----query_test.go(16KB)
----db.go(3KB)
----query.go(11KB)
----LICENSE(1KB)
----benchmarks()
--------main.go(2KB)
----row.go(8KB)
----helpers_test.go(780B)
----conn.go(3KB)
----README.md(4KB)
----conn_test.go(1KB)
----db_test.go(5KB)

网友评论