diff options
| author | fumingwei <[email protected]> | 2023-03-01 20:46:13 +0800 |
|---|---|---|
| committer | fumingwei <[email protected]> | 2023-03-01 21:11:21 +0800 |
| commit | 3f7c636998898b5186693afa96a622db67f4e123 (patch) | |
| tree | b08ec17c4d430bd3efb0fe7b0cbefffecdf35545 /test | |
| parent | ad590711cf82079ebe6009ce117611818ffbb964 (diff) | |
feature:新增metric prometheus输出
Diffstat (limited to 'test')
| -rw-r--r-- | test/fs2_test.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/fs2_test.cpp b/test/fs2_test.cpp index 795e697..10b0b50 100644 --- a/test/fs2_test.cpp +++ b/test/fs2_test.cpp @@ -48,6 +48,8 @@ int main(int argc, char *argv[]) const char *field_list_0[] = {"c0", "c1", "c2"}; struct metric_id_list id_list; + fieldstat_global_enable_prometheus_endpoint(9010, "/metrics"); + test_instance = fieldstat_instance_create(); ret = fieldstat_set_app_name(test_instance, "test"); if(ret == -1) @@ -154,5 +156,6 @@ int main(int argc, char *argv[]) sleep(1); fieldstat_passive_output(test_instance); printf("Testing for fieldstat\n"); + sleep(10000); return 0; } |
