From 1e22236b3fdce7446422fedb03594cf09c3d4cfb Mon Sep 17 00:00:00 2001 From: fumingwei Date: Tue, 28 Mar 2023 19:06:49 +0800 Subject: bugfix:1.将MESA_field_stat2改为fieldstat3 2.修复develop分支编译失败问题 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/src/gtest_fieldstat.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'test/src/gtest_fieldstat.cpp') diff --git a/test/src/gtest_fieldstat.cpp b/test/src/gtest_fieldstat.cpp index 609853e..6683a31 100644 --- a/test/src/gtest_fieldstat.cpp +++ b/test/src/gtest_fieldstat.cpp @@ -15,22 +15,17 @@ TEST(FeildStatAPI, FieldStatInstanceNew) fieldstat_instance_free(instance); } -/* + TEST(FeildStatAPI, FieldStatEnablePrometheusEndpoint) { - int ret_enable_prometheus_endpoint = 0; - int ret_req_prometheus_endpoint = 0; - const char *request_cmd = "curl -s -o /dev/null http://127.0.0.1:9020/metrics"; + int ret = 0; - ret_enable_prometheus_endpoint = fieldstat_global_enable_prometheus_endpoint(9020, "/metrcis"); - EXPECT_EQ(0, ret_enable_prometheus_endpoint); - usleep(500 * 1000); - ret_req_prometheus_endpoint = system(request_cmd); - EXPECT_EQ(0,ret_req_prometheus_endpoint); + ret = fieldstat_global_enable_prometheus_endpoint(9020, "/metrcis"); + EXPECT_EQ(0, ret); usleep(500 * 1000); fieldstat_global_disable_prometheus_endpoint(); } -*/ + TEST(FeildStatAPI, FieldStatSetPrometheusOutput) { struct fieldstat_instance *instance = NULL; -- cgit v1.2.3