mirror of
https://github.com/fralx/LimeReport.git
synced 2025-09-23 08:29:07 +03:00
Easyprofiler added
This commit is contained in:
16
3rdparty/easyprofiler/sample/CMakeFiles/CMakeDirectoryInformation.cmake
vendored
Normal file
16
3rdparty/easyprofiler/sample/CMakeFiles/CMakeDirectoryInformation.cmake
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.5
|
||||
|
||||
# Relative path conversion top directories.
|
||||
set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/alex/Work/C++Projects/easyprofiler")
|
||||
set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/alex/Work/C++Projects/easyprofiler")
|
||||
|
||||
# Force unix paths in dependencies.
|
||||
set(CMAKE_FORCE_UNIX_PATHS 1)
|
||||
|
||||
|
||||
# The C and CXX include file regular expressions for this directory.
|
||||
set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
|
||||
set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
|
||||
set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
|
||||
set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})
|
31
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample.dir/DependInfo.cmake
vendored
Normal file
31
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample.dir/DependInfo.cmake
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
# The set of languages for which implicit dependencies are needed:
|
||||
set(CMAKE_DEPENDS_LANGUAGES
|
||||
"CXX"
|
||||
)
|
||||
# The set of files for implicit dependencies of each language:
|
||||
set(CMAKE_DEPENDS_CHECK_CXX
|
||||
"/home/alex/Work/C++Projects/easyprofiler/sample/main.cpp" "/home/alex/Work/C++Projects/easyprofiler/sample/CMakeFiles/profiler_sample.dir/main.cpp.o"
|
||||
)
|
||||
set(CMAKE_CXX_COMPILER_ID "GNU")
|
||||
|
||||
# Preprocessor definitions for this target.
|
||||
set(CMAKE_TARGET_DEFINITIONS_CXX
|
||||
"BUILD_WITH_EASY_PROFILER=1"
|
||||
"EASY_DEFAULT_PORT=28077"
|
||||
"EASY_PROFILER_VERSION_MAJOR=1"
|
||||
"EASY_PROFILER_VERSION_MINOR=3"
|
||||
"EASY_PROFILER_VERSION_PATCH=0"
|
||||
)
|
||||
|
||||
# The include file search paths:
|
||||
set(CMAKE_CXX_TARGET_INCLUDE_PATH
|
||||
"easy_profiler_core/include"
|
||||
)
|
||||
|
||||
# Targets to which this target links.
|
||||
set(CMAKE_TARGET_LINKED_INFO_FILES
|
||||
"/home/alex/Work/C++Projects/easyprofiler/easy_profiler_core/CMakeFiles/easy_profiler.dir/DependInfo.cmake"
|
||||
)
|
||||
|
||||
# Fortran module output directory.
|
||||
set(CMAKE_Fortran_TARGET_MODULE_DIR "")
|
114
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample.dir/build.make
vendored
Normal file
114
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample.dir/build.make
vendored
Normal file
@@ -0,0 +1,114 @@
|
||||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.5
|
||||
|
||||
# Delete rule output on recipe failure.
|
||||
.DELETE_ON_ERROR:
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Special targets provided by cmake.
|
||||
|
||||
# Disable implicit rules so canonical targets will work.
|
||||
.SUFFIXES:
|
||||
|
||||
|
||||
# Remove some rules from gmake that .SUFFIXES does not remove.
|
||||
SUFFIXES =
|
||||
|
||||
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||
|
||||
|
||||
# Suppress display of executed commands.
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
|
||||
# A target that is always out of date.
|
||||
cmake_force:
|
||||
|
||||
.PHONY : cmake_force
|
||||
|
||||
#=============================================================================
|
||||
# Set environment variables for the build.
|
||||
|
||||
# The shell in which to execute make rules.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# The CMake executable.
|
||||
CMAKE_COMMAND = /usr/bin/cmake
|
||||
|
||||
# The command to remove a file.
|
||||
RM = /usr/bin/cmake -E remove -f
|
||||
|
||||
# Escaping for special characters.
|
||||
EQUALS = =
|
||||
|
||||
# The top-level source directory on which CMake was run.
|
||||
CMAKE_SOURCE_DIR = /home/alex/Work/C++Projects/easyprofiler
|
||||
|
||||
# The top-level build directory on which CMake was run.
|
||||
CMAKE_BINARY_DIR = /home/alex/Work/C++Projects/easyprofiler
|
||||
|
||||
# Include any dependencies generated for this target.
|
||||
include sample/CMakeFiles/profiler_sample.dir/depend.make
|
||||
|
||||
# Include the progress variables for this target.
|
||||
include sample/CMakeFiles/profiler_sample.dir/progress.make
|
||||
|
||||
# Include the compile flags for this target's objects.
|
||||
include sample/CMakeFiles/profiler_sample.dir/flags.make
|
||||
|
||||
sample/CMakeFiles/profiler_sample.dir/main.cpp.o: sample/CMakeFiles/profiler_sample.dir/flags.make
|
||||
sample/CMakeFiles/profiler_sample.dir/main.cpp.o: sample/main.cpp
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/alex/Work/C++Projects/easyprofiler/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object sample/CMakeFiles/profiler_sample.dir/main.cpp.o"
|
||||
cd /home/alex/Work/C++Projects/easyprofiler/sample && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/profiler_sample.dir/main.cpp.o -c /home/alex/Work/C++Projects/easyprofiler/sample/main.cpp
|
||||
|
||||
sample/CMakeFiles/profiler_sample.dir/main.cpp.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/profiler_sample.dir/main.cpp.i"
|
||||
cd /home/alex/Work/C++Projects/easyprofiler/sample && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/alex/Work/C++Projects/easyprofiler/sample/main.cpp > CMakeFiles/profiler_sample.dir/main.cpp.i
|
||||
|
||||
sample/CMakeFiles/profiler_sample.dir/main.cpp.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/profiler_sample.dir/main.cpp.s"
|
||||
cd /home/alex/Work/C++Projects/easyprofiler/sample && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/alex/Work/C++Projects/easyprofiler/sample/main.cpp -o CMakeFiles/profiler_sample.dir/main.cpp.s
|
||||
|
||||
sample/CMakeFiles/profiler_sample.dir/main.cpp.o.requires:
|
||||
|
||||
.PHONY : sample/CMakeFiles/profiler_sample.dir/main.cpp.o.requires
|
||||
|
||||
sample/CMakeFiles/profiler_sample.dir/main.cpp.o.provides: sample/CMakeFiles/profiler_sample.dir/main.cpp.o.requires
|
||||
$(MAKE) -f sample/CMakeFiles/profiler_sample.dir/build.make sample/CMakeFiles/profiler_sample.dir/main.cpp.o.provides.build
|
||||
.PHONY : sample/CMakeFiles/profiler_sample.dir/main.cpp.o.provides
|
||||
|
||||
sample/CMakeFiles/profiler_sample.dir/main.cpp.o.provides.build: sample/CMakeFiles/profiler_sample.dir/main.cpp.o
|
||||
|
||||
|
||||
# Object files for target profiler_sample
|
||||
profiler_sample_OBJECTS = \
|
||||
"CMakeFiles/profiler_sample.dir/main.cpp.o"
|
||||
|
||||
# External object files for target profiler_sample
|
||||
profiler_sample_EXTERNAL_OBJECTS =
|
||||
|
||||
bin/profiler_sample: sample/CMakeFiles/profiler_sample.dir/main.cpp.o
|
||||
bin/profiler_sample: sample/CMakeFiles/profiler_sample.dir/build.make
|
||||
bin/profiler_sample: bin/libeasy_profiler.so
|
||||
bin/profiler_sample: sample/CMakeFiles/profiler_sample.dir/link.txt
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/alex/Work/C++Projects/easyprofiler/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable ../bin/profiler_sample"
|
||||
cd /home/alex/Work/C++Projects/easyprofiler/sample && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/profiler_sample.dir/link.txt --verbose=$(VERBOSE)
|
||||
|
||||
# Rule to build all files generated by this target.
|
||||
sample/CMakeFiles/profiler_sample.dir/build: bin/profiler_sample
|
||||
|
||||
.PHONY : sample/CMakeFiles/profiler_sample.dir/build
|
||||
|
||||
sample/CMakeFiles/profiler_sample.dir/requires: sample/CMakeFiles/profiler_sample.dir/main.cpp.o.requires
|
||||
|
||||
.PHONY : sample/CMakeFiles/profiler_sample.dir/requires
|
||||
|
||||
sample/CMakeFiles/profiler_sample.dir/clean:
|
||||
cd /home/alex/Work/C++Projects/easyprofiler/sample && $(CMAKE_COMMAND) -P CMakeFiles/profiler_sample.dir/cmake_clean.cmake
|
||||
.PHONY : sample/CMakeFiles/profiler_sample.dir/clean
|
||||
|
||||
sample/CMakeFiles/profiler_sample.dir/depend:
|
||||
cd /home/alex/Work/C++Projects/easyprofiler && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/alex/Work/C++Projects/easyprofiler /home/alex/Work/C++Projects/easyprofiler/sample /home/alex/Work/C++Projects/easyprofiler /home/alex/Work/C++Projects/easyprofiler/sample /home/alex/Work/C++Projects/easyprofiler/sample/CMakeFiles/profiler_sample.dir/DependInfo.cmake --color=$(COLOR)
|
||||
.PHONY : sample/CMakeFiles/profiler_sample.dir/depend
|
||||
|
10
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample.dir/cmake_clean.cmake
vendored
Normal file
10
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample.dir/cmake_clean.cmake
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
file(REMOVE_RECURSE
|
||||
"CMakeFiles/profiler_sample.dir/main.cpp.o"
|
||||
"../bin/profiler_sample.pdb"
|
||||
"../bin/profiler_sample"
|
||||
)
|
||||
|
||||
# Per-language clean rules from dependency scanning.
|
||||
foreach(lang CXX)
|
||||
include(CMakeFiles/profiler_sample.dir/cmake_clean_${lang}.cmake OPTIONAL)
|
||||
endforeach()
|
2
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample.dir/depend.make
vendored
Normal file
2
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample.dir/depend.make
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# Empty dependencies file for profiler_sample.
|
||||
# This may be replaced when dependencies are built.
|
10
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample.dir/flags.make
vendored
Normal file
10
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample.dir/flags.make
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.5
|
||||
|
||||
# compile CXX with /usr/bin/c++
|
||||
CXX_FLAGS = -O3 -DNDEBUG -DEASY_CHRONO_STEADY_CLOCK=0 -DEASY_CHRONO_HIGHRES_CLOCK=0 -DEASY_OPTION_START_LISTEN_ON_STARTUP=0 -DEASY_OPTION_MEASURE_STORAGE_EXPAND=0 -DEASY_OPTION_STORAGE_EXPAND_BLOCKS_ON=0 -DEASY_OPTION_IMPLICIT_THREAD_REGISTRATION=1 -DEASY_OPTION_REMOVE_EMPTY_UNGUARDED_THREADS=0 -DEASY_OPTION_LOG_ENABLED=0 -DEASY_OPTION_PRETTY_PRINT_FUNCTIONS=0 -DEASY_OPTION_BUILTIN_COLORS=1 -std=gnu++11
|
||||
|
||||
CXX_DEFINES = -DBUILD_WITH_EASY_PROFILER=1 -DEASY_DEFAULT_PORT=28077 -DEASY_PROFILER_VERSION_MAJOR=1 -DEASY_PROFILER_VERSION_MINOR=3 -DEASY_PROFILER_VERSION_PATCH=0
|
||||
|
||||
CXX_INCLUDES = -I/home/alex/Work/C++Projects/easyprofiler/easy_profiler_core/include
|
||||
|
1
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample.dir/link.txt
vendored
Normal file
1
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample.dir/link.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/usr/bin/c++ -O3 -DNDEBUG CMakeFiles/profiler_sample.dir/main.cpp.o -o ../bin/profiler_sample -L/home/alex/Work/C++Projects/easyprofiler/../bin -rdynamic ../bin/libeasy_profiler.so -lpthread -Wl,-rpath,/home/alex/Work/C++Projects/easyprofiler/../bin:/home/alex/Work/C++Projects/easyprofiler/bin
|
3
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample.dir/progress.make
vendored
Normal file
3
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample.dir/progress.make
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
CMAKE_PROGRESS_1 = 32
|
||||
CMAKE_PROGRESS_2 = 33
|
||||
|
32
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample_disabled_profiler.dir/DependInfo.cmake
vendored
Normal file
32
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample_disabled_profiler.dir/DependInfo.cmake
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# The set of languages for which implicit dependencies are needed:
|
||||
set(CMAKE_DEPENDS_LANGUAGES
|
||||
"CXX"
|
||||
)
|
||||
# The set of files for implicit dependencies of each language:
|
||||
set(CMAKE_DEPENDS_CHECK_CXX
|
||||
"/home/alex/Work/C++Projects/easyprofiler/sample/main.cpp" "/home/alex/Work/C++Projects/easyprofiler/sample/CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.o"
|
||||
)
|
||||
set(CMAKE_CXX_COMPILER_ID "GNU")
|
||||
|
||||
# Preprocessor definitions for this target.
|
||||
set(CMAKE_TARGET_DEFINITIONS_CXX
|
||||
"BUILD_WITH_EASY_PROFILER=1"
|
||||
"DISABLE_EASY_PROFILER"
|
||||
"EASY_DEFAULT_PORT=28077"
|
||||
"EASY_PROFILER_VERSION_MAJOR=1"
|
||||
"EASY_PROFILER_VERSION_MINOR=3"
|
||||
"EASY_PROFILER_VERSION_PATCH=0"
|
||||
)
|
||||
|
||||
# The include file search paths:
|
||||
set(CMAKE_CXX_TARGET_INCLUDE_PATH
|
||||
"easy_profiler_core/include"
|
||||
)
|
||||
|
||||
# Targets to which this target links.
|
||||
set(CMAKE_TARGET_LINKED_INFO_FILES
|
||||
"/home/alex/Work/C++Projects/easyprofiler/easy_profiler_core/CMakeFiles/easy_profiler.dir/DependInfo.cmake"
|
||||
)
|
||||
|
||||
# Fortran module output directory.
|
||||
set(CMAKE_Fortran_TARGET_MODULE_DIR "")
|
114
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample_disabled_profiler.dir/build.make
vendored
Normal file
114
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample_disabled_profiler.dir/build.make
vendored
Normal file
@@ -0,0 +1,114 @@
|
||||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.5
|
||||
|
||||
# Delete rule output on recipe failure.
|
||||
.DELETE_ON_ERROR:
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Special targets provided by cmake.
|
||||
|
||||
# Disable implicit rules so canonical targets will work.
|
||||
.SUFFIXES:
|
||||
|
||||
|
||||
# Remove some rules from gmake that .SUFFIXES does not remove.
|
||||
SUFFIXES =
|
||||
|
||||
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||
|
||||
|
||||
# Suppress display of executed commands.
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
|
||||
# A target that is always out of date.
|
||||
cmake_force:
|
||||
|
||||
.PHONY : cmake_force
|
||||
|
||||
#=============================================================================
|
||||
# Set environment variables for the build.
|
||||
|
||||
# The shell in which to execute make rules.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# The CMake executable.
|
||||
CMAKE_COMMAND = /usr/bin/cmake
|
||||
|
||||
# The command to remove a file.
|
||||
RM = /usr/bin/cmake -E remove -f
|
||||
|
||||
# Escaping for special characters.
|
||||
EQUALS = =
|
||||
|
||||
# The top-level source directory on which CMake was run.
|
||||
CMAKE_SOURCE_DIR = /home/alex/Work/C++Projects/easyprofiler
|
||||
|
||||
# The top-level build directory on which CMake was run.
|
||||
CMAKE_BINARY_DIR = /home/alex/Work/C++Projects/easyprofiler
|
||||
|
||||
# Include any dependencies generated for this target.
|
||||
include sample/CMakeFiles/profiler_sample_disabled_profiler.dir/depend.make
|
||||
|
||||
# Include the progress variables for this target.
|
||||
include sample/CMakeFiles/profiler_sample_disabled_profiler.dir/progress.make
|
||||
|
||||
# Include the compile flags for this target's objects.
|
||||
include sample/CMakeFiles/profiler_sample_disabled_profiler.dir/flags.make
|
||||
|
||||
sample/CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.o: sample/CMakeFiles/profiler_sample_disabled_profiler.dir/flags.make
|
||||
sample/CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.o: sample/main.cpp
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/alex/Work/C++Projects/easyprofiler/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object sample/CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.o"
|
||||
cd /home/alex/Work/C++Projects/easyprofiler/sample && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.o -c /home/alex/Work/C++Projects/easyprofiler/sample/main.cpp
|
||||
|
||||
sample/CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.i"
|
||||
cd /home/alex/Work/C++Projects/easyprofiler/sample && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/alex/Work/C++Projects/easyprofiler/sample/main.cpp > CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.i
|
||||
|
||||
sample/CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.s"
|
||||
cd /home/alex/Work/C++Projects/easyprofiler/sample && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/alex/Work/C++Projects/easyprofiler/sample/main.cpp -o CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.s
|
||||
|
||||
sample/CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.o.requires:
|
||||
|
||||
.PHONY : sample/CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.o.requires
|
||||
|
||||
sample/CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.o.provides: sample/CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.o.requires
|
||||
$(MAKE) -f sample/CMakeFiles/profiler_sample_disabled_profiler.dir/build.make sample/CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.o.provides.build
|
||||
.PHONY : sample/CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.o.provides
|
||||
|
||||
sample/CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.o.provides.build: sample/CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.o
|
||||
|
||||
|
||||
# Object files for target profiler_sample_disabled_profiler
|
||||
profiler_sample_disabled_profiler_OBJECTS = \
|
||||
"CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.o"
|
||||
|
||||
# External object files for target profiler_sample_disabled_profiler
|
||||
profiler_sample_disabled_profiler_EXTERNAL_OBJECTS =
|
||||
|
||||
bin/profiler_sample_disabled_profiler: sample/CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.o
|
||||
bin/profiler_sample_disabled_profiler: sample/CMakeFiles/profiler_sample_disabled_profiler.dir/build.make
|
||||
bin/profiler_sample_disabled_profiler: bin/libeasy_profiler.so
|
||||
bin/profiler_sample_disabled_profiler: sample/CMakeFiles/profiler_sample_disabled_profiler.dir/link.txt
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/alex/Work/C++Projects/easyprofiler/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable ../bin/profiler_sample_disabled_profiler"
|
||||
cd /home/alex/Work/C++Projects/easyprofiler/sample && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/profiler_sample_disabled_profiler.dir/link.txt --verbose=$(VERBOSE)
|
||||
|
||||
# Rule to build all files generated by this target.
|
||||
sample/CMakeFiles/profiler_sample_disabled_profiler.dir/build: bin/profiler_sample_disabled_profiler
|
||||
|
||||
.PHONY : sample/CMakeFiles/profiler_sample_disabled_profiler.dir/build
|
||||
|
||||
sample/CMakeFiles/profiler_sample_disabled_profiler.dir/requires: sample/CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.o.requires
|
||||
|
||||
.PHONY : sample/CMakeFiles/profiler_sample_disabled_profiler.dir/requires
|
||||
|
||||
sample/CMakeFiles/profiler_sample_disabled_profiler.dir/clean:
|
||||
cd /home/alex/Work/C++Projects/easyprofiler/sample && $(CMAKE_COMMAND) -P CMakeFiles/profiler_sample_disabled_profiler.dir/cmake_clean.cmake
|
||||
.PHONY : sample/CMakeFiles/profiler_sample_disabled_profiler.dir/clean
|
||||
|
||||
sample/CMakeFiles/profiler_sample_disabled_profiler.dir/depend:
|
||||
cd /home/alex/Work/C++Projects/easyprofiler && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/alex/Work/C++Projects/easyprofiler /home/alex/Work/C++Projects/easyprofiler/sample /home/alex/Work/C++Projects/easyprofiler /home/alex/Work/C++Projects/easyprofiler/sample /home/alex/Work/C++Projects/easyprofiler/sample/CMakeFiles/profiler_sample_disabled_profiler.dir/DependInfo.cmake --color=$(COLOR)
|
||||
.PHONY : sample/CMakeFiles/profiler_sample_disabled_profiler.dir/depend
|
||||
|
10
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample_disabled_profiler.dir/cmake_clean.cmake
vendored
Normal file
10
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample_disabled_profiler.dir/cmake_clean.cmake
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
file(REMOVE_RECURSE
|
||||
"CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.o"
|
||||
"../bin/profiler_sample_disabled_profiler.pdb"
|
||||
"../bin/profiler_sample_disabled_profiler"
|
||||
)
|
||||
|
||||
# Per-language clean rules from dependency scanning.
|
||||
foreach(lang CXX)
|
||||
include(CMakeFiles/profiler_sample_disabled_profiler.dir/cmake_clean_${lang}.cmake OPTIONAL)
|
||||
endforeach()
|
2
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample_disabled_profiler.dir/depend.make
vendored
Normal file
2
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample_disabled_profiler.dir/depend.make
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# Empty dependencies file for profiler_sample_disabled_profiler.
|
||||
# This may be replaced when dependencies are built.
|
10
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample_disabled_profiler.dir/flags.make
vendored
Normal file
10
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample_disabled_profiler.dir/flags.make
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.5
|
||||
|
||||
# compile CXX with /usr/bin/c++
|
||||
CXX_FLAGS = -O3 -DNDEBUG -DEASY_CHRONO_STEADY_CLOCK=0 -DEASY_CHRONO_HIGHRES_CLOCK=0 -DEASY_OPTION_START_LISTEN_ON_STARTUP=0 -DEASY_OPTION_MEASURE_STORAGE_EXPAND=0 -DEASY_OPTION_STORAGE_EXPAND_BLOCKS_ON=0 -DEASY_OPTION_IMPLICIT_THREAD_REGISTRATION=1 -DEASY_OPTION_REMOVE_EMPTY_UNGUARDED_THREADS=0 -DEASY_OPTION_LOG_ENABLED=0 -DEASY_OPTION_PRETTY_PRINT_FUNCTIONS=0 -DEASY_OPTION_BUILTIN_COLORS=1 -std=gnu++11
|
||||
|
||||
CXX_DEFINES = -DBUILD_WITH_EASY_PROFILER=1 -DDISABLE_EASY_PROFILER -DEASY_DEFAULT_PORT=28077 -DEASY_PROFILER_VERSION_MAJOR=1 -DEASY_PROFILER_VERSION_MINOR=3 -DEASY_PROFILER_VERSION_PATCH=0
|
||||
|
||||
CXX_INCLUDES = -I/home/alex/Work/C++Projects/easyprofiler/easy_profiler_core/include
|
||||
|
1
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample_disabled_profiler.dir/link.txt
vendored
Normal file
1
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample_disabled_profiler.dir/link.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/usr/bin/c++ -O3 -DNDEBUG CMakeFiles/profiler_sample_disabled_profiler.dir/main.cpp.o -o ../bin/profiler_sample_disabled_profiler -L/home/alex/Work/C++Projects/easyprofiler/../bin -rdynamic ../bin/libeasy_profiler.so -lpthread -Wl,-rpath,/home/alex/Work/C++Projects/easyprofiler/../bin:/home/alex/Work/C++Projects/easyprofiler/bin
|
3
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample_disabled_profiler.dir/progress.make
vendored
Normal file
3
3rdparty/easyprofiler/sample/CMakeFiles/profiler_sample_disabled_profiler.dir/progress.make
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
CMAKE_PROGRESS_1 = 34
|
||||
CMAKE_PROGRESS_2 = 35
|
||||
|
1
3rdparty/easyprofiler/sample/CMakeFiles/progress.marks
vendored
Normal file
1
3rdparty/easyprofiler/sample/CMakeFiles/progress.marks
vendored
Normal file
@@ -0,0 +1 @@
|
||||
12
|
16
3rdparty/easyprofiler/sample/CMakeLists.txt
vendored
Normal file
16
3rdparty/easyprofiler/sample/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
set(CPP_FILES
|
||||
main.cpp
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
${CPP_FILES}
|
||||
)
|
||||
|
||||
link_directories(${CMAKE_SOURCE_DIR}/../bin)
|
||||
|
||||
add_executable(profiler_sample ${SOURCES})
|
||||
target_link_libraries(profiler_sample easy_profiler)
|
||||
|
||||
add_executable(profiler_sample_disabled_profiler ${SOURCES})
|
||||
target_link_libraries(profiler_sample_disabled_profiler easy_profiler)
|
||||
target_compile_definitions(profiler_sample_disabled_profiler PRIVATE DISABLE_EASY_PROFILER)
|
21
3rdparty/easyprofiler/sample/build_express_test.sh
vendored
Executable file
21
3rdparty/easyprofiler/sample/build_express_test.sh
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
TEMP_FILE_ENABLE="enable.info"
|
||||
TEMP_FILE_DISABLE="disable.info"
|
||||
OBJECTS="1000"
|
||||
|
||||
$CXX_COMPILER -O3 -std=c++11 -I../easy_profiler_core/include/ -L../bin/ -leasy_profiler express_sample.cpp -o express_test_disabled
|
||||
$CXX_COMPILER -O3 -std=c++11 -I../easy_profiler_core/include/ -L../bin/ -leasy_profiler -DBUILD_WITH_EASY_PROFILER express_sample.cpp -o express_test_enabled
|
||||
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../bin
|
||||
|
||||
./express_test_disabled $OBJECTS > $TEMP_FILE_DISABLE
|
||||
./express_test_enabled $OBJECTS > $TEMP_FILE_ENABLE
|
||||
|
||||
DT_ENA=`cat $TEMP_FILE_ENABLE | grep Elapsed| awk '{print $3}'`
|
||||
N_ENA=`cat $TEMP_FILE_ENABLE | grep Blocks| awk '{print $3}'`
|
||||
DT_DIS=`cat $TEMP_FILE_DISABLE | grep Elapsed| awk '{print $3}'`
|
||||
|
||||
DELTA=$(($DT_ENA-$DT_DIS))
|
||||
USEC_BLOCK=`awk "BEGIN{print $DELTA/$N_ENA}"`
|
||||
|
||||
echo "~" $USEC_BLOCK "usec/block"
|
34
3rdparty/easyprofiler/sample/cmake_install.cmake
vendored
Normal file
34
3rdparty/easyprofiler/sample/cmake_install.cmake
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
# Install script for directory: /home/alex/Work/C++Projects/easyprofiler/sample
|
||||
|
||||
# Set the install prefix
|
||||
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "/usr/local")
|
||||
endif()
|
||||
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# Set the install configuration name.
|
||||
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
if(BUILD_TYPE)
|
||||
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_CONFIG_NAME "Release")
|
||||
endif()
|
||||
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
endif()
|
||||
|
||||
# Set the component getting installed.
|
||||
if(NOT CMAKE_INSTALL_COMPONENT)
|
||||
if(COMPONENT)
|
||||
message(STATUS "Install component: \"${COMPONENT}\"")
|
||||
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_COMPONENT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Install shared libraries without execute permission?
|
||||
if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
|
||||
set(CMAKE_INSTALL_SO_NO_EXE "1")
|
||||
endif()
|
||||
|
83
3rdparty/easyprofiler/sample/express_sample.cpp
vendored
Normal file
83
3rdparty/easyprofiler/sample/express_sample.cpp
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <condition_variable>
|
||||
#include <cstdlib>
|
||||
#include <math.h>
|
||||
|
||||
#include <easy/profiler.h>
|
||||
#include <easy/reader.h>
|
||||
|
||||
int OBJECTS = 500;
|
||||
|
||||
void modellingThread(){
|
||||
EASY_THREAD("Modelling");
|
||||
|
||||
static const int N = OBJECTS;
|
||||
|
||||
volatile double *pos[N];
|
||||
for (int i = 0; i < N; ++i)
|
||||
{
|
||||
pos[i] = new volatile double[3];
|
||||
}
|
||||
|
||||
{
|
||||
EASY_BLOCK("Collisions");
|
||||
volatile int i, j;
|
||||
volatile double dist;
|
||||
for (i = 0; i < N; ++i)
|
||||
{
|
||||
for (j = i + 1; j < N; ++j)
|
||||
{
|
||||
EASY_BLOCK("Check");
|
||||
volatile double v[3];
|
||||
v[0] = pos[i][0] - pos[j][0];
|
||||
v[1] = pos[i][1] - pos[j][1];
|
||||
v[2] = pos[i][2] - pos[j][2];
|
||||
dist = v[0] * v[0] + v[1] * v[1] + v[2] * v[2];
|
||||
if (dist < 10000)
|
||||
{
|
||||
dist *= dist;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < N; ++i)
|
||||
{
|
||||
delete [] pos[i];
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
if (argc > 1 && argv[1]){
|
||||
OBJECTS = std::atoi(argv[1]);
|
||||
}
|
||||
|
||||
std::cout << "Objects count: " << OBJECTS << std::endl;
|
||||
|
||||
auto start = std::chrono::system_clock::now();
|
||||
|
||||
|
||||
EASY_PROFILER_ENABLE;
|
||||
EASY_MAIN_THREAD;
|
||||
|
||||
|
||||
modellingThread();
|
||||
|
||||
auto end = std::chrono::system_clock::now();
|
||||
auto elapsed =
|
||||
std::chrono::duration_cast<std::chrono::microseconds>(end - start);
|
||||
|
||||
std::cout << "Elapsed time: " << elapsed.count() << " usec" << std::endl;
|
||||
|
||||
auto blocks_count = profiler::dumpBlocksToFile("test.prof");
|
||||
|
||||
std::cout << "Blocks count: " << blocks_count << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
289
3rdparty/easyprofiler/sample/main.cpp
vendored
Normal file
289
3rdparty/easyprofiler/sample/main.cpp
vendored
Normal file
@@ -0,0 +1,289 @@
|
||||
//#define FULL_DISABLE_PROFILER
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <condition_variable>
|
||||
#include <cstdlib>
|
||||
#include <math.h>
|
||||
|
||||
#include <easy/profiler.h>
|
||||
#include <easy/arbitrary_value.h>
|
||||
#include <easy/reader.h>
|
||||
|
||||
std::condition_variable cv;
|
||||
std::mutex cv_m;
|
||||
int g_i = 0;
|
||||
|
||||
int OBJECTS = 500;
|
||||
int MODELLING_STEPS = 1500;
|
||||
int RENDER_STEPS = 1500;
|
||||
int RESOURCE_LOADING_COUNT = 50;
|
||||
|
||||
#define SAMPLE_NETWORK_TEST
|
||||
|
||||
void localSleep(int magic=200000)
|
||||
{
|
||||
//PROFILER_BEGIN_FUNCTION_BLOCK_GROUPED(profiler::colors::Blue);
|
||||
volatile int i = 0;
|
||||
for (; i < magic; ++i);
|
||||
}
|
||||
|
||||
void loadingResources(){
|
||||
EASY_FUNCTION(profiler::colors::DarkCyan);
|
||||
localSleep();
|
||||
// std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
}
|
||||
|
||||
void prepareMath(){
|
||||
EASY_FUNCTION(profiler::colors::Green);
|
||||
uint64_t sum = 0;
|
||||
int* intarray = new int[OBJECTS];
|
||||
for (int i = 0; i < OBJECTS; ++i)
|
||||
{
|
||||
intarray[i] = i * i;
|
||||
sum += i * i;
|
||||
}
|
||||
delete[] intarray;
|
||||
//std::this_thread::sleep_for(std::chrono::milliseconds(3));
|
||||
|
||||
EASY_VALUE("sum", sum, profiler::colors::Blue);
|
||||
}
|
||||
|
||||
void calcIntersect(){
|
||||
EASY_FUNCTION(profiler::colors::Gold);
|
||||
//int* intarray = new int[OBJECTS * OBJECTS];
|
||||
int* intarray = new int[OBJECTS];
|
||||
for (int i = 0; i < OBJECTS; ++i)
|
||||
{
|
||||
for (int j = i; j < OBJECTS; ++j)
|
||||
//intarray[i * OBJECTS + j] = i * j - i / 2 + (OBJECTS - j) * 5;
|
||||
intarray[j] = i * j - i / 2 + (OBJECTS - j) * 5;
|
||||
}
|
||||
delete[] intarray;
|
||||
//std::this_thread::sleep_for(std::chrono::milliseconds(4));
|
||||
}
|
||||
|
||||
double multModel(double i)
|
||||
{
|
||||
EASY_FUNCTION(profiler::colors::PaleGold);
|
||||
return i * sin(i) * cos(i);
|
||||
}
|
||||
|
||||
void calcPhys(){
|
||||
EASY_FUNCTION(profiler::colors::Amber);
|
||||
double* intarray = new double[OBJECTS];
|
||||
for (int i = 0; i < OBJECTS; ++i)
|
||||
intarray[i] = multModel(double(i)) + double(i / 3) - double((OBJECTS - i) / 2);
|
||||
calcIntersect();
|
||||
delete[] intarray;
|
||||
}
|
||||
|
||||
double calcSubbrain(int i)
|
||||
{
|
||||
EASY_FUNCTION(profiler::colors::Navy);
|
||||
auto val = i * i * i - i / 10 + (OBJECTS - i) * 7 ;
|
||||
EASY_VALUE("subbrainResult", val, profiler::colors::DarkRed);
|
||||
return val;
|
||||
}
|
||||
|
||||
void calcBrain(){
|
||||
EASY_FUNCTION(profiler::colors::LightBlue);
|
||||
double* intarray = new double[OBJECTS];
|
||||
for (int i = 0; i < OBJECTS; ++i)
|
||||
intarray[i] = calcSubbrain(i) + double(i * 180 / 3);
|
||||
delete[] intarray;
|
||||
//std::this_thread::sleep_for(std::chrono::milliseconds(3));
|
||||
}
|
||||
|
||||
void calculateBehavior(){
|
||||
EASY_FUNCTION(profiler::colors::Blue);
|
||||
calcPhys();
|
||||
calcBrain();
|
||||
}
|
||||
|
||||
void modellingStep(){
|
||||
EASY_FUNCTION();
|
||||
prepareMath();
|
||||
calculateBehavior();
|
||||
}
|
||||
|
||||
void prepareRender(){
|
||||
EASY_FUNCTION(profiler::colors::Brick);
|
||||
localSleep();
|
||||
//std::this_thread::sleep_for(std::chrono::milliseconds(8));
|
||||
|
||||
}
|
||||
|
||||
int multPhys(int i)
|
||||
{
|
||||
EASY_FUNCTION(profiler::colors::Red700, profiler::ON);
|
||||
return i * i * i * i / 100;
|
||||
}
|
||||
|
||||
int calcPhysicForObject(int i)
|
||||
{
|
||||
EASY_FUNCTION(profiler::colors::Red);
|
||||
return multPhys(i) + i / 3 - (OBJECTS - i) * 15;
|
||||
}
|
||||
|
||||
void calculatePhysics(){
|
||||
EASY_FUNCTION(profiler::colors::Red);
|
||||
unsigned int* intarray = new unsigned int[OBJECTS];
|
||||
for (int i = 0; i < OBJECTS; ++i)
|
||||
intarray[i] = calcPhysicForObject(i);
|
||||
delete[] intarray;
|
||||
//std::this_thread::sleep_for(std::chrono::milliseconds(8));
|
||||
}
|
||||
|
||||
void frame(){
|
||||
EASY_FUNCTION(profiler::colors::Magenta);
|
||||
prepareRender();
|
||||
calculatePhysics();
|
||||
}
|
||||
|
||||
void loadingResourcesThread(){
|
||||
//std::unique_lock<std::mutex> lk(cv_m);
|
||||
//cv.wait(lk, []{return g_i == 1; });
|
||||
EASY_THREAD("Resource loading");
|
||||
#ifdef SAMPLE_NETWORK_TEST
|
||||
while (true) {
|
||||
#else
|
||||
for(int i = 0; i < RESOURCE_LOADING_COUNT; i++){
|
||||
#endif
|
||||
loadingResources();
|
||||
EASY_EVENT("Resources Loading!", profiler::colors::Cyan);
|
||||
localSleep(1200000);
|
||||
//std::this_thread::sleep_for(std::chrono::milliseconds(20));
|
||||
}
|
||||
}
|
||||
|
||||
void modellingThread(){
|
||||
//std::unique_lock<std::mutex> lk(cv_m);
|
||||
//cv.wait(lk, []{return g_i == 1; });
|
||||
EASY_THREAD("Modelling");
|
||||
uint64_t step = 0;
|
||||
#ifdef SAMPLE_NETWORK_TEST
|
||||
while (true) {
|
||||
#else
|
||||
for (int i = 0; i < MODELLING_STEPS; i++){
|
||||
#endif
|
||||
EASY_END_BLOCK;
|
||||
EASY_NONSCOPED_BLOCK("Frame", true, 15., profiler::ON, -5.f, profiler::colors::Red);
|
||||
modellingStep();
|
||||
|
||||
localSleep(1200000);
|
||||
|
||||
++step;
|
||||
EASY_VALUE("step", step, profiler::colors::Gold);
|
||||
if (step > 10000000)
|
||||
step = 0;
|
||||
|
||||
EASY_TEXT("Test String", "Some short text. Hey!", profiler::colors::Red);
|
||||
//std::this_thread::sleep_for(std::chrono::milliseconds(20));
|
||||
}
|
||||
EASY_END_BLOCK;
|
||||
}
|
||||
|
||||
void renderThread(){
|
||||
//std::unique_lock<std::mutex> lk(cv_m);
|
||||
//cv.wait(lk, []{return g_i == 1; });
|
||||
EASY_THREAD("Render");
|
||||
#ifdef SAMPLE_NETWORK_TEST
|
||||
while (true) {
|
||||
#else
|
||||
for (int i = 0; i < RENDER_STEPS; i++){
|
||||
#endif
|
||||
frame();
|
||||
localSleep(1200000);
|
||||
//std::this_thread::sleep_for(std::chrono::milliseconds(20));
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
if (argc > 1 && argv[1]){
|
||||
OBJECTS = std::atoi(argv[1]);
|
||||
}
|
||||
if (argc > 2 && argv[2]){
|
||||
MODELLING_STEPS = std::atoi(argv[2]);
|
||||
}
|
||||
if (argc > 3 && argv[3]){
|
||||
RENDER_STEPS = std::atoi(argv[3]);
|
||||
}
|
||||
if (argc > 4 && argv[4]){
|
||||
RESOURCE_LOADING_COUNT = std::atoi(argv[4]);
|
||||
}
|
||||
|
||||
std::cout << "Objects count: " << OBJECTS << std::endl;
|
||||
std::cout << "Render steps: " << MODELLING_STEPS << std::endl;
|
||||
std::cout << "Modelling steps: " << RENDER_STEPS << std::endl;
|
||||
std::cout << "Resource loading count: " << RESOURCE_LOADING_COUNT << std::endl;
|
||||
|
||||
auto start = std::chrono::system_clock::now();
|
||||
|
||||
#ifndef SAMPLE_NETWORK_TEST
|
||||
EASY_PROFILER_ENABLE;
|
||||
#endif
|
||||
|
||||
EASY_MAIN_THREAD;
|
||||
profiler::startListen();
|
||||
|
||||
#ifdef EASY_CONSTEXPR_AVAILABLE
|
||||
constexpr int grrr[] {2, -3, 4};
|
||||
auto pppp = &grrr;
|
||||
EASY_ARRAY("threads count", grrr, 3, false, true, "blabla", profiler::colors::Blue/*, EASY_VIN("threads count")*/, profiler::OFF);
|
||||
#endif
|
||||
|
||||
int* intPtr = new int(2);
|
||||
EASY_VALUE("count", *intPtr);
|
||||
|
||||
std::vector<std::thread> threads;
|
||||
//for (int i=0; i < 3; i++)
|
||||
{
|
||||
threads.emplace_back(loadingResourcesThread);
|
||||
threads.emplace_back(renderThread);
|
||||
threads.emplace_back(modellingThread);
|
||||
}
|
||||
|
||||
cv_m.lock();
|
||||
g_i = 1;
|
||||
cv_m.unlock();
|
||||
cv.notify_all();
|
||||
|
||||
#ifndef SAMPLE_NETWORK_TEST
|
||||
std::atomic_bool stop = ATOMIC_VAR_INIT(false);
|
||||
auto frame_time_printer_thread = std::thread([&stop]()
|
||||
{
|
||||
while (!stop.load(std::memory_order_acquire))
|
||||
{
|
||||
std::cout << "Frame time: max " << profiler::main_thread::frameTimeLocalMax() << " us // avg " << profiler::main_thread::frameTimeLocalAvg() << " us\n";
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
||||
}
|
||||
});
|
||||
#endif
|
||||
|
||||
modellingThread();
|
||||
|
||||
#ifndef SAMPLE_NETWORK_TEST
|
||||
stop.store(true, std::memory_order_release);
|
||||
frame_time_printer_thread.join();
|
||||
#endif
|
||||
|
||||
for(auto& t : threads)
|
||||
t.join();
|
||||
|
||||
auto end = std::chrono::system_clock::now();
|
||||
auto elapsed =
|
||||
std::chrono::duration_cast<std::chrono::microseconds>(end - start);
|
||||
|
||||
std::cout << "Elapsed time: " << elapsed.count() << " usec" << std::endl;
|
||||
|
||||
auto blocks_count = profiler::dumpBlocksToFile("test.prof");
|
||||
|
||||
std::cout << "Blocks count: " << blocks_count << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
249
3rdparty/easyprofiler/sample/main_clock.cpp
vendored
Normal file
249
3rdparty/easyprofiler/sample/main_clock.cpp
vendored
Normal file
@@ -0,0 +1,249 @@
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <condition_variable>
|
||||
#include <cstdlib>
|
||||
#include <math.h>
|
||||
#include <type_traits>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
|
||||
static inline uint64_t getCurrentTime()
|
||||
{
|
||||
#if defined(__i386__)
|
||||
int64_t ret;
|
||||
__asm__ volatile("rdtsc" : "=A"(ret));
|
||||
return ret;
|
||||
#elif defined(__x86_64__) || defined(__amd64__)
|
||||
uint64_t low, high;
|
||||
__asm__ volatile("rdtsc" : "=a"(low), "=d"(high));
|
||||
return (high << 32) | low;
|
||||
#endif
|
||||
}
|
||||
|
||||
int OBJECTS = 500;
|
||||
#define STR(x) #x
|
||||
|
||||
int64_t calculate_cpu_frequency()//per sec
|
||||
{
|
||||
double g_TicksPerNanoSec;
|
||||
struct timespec begints, endts;
|
||||
uint64_t begin = 0, end = 0;
|
||||
clock_gettime(CLOCK_MONOTONIC, &begints);
|
||||
begin = getCurrentTime();
|
||||
volatile uint64_t i;
|
||||
for (i = 0; i < 100000000; i++); /* must be CPU intensive */
|
||||
end = getCurrentTime();
|
||||
clock_gettime(CLOCK_MONOTONIC, &endts);
|
||||
struct timespec tmpts;
|
||||
const int NANO_SECONDS_IN_SEC = 1000000000;
|
||||
tmpts.tv_sec = endts.tv_sec - begints.tv_sec;
|
||||
tmpts.tv_nsec = endts.tv_nsec - begints.tv_nsec;
|
||||
if (tmpts.tv_nsec < 0)
|
||||
{
|
||||
tmpts.tv_sec--;
|
||||
tmpts.tv_nsec += NANO_SECONDS_IN_SEC;
|
||||
}
|
||||
|
||||
uint64_t nsecElapsed = tmpts.tv_sec * 1000000000LL + tmpts.tv_nsec;
|
||||
g_TicksPerNanoSec = (double)(end - begin) / (double)nsecElapsed;
|
||||
|
||||
int64_t cpu_frequency = int(g_TicksPerNanoSec * 1000);
|
||||
|
||||
return cpu_frequency;
|
||||
}
|
||||
|
||||
const auto CPU_FREQUENCY = calculate_cpu_frequency();
|
||||
|
||||
# define TICKS_TO_US(ticks) ticks / CPU_FREQUENCY
|
||||
|
||||
void localSleep(int magic=200000)
|
||||
{
|
||||
volatile int i = 0;
|
||||
for (; i < magic; ++i);
|
||||
}
|
||||
|
||||
template<class Clock>
|
||||
auto calcDelta(int magic=200000) -> decltype(Clock::now().time_since_epoch().count())
|
||||
{
|
||||
auto start = Clock::now().time_since_epoch().count();
|
||||
localSleep(magic);
|
||||
auto end = Clock::now().time_since_epoch().count();
|
||||
return end - start;
|
||||
}
|
||||
|
||||
template<class Clock>
|
||||
double calcDuration(int objects)
|
||||
{
|
||||
const auto frequency = Clock::period::den / Clock::period::num;
|
||||
|
||||
auto start = Clock::now();
|
||||
|
||||
decltype(Clock::now().time_since_epoch().count()) summ = 0;
|
||||
|
||||
for (int i=0; i < objects; i++)
|
||||
{
|
||||
summ += calcDelta<Clock>();
|
||||
}
|
||||
|
||||
summ = summ * 1000000LL / frequency;
|
||||
|
||||
auto end = Clock::now();
|
||||
auto elapsed =
|
||||
std::chrono::duration_cast<std::chrono::microseconds>(end - start);
|
||||
|
||||
|
||||
return (elapsed.count()-summ)/double(objects)/2.0;
|
||||
}
|
||||
|
||||
uint64_t calcDeltaRdtsc(int magic=200000)
|
||||
{
|
||||
auto start = getCurrentTime();
|
||||
localSleep(magic);
|
||||
auto end = getCurrentTime();
|
||||
return end - start;
|
||||
}
|
||||
|
||||
double calcDurationByRdtsc(int objects)
|
||||
{
|
||||
auto start = getCurrentTime();
|
||||
|
||||
uint64_t summ = 0;
|
||||
|
||||
for (int i=0; i < objects; i++)
|
||||
{
|
||||
summ += calcDeltaRdtsc();
|
||||
}
|
||||
|
||||
auto end = getCurrentTime();
|
||||
return TICKS_TO_US((end - start - summ))/double(objects)/2.0;
|
||||
}
|
||||
|
||||
uint64_t calcDeltaSysCall(int magic, int type)
|
||||
{
|
||||
timespec tp0,tp1;
|
||||
syscall(SYS_clock_gettime, type, &tp0);
|
||||
auto start = tp0.tv_sec*1000000000+tp0.tv_nsec;
|
||||
localSleep(magic);
|
||||
syscall(SYS_clock_gettime, type, &tp1);
|
||||
auto end = tp1.tv_sec*1000000000+tp1.tv_nsec;
|
||||
return end - start;
|
||||
}
|
||||
|
||||
double calcDurationBySyscall(int objects, int type)
|
||||
{
|
||||
timespec tp0,tp1;
|
||||
syscall(SYS_clock_gettime, type, &tp0);
|
||||
auto start = tp0.tv_sec*1000000000+tp0.tv_nsec;
|
||||
|
||||
uint64_t summ = 0;
|
||||
|
||||
for (int i=0; i < objects; i++)
|
||||
{
|
||||
summ += calcDeltaSysCall(200000,type);
|
||||
}
|
||||
|
||||
syscall(SYS_clock_gettime, type, &tp1);
|
||||
auto end = tp1.tv_sec*1000000000+tp1.tv_nsec;
|
||||
return (end - start - summ)/double(objects)/2.0/1000.0;
|
||||
}
|
||||
|
||||
uint64_t calcDeltaSysGetTime(int magic, int type)
|
||||
{
|
||||
timespec tp0,tp1;
|
||||
clock_gettime(type, &tp0);
|
||||
auto start = tp0.tv_sec*1000000000+tp0.tv_nsec;
|
||||
localSleep(magic);
|
||||
clock_gettime(type, &tp1);
|
||||
auto end = tp1.tv_sec*1000000000+tp1.tv_nsec;
|
||||
return end - start;
|
||||
}
|
||||
|
||||
double calcDurationByGetTime(int objects, int type)
|
||||
{
|
||||
timespec tp0,tp1;
|
||||
clock_gettime(type, &tp0);
|
||||
auto start = tp0.tv_sec*1000000000+tp0.tv_nsec;
|
||||
|
||||
uint64_t summ = 0;
|
||||
|
||||
for (int i=0; i < objects; i++)
|
||||
{
|
||||
summ += calcDeltaSysGetTime(200000,type);
|
||||
}
|
||||
|
||||
clock_gettime(type, &tp1);
|
||||
auto end = tp1.tv_sec*1000000000+tp1.tv_nsec;
|
||||
return (end - start - summ)/double(objects)/2.0/1000.0;
|
||||
}
|
||||
|
||||
uint64_t calcDeltaSysGetTimeOfDay(int magic=200000)
|
||||
{
|
||||
timeval tv0,tv1;
|
||||
gettimeofday(&tv0,0);
|
||||
auto start = tv0.tv_sec*1000000+tv0.tv_usec;
|
||||
localSleep(magic);
|
||||
gettimeofday(&tv1, 0);
|
||||
auto end = tv1.tv_sec*1000000+tv1.tv_usec;
|
||||
return end - start;
|
||||
}
|
||||
|
||||
double calcDurationByGetTimeOfDay(int objects)
|
||||
{
|
||||
timeval tv0,tv1;
|
||||
gettimeofday(&tv0,0);
|
||||
auto start = tv0.tv_sec*1000000+tv0.tv_usec;
|
||||
|
||||
uint64_t summ = 0;
|
||||
|
||||
for (int i=0; i < objects; i++)
|
||||
{
|
||||
summ += calcDeltaSysGetTimeOfDay();
|
||||
}
|
||||
|
||||
gettimeofday(&tv1, 0);
|
||||
auto end = tv1.tv_sec*1000000+tv1.tv_usec;
|
||||
return (end - start - summ)/double(objects)/2.0;
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
if (argc > 1 && argv[1]){
|
||||
OBJECTS = std::atoi(argv[1]);
|
||||
}
|
||||
|
||||
|
||||
std::cout << STR(std::chrono::steady_clock) << ": "<<calcDuration<std::chrono::steady_clock>(OBJECTS) << " usec\n";
|
||||
std::cout << STR(std::chrono::high_resolution_clock)<< ": " << calcDuration<std::chrono::high_resolution_clock>(OBJECTS) << " usec\n";
|
||||
std::cout << STR(std::chrono::system_clock)<< ": " << calcDuration<std::chrono::system_clock>(OBJECTS) << " usec\n";
|
||||
|
||||
std::cout << "\n";
|
||||
|
||||
std::cout << "rdtsc: " << calcDurationByRdtsc(OBJECTS) << " usec\n";
|
||||
|
||||
std::cout << "\n";
|
||||
|
||||
std::cout << "syscall(SYS_clock_gettime, CLOCK_MONOTONIC): " << calcDurationBySyscall(OBJECTS,CLOCK_MONOTONIC) << " usec\n";
|
||||
std::cout << "syscall(SYS_clock_gettime, CLOCK_REALTIME): " << calcDurationBySyscall(OBJECTS,CLOCK_REALTIME) << " usec\n";
|
||||
std::cout << "syscall(SYS_clock_gettime, CLOCK_MONOTONIC_RAW): " << calcDurationBySyscall(OBJECTS,CLOCK_MONOTONIC_RAW) << " usec\n";
|
||||
std::cout << "syscall(SYS_clock_gettime, CLOCK_MONOTONIC_COARSE): " << calcDurationBySyscall(OBJECTS,CLOCK_MONOTONIC_COARSE) << " usec\n";
|
||||
std::cout << "syscall(SYS_clock_gettime, CLOCK_REALTIME_COARSE): " << calcDurationBySyscall(OBJECTS,CLOCK_REALTIME_COARSE) << " usec\n";
|
||||
|
||||
std::cout << "\n";
|
||||
|
||||
std::cout << "clock_gettime(CLOCK_MONOTONIC): " << calcDurationByGetTime(OBJECTS,CLOCK_MONOTONIC) << " usec\n";
|
||||
std::cout << "clock_gettime(CLOCK_REALTIME): " << calcDurationByGetTime(OBJECTS,CLOCK_REALTIME) << " usec\n";
|
||||
std::cout << "clock_gettime(CLOCK_MONOTONIC_RAW): " << calcDurationByGetTime(OBJECTS,CLOCK_MONOTONIC_RAW) << " usec\n";
|
||||
std::cout << "clock_gettime(CLOCK_MONOTONIC_COARSE): " << calcDurationByGetTime(OBJECTS,CLOCK_MONOTONIC_COARSE) << " usec\n";
|
||||
std::cout << "clock_gettime(CLOCK_REALTIME_COARSE): " << calcDurationByGetTime(OBJECTS,CLOCK_REALTIME_COARSE) << " usec\n";
|
||||
|
||||
std::cout << "\n";
|
||||
|
||||
std::cout << "gettimeofday(): " << calcDurationByGetTimeOfDay(OBJECTS) << " usec\n";
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user