This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new e94fca4949f [enhancement](bvar) add metrics to monitor load throughput 
(#25189)
e94fca4949f is described below

commit e94fca4949fab93d8b7e68c8f96a7bb699194d40
Author: zhengyu <[email protected]>
AuthorDate: Wed Oct 11 19:56:33 2023 +0800

    [enhancement](bvar) add metrics to monitor load throughput (#25189)
    
    to monitor realtime load throughput of the BE
    
    Signed-off-by: freemandealer <[email protected]>
---
 be/src/vec/sink/writer/vtablet_writer.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/be/src/vec/sink/writer/vtablet_writer.cpp 
b/be/src/vec/sink/writer/vtablet_writer.cpp
index f554f036174..0b390657218 100644
--- a/be/src/vec/sink/writer/vtablet_writer.cpp
+++ b/be/src/vec/sink/writer/vtablet_writer.cpp
@@ -92,12 +92,18 @@
 #include "vec/exprs/vexpr.h"
 #include "vec/sink/vtablet_block_convertor.h"
 #include "vec/sink/vtablet_finder.h"
+#include "bvar/bvar.h"
 
 namespace doris {
 class TExpr;
 
 namespace vectorized {
 
+bvar::Adder<int64_t> g_sink_write_bytes;
+bvar::PerSecond<bvar::Adder<int64_t>> 
g_sink_write_bytes_per_second("sink_throughput_byte", &g_sink_write_bytes, 60);
+bvar::Adder<int64_t> g_sink_write_rows;
+bvar::PerSecond<bvar::Adder<int64_t>> 
g_sink_write_rows_per_second("sink_throughput_row", &g_sink_write_rows, 60);
+
 Status IndexChannel::init(RuntimeState* state, const 
std::vector<TTabletWithPartition>& tablets) {
     SCOPED_CONSUME_MEM_TRACKER(_index_channel_tracker.get());
     for (auto& tablet : tablets) {
@@ -1822,6 +1828,9 @@ Status 
VTabletWriter::append_block(doris::vectorized::Block& input_block) {
     for (const auto& index_channel : _channels) {
         RETURN_IF_ERROR(index_channel->check_intolerable_failure());
     }
+
+    g_sink_write_bytes << bytes;
+    g_sink_write_rows << rows;
     return Status::OK();
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to