Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
For additional files put them into EXTRA_DIST list.
[simgrid.git] / teshupdate.pl
1 #! /usr/bin/perl
2
3 # This script is only there temporarly for the time that we convert all the tesh files into the new log formating allowing to sort the output
4 # Ouf, cette phrase est trop longue et illisible, desole (mt)
5
6 use strict;
7
8 while (<>) {
9     if (/\$ (.*)$/) {
10         print "! output sort\n";
11         print "\$ $1 ".'--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n'."\n";
12     } elsif (/\> \[([^:]*):([^:]*):([^(]*)\(([0-9]*)\) ([0-9.]*)\] \[([^\]]*)\] (.*)/) { # ) {
13       my ($host,$proc,$thread,$pid,$time,$msg) = ($1,$2,$3,$4,$5,$7);
14 #      print "h=$host,p=$proc,pid=$pid,t=$time; $_";
15       $time = sprintf "%10.6f",$time;
16       print "> [$time] ($pid:$proc\@$host) $msg\n";
17     } elsif (/\> \[([0-9.]*)\] \[([^\]]*)\] (.*)/) {
18       my ($time,$msg) = ($1,$3);
19       $time = sprintf "%10.6f",$time;
20       print "> [$time] (0:@) $msg\n";
21     } else {
22         print $_;
23     }
24 }