|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 2181 (0x885)
Types: TextFile
Names: »B«
└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
└─⟦5cb1d1d7f⟧ »DATA«
└─⟦3b1ee7bd8⟧
└─⟦this⟧
with Text_Io, Cpu_Time_Clock;
use Text_Io;
procedure A000090 is
package Tio is new Fixed_Io (Duration);
package Iio is new Integer_Io (Integer);
use Tio, Iio;
type Delta_Array is array (Integer range <>) of Duration;
Num_Samples : constant Integer := 12_000;
Sample_Size : Integer := 0;
Deltas : Delta_Array (1 .. Num_Samples) :=
(1 .. Num_Samples => Cpu_Time_Clock);
Resolution : Duration := 86_000.0;
Resolution_Avg : Duration := 0.0;
Variance : Duration := 0.0;
begin
New_Line;
New_Line;
Put_Line ("Test Name: A000090");
Put_Line (" Clock resolution measurement running");
for I in 1 .. Num_Samples - 1 loop
Deltas (I) := Deltas (I) - Deltas (I + 1);
end loop;
for I in 1 .. Num_Samples - 2 loop
Deltas (I) := Deltas (I) - Deltas (I + 1);
end loop;
for I in 1 .. Num_Samples - 2 loop
if (Deltas (I) > 0.000000) and (Deltas (I) < Resolution) then
Resolution := Deltas (I);
end if;
if Deltas (I) > 0.000000 then
Resolution_Avg := Resolution_Avg + Deltas (I);
Sample_Size := Sample_Size + 1;
end if;
end loop;
Resolution_Avg := Resolution_Avg / Sample_Size;
for I in 1 .. Num_Samples - 2 loop
if Deltas (I) > 0.000000 then
Variance := Variance + Duration ((Deltas (I) - Resolution_Avg) *
(Deltas (I) - Resolution_Avg));
end if;
end loop;
Variance := Variance / (Sample_Size - 1);
Put_Line ("Test Description:");
Put_Line (" Determine clock resolution using second differences");
Put_Line (" of values returned by the function CPU_Time_Clock.");
New_Line;
Put (" Number of sample values is ");
Put (Num_Samples);
New_Line;
Put (" Clock Resolution = ");
Put (Resolution, 8, 15, 0);
Put (" seconds.");
New_Line;
Put (" Clock Resolution (average) = ");
Put (Resolution_Avg, 8, 15, 0);
Put (" seconds.");
New_Line;
Put (" Clock Resolution (variance) = ");
Put (Variance, 8, 15, 0);
Put (" seconds.");
New_Line;
end A000090;