Changeset d3b05790 in rtems


Ignore:
Timestamp:
Jun 21, 2007, 10:44:21 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
31fe820
Parents:
58a7d5f9
Message:

2007-06-21 Joel Sherrill <joel.sherrill@…>

  • nsecs/init.c, nsecs/nsecs.scn: Add set of loops so you can see the time varaying in proportion to the length of the loop measured.
Location:
testsuites/samples
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • testsuites/samples/ChangeLog

    r58a7d5f9 rd3b05790  
     12007-06-21      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * nsecs/init.c, nsecs/nsecs.scn: Add set of loops so you can see the
     4        time varaying in proportion to the length of the loop measured.
     5
    162007-05-16      Ralf Corsepius <ralf.corsepius@rtems.org>
    27
  • testsuites/samples/nsecs/init.c

    r58a7d5f9 rd3b05790  
    104104  }
    105105
     106  /*
     107   *  Iterate 10 times showing difference in Uptime with different counts
     108   */
     109  printf( "\n10 iterations of getting Uptime with different loop values\n" );
     110  for (index=1 ; index <=10 ; index++ ) {
     111    struct timespec start, stop;
     112    struct timespec diff;
     113    int j, max = (index * 10000);
     114    rtems_clock_get_uptime( &start );
     115      for (j=0 ; j<max ; j++ )
     116        Empty_function();
     117    rtems_clock_get_uptime( &stop );
     118
     119    subtract_em( &start, &stop, &diff );
     120    printf( "loop of %d %d:%d %d:%d --> %d:%d\n",
     121      max,
     122      start.tv_sec, start.tv_nsec,
     123      stop.tv_sec, stop.tv_nsec,
     124      diff.tv_sec, diff.tv_nsec
     125   );
     126  }
     127
     128  sleep(1);
     129
    106130  puts( "*** END OF NANOSECOND CLOCK TEST ***" );
    107131  exit(0);
  • testsuites/samples/nsecs/nsecs.scn

    r58a7d5f9 rd3b05790  
    34340:49595000 0:49603000 --> 0:8000
    35350:50908000 0:50917000 --> 0:9000
     36
     3710 iterations of getting Uptime with different loop values
     38loop of 10000 0:119488000 0:119704000 --> 0:216000
     39loop of 20000 0:124028000 0:124463000 --> 0:435000
     40loop of 30000 0:128567000 0:129220000 --> 0:653000
     41loop of 40000 0:133097000 0:133964000 --> 0:867000
     42loop of 50000 0:137643000 0:138728000 --> 0:1085000
     43loop of 60000 0:142265000 0:143572000 --> 0:1307000
     44loop of 70000 0:146894000 0:148416000 --> 0:1522000
     45loop of 80000 0:151519000 0:153260000 --> 0:1741000
     46loop of 90000 0:156145000 0:158099000 --> 0:1954000
     47loop of 100000 0:160770000 0:162942000 --> 0:2172000
    3648*** END OF NANOSECOND CLOCK TEST ***
Note: See TracChangeset for help on using the changeset viewer.