增加自定义接口

This commit is contained in:
duanhf2012
2020-04-02 21:53:12 +08:00
parent 060fb6d34c
commit 50d8c41b56

View File

@@ -69,6 +69,18 @@ func RegProfiler(profilerName string) *Profiler {
return pProfiler
}
func (slf *Profiler) SetMaxOverTime(tm time.Duration){
slf.maxOverTime = tm
}
func (slf *Profiler) SetOverTime(tm time.Duration){
slf.overTime = tm
}
func (slf *Profiler) SetMaxRecordNum(num int){
slf.maxRecordNum = num
}
func (slf *Profiler) Push(tag string) *Analyzer{
slf.stackLocker.Lock()
defer slf.stackLocker.Unlock()