Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,11 @@ src/tscore/ink_autoconf.h
src/tscore/ink_autoconf.h.in
include/tscore/ink_config.h
include/ts/apidefs.h
src/tscore/benchmark_shared_mutex
src/tscore/CompileParseRules
src/tscore/CompileParseRules.dSYM
src/tscore/ParseRulesCType
src/tscore/ParseRulesCTypeToLower
src/tscore/ParseRulesCTypeToUpper
src/tscore/freelist_benchmark
src/tscore/mkdfa
src/tscore/test_atomic
src/tscore/test_freelist
Expand All @@ -114,7 +112,6 @@ iocore/aio/test_AIO
iocore/eventsystem/test_IOBuffer
iocore/eventsystem/test_EventSystem
iocore/eventsystem/test_MIOBufferWriter
iocore/eventsystem/benchmark_ProxyAllocator

iocore/hostdb/test_RefCountCache
iocore/hostdb/test_HostFile
Expand Down Expand Up @@ -164,6 +161,10 @@ plugins/esi/vars_test

plugins/experimental/uri_signing/test_uri_signing

tools/benchmark/benchmark_FreeList
tools/benchmark/benchmark_ProxyAllocator
tools/benchmark/benchmark_SharedMutex

mgmt/rpc/overridable_txn_vars.cc
mgmt/rpc/IPCSocketClient.cc
mgmt/rpc/test_jsonrpc
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2403,6 +2403,7 @@ AC_CONFIG_FILES([
tools/Makefile
tools/trafficserver.pc
tools/tsxs
tools/benchmark/Makefile
tests/Makefile
])

Expand Down
8 changes: 1 addition & 7 deletions iocore/eventsystem/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ libinkevent_a_SOURCES = \

check_PROGRAMS = test_IOBuffer \
test_EventSystem \
test_MIOBufferWriter \
benchmark_ProxyAllocator
test_MIOBufferWriter

test_LD_FLAGS = \
@AM_LDFLAGS@ \
Expand Down Expand Up @@ -115,11 +114,6 @@ test_MIOBufferWriter_SOURCES = unit_tests/test_MIOBufferWriter.cc
test_MIOBufferWriter_CPPFLAGS = $(test_CPP_FLAGS)
test_MIOBufferWriter_LDFLAGS = $(test_LD_FLAGS)

benchmark_ProxyAllocator_SOURCES = unit_tests/benchmark_ProxyAllocator.cc
benchmark_ProxyAllocator_CPPFLAGS = $(test_CPP_FLAGS)
benchmark_ProxyAllocator_LDFLAGS = $(test_LD_FLAGS)
benchmark_ProxyAllocator_LDADD = $(test_LD_ADD)

include $(top_srcdir)/mk/tidy.mk

clang-tidy-local: $(DIST_SOURCES)
Expand Down
11 changes: 1 addition & 10 deletions src/tscore/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

include $(top_srcdir)/mk/tidy.mk

noinst_PROGRAMS = CompileParseRules freelist_benchmark benchmark_shared_mutex
noinst_PROGRAMS = CompileParseRules
check_PROGRAMS = test_geometry test_X509HostnameValidator test_tscore

if EXPENSIVE_TESTS
Expand Down Expand Up @@ -190,15 +190,6 @@ test_tscore_SOURCES += \
unit_tests/test_HKDF.cc
endif

freelist_benchmark_CXXFLAGS = -Wno-array-bounds $(AM_CXXFLAGS) -I$(abs_top_srcdir)/lib/catch2
freelist_benchmark_LDADD = libtscore.a @HWLOC_LIBS@ @LIBPCRE@ @LIBCAP@
freelist_benchmark_SOURCES = unit_tests/freelist_benchmark.cc

benchmark_shared_mutex_CXXFLAGS = -Wno-array-bounds $(AM_CXXFLAGS) -I$(abs_top_srcdir)/lib/catch2
benchmark_shared_mutex_LDADD = libtscore.a @LIBPCRE@ @LIBCAP@

benchmark_shared_mutex_SOURCES = unit_tests/benchmark_shared_mutex.cc

CompileParseRules_SOURCES = CompileParseRules.cc

CompileParseRules$(BUILD_EXEEXT): $(CompileParseRules_OBJECTS)
Expand Down
2 changes: 2 additions & 0 deletions tools/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

SUBDIRS = benchmark

bin_SCRIPTS = tsxs tspush

pkgconfigdir = $(libdir)/pkgconfig
Expand Down
75 changes: 75 additions & 0 deletions tools/benchmark/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#
# Collection of Catch2 based micro benchmark programs
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

include $(top_srcdir)/mk/tidy.mk

noinst_PROGRAMS = \
benchmark_FreeList \
benchmark_ProxyAllocator \
benchmark_SharedMutex

benchmark_LD_FLAGS = \
@AM_LDFLAGS@ \
@OPENSSL_LDFLAGS@ \
@SWOC_LDFLAGS@ \
@YAMLCPP_LDFLAGS@

benchmark_CPP_FLAGS = \
-Wno-array-bounds \
$(AM_CPPFLAGS) \
$(iocore_include_dirs) \
-I$(abs_top_srcdir)/include \
-I$(abs_top_srcdir)/proxy \
-I$(abs_top_srcdir)/proxy/hdrs \
-I$(abs_top_srcdir)/proxy/http \
-I$(abs_top_srcdir)/proxy/logging \
-I$(abs_top_srcdir)/mgmt \
-I$(abs_top_srcdir)/mgmt/utils \
-I$(abs_top_srcdir)/lib/catch2 \
@OPENSSL_INCLUDES@ \
@SWOC_INCLUDES@

benchmark_LD_ADD = \
$(top_builddir)/iocore/eventsystem/libinkevent.a \
$(top_builddir)/src/records/librecords_p.a \
$(top_builddir)/src/tscore/libtscore.a \
$(top_builddir)/src/tscpp/util/libtscpputil.la \
@HWLOC_LIBS@ \
@LIBPCRE@ \
@LIBCAP@ \
@SWOC_LIBS@ \
@YAMLCPP_LIBS@

benchmark_FreeList_SOURCES = benchmark_FreeList.cc
benchmark_FreeList_CPPFLAGS = $(benchmark_CPP_FLAGS)
benchmark_FreeList_LDFLAGS = $(benchmark_LD_FLAGS)
benchmark_FreeList_LDADD = $(benchmark_LD_ADD)

benchmark_ProxyAllocator_SOURCES = benchmark_ProxyAllocator.cc
benchmark_ProxyAllocator_CPPFLAGS = $(benchmark_CPP_FLAGS)
benchmark_ProxyAllocator_LDFLAGS = $(benchmark_LD_FLAGS)
benchmark_ProxyAllocator_LDADD = $(benchmark_LD_ADD)

benchmark_SharedMutex_SOURCES = benchmark_SharedMutex.cc
benchmark_SharedMutex_CPPFLAGS = $(benchmark_CPP_FLAGS)
benchmark_SharedMutex_LDFLAGS = $(benchmark_LD_FLAGS)
benchmark_SharedMutex_LDADD = $(benchmark_LD_ADD)

clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)