5 use tests::threads::mlfqs;
9 my (@output) = read_text_file ("$test.output");
10 common_checks (@output);
11 @output = get_core_output (@output);
17 my ($t, $load_avg) = /After (\d+) seconds, load average=(\d+\.\d+)\./
19 $actual[$t] = $load_avg;
22 # Calculate expected values.
26 for (my ($t) = 0; $t < 180; $t++) {
27 my ($ready) = $t < 60 ? 60 : 0;
28 $load_avg = (59/60) * $load_avg + (1/60) * $ready;
29 $expected[$t] = $load_avg;
32 mlfqs_compare ("time", "%.2f", \@actual, \@expected, 2.5, [2, 178, 2],
33 "Some load average values were missing or "
34 . "differed from those expected "
35 . "by more than 2.5.");