test/spinlock: amortize the cost of getting time
authorGavin Hu <gavin.hu@arm.com>
Fri, 8 Mar 2019 07:56:36 +0000 (15:56 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 28 Mar 2019 08:18:59 +0000 (09:18 +0100)
commita52c5530d8d2b21c1ff4a5b12b40216fb6ee06f1
tree0a9e9f5468150aa03497b9f5d353de227d551fef
parent9119ad305db027b5c87e27b13fde9d60f9aa9a1f
test/spinlock: amortize the cost of getting time

Instead of getting timestamps per iteration, amortize its overhead
can help getting more precise benchmarking results.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
app/test/test_spinlock.c