source: rtems/c/src/ada-tests/support/time_test_support.adb @ 9b4422a2

4.115
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on May 3, 2012 at 3:09:24 PM

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 1.7 KB
Line 
1--
2--  TIME_TEST_SUPPORT / SPECIFICATION
3--
4--  DESCRIPTION:
5--
6--  This package provides routines which aid the individual tests in
7--  the Timing Test Suite and simplify their design and operation.
8--
9--  DEPENDENCIES:
10--
11-- 
12--
13--  COPYRIGHT (c) 1989-2009.
14--  On-Line Applications Research Corporation (OAR).
15--
16--  The license and distribution terms for this file may in
17--  the file LICENSE in this distribution or at
18--  http://www.rtems.com/license/LICENSE.
19--
20
21with INTERFACES; use INTERFACES;
22with TEXT_IO;
23with UNSIGNED32_IO;
24
25package body TIME_TEST_SUPPORT is
26
27--PAGE
28--
29--  PUT_TIME
30--
31
32   procedure PUT_TIME (
33      MESSAGE          : in     STRING;
34      TOTAL_TIME       : in     RTEMS.UNSIGNED32;
35      ITERATIONS       : in     RTEMS.UNSIGNED32;
36      LOOP_OVERHEAD    : in     RTEMS.UNSIGNED32;
37      CALLING_OVERHEAD : in     RTEMS.UNSIGNED32
38   ) is
39      PER_ITERATION : RTEMS.UNSIGNED32;
40   begin
41
42      PER_ITERATION := (TOTAL_TIME - LOOP_OVERHEAD) / ITERATIONS;
43      PER_ITERATION := PER_ITERATION - CALLING_OVERHEAD;
44
45      if PER_ITERATION = 0 then
46
47         TEXT_IO.PUT( "TOTAL_TIME " );
48         UNSIGNED32_IO.PUT( TOTAL_TIME );
49         TEXT_IO.NEW_LINE; 
50
51         TEXT_IO.PUT( "ITERATIONS " );
52         UNSIGNED32_IO.PUT( ITERATIONS );
53         TEXT_IO.NEW_LINE; 
54
55         TEXT_IO.PUT( "LOOP_OVERHEAD " );
56         UNSIGNED32_IO.PUT( LOOP_OVERHEAD );
57         TEXT_IO.NEW_LINE; 
58
59         TEXT_IO.PUT( "CALLING_OVERHEAD " );
60         UNSIGNED32_IO.PUT( CALLING_OVERHEAD );
61         TEXT_IO.NEW_LINE; 
62
63      end if;
64
65      TEXT_IO.PUT( MESSAGE );
66      TEXT_IO.PUT( " " );
67      UNSIGNED32_IO.PUT( PER_ITERATION );
68      TEXT_IO.NEW_LINE; 
69      TEXT_IO.FLUSH; 
70
71   end PUT_TIME;
72
73end TIME_TEST_SUPPORT;
Note: See TracBrowser for help on using the repository browser.