1 Star 1 Fork 3

menuiis / gkit

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
alloc.go 612 Bytes
一键复制 编辑 原始数据 按行查看 历史
menuis 提交于 2024-04-22 10:18 +08:00 . init
package main
import (
"fmt"
"net/http"
"time"
"gitee.com/menciis/gkit/watching"
)
func init() {
http.HandleFunc("/alloc", alloc)
go http.ListenAndServe(":10003", nil)
}
func main() {
w := watching.NewWatching(
watching.WithCollectInterval("2s"),
watching.WithCoolDown("1m"),
watching.WithDumpPath("./tmp"),
watching.WithTextDump(),
watching.WithMemDump(3, 25, 80),
)
w.EnableMemDump().Start()
time.Sleep(time.Hour)
}
func alloc(wr http.ResponseWriter, req *http.Request) {
m := make(map[string]string, 102400)
for i := 0; i < 1000; i++ {
m[fmt.Sprint(i)] = fmt.Sprint(i)
}
_ = m
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/menciis/gkit.git
git@gitee.com:menciis/gkit.git
menciis
gkit
gkit
d3f65ed26d21

搜索帮助