Skip to content

Commit

Permalink
remove old and commit neww
Browse files Browse the repository at this point in the history
  • Loading branch information
zclllyybb committed Nov 18, 2024
1 parent 2bc1964 commit 69af298
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 334 deletions.
2 changes: 1 addition & 1 deletion be/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -818,5 +818,5 @@ if (BUILD_BENCHMARK)
add_executable(benchmark_test ${BASE_DIR}/benchmark/benchmark_main.cpp)
target_link_libraries(benchmark_test ${DORIS_LINK_LIBS})
message(STATUS "Add benchmark to build")
install(TARGETS benchmark_test DESTINATION ${OUTPUT_DIR})
install(TARGETS benchmark_test DESTINATION ${OUTPUT_DIR}/lib)
endif()
11 changes: 0 additions & 11 deletions be/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,3 @@ if (OS_MACOSX AND ARCH_ARM)
COMMAND ${LLVM_STRIP} --strip-all $<TARGET_FILE:doris_be_test>
)
endif()

if (BUILD_BENCHMARK_TOOL AND BUILD_BENCHMARK_TOOL STREQUAL "ON")
add_executable(benchmark_tool
tools/benchmark_tool.cpp
testutil/test_util.cpp
olap/tablet_schema_helper.cpp
)

target_link_libraries(benchmark_tool ${TEST_LINK_LIBS})
set_target_properties(benchmark_tool PROPERTIES COMPILE_FLAGS "-fno-access-control")
endif()
320 changes: 0 additions & 320 deletions be/test/tools/benchmark_tool.cpp

This file was deleted.

17 changes: 15 additions & 2 deletions bin/start_be.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ OPTS="$(getopt \
-l 'daemon' \
-l 'console' \
-l 'version' \
-l 'benchmark' \
-- "$@")"

eval set -- "${OPTS}"

RUN_DAEMON=0
RUN_CONSOLE=0
RUN_VERSION=0
RUN_BENCHMARK=0

while true; do
case "$1" in
--daemon)
Expand All @@ -53,6 +56,10 @@ while true; do
RUN_VERSION=1
shift
;;
--benchmark)
RUN_BENCHMARK=1
shift
;;
--)
shift
break
Expand Down Expand Up @@ -293,7 +300,7 @@ fi

pidfile="${PID_DIR}/be.pid"

if [[ -f "${pidfile}" ]]; then
if [[ -f "${pidfile}" && "${RUN_BENCHMARK}" -eq 0 ]]; then
if kill -0 "$(cat "${pidfile}")" >/dev/null 2>&1; then
echo "Backend is already running as process $(cat "${pidfile}"), stop it first"
exit 1
Expand Down Expand Up @@ -419,7 +426,13 @@ else
export MALLOC_CONF="${JEMALLOC_CONF},prof_prefix:${JEMALLOC_PROF_PRFIX}"
fi

if [[ "${RUN_DAEMON}" -eq 1 ]]; then
if [[ "${RUN_BENCHMARK}" -eq 1 ]]; then
if [[ "$(uname -s)" == 'Darwin' ]]; then
env DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}" ${LIMIT:+${LIMIT}} "${DORIS_HOME}/lib/benchmark_test"
else
${LIMIT:+${LIMIT}} "${DORIS_HOME}/lib/benchmark_test"
fi
elif [[ "${RUN_DAEMON}" -eq 1 ]]; then
if [[ "$(uname -s)" == 'Darwin' ]]; then
nohup env DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}" ${LIMIT:+${LIMIT}} "${DORIS_HOME}/lib/doris_be" "$@" >>"${LOG_DIR}/be.out" 2>&1 </dev/null &
else
Expand Down
Loading

0 comments on commit 69af298

Please sign in to comment.