This patch has checkpatch errors that will need to be fixed:
ERROR:SPACING: space prohibited before that close parenthesis ')' #179: FILE: lib/librte_metrics/rte_metrics.c:233: + if (count < 1 ) ERROR:TRAILING_WHITESPACE: trailing whitespace #242: FILE: lib/librte_metrics/rte_metrics.c:298: +^I^Ifor (idx_name = 0; idx < stats->cnt_stats && $ If the patch is applied, two of the unit-tests for metrics break: # ./test/build/app/test RTE>>metrics_autotest + ------------------------------------------------------- + + Test Suite : Metrics Unit Test Suite + ------------------------------------------------------- + + TestCase [ 0] : test_metrics_without_init succeeded + TestCase [ 1] : test_metrics_reg_name_with_validname succeeded + TestCase [ 2] : test_metrics_reg_names succeeded + TestCase [ 3] : test_metrics_update_value failed + TestCase [ 4] : test_metrics_update_values failed + TestCase [ 5] : test_metrics_get_names succeeded + TestCase [ 6] : test_metrics_get_values succeeded + ------------------------------------------------------- + + Test Suite Summary + Tests Total : 7 + Tests Skipped : 0 + Tests Executed : 7 + Tests Unsupported: 0 + Tests Passed : 5 + Tests Failed : 2 + ------------------------------------------------------- + Both of these issues will need to be addressed. On 22/02/2019 15:39, wanjunjie wrote:
From: junka <wan.jun...@foxmail.com> The bitmap will help maintain the metrics. We can dynamically add and remove metrics data. For example, after uninit latency lib, it could remove itself from the metrics. This could make the result from rte_metrics_get_names much more simple to display the wanted metrics data only. Signed-off-by: junka <wan.jun...@foxmail.com> --- lib/librte_metrics/rte_metrics.c | 182 ++++++++++++++++++++++++++++----------- lib/librte_metrics/rte_metrics.h | 21 +++++ 2 files changed, 152 insertions(+), 51 deletions(-)
<snip>