diff --git a/test/src/test_cpu_usage/CMakeLists.txt b/test/src/test_cpu_usage/CMakeLists.txt index fded082..0006453 100644 --- a/test/src/test_cpu_usage/CMakeLists.txt +++ b/test/src/test_cpu_usage/CMakeLists.txt @@ -13,12 +13,12 @@ string(REGEX REPLACE "(.*)/(.*)/(.*)" "\\1" PARENTPATH ${PROJECT_SOURCE_DIR}) message("last=" ${PARENTPATH}) include(${PARENTPATH}/CmakeTemplate.txt) -include_directories(./third/gtest/include) -link_directories(./third/gtest/lib) add_executable(test_cpu_usage test_cpu_usage.cpp) set_property(TARGET test_cpu_usage PROPERTY MSVC_RUNTIME_LIBRARY MultiThreadedDebugDLL) - target_include_directories(test_cpu_usage SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../../obj/inc/third/include) +message(${CMAKE_CURRENT_SOURCE_DIR}/../../../obj/inc/third/include) + +target_include_directories(test_cpu_usage SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../../obj/inc/) diff --git a/test/src/test_cpu_usage/test_cpu_usage.cpp b/test/src/test_cpu_usage/test_cpu_usage.cpp index e976066..1e5de2a 100644 --- a/test/src/test_cpu_usage/test_cpu_usage.cpp +++ b/test/src/test_cpu_usage/test_cpu_usage.cpp @@ -6,14 +6,18 @@ using namespace std; int main(int argc,char **argv){ - CProcessMonitor usage1 = CProcessMonitor(14316); + CProcessMonitor usage1(19728); + usage1.StartLog(1000); while(true){ uint64_t vmem,pmem; usage1.GetMemoryUsage(&pmem,&vmem); - std::cout<<"cpu usage is "<< usage1.GetCpuUsage() << " "<