提交 54893864 编写于 作者: Y yu yunfeng 提交者: jinhai

alter server_config


Former-commit-id: 955278b226f1e121fb84d156913560aa93741d18
上级 40aa8e1d
......@@ -14,7 +14,7 @@ db_config:
index_building_threshold: 1024 #build index file when raw data file size larger than this value, unit: MB
metric_config:
is_startup: true # true is on, false is off
is_startup: off # on is activated, otherwise is down. note: case sensitive
collector: prometheus # prometheus, now we only have prometheus
prometheus_config:
collect_type: pull # pull means prometheus pull the message from server, push means server push metric to push gateway
......
......@@ -17,7 +17,8 @@ ServerError
PrometheusMetrics::Init() {
try {
ConfigNode &configNode = ServerConfig::GetInstance().GetConfig(CONFIG_METRIC);
startup_ = configNode.GetValue(CONFIG_METRIC_IS_STARTUP) == "true" ? true : false;
startup_ = configNode.GetValue(CONFIG_METRIC_IS_STARTUP) == "on";
if(!startup_) return SERVER_SUCCESS;
// Following should be read from config file.
const std::string bind_address = configNode.GetChild(CONFIG_PROMETHEUS).GetValue(CONFIG_METRIC_PROMETHEUS_PORT);
const std::string uri = std::string("/metrics");
......
......@@ -102,7 +102,7 @@ TEST_F(DBTest, Metric_Tes) {
}
});
int loop = 10;
int loop = 10000;
for (auto i=0; i<loop; ++i) {
if (i==40) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册