diff mbox series

[v2] test/lpm: reset total time

Message ID 20191001053253.32327-1-honnappa.nagarahalli@arm.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers show
Series [v2] test/lpm: reset total time | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-compilation success Compile Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS

Commit Message

Honnappa Nagarahalli Oct. 1, 2019, 5:32 a.m. UTC
total_time needs to be reset to measure the cycles for delete API.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
v2 - Corrected checkpatch issue

 app/test/test_lpm_perf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Vladimir Medvedkin Oct. 4, 2019, 11:14 a.m. UTC | #1
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>

Tested-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>


On 01/10/2019 06:32, Honnappa Nagarahalli wrote:
> total_time needs to be reset to measure the cycles for delete API.
>
> Fixes: af75078fece3 ("first public release")
> Cc: stable@dpdk.org
>
> Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---
> v2 - Corrected checkpatch issue
>
>   app/test/test_lpm_perf.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/app/test/test_lpm_perf.c b/app/test/test_lpm_perf.c
> index a9f02d983..9fa02f9df 100644
> --- a/app/test/test_lpm_perf.c
> +++ b/app/test/test_lpm_perf.c
> @@ -937,7 +937,7 @@ test_lpm_perf(void)
>   			(double)total_time / ((double)ITERATIONS * BATCH_SIZE),
>   			(count * 100.0) / (double)(ITERATIONS * BATCH_SIZE));
>   
> -	/* Delete */
> +	/* Measure Delete */
>   	status = 0;
>   	begin = rte_rdtsc();
>   
> @@ -947,7 +947,7 @@ test_lpm_perf(void)
>   				large_route_table[i].depth);
>   	}
>   
> -	total_time += rte_rdtsc() - begin;
> +	total_time = rte_rdtsc() - begin;
>   
>   	printf("Average LPM Delete: %g cycles\n",
>   			(double)total_time / NUM_ROUTE_ENTRIES);
David Marchand Oct. 24, 2019, 8:06 a.m. UTC | #2
> On 01/10/2019 06:32, Honnappa Nagarahalli wrote:
> > total_time needs to be reset to measure the cycles for delete API.
> >
> > Fixes: af75078fece3 ("first public release")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> > Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
> Tested-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>

Applied, thanks.
diff mbox series

Patch

diff --git a/app/test/test_lpm_perf.c b/app/test/test_lpm_perf.c
index a9f02d983..9fa02f9df 100644
--- a/app/test/test_lpm_perf.c
+++ b/app/test/test_lpm_perf.c
@@ -937,7 +937,7 @@  test_lpm_perf(void)
 			(double)total_time / ((double)ITERATIONS * BATCH_SIZE),
 			(count * 100.0) / (double)(ITERATIONS * BATCH_SIZE));
 
-	/* Delete */
+	/* Measure Delete */
 	status = 0;
 	begin = rte_rdtsc();
 
@@ -947,7 +947,7 @@  test_lpm_perf(void)
 				large_route_table[i].depth);
 	}
 
-	total_time += rte_rdtsc() - begin;
+	total_time = rte_rdtsc() - begin;
 
 	printf("Average LPM Delete: %g cycles\n",
 			(double)total_time / NUM_ROUTE_ENTRIES);