revert client
This commit is contained in:
parent
e7953ad541
commit
0f90422a39
|
@ -10,14 +10,13 @@ tmr_h tmrStartHandle;
|
||||||
SHashObj* clusterMonitorInfoTable;
|
SHashObj* clusterMonitorInfoTable;
|
||||||
|
|
||||||
static const int interval = 1000; // ms
|
static const int interval = 1000; // ms
|
||||||
static const int sendBathchSize = 1;
|
static const int sendBathchSize = 10;
|
||||||
|
|
||||||
int32_t sendReport(ClientMonitor* pMonitor, char* pCont);
|
int32_t sendReport(ClientMonitor* pMonitor, char* pCont);
|
||||||
void generateClusterReport(ClientMonitor* pMonitor, bool send) {
|
void generateClusterReport(ClientMonitor* pMonitor, bool send) {
|
||||||
char ts[50];
|
char ts[50];
|
||||||
sprintf(ts, "%" PRId64, taosGetTimestamp(TSDB_TIME_PRECISION_MILLI));
|
sprintf(ts, "%" PRId64, taosGetTimestamp(TSDB_TIME_PRECISION_MILLI));
|
||||||
char* pCont = (char*)taos_collector_registry_bridge_new(pMonitor->registry, ts, "%" PRId64, NULL);
|
char* pCont = (char*)taos_collector_registry_bridge_new(pMonitor->registry, ts, "%" PRId64, NULL);
|
||||||
uInfo("report cont:\n%s", pCont);
|
|
||||||
if (send && strlen(pCont) != TSDB_CODE_SUCCESS) {
|
if (send && strlen(pCont) != TSDB_CODE_SUCCESS) {
|
||||||
if (sendReport(pMonitor, pCont) == 0) {
|
if (sendReport(pMonitor, pCont) == 0) {
|
||||||
taos_collector_registry_clear_batch(pMonitor->registry);
|
taos_collector_registry_clear_batch(pMonitor->registry);
|
||||||
|
|
Loading…
Reference in New Issue