From mboxrd@z Thu Jan 1 00:00:00 1970 From: Remy Horton Subject: Re: [PATCH v5] lib/metrics: add unregister api for metrics Date: Thu, 28 Feb 2019 11:53:19 +0000 Message-ID: References: <1550849955-15101-1-git-send-email-wan.junjie@foxmail.com> <1551287944-27314-1-git-send-email-wan.junjie@foxmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Junjie Wan Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 8D680378B for ; Thu, 28 Feb 2019 12:53:24 +0100 (CET) In-Reply-To: <1551287944-27314-1-git-send-email-wan.junjie@foxmail.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > > 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