2 eval 'exec perl -wS $0 ${1+"$@"}'
6 =head1 PROGRAM NAME AND AUTHOR
8 Timings - $Revision: 1.2 $
9 Last changes: $Author: rt $ $Date: 2004-11-26 18:43:32 $
13 Extract move effect timings from a verbose trace log of the
14 presentation engine. Generated is a gnuplot data file, which can be
15 displayed issuing a 'gnuplot <filename>' or at a gnuplot prompt, via
18 To generate such a verbose log file, rebuild module canvas and module
19 slideshow with VERBOSE=t defined in the environment, and debug=t at
20 the build tool command line. Then run the presentation, and redirect
21 stdout to your log file.
23 Call me like this: timings.pl < trace-file > gnuplot-target
25 The whole point in doing this is to detect jerks in shape movements,
26 which manifest themselves clearly in the graphed gnuplot output. Note
27 that there's some heuristic to recognize when one effect ends and
28 another has started: If the time difference between two subsequent
29 page flipping times is more than one second, a new effect is assumed
30 and a new gnuplot data record is generated.
38 ##############################################################################
41 print "# Autogenerated by timings.pl, do not change\n",
42 "set ylabel \"position\"\n",
43 "set xlabel \"time\"\n",
44 "plot '-' index 0 using (\$1):(\$2) title \"Move effect position\" with lp\n",
53 if( $state == 0 && m
|next position will be
| )
55 ($posX) = m
|.*\
(([0-9]+.[0-9]+),|;
56 ($posY) = m
|.*,([0-9]+.[0-9]+)\
)|;
59 elsif( $state == 1 && m
|output
pos is
| )
63 elsif( $state == 2 && m
|flip done at
| )
66 ($flippingTime) = m
|.*at
([0-9]+.[0-9]+)|;
70 if( $last_time + 1.0 < $flippingTime )
73 print "\n\n#", $record, "\n";
78 $last_time = $flippingTime;
79 print $flippingTime, " ", $posX, " ", $posY, "\n";