here is the perl program i wrote. it parses the trailfiles out put by proe.
Each time you open a part or assembly or drawing it will produce two lines
like this one:
!10-Mar-11 14:46:51 Start ilws://location/part.prt.1
!10-Mar-11 14:80:51 End ilws://location/part.prt.1
So I take the times and get the difference. This will show directly what the
benefits of WF2 to WF4 will be when opening stuff. Unfortunatelly OLEF's
program cannot handle just random trail files to compare. Its trailfile
sends a time stamp command every time it changes the stuff its testing. That
way the OCUS test can just show how long it took. I want to do the same
here, but I can't expect people to send out a time stamp even every time
they do something.
regards,
Alfonso
#!/usr/local/bin/perl -w
# written by Alfonso Medina O
# this program's intension in to obtain useful data from the result of
runing the ptc status command
use strict;
#use Data::Dump::Streamer;
our @lines;
our %seen; #prevent repeats
our %part;
our @parts;
our $item = "time_keep.txt";
our $timstart=();
our $timend=();
our $elapsed=();
our $size=();
open(FILE,"$item") or die "Cannot open '$item' error given: $!";
@lines = <file>;
close(FILE);
#chomp (@lines);
#shift (@lines);
#shift (@lines);
foreach my $line(@lines) {
#print "$line\n";
#!10-Mar-11 14:46:51 End ilws://csdcad2/43474/ESQ102.prt.1
if ($line=~/(\d*)\:(\d*)\:(\d*)\s*(\S*)\s*ilws(\S*)/){ #if there are
leading spaces. this makes sure we have good data for the rest
my $state = "$4$5";
$seen{$state}++;
next if $seen{$state} > 1;
$part{$5}{part}="$5";
$part{$5}{state}="$4";
$part{$5}{$4}{seconds}="$3";
$part{$5}{$4}{minutes}="$2";
$part{$5}{$4}{hours}="$1";
push(@parts, "$5");
#print "$1, $2, $3, $4, $5\n";
}
}
%seen=(); #prevent repeats
foreach my $line(@parts) {
$seen{$line}++;
next if $seen{$line} > 1;
#print
"$part{$line}{Start}{seconds},$part{$line}{Start}{minutes},$part{$line}{Start}{hours}\n";
$timstart=$part{$line}{Start}{seconds}+(60*$part{$line}{Start}{minutes})+(60*60*$part{$line}{Start}{hours});
$timend=$part{$line}{End}{seconds}+(60*$part{$line}{End}{minutes})+(60*60*$part{$line}{End}{hours});
$elapsed+=$timend-$timstart;
#print "$elapsed\n";
$size++;
}
print "Time elapsed while opening $size items\n$elapsed seconds\n";