1
This commit is contained in:
parent
6e1e84260c
commit
8268f46feb
@ -118,6 +118,7 @@ namespace f8
|
|||||||
while (!terminated_) {
|
while (!terminated_) {
|
||||||
CheckDB();
|
CheckDB();
|
||||||
ProcessMsg();
|
ProcessMsg();
|
||||||
|
++DBPool::Instance()->run_loop_num;
|
||||||
WaitLoopCond();
|
WaitLoopCond();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,6 +168,7 @@ namespace f8
|
|||||||
AsyncQueryNode *pdelnode = work_node_;
|
AsyncQueryNode *pdelnode = work_node_;
|
||||||
work_node_ = work_node_->nextnode;
|
work_node_ = work_node_->nextnode;
|
||||||
ProcAsyncQuery(pdelnode);
|
ProcAsyncQuery(pdelnode);
|
||||||
|
++DBPool::Instance()->exec_query_num;
|
||||||
delete pdelnode;
|
delete pdelnode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -431,6 +433,7 @@ namespace f8
|
|||||||
.SetParam1(AQE_CONN_ERROR));
|
.SetParam1(AQE_CONN_ERROR));
|
||||||
},
|
},
|
||||||
&p->timer_attacher.timer_list_);
|
&p->timer_attacher.timer_list_);
|
||||||
|
++DBPool::Instance()->total_query_num;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <atomic>
|
||||||
|
|
||||||
namespace f8
|
namespace f8
|
||||||
{
|
{
|
||||||
typedef std::vector<std::vector<std::string>> DataSet;
|
typedef std::vector<std::vector<std::string>> DataSet;
|
||||||
@ -15,6 +17,9 @@ namespace f8
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
AsyncDBOnErrorFunc on_dberror = nullptr;
|
AsyncDBOnErrorFunc on_dberror = nullptr;
|
||||||
|
std::atomic<long long> total_query_num = {0};
|
||||||
|
std::atomic<long long> exec_query_num = {0};
|
||||||
|
std::atomic<long long> run_loop_num = {0};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void Init();
|
void Init();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user