未验证 提交 5ab3bf88 编写于 作者: W Wang Xiangyu 提交者: GitHub

Update compile option with fiu (#3293)

* always disable fiu in milvus_server and enable in unittest, make it work in config directory
Signed-off-by: NWang Xiangyu <xy.wang@zilliz.com>

* always enable fiu to keeping behavior
Signed-off-by: NWang Xiangyu <xy.wang@zilliz.com>

* always enable fiu to keeping behavior
Signed-off-by: NWang Xiangyu <xy.wang@zilliz.com>
上级 5f76a529
......@@ -7,12 +7,12 @@ timeout(time: 120, unit: 'MINUTES') {
if ("${BINARY_VERSION}" == "gpu") {
if (isTimeTriggeredBuild()) {
sh "/bin/bash --login -c \". ./before-install.sh && ./build.sh -t ${params.BUILD_TYPE} -j4 -i ${env.MILVUS_INSTALL_PREFIX} --with_fiu --coverage -l -g -u -s '-gencode=arch=compute_61,code=sm_61;-gencode=arch=compute_75,code=sm_75' \""
sh "/bin/bash --login -c \". ./before-install.sh && ./build.sh -t ${params.BUILD_TYPE} -j4 ${env.MILVUS_INSTALL_PREFIX} --with_fiu --coverage -l -g -u -s '-gencode=arch=compute_61,code=sm_61;-gencode=arch=compute_75,code=sm_75' \""
} else {
sh "/bin/bash --login -c \". ./before-install.sh && ./build.sh -t ${params.BUILD_TYPE} -j4 -i ${env.MILVUS_INSTALL_PREFIX} --with_fiu --coverage -l -g -u\""
sh "/bin/bash --login -c \". ./before-install.sh && ./build.sh -t ${params.BUILD_TYPE} -j4 ${env.MILVUS_INSTALL_PREFIX} --with_fiu --coverage -l -g -u\""
}
} else {
sh "/bin/bash --login -c \". ./before-install.sh && ./build.sh -t ${params.BUILD_TYPE} -j4 -i ${env.MILVUS_INSTALL_PREFIX} --with_fiu --coverage -l -u\""
sh "/bin/bash --login -c \". ./before-install.sh && ./build.sh -t ${params.BUILD_TYPE} -j4 ${env.MILVUS_INSTALL_PREFIX} --with_fiu --coverage -l -u\""
}
sh "./update_ccache.sh -l ${params.JFROG_ARTFACTORY_URL}/ccache -u ${USERNAME} -p ${PASSWORD}"
}
......
......@@ -85,6 +85,9 @@ else ()
message( STATUS "Building Milvus CPU version" )
endif ()
# TODO: remove after all ut set "FIU_ENABLE"
set(MILVUS_WITH_FIU "ON")
set_milvus_definition( MILVUS_WITH_PROMETHEUS "MILVUS_WITH_PROMETHEUS" )
set_milvus_definition( ENABLE_CPU_PROFILING "ENABLE_CPU_PROFILING" )
set_milvus_definition( MILVUS_WITH_FIU "FIU_ENABLE" )
......
......@@ -17,10 +17,9 @@ RUN_CPPLINT="OFF"
CUDA_COMPILER=/usr/local/cuda/bin/nvcc
GPU_VERSION="OFF" #defaults to CPU version
WITH_PROMETHEUS="ON"
FIU_ENABLE="OFF"
CUDA_ARCH="DEFAULT"
while getopts "p:d:t:s:ulrcghzmei" arg; do
while getopts "p:d:t:s:ulrcghzme" arg; do
case $arg in
p)
INSTALL_PREFIX=$OPTARG
......@@ -55,9 +54,6 @@ while getopts "p:d:t:s:ulrcghzmei" arg; do
e)
WITH_PROMETHEUS="OFF"
;;
i)
FIU_ENABLE="ON"
;;
s)
CUDA_ARCH=$OPTARG
;;
......@@ -75,7 +71,6 @@ parameter:
-z: profiling(default: OFF)
-g: build GPU version(default: OFF)
-e: build without prometheus(default: OFF)
-i: build FIU_ENABLE(default: OFF)
-s: build with CUDA arch(default:DEFAULT), for example '-gencode=compute_61,code=sm_61;-gencode=compute_75,code=sm_75'
-h: help
......@@ -119,7 +114,6 @@ CMAKE_CMD="cmake \
-DENABLE_CPU_PROFILING=${PROFILING} \
-DMILVUS_GPU_VERSION=${GPU_VERSION} \
-DMILVUS_WITH_PROMETHEUS=${WITH_PROMETHEUS} \
-DMILVUS_WITH_FIU=${FIU_ENABLE} \
-DMILVUS_CUDA_ARCH=${CUDA_ARCH} \
../"
echo ${CMAKE_CMD}
......
......@@ -85,3 +85,18 @@ MACRO(append_flags target)
set(${target} "${${target}} ${FLAG}")
endforeach()
ENDMACRO(append_flags)
macro(create_executable)
cmake_parse_arguments(E "" "TARGET" "SRCS;LIBS;DEFS" ${ARGN})
add_executable(${E_TARGET})
target_sources(${E_TARGET} PRIVATE ${E_SRCS})
target_link_libraries(${E_TARGET} PRIVATE ${E_LIBS})
target_compile_definitions(${E_TARGET} PRIVATE ${E_DEFS})
endmacro()
macro(create_library)
cmake_parse_arguments(L "" "TARGET" "SRCS;LIBS;DEFS" ${ARGN})
add_library(${L_TARGET} ${L_SRCS})
target_link_libraries(${L_TARGET} PRIVATE ${L_LIBS})
target_compile_definitions(${L_TARGET} PRIVATE ${L_DEFS})
endmacro()
\ No newline at end of file
......@@ -13,7 +13,7 @@
#include <utility>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include "config/ServerConfig.h"
#include "utils/Log.h"
......
......@@ -13,7 +13,7 @@
#include "config/ServerConfig.h"
#include "utils/Log.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <sstream>
#include <utility>
......
......@@ -17,7 +17,7 @@
#include "codecs/IdBloomFilterFormat.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <memory>
#include <string>
......
......@@ -20,21 +20,44 @@ set( CONFIG_SRCS ConfigMgr.h
ServerConfig.cpp
)
add_library( config ${CONFIG_SRCS} )
target_link_libraries ( config yaml-cpp )
set( CONFIG_LIBS yaml-cpp
fiu
)
create_library(
TARGET config
SRCS ${CONFIG_SRCS}
LIBS ${CONFIG_LIBS}
)
if ( BUILD_UNIT_TEST )
add_executable( ConfigTypeTest )
target_sources( ConfigTypeTest PRIVATE ConfigTypeTest1
ConfigTypeTest2 )
target_link_libraries( ConfigTypeTest
PRIVATE config
gtest
gtest_main
gmock
gmock_main
)
create_library(
TARGET config-fiu
SRCS ${CONFIG_SRCS}
LIBS ${CONFIG_LIBS}
DEFS FIU_ENABLE
)
target_compile_definitions(config-fiu PRIVATE FIU_ENABLE)
set(GTEST_LIBS gtest gtest_main gmock gmock_main)
create_executable(
TARGET ServerConfigTest
SRCS ServerConfigTest
LIBS config-fiu ${GTEST_LIBS}
DEFS FIU_ENABLE
)
create_executable(
TARGET ConfigTypeTest
SRCS ConfigTypeTest1 ConfigTypeTest2
LIBS config-fiu ${GTEST_LIBS}
DEFS FIU_ENABLE
)
add_test ( NAME ServerConfigTest
COMMAND $<TARGET_FILE:ServerConfigTest>
)
add_test ( NAME ConfigTypeTest
COMMAND $<TARGET_FILE:ConfigTypeTest>
......
......@@ -9,6 +9,9 @@
// 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 <fiu/fiu-local.h>
#include <iostream>
#include <sstream>
#include <string>
#include <unordered_set>
......@@ -47,6 +50,11 @@ ParseGPUDevices(const std::string& str) {
std::string device;
while (std::getline(ss, device, ',')) {
fiu_do_on("ParseGPUDevices.invalid_format", device = "");
if (device.length() < 4) {
/* Invalid format string */
return {};
}
device_set.insert(std::stoll(device.substr(3)));
}
......
// Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed 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 <fiu-control.h>
#include <fiu/fiu-local.h>
#include <gtest/gtest.h>
#include "config/ServerConfig.h"
TEST(ServerConfigTest, parse_invalid_devices) {
fiu_init(0);
fiu_enable("ParseGPUDevices.invalid_format", 1, nullptr, 0);
auto collections = milvus::ParseGPUDevices("gpu0,gpu1");
ASSERT_EQ(collections.size(), 0);
}
......@@ -39,7 +39,7 @@
#include "utils/StringHelpFunctions.h"
#include "utils/TimeRecorder.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <src/scheduler/job/BuildIndexJob.h>
#include <limits>
#include <utility>
......
......@@ -13,7 +13,7 @@
#include "utils/Log.h"
#include <assert.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <chrono>
#include <iostream>
#include <string>
......
......@@ -11,7 +11,7 @@
#include "db/Utils.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <unistd.h>
#include <boost/filesystem.hpp>
......
......@@ -20,7 +20,7 @@
#include <memory>
#include <string>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include "config/ServerConfig.h"
#include "db/Utils.h"
......
......@@ -11,7 +11,7 @@
#include "db/insert/MemManagerImpl.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <thread>
#include "VectorSource.h"
......
......@@ -13,7 +13,7 @@
#include <thread>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include "utils/Log.h"
......
......@@ -18,7 +18,7 @@
#include <utility>
#include <vector>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <mysql++/mysql++.h>
#include "db/Utils.h"
......
......@@ -23,7 +23,7 @@
#include "utils/Log.h"
#include "utils/Status.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <stdlib.h>
#include <time.h>
#include <any>
......
......@@ -20,7 +20,7 @@
#include "utils/Error.h"
#include "utils/Log.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <map>
#include <set>
#include <string>
......
......@@ -10,7 +10,7 @@
// or implied. See the License for the specific language governing permissions and limitations under the License
#include <faiss/index_io.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include "knowhere/common/Exception.h"
#include "knowhere/index/IndexType.h"
......
......@@ -23,7 +23,7 @@
#include <faiss/gpu/GpuCloner.h>
#endif
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <chrono>
#include <memory>
#include <string>
......
......@@ -9,7 +9,7 @@
// 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 <fiu-local.h>
#include <fiu/fiu-local.h>
#include <string>
#include "knowhere/common/Exception.h"
......
......@@ -16,7 +16,7 @@
#ifdef MILVUS_GPU_VERSION
#include <faiss/gpu/GpuCloner.h>
#endif
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <string>
#include "knowhere/common/Exception.h"
......
......@@ -15,7 +15,7 @@
#include <faiss/gpu/GpuIndexIVF.h>
#include <faiss/gpu/GpuIndexIVFFlat.h>
#include <faiss/index_io.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <string>
#include "knowhere/common/Exception.h"
......
......@@ -14,7 +14,7 @@
#include <faiss/gpu/GpuCloner.h>
#include <faiss/gpu/GpuIndexIVF.h>
#include <faiss/index_factory.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <string>
#include <utility>
......
......@@ -12,7 +12,7 @@
#include "knowhere/index/vector_index/helpers/FaissGpuResourceMgr.h"
#include "knowhere/common/Log.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <utility>
namespace milvus {
......
......@@ -23,7 +23,7 @@
#include <faiss/gpu/GpuCloner.h>
#endif
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <chrono>
#include <memory>
#include <string>
......
......@@ -9,7 +9,7 @@
// 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 <fiu-local.h>
#include <fiu/fiu-local.h>
#include <string>
#include "knowhere/common/Exception.h"
......
......@@ -10,7 +10,7 @@
// or implied. See the License for the specific language governing permissions and limitations under the License
#include <faiss/index_io.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include "knowhere/common/Exception.h"
#include "knowhere/index/IndexType.h"
......
......@@ -15,7 +15,7 @@
#include <faiss/gpu/GpuIndexIVF.h>
#include <faiss/gpu/GpuIndexIVFFlat.h>
#include <faiss/index_io.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <string>
#include "knowhere/common/Exception.h"
......
......@@ -10,7 +10,7 @@
// or implied. See the License for the specific language governing permissions and limitations under the License.
#include <fiu-control.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <gtest/gtest.h>
#include <thread>
......
......@@ -12,7 +12,7 @@
#include <gtest/gtest.h>
#include <fiu-control.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <iostream>
#include <thread>
......
......@@ -12,7 +12,7 @@
#include <gtest/gtest.h>
#include <fiu-control.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <iostream>
#include <thread>
......
......@@ -12,7 +12,7 @@
#include <gtest/gtest.h>
#include <fiu-control.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <iostream>
#include <thread>
......
......@@ -12,7 +12,7 @@
#include <gtest/gtest.h>
#include <fiu-control.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <iostream>
#include <thread>
......
......@@ -14,7 +14,7 @@
#include "wrapper/utils.h"
#include <fiu-control.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <gtest/gtest.h>
TEST_F(KnowhereTest, KNOWHERE_RESOURCE_TEST) {
......
......@@ -10,7 +10,7 @@
// or implied. See the License for the specific language governing permissions and limitations under the License.
#include <fiu-control.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <gtest/gtest.h>
#include <memory>
......
......@@ -19,7 +19,7 @@
#endif
#include <fiu-control.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <gtest/gtest.h>
#include "knowhere/index/vector_index/helpers/IndexParameter.h"
......
......@@ -9,7 +9,7 @@
// 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 <fiu-local.h>
#include <fiu/fiu-local.h>
#include <libgen.h>
#include <cctype>
#include <string>
......
......@@ -15,7 +15,7 @@
#include "utils/Log.h"
#include <dirent.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <sys/sysinfo.h>
#include <sys/times.h>
#include <unistd.h>
......
......@@ -14,7 +14,7 @@
#include "Utils.h"
#include "config/ServerConfig.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <set>
#include <string>
#include <utility>
......
......@@ -8,7 +8,7 @@
// 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 <fiu-local.h>
#include <fiu/fiu-local.h>
#include "scheduler/SchedInst.h"
#include "scheduler/Utils.h"
......
......@@ -18,7 +18,7 @@
#include "scheduler/tasklabel/SpecResLabel.h"
#include "utils/Log.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
namespace milvus {
namespace scheduler {
......
......@@ -18,7 +18,7 @@
#include "scheduler/tasklabel/SpecResLabel.h"
#include "utils/Log.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
namespace milvus {
namespace scheduler {
......
......@@ -11,7 +11,7 @@
#include "scheduler/task/BuildIndexTask.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <memory>
#include <utility>
......
......@@ -11,7 +11,7 @@
#include "scheduler/task/SearchTask.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <algorithm>
#include <memory>
......
......@@ -17,7 +17,7 @@
#include "utils/Log.h"
#include "utils/StringHelpFunctions.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <algorithm>
#include <limits>
#include <set>
......
......@@ -14,7 +14,7 @@
#include "server/delivery/strategy/SearchReqStrategy.h"
#include "utils/Log.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <unistd.h>
#include <queue>
#include <utility>
......
......@@ -12,7 +12,7 @@
#include "server/delivery/ReqScheduler.h"
#include "utils/Log.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <unistd.h>
#include <utility>
......
......@@ -16,7 +16,7 @@
#include "utils/Log.h"
#include "utils/TimeRecorder.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <memory>
#include <unordered_map>
#include <vector>
......
......@@ -16,7 +16,7 @@
#include "utils/Log.h"
#include "utils/TimeRecorder.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <set>
namespace milvus {
......
......@@ -17,7 +17,7 @@
#include "utils/Log.h"
#include "utils/TimeRecorder.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <memory>
#include <string>
#include <unordered_map>
......
......@@ -15,7 +15,7 @@
#include "utils/Log.h"
#include "utils/TimeRecorder.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <memory>
#include <string>
#include <vector>
......
......@@ -17,7 +17,7 @@
#include "utils/Log.h"
#include "utils/TimeRecorder.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <memory>
#include <string>
#include <unordered_map>
......
......@@ -15,7 +15,7 @@
#include "utils/Log.h"
#include "utils/TimeRecorder.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <memory>
#include <unordered_map>
#include <vector>
......
......@@ -15,7 +15,7 @@
#include "utils/Log.h"
#include "utils/TimeRecorder.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <memory>
#include <string>
......
......@@ -15,7 +15,7 @@
#include "utils/Log.h"
#include "utils/TimeRecorder.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
namespace milvus {
namespace server {
......
......@@ -15,7 +15,7 @@
#include "utils/Log.h"
#include "utils/TimeRecorder.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <memory>
#include <vector>
......
......@@ -18,7 +18,7 @@
#include "utils/Log.h"
#include "utils/TimeRecorder.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <memory>
#include <string>
#include <unordered_map>
......
......@@ -14,7 +14,7 @@
#include "utils/Log.h"
#include "utils/TimeRecorder.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <string>
namespace milvus {
......
......@@ -15,7 +15,7 @@
#include "utils/Log.h"
#include "utils/TimeRecorder.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <memory>
#include <vector>
......
......@@ -15,7 +15,7 @@
#include "utils/Log.h"
#include "utils/TimeRecorder.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <memory>
#include <vector>
......
......@@ -17,7 +17,7 @@
#include "utils/Log.h"
#include "utils/TimeRecorder.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <memory>
#include <string>
#include <unordered_map>
......
......@@ -11,7 +11,7 @@
#include "server/grpc_impl/GrpcRequestHandler.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <algorithm>
#include <memory>
#include <string>
......
......@@ -15,7 +15,7 @@
#include <string>
#include <vector>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include "faiss/FaissHook.h"
#include "faiss/utils/instruction_set.h"
......
......@@ -16,7 +16,7 @@
#include <set>
#include <vector>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include "config/ServerConfig.h"
#include "utils/Log.h"
......
......@@ -16,7 +16,7 @@
#include <string.h>
#include <unistd.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include "utils/Log.h"
......
......@@ -16,7 +16,7 @@
#include <string>
#include <vector>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include "config/ServerConfig.h"
#include "utils/Log.h"
......
......@@ -18,7 +18,7 @@
#include <unordered_map>
#include <vector>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include "config/ServerConfig.h"
#include "db/Utils.h"
......
......@@ -10,7 +10,7 @@
// or implied. See the License for the specific language governing permissions and limitations under the License.
#include "server/web_impl/utils/Util.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include "utils/ConfigUtils.h"
namespace milvus {
......
......@@ -17,7 +17,7 @@
#include <experimental/filesystem>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include "log/Log.h"
#include "storage/disk/DiskOperation.h"
......
......@@ -16,7 +16,7 @@
#include <aws/s3/model/GetObjectRequest.h>
#include <aws/s3/model/ListObjectsRequest.h>
#include <aws/s3/model/PutObjectRequest.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <fstream>
#include <iostream>
#include <memory>
......
......@@ -13,7 +13,7 @@
#include "utils/Log.h"
#include <dirent.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <pwd.h>
#include <sys/stat.h>
#include <unistd.h>
......
......@@ -19,7 +19,7 @@
#ifdef MILVUS_GPU_VERSION
#include <cuda_runtime.h>
#endif
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <sys/stat.h>
#include <sys/sysinfo.h>
#include <unistd.h>
......
......@@ -11,7 +11,7 @@
#include "utils/StringHelpFunctions.h"
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <algorithm>
#include <regex>
#include <string>
......
......@@ -11,7 +11,7 @@
#pragma once
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <condition_variable>
#include <functional>
#include <future>
......
/* libfiu - Fault Injection in Userspace
*
* This header, part of libfiu, is meant to be included in your project to
* avoid having libfiu as a mandatory build-time dependency.
*
* You can add it to your project, and #include it instead of fiu.h.
* The real fiu.h will be used only when FIU_ENABLE is defined.
*
* This header, as the rest of libfiu, is in the public domain.
*
* You can find more information about libfiu at
* http://blitiri.com.ar/p/libfiu.
*/
#ifndef _FIU_LOCAL_H
#define _FIU_LOCAL_H
/* Only define the stubs when fiu is disabled, otherwise use the real fiu.h
* header */
#ifndef FIU_ENABLE
#define fiu_init(flags) 0
#define fiu_fail(name) 0
#define fiu_failinfo() NULL
#define fiu_do_on(name, action)
#define fiu_exit_on(name)
#define fiu_return_on(name, retval)
#else
#include <fiu.h>
#endif /* FIU_ENABLE */
#endif /* _FIU_LOCAL_H */
......@@ -10,7 +10,7 @@
// or implied. See the License for the specific language governing permissions and limitations under the License.
#include <fiu-control.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <gtest/gtest.h>
#include <algorithm>
......
......@@ -10,7 +10,7 @@
// or implied. See the License for the specific language governing permissions and limitations under the License.
#include <fiu-control.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <gtest/gtest.h>
#include <string>
......
......@@ -10,7 +10,7 @@
// or implied. See the License for the specific language governing permissions and limitations under the License.
#include <fiu-control.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <gtest/gtest.h>
#include <string>
......
......@@ -11,7 +11,7 @@
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include "easyloggingpp/easylogging++.h"
......
......@@ -15,7 +15,7 @@
#include <string>
#include <thread>
#include <gtest/gtest.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <fiu-control.h>
#include "config/ServerConfig.h"
......
......@@ -16,7 +16,7 @@
#include <gtest/gtest.h>
#include <iostream>
#include <fiu-control.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
TEST(PrometheusTest, PROMETHEUS_TEST) {
fiu_init(0);
......
......@@ -8,7 +8,7 @@
// 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 <fiu-local.h>
#include <fiu/fiu-local.h>
#include <fiu-control.h>
#include <gtest/gtest.h>
#include <src/scheduler/task/BuildIndexTask.h>
......
......@@ -10,7 +10,7 @@
// or implied. See the License for the specific language governing permissions and limitations under the License.
#include <gtest/gtest.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <fiu-control.h>
#include "src/scheduler/SchedInst.h"
......
......@@ -8,7 +8,7 @@
// 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 <fiu-local.h>
#include <fiu/fiu-local.h>
#include <fiu-control.h>
#include <gtest/gtest.h>
......
......@@ -9,7 +9,7 @@
// 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 <fiu-local.h>
#include <fiu/fiu-local.h>
#include <fiu-control.h>
#include <gtest/gtest.h>
#include <opentracing/mocktracer/tracer.h>
......
......@@ -10,7 +10,7 @@
// or implied. See the License for the specific language governing permissions and limitations under the License.
#include <fiu-control.h>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <gtest/gtest.h>
#include "easyloggingpp/easylogging++.h"
......
......@@ -13,7 +13,7 @@
#include <gtest/gtest.h>
#include <fstream>
#include <memory>
#include <fiu-local.h>
#include <fiu/fiu-local.h>
#include <fiu-control.h>
#include "config/Config.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册