From c6009077a8f7818a9aa1cb858e4cf39739a2b957 Mon Sep 17 00:00:00 2001 From: Murphy Chen Date: Tue, 8 Oct 2024 16:28:02 +0800 Subject: [PATCH] add benchmark Signed-off-by: Murphy Chen --- processor/routingprocessor/logs_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/processor/routingprocessor/logs_test.go b/processor/routingprocessor/logs_test.go index 158597561e80..6bc8810cb5b4 100644 --- a/processor/routingprocessor/logs_test.go +++ b/processor/routingprocessor/logs_test.go @@ -565,6 +565,15 @@ func TestLogs_RoutingWorks_ResourceAttribute_WithOTTL_Ordered(t *testing.T) { } } +/* +# before +BenchmarkLogs_Routing +BenchmarkLogs_Routing-8 18951 63102 ns/op + +# after +BenchmarkLogs_Routing +BenchmarkLogs_Routing-8 21171 57387 ns/op +*/ func BenchmarkLogs_Routing(t *testing.B) { defaultExp := &mockLogsExporter{} lExpFirst := &mockLogsExporter{}