$ go tool pprof http://127.0.0.1:6060/debug/pprof/profile?seconds=30Saved profilein/root/pprof/pprof.demo.samples.CPU.001.pb.gzFile:demoType:CPUTime:Dec24,2023at11:42am(CST)Duration:10s,Total samples=70ms(0.7%)
它总共有3组配置文件:buf.work.yaml、buf.gen.yaml、buf.yaml。 另外,还有一个buf.lock文件,但是它不需要进行人工配置,它是由buf mod update命令所生成。这跟前端的npm、yarn等的lock文件差不多,golang的go.sum也差不多。 它的配置文件不多,也不复杂,维护起来非常方便,支持远程proto插件,支持远程第三方proto。
Save,Update,Delete,Find 中钩子方法支持 Preload、Joins 的预加载事务,嵌套事务,Save Point,Rollbac...
yky-feature-service/internal/featureservice/service/config.updateLocalCacheBatchHmgetLoadedFeatureCache 6.04MB 2.41% 71.52% 6.04MB 2.41% bufio.NewReaderSize 5.52MB 2.20% 73.72% 5.52MB 2.20% bufio.NewWriterSize 5.50MB 2.19% 75.91% 5.50MB 2.19% git.code.oa.com/polaris/polaris-go/pkg/model/local....
WorkerPoolSize:工作任务池最大工作Goroutine数量 LogDir: 日志文件夹 LogFile: 日志文件名称(如果不提供,则日志信息打印到Stderr) funcNewServer() ziface.IServer 创建一个Zinx服务器句柄,该句柄作为当前服务器应用程序的主枢纽,包括如下功能: 1)开启服务 ...
{"driverId": 17,"pageNo": 1,"pageSize": 20,"status": 1} 参考: Apache Bench安装与使用 golang中mysql连接池使用 Golang Mysql笔记(一)--- 连接与连接池 golang 数据库连接池 转自:https://www.cnblogs.com/davis12/p/16357728.html
读写分离,基本的原理是让主数据库处理事务性增、改、删操作(INSERT、 UPDATE、 DELETE) ,而从数据库处理SELECT查询操作。数据库复制被用来把事务性操作导致的变更同步到集群中的从数据库。 2、为什么要读写分离呢? 因为数据库的“写”(写10000条数据可能要3分钟)操作是比较耗时的。
intepoll_create(int size);intepoll_ctl(int epfd,int op,int fd,struct epoll_event *event);intepoll_wait(int epfd,struct epoll_event *events,int maxevents,int timeout); 使用起来很清晰,首先要调用epoll_create建立一个epoll对象。参数size是内核保证能够正确处理的最大句柄数,多于这个最大数时内核可...
uz := &unzip{offset: offset, name: zipFile} defer uz.close() zr, err := zip.NewReader(uz, uz.Size()) if err != nil { return err } 以上均实现后就可以实现一个支持头部偏移和带密码解压zip包的代码 参考资料: https://golang.google.cn/pkg/archive/zip/ https://github.com/yeka/zip...
ci(golangci-lint): update configuration and fix lint issues (#4247) May 23, 2025 internal chore(bind): return 413 status code when error is http.MaxBytesError ( May 25, 2025 render refactor: replace interface{} with any in type declarations (#4249) May 26, 2025 testdata chore: support...