You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by je...@apache.org on 2023/01/18 08:02:17 UTC

[nuttx-apps] branch master updated: system/ramspeed: skip cases where time too short

This is an automated email from the ASF dual-hosted git repository.

jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 360f7b748 system/ramspeed: skip cases where time too short
360f7b748 is described below

commit 360f7b748ab74f70e10aa8cd4a897b0266c8695f
Author: pengyiqiang <pe...@xiaomi.com>
AuthorDate: Wed Jan 18 14:07:13 2023 +0800

    system/ramspeed: skip cases where time too short
    
    Signed-off-by: pengyiqiang <pe...@xiaomi.com>
---
 system/ramspeed/ramspeed_main.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/system/ramspeed/ramspeed_main.c b/system/ramspeed/ramspeed_main.c
index 0effc4bd6..86757f7c2 100644
--- a/system/ramspeed/ramspeed_main.c
+++ b/system/ramspeed/ramspeed_main.c
@@ -344,7 +344,7 @@ static void print_rate(FAR const char *name, size_t bytes,
       printf(RAMSPEED_PREFIX
              "Time-consuming is too short,"
              " please increase the <repeat number>\n");
-      exit(EXIT_FAILURE);
+      return;
     }
 
   rate = (uint64_t)bytes * 1000 / cost_time / 1024;
@@ -377,11 +377,12 @@ static void memcpy_speed_test(FAR void *dest, FAR const void *src,
 
       if (step < 1024)
         {
-          printf("______do %" PRIu32 " B operation______\n", step);
+          printf("______Perform %" PRIu32 " Bytes access ______\n", step);
         }
       else
         {
-          printf("______do %" PRIu32  " KB operation______\n", step / 1024);
+          printf("______Perform %" PRIu32  " KBytes access ______\n",
+                 step / 1024);
         }
 
       if (irq_disable)
@@ -441,11 +442,12 @@ static void memset_speed_test(FAR void *dest, uint8_t value,
 
       if (step < 1024)
         {
-          printf("______do %" PRIu32 " B operation______\n", step);
+          printf("______Perform %" PRIu32 " Bytes access______\n", step);
         }
       else
         {
-          printf("______do %" PRIu32  " KB operation______\n", step / 1024);
+          printf("______Perform %" PRIu32  " KBytes access______\n",
+                 step / 1024);
         }
 
       if (irq_disable)