no message
parent
77c1dbefe4
commit
74bfec54d5
|
@ -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/)
|
||||
|
|
|
@ -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() << " "<<pmem << "byte "<< vmem <<"byte" << std::endl;
|
||||
std::cout<<"cpu usage is "<< usage1.GetCpuUsage() << " "<<pmem <<
|
||||
"byte "<< vmem <<"byte seq "<< usage1.m_logs.size() << std::endl;
|
||||
|
||||
Sleep(1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue