3 # --- T2-COPYRIGHT-NOTE-BEGIN ---
4 # T2 SDE: scripts/parasim1.pl
5 # Copyright (C) 2004 - 2022 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 ROCK Linux Project
8 # This Copyright note is generated by scripts/Create-CopyPatch,
9 # more information can be found in the files COPYING and README.
11 # This program is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License version 2.
13 # --- T2-COPYRIGHT-NOTE-END ---
25 open(F
, $ARGV[0]) || die $!;
29 $max_y=$_[1] if $_[1] > $max_y;
33 open(F
, $ARGV[0]) || die $!;
34 for ($x=0; <F
>; $x++) {
36 $_ = int(($x*$size_x) / $max_x);
38 $data_val[$_] = 0 unless defined $data_val[$_];
39 $data_nr[$_] = 0 unless defined $data_nr[$_];
41 $data_val[$_] += $_[1];
46 $max_y=$ARGV[1] if $ARGV[1] > 0;
48 my @leftlabel=qw
/. . P a r a l l e l . J o b s . ./;
50 print "\n ----+----------------------------------------" .
51 "------------------------------+\n";
53 for ($y=$size_y; $y>0; $y--) {
54 if ($y == $size_y) { printf(" %3d |", $max_y); }
55 elsif ($y == 1) { print " 1 |"; }
57 print " ", ($leftlabel[$size_y - $y] ne '.' ?
58 $leftlabel[$size_y - $y] : ' '), " |";
61 for ($x=0; $x<$size_x; $x++) {
62 $_ = ($data_val[$x]*$size_y*2 / $data_nr[$x]) / $max_y;
63 if ($_ >= $y*2-1) { print ":"; }
64 elsif ($_ >= $y*2-2) { print "."; }
70 print " ----+----------------------------------------" .
71 "------------------------------+\n";
73 printf(" | 1 Number of Jobs build so far " .
74 " %5d |\n\n", $max_x);