0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 16:51:22 +08:00

#0 [Core][GUI] refactoring

This commit is contained in:
Victor Zarubkin 2017-11-09 23:34:17 +03:00
parent 530eb2446c
commit ae4c6c4e9f
15 changed files with 36 additions and 31 deletions

View File

@ -48,6 +48,7 @@
* : limitations under the License. * : limitations under the License.
************************************************************************/ ************************************************************************/
#include <easy/profiler.h>
#include "profile_manager.h" #include "profile_manager.h"
#include "current_time.h" #include "current_time.h"

View File

@ -43,7 +43,7 @@ The Apache License, Version 2.0 (the "License");
#ifndef EASY_PROFILER_CURRENT_THREAD_H #ifndef EASY_PROFILER_CURRENT_THREAD_H
#define EASY_PROFILER_CURRENT_THREAD_H #define EASY_PROFILER_CURRENT_THREAD_H
#include <easy/profiler.h> #include <easy/details/profiler_public_types.h>
#ifdef _WIN32 #ifdef _WIN32
# include <Windows.h> # include <Windows.h>

View File

@ -43,7 +43,7 @@ The Apache License, Version 2.0 (the "License");
#ifndef EASY_PROFILER_CURRENT_TIME_H #ifndef EASY_PROFILER_CURRENT_TIME_H
#define EASY_PROFILER_CURRENT_TIME_H #define EASY_PROFILER_CURRENT_TIME_H
#include <easy/profiler.h> #include <easy/details/profiler_public_types.h>
#if defined(_MSC_VER) && _MSC_VER <= 1800 #if defined(_MSC_VER) && _MSC_VER <= 1800
// std::chrono for MSVC2013 is broken - it has very low resolution of 16ms // std::chrono for MSVC2013 is broken - it has very low resolution of 16ms

View File

@ -60,7 +60,7 @@
#include <memory.h> #include <memory.h>
#include <chrono> #include <chrono>
#include <unordered_map> #include <unordered_map>
#include <easy/profiler.h> #include <easy/details/profiler_public_types.h>
#include "profile_manager.h" #include "profile_manager.h"
#include "current_time.h" #include "current_time.h"

View File

