mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
system/cachespeed:Optimize the number of tests
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
parent
f3b1ac089b
commit
d0349a3bd4
1 changed files with 3 additions and 4 deletions
|
|
@ -38,10 +38,10 @@
|
|||
****************************************************************************/
|
||||
|
||||
#define CACHESPEED_PREFIX "CACHE Speed: "
|
||||
#define REPEAT_NUM 1000
|
||||
|
||||
#ifdef CACHESPEED_PERFTIME
|
||||
#define TIME uint64_t
|
||||
#define REPEAT_NUM 10000
|
||||
|
||||
#define CONVERT(cost) \
|
||||
do \
|
||||
|
|
@ -54,7 +54,6 @@
|
|||
#define TIMESTAMP(x) (x) = up_perf_gettime()
|
||||
#else
|
||||
#define TIME time_t
|
||||
#define REPEAT_NUM 1000
|
||||
|
||||
#define CONVERT(cost)
|
||||
|
||||
|
|
@ -177,8 +176,8 @@ static void test_skeleton(FAR struct cachespeed_s *cs,
|
|||
update_size = cache_line_size;
|
||||
}
|
||||
|
||||
for (size_t bytes = cache_line_size;
|
||||
bytes <= cache_size; bytes += update_size)
|
||||
for (size_t bytes = update_size;
|
||||
bytes <= cache_size; bytes = 2 * bytes)
|
||||
{
|
||||
irqstate_t irq;
|
||||
TIME start;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue