mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-27 08:41:02 +08:00
Rename directory profiler to easy
This commit is contained in:
parent
eca7061fd0
commit
76defe2372
@ -19,7 +19,7 @@ along with this program.If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define EASY________SOCKET_________H
|
#define EASY________SOCKET_________H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "profiler/profiler.h"
|
#include "easy/profiler.h"
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
@ -19,7 +19,7 @@ along with this program.If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifndef EASY_PROFILER____H_______
|
#ifndef EASY_PROFILER____H_______
|
||||||
#define EASY_PROFILER____H_______
|
#define EASY_PROFILER____H_______
|
||||||
|
|
||||||
#include "profiler/profiler_aux.h"
|
#include "easy/profiler_aux.h"
|
||||||
|
|
||||||
#if defined ( __clang__ )
|
#if defined ( __clang__ )
|
||||||
# pragma clang diagnostic push
|
# pragma clang diagnostic push
|
||||||
@ -44,7 +44,7 @@ namespace profiler {
|
|||||||
/** Macro for beginning of a block with custom name and color.
|
/** Macro for beginning of a block with custom name and color.
|
||||||
|
|
||||||
\code
|
\code
|
||||||
#include "profiler/profiler.h"
|
#include "easy/profiler.h"
|
||||||
void foo()
|
void foo()
|
||||||
{
|
{
|
||||||
// some code ...
|
// some code ...
|
||||||
@ -83,7 +83,7 @@ Block will be automatically completed by destructor.
|
|||||||
/** Macro for beginning of a block with function name and custom color.
|
/** Macro for beginning of a block with function name and custom color.
|
||||||
|
|
||||||
\code
|
\code
|
||||||
#include "profiler/profiler.h"
|
#include "easy/profiler.h"
|
||||||
void foo(){
|
void foo(){
|
||||||
EASY_FUNCTION(); // Block with name="foo" and default color
|
EASY_FUNCTION(); // Block with name="foo" and default color
|
||||||
//some code...
|
//some code...
|
||||||
@ -113,7 +113,7 @@ Name of the block automatically created with function name.
|
|||||||
/** Macro for completion of last opened block.
|
/** Macro for completion of last opened block.
|
||||||
|
|
||||||
\code
|
\code
|
||||||
#include "profiler/profiler.h"
|
#include "easy/profiler.h"
|
||||||
int foo()
|
int foo()
|
||||||
{
|
{
|
||||||
// some code ...
|
// some code ...
|
@ -32,8 +32,8 @@
|
|||||||
#define EASY_PROFILER__AUX__H_______
|
#define EASY_PROFILER__AUX__H_______
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "profiler/easy_compiler_support.h"
|
#include "easy/easy_compiler_support.h"
|
||||||
#include "profiler/profiler_colors.h"
|
#include "easy/profiler_colors.h"
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@ -61,6 +61,7 @@ namespace profiler {
|
|||||||
#ifndef FULL_DISABLE_PROFILER
|
#ifndef FULL_DISABLE_PROFILER
|
||||||
|
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
# define EASY_STRINGIFY(a) #a
|
# define EASY_STRINGIFY(a) #a
|
||||||
# define EASY_STRINGIFICATION(a) EASY_STRINGIFY(a)
|
# define EASY_STRINGIFICATION(a) EASY_STRINGIFY(a)
|
||||||
@ -73,11 +74,19 @@ namespace profiler {
|
|||||||
|
|
||||||
template <const bool IS_REF> struct NameSwitch EASY_FINAL {
|
template <const bool IS_REF> struct NameSwitch EASY_FINAL {
|
||||||
static const char* runtime_name(const char* name) { return name; }
|
static const char* runtime_name(const char* name) { return name; }
|
||||||
|
static const char* runtime_name(const std::string& name) { return name.c_str(); }
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
static const char* compiletime_name(const T&, const char* autoGeneratedName) { return autoGeneratedName; }
|
||||||
static const char* compiletime_name(const char*, const char* autoGeneratedName) { return autoGeneratedName; }
|
static const char* compiletime_name(const char*, const char* autoGeneratedName) { return autoGeneratedName; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <> struct NameSwitch<true> EASY_FINAL {
|
template <> struct NameSwitch<true> EASY_FINAL {
|
||||||
static const char* runtime_name(const char*) { return ""; }
|
static const char* runtime_name(const char*) { return ""; }
|
||||||
|
static const char* runtime_name(const std::string& name) { return name.c_str(); }
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
static const char* compiletime_name(const T&, const char* autoGeneratedName) { return autoGeneratedName; }
|
||||||
static const char* compiletime_name(const char* name, const char*) { return name; }
|
static const char* compiletime_name(const char* name, const char*) { return name; }
|
||||||
};
|
};
|
||||||
|
|
@ -25,8 +25,8 @@ along with this program.If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include "profiler/profiler.h"
|
#include "easy/profiler.h"
|
||||||
#include "profiler/serialized_block.h"
|
#include "easy/serialized_block.h"
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
@ -19,7 +19,7 @@ along with this program.If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifndef EASY_PROFILER_SERIALIZED_BLOCK__H_______
|
#ifndef EASY_PROFILER_SERIALIZED_BLOCK__H_______
|
||||||
#define EASY_PROFILER_SERIALIZED_BLOCK__H_______
|
#define EASY_PROFILER_SERIALIZED_BLOCK__H_______
|
||||||
|
|
||||||
#include "profiler/profiler.h"
|
#include "easy/profiler.h"
|
||||||
|
|
||||||
namespace profiler {
|
namespace profiler {
|
||||||
|
|
@ -11,8 +11,6 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|||||||
find_package(Qt5Widgets REQUIRED)
|
find_package(Qt5Widgets REQUIRED)
|
||||||
find_package(Qt5Network REQUIRED)
|
find_package(Qt5Network REQUIRED)
|
||||||
|
|
||||||
include_directories(${ROOT}/3rdparty/nanomsg/src)
|
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME}
|
add_executable(${PROJECT_NAME}
|
||||||
main.cpp
|
main.cpp
|
||||||
blocks_graphics_view.h
|
blocks_graphics_view.h
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
#include <QPoint>
|
#include <QPoint>
|
||||||
#include <QRectF>
|
#include <QRectF>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include "profiler/reader.h"
|
#include "easy/reader.h"
|
||||||
#include "common_types.h"
|
#include "common_types.h"
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
#include <QTreeWidget>
|
#include <QTreeWidget>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include "tree_widget_loader.h"
|
#include "tree_widget_loader.h"
|
||||||
#include "profiler/reader.h"
|
#include "easy/reader.h"
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#include <QRgb>
|
#include <QRgb>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QFont>
|
#include <QFont>
|
||||||
#include "profiler/reader.h"
|
#include "easy/reader.h"
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#include <QTreeWidget>
|
#include <QTreeWidget>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "profiler/profiler.h"
|
#include "easy/profiler.h"
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
#include <QGraphicsItem>
|
#include <QGraphicsItem>
|
||||||
#include <QRectF>
|
#include <QRectF>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include "profiler/reader.h"
|
#include "easy/reader.h"
|
||||||
#include "common_types.h"
|
#include "common_types.h"
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
#define EASY__GLOBALS_QOBJECTS_H___
|
#define EASY__GLOBALS_QOBJECTS_H___
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include "profiler/profiler.h"
|
#include "easy/profiler.h"
|
||||||
|
|
||||||
namespace profiler_gui {
|
namespace profiler_gui {
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
//#include <QFileSystemModel>
|
//#include <QFileSystemModel>
|
||||||
//#include "treemodel.h"
|
//#include "treemodel.h"
|
||||||
#include "main_window.h"
|
#include "main_window.h"
|
||||||
#include "profiler/reader.h"
|
#include "easy/reader.h"
|
||||||
|
|
||||||
|
|
||||||
//#ifdef _WIN32
|
//#ifdef _WIN32
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
#include "blocks_graphics_view.h"
|
#include "blocks_graphics_view.h"
|
||||||
#include "descriptors_tree_widget.h"
|
#include "descriptors_tree_widget.h"
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "profiler/easy_net.h"
|
#include "easy/easy_net.h"
|
||||||
|
|
||||||
#ifdef max
|
#ifdef max
|
||||||
#undef max
|
#undef max
|
||||||
|
@ -38,8 +38,8 @@
|
|||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
#include "profiler/easy_socket.h"
|
#include "easy/easy_socket.h"
|
||||||
#include "profiler/reader.h"
|
#include "easy/reader.h"
|
||||||
|
|
||||||
#ifdef max
|
#ifdef max
|
||||||
#undef max
|
#undef max
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <QTreeWidget>
|
#include <QTreeWidget>
|
||||||
#include "profiler/reader.h"
|
#include "easy/reader.h"
|
||||||
#include "common_types.h"
|
#include "common_types.h"
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include "profiler/reader.h"
|
#include "easy/reader.h"
|
||||||
#include "common_types.h"
|
#include "common_types.h"
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "profiler/profiler.h"
|
#include "easy/profiler.h"
|
||||||
#include "profiler/reader.h"
|
#include "easy/reader.h"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
//#define FULL_DISABLE_PROFILER
|
//#define FULL_DISABLE_PROFILER
|
||||||
#include "profiler/profiler.h"
|
#include "easy/profiler.h"
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <condition_variable>
|
#include <condition_variable>
|
||||||
#include "profiler/reader.h"
|
#include "easy/reader.h"
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
@ -9,10 +9,10 @@ set(CPP_FILES
|
|||||||
)
|
)
|
||||||
|
|
||||||
set(H_FILES
|
set(H_FILES
|
||||||
${ROOT}/include/profiler/profiler.h
|
${ROOT}/include/easy/profiler.h
|
||||||
${ROOT}/include/profiler/reader.h
|
${ROOT}/include/easy/reader.h
|
||||||
${ROOT}/include/profiler/easy_net.h
|
${ROOT}/include/easy/easy_net.h
|
||||||
${ROOT}/include/profiler/easy_socket.h
|
${ROOT}/include/easy/easy_socket.h
|
||||||
profile_manager.h
|
profile_manager.h
|
||||||
spin_lock.h
|
spin_lock.h
|
||||||
event_trace_win.h
|
event_trace_win.h
|
||||||
|
@ -19,7 +19,7 @@ along with this program.If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifndef EASY_______CURRENT_TIME_H_____
|
#ifndef EASY_______CURRENT_TIME_H_____
|
||||||
#define EASY_______CURRENT_TIME_H_____
|
#define EASY_______CURRENT_TIME_H_____
|
||||||
|
|
||||||
#include "profiler/profiler.h"
|
#include "easy/profiler.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program.If not, see <http://www.gnu.org/licenses/>.
|
along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "profiler/easy_socket.h"
|
#include "easy/easy_socket.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include "profiler/profiler.h"
|
#include "easy/profiler.h"
|
||||||
#include "profile_manager.h"
|
#include "profile_manager.h"
|
||||||
#include "current_time.h"
|
#include "current_time.h"
|
||||||
|
|
||||||
|
@ -27,9 +27,9 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include "profile_manager.h"
|
#include "profile_manager.h"
|
||||||
#include "profiler/serialized_block.h"
|
#include "easy/serialized_block.h"
|
||||||
#include "profiler/easy_net.h"
|
#include "easy/easy_net.h"
|
||||||
#include "profiler/easy_socket.h"
|
#include "easy/easy_socket.h"
|
||||||
#include "event_trace_win.h"
|
#include "event_trace_win.h"
|
||||||
#include "current_time.h"
|
#include "current_time.h"
|
||||||
|
|
||||||
|
@ -19,8 +19,8 @@ along with this program.If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifndef EASY_PROFILER____MANAGER____H______
|
#ifndef EASY_PROFILER____MANAGER____H______
|
||||||
#define EASY_PROFILER____MANAGER____H______
|
#define EASY_PROFILER____MANAGER____H______
|
||||||
|
|
||||||
#include "profiler/profiler.h"
|
#include "easy/profiler.h"
|
||||||
#include "profiler/easy_socket.h"
|
#include "easy/easy_socket.h"
|
||||||
#include "spin_lock.h"
|
#include "spin_lock.h"
|
||||||
#include "outstream.h"
|
#include "outstream.h"
|
||||||
#include "hashed_cstr.h"
|
#include "hashed_cstr.h"
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
* : along with this program.If not, see <http://www.gnu.org/licenses/>.
|
* : along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
#include "profiler/reader.h"
|
#include "easy/reader.h"
|
||||||
#include "hashed_cstr.h"
|
#include "hashed_cstr.h"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user