1 Star 0 Fork 0

GiteeStudio / surface

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Go basic libary, Aka Surface

TODO

package main

import (
	"fmt"
	"os"
	"runtime/pprof"
	"time"

	"gitee.com/oscstudio/surface"
)

var slot surface.Slot

func main() {
	f, err := os.Create(fmt.Sprintf("cpu_%d_%s.prof", os.Getpid(), time.Now().Format("2006_01_02_03_04_05")))
	if err != nil {
		return
	}
	pprof.StartCPUProfile(f)
	defer pprof.StopCPUProfile()
	slot.Initialize("/tmp/slot_access.log", "/tmp/slot_error.log")
	slot.RolateSize(4096)
	for i := 0; i < 200000; i++ {
		slot.INFO("test %s %d", os.Args[0], i)
		slot.Access("POST /api/v3/internal/test %d", i)
	}
}

空文件

简介

Golang basic library. 展开 收起
Go
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Go
1
https://gitee.com/oscstudio/surface.git
git@gitee.com:oscstudio/surface.git
oscstudio
surface
surface
master

搜索帮助