From 50d8c41b5667ac155fff51abe9fff400dd6a795b Mon Sep 17 00:00:00 2001 From: duanhf2012 Date: Thu, 2 Apr 2020 21:53:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- profiler/profiler.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/profiler/profiler.go b/profiler/profiler.go index 7ce2a58..d8d3c2b 100644 --- a/profiler/profiler.go +++ b/profiler/profiler.go @@ -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()