3 # --- T2-COPYRIGHT-NOTE-BEGIN ---
4 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
6 # T2 SDE: scripts/parasim3.pl
7 # Copyright (C) 2004 - 2005 The T2 SDE Project
8 # Copyright (C) 1998 - 2003 ROCK Linux Project
10 # More information can be found in the files COPYING and README.
12 # This program is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; version 2 of the License. A copy of the
15 # GNU General Public License can be found in the file COPYING.
16 # --- T2-COPYRIGHT-NOTE-END ---
18 my ($size_x, $max_x) = (68, 0);
19 my $size_y=int( 16 / ($#ARGV+1) );
22 foreach $file (@ARGV) {
23 open(F
, $file) || die $!;
26 $_[0]=int($_[0] * 100);
27 $max_x=$_[0] if $_[0] > $max_x;
32 print "\n -----+-----------------------------------" .
33 "---------------------------------+\n";
35 foreach $file (reverse @ARGV) {
42 open(F
, $file) || die $!;
45 $max_y=$_[1] if $_[1] > $max_y;
49 open(F
, $file) || die $!;
52 for ($newx=int($_[0] * 100); $x <= $newx; $x++) {
53 $_ = int(($x*$size_x) / $max_x);
55 $data_val[$_] = 0 unless defined $data_val[$_];
56 $data_nr[$_] = 0 unless defined $data_nr[$_];
58 $data_val[$_] += $_[1];
64 for ($y=$size_y; $y>0; $y--) {
65 if ($y == $size_y) { printf(" %3d |", $max_y); }
66 elsif ($y == 1) { print " 1 |"; }
69 for ($x=0; $x<$size_x; $x++) {
70 if (defined $data_val[$x]) {
71 $_ = ($data_val[$x]*$size_y*2 /
72 $data_nr[$x]) / $max_y;
73 if ($_ >= $y*2-1) { print ":"; }
74 elsif ($_ >= $y*2-2) { print "."; }
83 print " -----+-----------------------------------" .
84 "---------------------------------+\n";
87 printf " Jobs | 00:00 Time " .
89 $max_x / 100, ($max_x * 0.6 ) % 60;