@ -43,8 +43,11 @@ The Apache License, Version 2.0 (the "License");
#define EASY_PROFILER_SOCKET_H #define EASY_PROFILER_SOCKET_H
#include <stdint.h> #include <stdint.h>
#include <easy/profiler.h> #include <easy/details/easy_compiler_support.h>
#ifndef _WIN32 #ifndef _WIN32
// Unix
# include <sys/types.h> # include <sys/types.h>
# include <sys/socket.h> # include <sys/socket.h>
# include <netdb.h> # include <netdb.h>
@ -52,17 +55,19 @@ The Apache License, Version 2.0 (the "License");
# include <unistd.h> # include <unistd.h>
# include <fcntl.h> # include <fcntl.h>
# include <netinet/in.h> //for android-build # include <netinet/in.h> //for android-build
#else #else
// Windows
# define WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN
# include <winsock2.h> # include <winsock2.h>
# include <windows.h> # include <windows.h>
# include <ws2tcpip.h> # include <ws2tcpip.h>
# include <stdlib.h> # include <stdlib.h>
#endif #endif
class PROFILER_API EasySocket class PROFILER_API EasySocket EASY_FINAL
{ {
public: public:
@ -84,8 +89,6 @@ private:
socket_t m_socket = 0; socket_t m_socket = 0;
socket_t m_replySocket = 0; socket_t m_replySocket = 0;
int m_receiveTimeoutMs = 0;
int m_wsaret = -1; int m_wsaret = -1;
struct hostent* m_server = nullptr; struct hostent* m_server = nullptr;

View File

@ -45,14 +45,12 @@ The Apache License, Version 2.0 (the "License");
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include <easy/serialized_block.h>
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
#include <string> #include <string>
#include <atomic> #include <atomic>
#include <easy/profiler.h>
#include <easy/serialized_block.h>
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
namespace profiler { namespace profiler {

View File

@ -43,7 +43,7 @@ The Apache License, Version 2.0 (the "License");
#ifndef EASY_PROFILER_NONSCOPED_BLOCK_H #ifndef EASY_PROFILER_NONSCOPED_BLOCK_H
#define EASY_PROFILER_NONSCOPED_BLOCK_H #define EASY_PROFILER_NONSCOPED_BLOCK_H
#include <easy/profiler.h> #include <easy/details/profiler_public_types.h>
class NonscopedBlock : public profiler::Block class NonscopedBlock : public profiler::Block
{ {

View File

@ -53,6 +53,8 @@
#include <future> #include <future>
#include "profile_manager.h" #include "profile_manager.h"
#include <easy/profiler.h>
#include <easy/arbitrary_value.h>
#include <easy/serialized_block.h> #include <easy/serialized_block.h>
#include <easy/easy_net.h> #include <easy/easy_net.h>
#include <easy/easy_socket.h> #include <easy/easy_socket.h>

View File

@ -43,9 +43,7 @@ The Apache License, Version 2.0 (the "License");
#ifndef EASY_PROFILER_MANAGER_H #ifndef EASY_PROFILER_MANAGER_H
#define EASY_PROFILER_MANAGER_H #define EASY_PROFILER_MANAGER_H
#include <easy/profiler.h> #include <easy/details/profiler_public_types.h>
#include <easy/arbitrary_value.h>
#include <easy/easy_socket.h>
#include "spin_lock.h" #include "spin_lock.h"
#include "outstream.h" #include "outstream.h"
@ -65,6 +63,8 @@ typedef uint64_t processid_t;
class BlockDescriptor; class BlockDescriptor;
namespace profiler { class ValueId; }
class ProfileManager class ProfileManager
{ {
#ifndef EASY_MAGIC_STATIC_AVAILABLE #ifndef EASY_MAGIC_STATIC_AVAILABLE

View File

@ -67,6 +67,7 @@
************************************************************************/ ************************************************************************/
#include <easy/reader.h> #include <easy/reader.h>
#include <easy/profiler.h>
#include "hashed_cstr.h" #include "hashed_cstr.h"

View File

@ -43,8 +43,8 @@ The Apache License, Version 2.0 (the "License");
#ifndef EASY_PROFILER_THREAD_STORAGE_H #ifndef EASY_PROFILER_THREAD_STORAGE_H
#define EASY_PROFILER_THREAD_STORAGE_H #define EASY_PROFILER_THREAD_STORAGE_H
#include <easy/profiler.h> #include <easy/details/profiler_public_types.h>
#include <easy/arbitrary_value.h> #include <easy/details/arbitrary_value_public_types.h>
#include <vector> #include <vector>
#include <string> #include <string>
#include <atomic> #include <atomic>

View File

@ -62,7 +62,7 @@
#include <vector> #include <vector>
#include <unordered_set> #include <unordered_set>
#include <easy/profiler.h> #include <easy/details/profiler_public_types.h>
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////

View File

@ -60,7 +60,6 @@
#include <QTimer> #include <QTimer>
#include <vector> #include <vector>
#include <deque> #include <deque>
#include <easy/profiler.h>
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////

View File

@ -56,7 +56,7 @@
#define EASY_GLOBALS_QOBJECTS_H #define EASY_GLOBALS_QOBJECTS_H
#include <QObject> #include <QObject>
#include <easy/profiler.h> #include <easy/details/profiler_public_types.h>
namespace profiler_gui { namespace profiler_gui {

View File

@ -102,6 +102,7 @@
#include "globals.h" #include "globals.h"
#include <easy/easy_net.h> #include <easy/easy_net.h>
#include <easy/profiler.h>
#ifdef max #ifdef max
#undef max #undef max