use POSIX;
my($grid_Y_size)=225;
-my($grid_X_size)=100550; # Can be changed to improve readability in
- # function of the total execution time
+my($grid_X_size)=100550; # Can be changed to improve readability in function of the total execution time
my($color_suspended)=1;
my($color_compute)=2;
# Determine the order of the colors in the legend
my(@color_list)=($color_compute,$color_communicate,$color_wait_for_recpt,$color_suspended);
-
-
-
sub read_cat {
my(%Cat);
my($filename)=@_;
return \%Cat;
}
-
sub read_event {
my($filename,$Cat)=@_;
my($line);
return \%link;
}
-
sub build_cat_tree {
my($root,$Cat)=@_;
my(@childs)=();
}
# print "$$Cat{$cat}{name}\t\t $Cat{$cat}{father}\n";
}
-
return [$root,@childs];
}
unshift @$tree, $root;
}
-
sub cat_sorting_function {
my($cat1,$cat2,$Cat)=@_;
if (!defined($$Cat{$cat1}{state})) {
my($max_date)=0;
foreach $cat (keys %$Cat) {
- next unless (defined($$Cat{$cat}{Y_min}) &&
- defined($$Cat{$cat}{Y_max}));
+ next unless (defined($$Cat{$cat}{Y_min}) && defined($$Cat{$cat}{Y_max}));
my(@states)=();
my($e);
foreach $e (@{$$Cat{$cat}{state}}) {
$state = $$old_event[1];
# LM: I added the next line because of "undefined values"...
-# normally, I think that this should not happen, but this part of code
-# is a bit too cryptic to me
+# normally, I think that this should not happen, but this part of code is a bit too cryptic to me
next unless (defined($state));
my($line) = new XFig ('polyline');
$fig->add ($line);
}
-
-
# Host visualization
-
my($max_Y)= 0;
my($index_fill)=0;
my($host_text_x)= $min_x_for_host + 200;
foreach $cat (keys %$Cat) {
- next unless (defined($$Cat{$cat}{Y_min_host}) &&
- defined($$Cat{$cat}{Y_max_host}));
+ next unless (defined($$Cat{$cat}{Y_min_host}) && defined($$Cat{$cat}{Y_max_host}));
my($line) = new XFig ('polyline');
$line->{'depth'} = 150;
}
# Time axis
-
my($line) = new XFig ('polyline');
$line->{'depth'} = 0;
$line->{'subtype'} = 1; # line
$line->{'thickness'} = 0;
$line->{'points'} = [ [0,0],[0, -400] ];
$fig->add ($line);
-
}
sub main {
shift @$cat_list;
# print "@$cat_list \n";
set_cat_position($Cat,$cat_list);
-
my($fig)=create_fig("toto.fig");
draw_cat($fig,$Cat,$Link);