mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 20:53:52 +00:00
Move protocol specific sizes to common header.
This commit is contained in:
parent
a31ab6a256
commit
16dd561029
@ -1,9 +1,9 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <limits>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "../common/tracy_lz4.hpp"
|
#include "../common/tracy_lz4.hpp"
|
||||||
|
#include "../common/TracyProtocol.hpp"
|
||||||
#include "../common/TracySocket.hpp"
|
#include "../common/TracySocket.hpp"
|
||||||
#include "../common/TracySystem.hpp"
|
#include "../common/TracySystem.hpp"
|
||||||
#include "TracyProfiler.hpp"
|
#include "TracyProfiler.hpp"
|
||||||
@ -74,10 +74,7 @@ Profiler* Profiler::Instance()
|
|||||||
|
|
||||||
void Profiler::Worker()
|
void Profiler::Worker()
|
||||||
{
|
{
|
||||||
enum { TargetFrameSize = 64000 };
|
|
||||||
enum { BulkSize = TargetFrameSize / QueueItemSize };
|
enum { BulkSize = TargetFrameSize / QueueItemSize };
|
||||||
enum { LZ4Size = LZ4_COMPRESSBOUND( TargetFrameSize ) };
|
|
||||||
static_assert( LZ4Size <= std::numeric_limits<uint16_t>::max(), "LZ4Size greater than uint16_t" );
|
|
||||||
|
|
||||||
moodycamel::ConsumerToken token( m_queue );
|
moodycamel::ConsumerToken token( m_queue );
|
||||||
|
|
||||||
|
18
common/TracyProtocol.hpp
Executable file
18
common/TracyProtocol.hpp
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef __TRACYPROTOCOL_HPP__
|
||||||
|
#define __TRACYPROTOCOL_HPP__
|
||||||
|
|
||||||
|
#include <limits>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "../common/tracy_lz4.hpp"
|
||||||
|
|
||||||
|
namespace tracy
|
||||||
|
{
|
||||||
|
|
||||||
|
enum { TargetFrameSize = 64000 };
|
||||||
|
enum { LZ4Size = LZ4_COMPRESSBOUND( TargetFrameSize ) };
|
||||||
|
static_assert( LZ4Size <= std::numeric_limits<uint16_t>::max(), "LZ4Size greater than uint16_t" );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
Loading…
x
Reference in New Issue
Block a user