[dpdk-dev] [PATCH v5] lib/metrics: add unregister api for metrics

Remy Horton remy.horton at intel.com
Thu Feb 28 12:53:19 CET 2019


The tests for metrics themselves now all pass, but there is failure with 
bitrate statistics (bitrate stats uses metrics underneath). Latency 
statistics, which also uses metrics, seems ok though.

RTE>>bitratestats_autotest
  + ------------------------------------------------------- +
  + Test Suite : BitRate Stats Unit Test Suite
port in ring setup : 0
  + ------------------------------------------------------- +
  + TestCase [ 0] : test_stats_bitrate_create succeeded
  + TestCase [ 1] : test_stats_bitrate_reg failed
  + TestCase [ 2] : test_stats_bitrate_reg_invalidpointer succeeded
  + TestCase [ 3] : test_stats_bitrate_calc_invalid_bitrate_data succeeded
Invalid port_id=33
  + TestCase [ 4] : test_stats_bitrate_calc_invalid_portid_1 succeeded
Invalid port_id=65535
  + TestCase [ 5] : test_stats_bitrate_calc_invalid_portid_2 succeeded
Invalid port_id=31
  + TestCase [ 6] : test_stats_bitrate_calc_non_existing_portid succeeded
  + TestCase [ 7] : test_stats_bitrate_calc succeeded
  + ------------------------------------------------------- +
  + Test Suite Summary
  + Tests Total :        8
  + Tests Skipped :      0
  + Tests Executed :     8
  + Tests Unsupported:   0
  + Tests Passed :       7
  + Tests Failed :       1
  + ------------------------------------------------------- +
Test Failed


Personally if I was reimplementing metrics I would be inclined to 
replace the single fixed-size metadata[] array that is carved up with 
something more dynamic, perhaps a 2d linked-list. Doing so would 
probably negate the need for a bitmap.



On 27/02/2019 17:19, Junjie Wan wrote:
> From: junka <wan.junjie at 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: Junjie Wan <wan.junjie at foxmail.com>


More information about the dev mailing list