This commit is contained in:
xiao77 2024-09-03 16:25:40 +08:00
parent d3518fbc89
commit 81615362c3
8 changed files with 74 additions and 78 deletions

View File

@ -14,8 +14,8 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include "vmInt.h"
#include "taos_monitor.h" #include "taos_monitor.h"
#include "vmInt.h"
extern taos_counter_t *tsInsertCounter; extern taos_counter_t *tsInsertCounter;

View File

@ -14,9 +14,9 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include "audit.h"
#include "dmMgmt.h" #include "dmMgmt.h"
#include "dmNodes.h" #include "dmNodes.h"
#include "audit.h"
static void dmGetMonitorBasicInfo(SDnode *pDnode, SMonBasicInfo *pInfo) { static void dmGetMonitorBasicInfo(SDnode *pDnode, SMonBasicInfo *pInfo) {
pInfo->protocol = 1; pInfo->protocol = 1;
@ -142,9 +142,7 @@ void dmMonitorCleanExpiredSamples() {
} }
// Todo: put this in seperate file in the future // Todo: put this in seperate file in the future
void dmSendAuditRecords() { void dmSendAuditRecords() { auditSendRecordsInBatch(); }
auditSendRecordsInBatch();
}
void dmGetVnodeLoads(SMonVloadInfo *pInfo) { void dmGetVnodeLoads(SMonVloadInfo *pInfo) {
SDnode *pDnode = dmInstance(); SDnode *pDnode = dmInstance();

View File

@ -57,8 +57,8 @@ int taos_metric_formatter_load_l_value(taos_metric_formatter_t *metric_formatter
/** /**
* @brief API PRIVATE Loads the formatter with a metric sample * @brief API PRIVATE Loads the formatter with a metric sample
*/ */
int taos_metric_formatter_load_sample(taos_metric_formatter_t *metric_formatter, taos_metric_sample_t *sample, int taos_metric_formatter_load_sample(taos_metric_formatter_t *metric_formatter, taos_metric_sample_t *sample, char *ts,
char *ts, char *format); char *format);
/** /**
* @brief API PRIVATE Loads a metric in the string exposition format * @brief API PRIVATE Loads a metric in the string exposition format

View File

@ -20,14 +20,14 @@
#include "taos_alloc.h" #include "taos_alloc.h"
// Private // Private
#include "taos_test.h"
#include "taos_errors.h" #include "taos_errors.h"
#include "taos_log.h" #include "taos_log.h"
#include "taos_metric_formatter_i.h"
#include "taos_metric_i.h" #include "taos_metric_i.h"
#include "taos_metric_sample_i.h" #include "taos_metric_sample_i.h"
#include "taos_metric_sample_t.h" #include "taos_metric_sample_t.h"
#include "taos_metric_t.h" #include "taos_metric_t.h"
#include "taos_metric_formatter_i.h" #include "taos_test.h"
taos_counter_t *taos_counter_new(const char *name, const char *help, size_t label_key_count, const char **label_keys) { taos_counter_t *taos_counter_new(const char *name, const char *help, size_t label_key_count, const char **label_keys) {
return (taos_counter_t *)taos_metric_new(TAOS_COUNTER, name, help, label_key_count, label_keys); return (taos_counter_t *)taos_metric_new(TAOS_COUNTER, name, help, label_key_count, label_keys);
@ -66,9 +66,7 @@ int taos_counter_add(taos_counter_t *self, double r_value, const char **label_va
return taos_metric_sample_add(sample, r_value); return taos_metric_sample_add(sample, r_value);
} }
int taos_counter_get_keys_size(taos_counter_t *self) { int taos_counter_get_keys_size(taos_counter_t *self) { return self->samples->keys->size; }
return self->samples->keys->size;
}
int taos_counter_get_vgroup_ids(taos_counter_t *self, char ***keys, int32_t **vgroup_ids) { int taos_counter_get_vgroup_ids(taos_counter_t *self, char ***keys, int32_t **vgroup_ids) {
TAOS_TEST_PARA(self != NULL); TAOS_TEST_PARA(self != NULL);