mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-27 00:31:02 +08:00
#0 [Core][GUI] refactoring
This commit is contained in:
parent
530eb2446c
commit
ae4c6c4e9f
@ -48,6 +48,7 @@
|
||||
* : limitations under the License.
|
||||
************************************************************************/
|
||||
|
||||
#include <easy/profiler.h>
|
||||
#include "profile_manager.h"
|
||||
#include "current_time.h"
|
||||
|
||||
|
@ -43,7 +43,7 @@ The Apache License, Version 2.0 (the "License");
|
||||
#ifndef EASY_PROFILER_CURRENT_THREAD_H
|
||||
#define EASY_PROFILER_CURRENT_THREAD_H
|
||||
|
||||
#include <easy/profiler.h>
|
||||
#include <easy/details/profiler_public_types.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <Windows.h>
|
||||
|
@ -43,7 +43,7 @@ The Apache License, Version 2.0 (the "License");
|
||||
#ifndef 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
|
||||
// std::chrono for MSVC2013 is broken - it has very low resolution of 16ms
|
||||
|
@ -60,7 +60,7 @@
|
||||
#include <memory.h>
|
||||
#include <chrono>
|
||||
#include <unordered_map>
|
||||
#include <easy/profiler.h>
|
||||
#include <easy/details/profiler_public_types.h>
|
||||
#include "profile_manager.h"
|
||||
#include "current_time.h"
|
||||
|
||||
|
@ -43,26 +43,31 @@ The Apache License, Version 2.0 (the "License");
|
||||
#define EASY_PROFILER_SOCKET_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <easy/profiler.h>
|
||||
#include <easy/details/easy_compiler_support.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <netinet/in.h> //for android-build
|
||||
|
||||
// Unix
|
||||
# include <sys/types.h>
|
||||
# include <sys/socket.h>
|
||||
# include <netdb.h>
|
||||
# include <stdio.h>
|
||||
# include <unistd.h>
|
||||
# include <fcntl.h>
|
||||
# include <netinet/in.h> //for android-build
|
||||
|
||||
#else
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
// Windows
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# include <winsock2.h>
|
||||
# include <windows.h>
|
||||
# include <ws2tcpip.h>
|
||||
# include <stdlib.h>
|
||||
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <ws2tcpip.h>
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
class PROFILER_API EasySocket
|
||||
class PROFILER_API EasySocket EASY_FINAL
|
||||
{
|
||||
public:
|
||||
|
||||
@ -84,8 +89,6 @@ private:
|
||||
|
||||
socket_t m_socket = 0;
|
||||
socket_t m_replySocket = 0;
|
||||
|
||||
int m_receiveTimeoutMs = 0;
|
||||
int m_wsaret = -1;
|
||||
|
||||
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 <vector>
|
||||
#include <string>
|
||||
#include <atomic>
|
||||
|
||||
#include <easy/profiler.h>
|
||||
#include <easy/serialized_block.h>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace profiler {
|
||||
|
@ -43,7 +43,7 @@ The Apache License, Version 2.0 (the "License");
|
||||
#ifndef 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
|
||||
{
|
||||
|
@ -53,6 +53,8 @@
|
||||
#include <future>
|
||||
#include "profile_manager.h"
|
||||
|
||||
#include <easy/profiler.h>
|
||||
#include <easy/arbitrary_value.h>
|
||||
#include <easy/serialized_block.h>
|
||||
#include <easy/easy_net.h>
|
||||
#include <easy/easy_socket.h>
|
||||
|
@ -43,9 +43,7 @@ The Apache License, Version 2.0 (the "License");
|
||||
#ifndef EASY_PROFILER_MANAGER_H
|
||||
#define EASY_PROFILER_MANAGER_H
|
||||
|
||||
#include <easy/profiler.h>
|
||||
#include <easy/arbitrary_value.h>
|
||||
#include <easy/easy_socket.h>
|
||||
#include <easy/details/profiler_public_types.h>
|
||||
|
||||
#include "spin_lock.h"
|
||||
#include "outstream.h"
|
||||
@ -65,6 +63,8 @@ typedef uint64_t processid_t;
|
||||
|
||||
class BlockDescriptor;
|
||||
|
||||
namespace profiler { class ValueId; }
|
||||
|
||||
class ProfileManager
|
||||
{
|
||||
#ifndef EASY_MAGIC_STATIC_AVAILABLE
|
||||
|
@ -67,6 +67,7 @@
|
||||
************************************************************************/
|
||||
|
||||
#include <easy/reader.h>
|
||||
#include <easy/profiler.h>
|
||||
|
||||
#include "hashed_cstr.h"
|
||||
|
||||
|
@ -43,8 +43,8 @@ The Apache License, Version 2.0 (the "License");
|
||||
#ifndef EASY_PROFILER_THREAD_STORAGE_H
|
||||
#define EASY_PROFILER_THREAD_STORAGE_H
|
||||
|
||||
#include <easy/profiler.h>
|
||||
#include <easy/arbitrary_value.h>
|
||||
#include <easy/details/profiler_public_types.h>
|
||||
#include <easy/details/arbitrary_value_public_types.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <atomic>
|
||||
|
@ -62,7 +62,7 @@
|
||||
#include <vector>
|
||||
#include <unordered_set>
|
||||
|
||||
#include <easy/profiler.h>
|
||||
#include <easy/details/profiler_public_types.h>
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -60,7 +60,6 @@
|
||||
#include <QTimer>
|
||||
#include <vector>
|
||||
#include <deque>
|
||||
#include <easy/profiler.h>
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -56,7 +56,7 @@
|
||||
#define EASY_GLOBALS_QOBJECTS_H
|
||||
|
||||
#include <QObject>
|
||||
#include <easy/profiler.h>
|
||||
#include <easy/details/profiler_public_types.h>
|
||||
|
||||
namespace profiler_gui {
|
||||
|
||||
|
@ -102,6 +102,7 @@
|
||||
#include "globals.h"
|
||||
|
||||
#include <easy/easy_net.h>
|
||||
#include <easy/profiler.h>
|
||||
|
||||
#ifdef max
|
||||
#undef max
|
||||
|
Loading…
x
Reference in New Issue
Block a user