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:
parent
530eb2446c
commit
ae4c6c4e9f
@ -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"
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
@ -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
|
||||||
|
@ -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"
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
@ -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 {
|
||||||
|
@ -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
|
||||||
{
|
{
|
||||||
|
@ -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>
|
||||||
|
@ -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
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
#include <easy/reader.h>
|
#include <easy/reader.h>
|
||||||
|
#include <easy/profiler.h>
|
||||||
|
|
||||||
#include "hashed_cstr.h"
|
#include "hashed_cstr.h"
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
@ -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>
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -60,7 +60,6 @@
|
|||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <easy/profiler.h>
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -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 {
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user