From 10e2411c90794894ac48b28d9db35d985705aea4 Mon Sep 17 00:00:00 2001 From: steden <1470804@qq.com> Date: Wed, 22 Nov 2023 17:39:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trace/trace_test.go | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 trace/trace_test.go diff --git a/trace/trace_test.go b/trace/trace_test.go new file mode 100644 index 000000000..11de6a65e --- /dev/null +++ b/trace/trace_test.go @@ -0,0 +1,45 @@ +package trace + +import ( + "fmt" + "github.com/farseer-go/fs/trace/eumCallType" + "testing" +) + +func TestTrace(t *testing.T) { + emptyManager := EmptyManager{} + emptyManager.GetCurTrace() + emptyManager.TraceDatabase() + emptyManager.TraceEtcd("", "", 0) + emptyManager.TraceElasticsearch("", "", "") + emptyManager.TraceHand("") + emptyManager.TraceMq("", "", "") + emptyManager.EntryFSchedule("", 0, 0) + emptyManager.EntryMqConsumer("", "", "") + emptyManager.EntryQueueConsumer("") + emptyManager.EntryTask("") + emptyManager.EntryWatchKey("") + emptyManager.EntryWebApi("", "", "", "", nil, "", "") + emptyManager.TraceDatabaseOpen("", "") + emptyManager.TraceHttp("", "") + emptyManager.TraceKeyLocation("") + emptyManager.TraceMqSend("", "", "", "") + emptyManager.TraceRedis("", "", "") + + eumCallType.Http.ToString() + eumCallType.Grpc.ToString() + eumCallType.Database.ToString() + eumCallType.Redis.ToString() + eumCallType.Mq.ToString() + eumCallType.Elasticsearch.ToString() + eumCallType.Etcd.ToString() + eumCallType.Hand.ToString() + eumCallType.KeyLocation.ToString() + + detail := BaseTraceDetail{} + detail.End(fmt.Errorf("")) + detail.Ignore() + detail.GetLevel() + detail.IsIgnore() + detail.SetSql("", "", "", 0) +}