Add metrics to the framework
This change adds support for a metrics class which provides
the API allowing an xAPP to easily create and send a set of
measurements to a central collector for forwarding.
Issue-ID: RIC381
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Change-Id: I0926b26d4862df308ab0863260805fe057785bdc
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 949b158..308c524 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,7 +29,7 @@
cmake_minimum_required( VERSION 3.5 )
set( major_version "2" ) # should be automatically populated from git tag later, but until CI process sets a tag we use this
-set( minor_version "0" )
+set( minor_version "1" )
set( patch_level "0" )
set( install_root "${CMAKE_INSTALL_PREFIX}" )
@@ -156,7 +156,7 @@
# but Cmake insists on having these exist when we add them to include directories to
# enable code to find them after we build them.
#
-include_directories( "${srcd}/src/messaging;${srcd}/src/json;${srcd}/src/alarm;${srcd}/ext/jsmn" )
+include_directories( "${srcd}/src/messaging;${srcd}/src/json;${srcd}/src/alarm;${srcd}/src/metrics;${srcd}/ext/jsmn" )
# Compiler flags
#
@@ -186,12 +186,13 @@
add_subdirectory( src/messaging )
add_subdirectory( src/xapp )
add_subdirectory( src/alarm )
+add_subdirectory( src/metrics )
#add_subdirectory( doc ) # this will auto skip if {X}fm is not available
# shared and static libraries are built from the same object files.
#
add_library( ricxfcpp_shared SHARED
- "$<TARGET_OBJECTS:message_objects>;$<TARGET_OBJECTS:json_objects>;$<TARGET_OBJECTS:alarm_objects>;$<TARGET_OBJECTS:xapp_objects>"
+ "$<TARGET_OBJECTS:message_objects>;$<TARGET_OBJECTS:json_objects>;$<TARGET_OBJECTS:alarm_objects>;$<TARGET_OBJECTS:metrics_objects>;$<TARGET_OBJECTS:xapp_objects>"
)
set_target_properties( ricxfcpp_shared
PROPERTIES
@@ -199,12 +200,12 @@
SOVERSION ${major_version}
VERSION ${major_version}.${minor_version}.${patch_level}
)
-target_include_directories( ricxfcpp_shared PUBLIC "src/messenger" "src/xapp" )
+#target_include_directories( ricxfcpp_shared PUBLIC "src/alarm" "src/metrics" "src/messenger" "src/xapp" )
# we only build/export the static archive (.a) if generating a dev package
if( DEV_PKG )
add_library( ricxfcpp_static STATIC
- "$<TARGET_OBJECTS:message_objects>;$<TARGET_OBJECTS:json_objects>;$<TARGET_OBJECTS:xapp_objects>"
+ "$<TARGET_OBJECTS:message_objects>;$<TARGET_OBJECTS:json_objects>;$<TARGET_OBJECTS:alarm_objects>;$<TARGET_OBJECTS:metrics_objects>;$<TARGET_OBJECTS:xapp_objects>"
)
set_target_properties( ricxfcpp_static
PROPERTIES
@@ -212,14 +213,14 @@
SOVERSION ${major_version}
VERSION ${major_version}.${minor_version}.${patch_level}
)
- target_include_directories( ricxfcpp_static PUBLIC "src/messenger" "src/xapp" )
+# target_include_directories( ricxfcpp_static PUBLIC "src/alarm" "src/metrics" "src/messenger" "src/xapp" )
endif()
# -------- unit testing -------------------------------------------------------
enable_testing()
add_test(
NAME drive_unit_tests
- COMMAND bash ../test/unit_test.sh -q
+ COMMAND bash ../test/unit_test.sh -q CMBUILD=${CMAKE_CURRENT_BINARY_DIR}
WORKING_DIRECTORY ../test
)