mirror of
https://github.com/wolfpld/tracy
synced 2025-05-03 06:03:51 +00:00
Use one flag to control whether LZ4 is enabled.
This commit is contained in:
parent
76df000467
commit
2442c8fe58
@ -7,6 +7,10 @@
|
|||||||
#include "../common/TracySystem.hpp"
|
#include "../common/TracySystem.hpp"
|
||||||
#include "TracyProfiler.hpp"
|
#include "TracyProfiler.hpp"
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
# define DISABLE_LZ4
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace tracy
|
namespace tracy
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -88,7 +92,7 @@ void Profiler::Worker()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_sock->Send( &m_timeBegin, sizeof( m_timeBegin ) );
|
m_sock->Send( &m_timeBegin, sizeof( m_timeBegin ) );
|
||||||
#ifdef _DEBUG
|
#ifdef DISABLE_LZ4
|
||||||
// notify client that lz4 compression is disabled (too slow in debug builds)
|
// notify client that lz4 compression is disabled (too slow in debug builds)
|
||||||
char val = 0;
|
char val = 0;
|
||||||
m_sock->Send( &val, 1 );
|
m_sock->Send( &val, 1 );
|
||||||
@ -125,7 +129,7 @@ void Profiler::Worker()
|
|||||||
|
|
||||||
bool Profiler::SendData( const char* data, size_t len )
|
bool Profiler::SendData( const char* data, size_t len )
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
#ifdef DISABLE_LZ4
|
||||||
if( m_sock->Send( data, len ) == -1 ) return false;
|
if( m_sock->Send( data, len ) == -1 ) return false;
|
||||||
#else
|
#else
|
||||||
char lz4[LZ4Size + sizeof( lz4sz_t )];
|
char lz4[LZ4Size + sizeof( lz4sz_t )];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user