Code setup
parent
ce8bfbd144
commit
e5a1763e9b
|
@ -7,13 +7,13 @@ option(BUILD_STD "Build the BLT standard utilities." ON)
|
||||||
option(BUILD_PROFILING "Build the BLT profiler extension" ON)
|
option(BUILD_PROFILING "Build the BLT profiler extension" ON)
|
||||||
|
|
||||||
if(${BUILD_STD})
|
if(${BUILD_STD})
|
||||||
file(GLOB_RECURSE STD_FILES "src/blt/std")
|
file(GLOB_RECURSE STD_FILES "${CMAKE_SOURCE_DIR}/src/blt/std/*.cpp")
|
||||||
else()
|
else()
|
||||||
set(STD_FILES "")
|
set(STD_FILES "")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(${BUILD_PROFILING})
|
if(${BUILD_PROFILING})
|
||||||
file(GLOB_RECURSE PROFILING_FILES "src/blt/profiling")
|
file(GLOB_RECURSE PROFILING_FILES "${CMAKE_SOURCE_DIR}/src/blt/profiling/*.cpp")
|
||||||
else()
|
else()
|
||||||
set(PROFILING_FILES "")
|
set(PROFILING_FILES "")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -7,6 +7,23 @@
|
||||||
#ifndef BLT_PROFILER_H
|
#ifndef BLT_PROFILER_H
|
||||||
#define BLT_PROFILER_H
|
#define BLT_PROFILER_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <string_view>
|
||||||
|
|
||||||
|
struct CapturePoint {
|
||||||
|
long point;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CaptureInterval {
|
||||||
|
CapturePoint start;
|
||||||
|
CapturePoint end;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<class MAP_TYPE>
|
||||||
|
class Profiler {
|
||||||
|
private:
|
||||||
|
MAP_TYPE* intervals;
|
||||||
|
MAP_TYPE* points = new MAP_TYPE<std::string_view, CaptureInterval>();
|
||||||
|
};
|
||||||
|
|
||||||
#endif //BLT_PROFILER_H
|
#endif //BLT_PROFILER_H
|
||||||
|
|
|
@ -3,4 +3,4 @@
|
||||||
* Licensed under GNU General Public License V3.0
|
* Licensed under GNU General Public License V3.0
|
||||||
* See LICENSE file for license detail
|
* See LICENSE file for license detail
|
||||||
*/
|
*/
|
||||||
#include <btl/profiling/profiler.h>
|
#include <blt/profiling/profiler.h>
|
Loading…
Reference in New Issue