mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-22 01:30:51 +00:00
dbms: more instrumentation [#METR-2944].
This commit is contained in:
parent
6820638c30
commit
a57d64b7fa
@ -5,6 +5,7 @@
|
||||
#include <vector>
|
||||
#include <Poco/SharedPtr.h>
|
||||
#include <Yandex/likely.h>
|
||||
#include <DB/Common/ProfileEvents.h>
|
||||
|
||||
|
||||
namespace DB
|
||||
@ -33,6 +34,9 @@ private:
|
||||
|
||||
Chunk(size_t size_, Chunk * prev_)
|
||||
{
|
||||
ProfileEvents::increment(ProfileEvents::ArenaAllocChunks);
|
||||
ProfileEvents::increment(ProfileEvents::ArenaAllocBytes, size_);
|
||||
|
||||
begin = allocate(size_);
|
||||
pos = begin;
|
||||
end = begin + size_;
|
||||
|
@ -19,6 +19,11 @@
|
||||
M(CompressedReadBufferBytes, "Read decompressed bytes") \
|
||||
M(UncompressedCacheHits, "Uncompressed cache hits") \
|
||||
M(UncompressedCacheMisses, "Uncompressed cache misses") \
|
||||
M(IOBufferAllocs, "IO buffers allocations") \
|
||||
M(IOBufferAllocBytes, "IO buffers allocated bytes") \
|
||||
M(ArenaAllocChunks, "Arena allocated chunks") \
|
||||
M(ArenaAllocBytes, "Arena allocated bytes") \
|
||||
M(FunctionExecute, "Function executes") \
|
||||
\
|
||||
M(END, "")
|
||||
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
|
||||
#include <DB/Common/ProfileEvents.h>
|
||||
|
||||
#include <DB/Core/Exception.h>
|
||||
#include <DB/Core/ErrorCodes.h>
|
||||
|
||||
@ -67,6 +69,9 @@ private:
|
||||
return;
|
||||
}
|
||||
|
||||
ProfileEvents::increment(ProfileEvents::IOBufferAllocs);
|
||||
ProfileEvents::increment(ProfileEvents::IOBufferAllocBytes, m_capacity);
|
||||
|
||||
if (!alignment)
|
||||
{
|
||||
m_data = reinterpret_cast<char *>(malloc(m_capacity));
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <DB/Common/ProfileEvents.h>
|
||||
#include <DB/Interpreters/ExpressionActions.h>
|
||||
#include <DB/Columns/ColumnsNumber.h>
|
||||
#include <DB/Columns/ColumnArray.h>
|
||||
@ -6,6 +7,7 @@
|
||||
#include <DB/Functions/IFunction.h>
|
||||
#include <set>
|
||||
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
||||
@ -196,6 +198,7 @@ void ExpressionActions::Action::execute(Block & block) const
|
||||
new_column.type = result_type;
|
||||
block.insert(new_column);
|
||||
|
||||
ProfileEvents::increment(ProfileEvents::FunctionExecute);
|
||||
function->execute(block, arguments, prerequisites, block.getPositionByName(result_name));
|
||||
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user