diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-11-26 17:43:32 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-11-26 17:43:32 +0000 |
commit | 5544eaf303c135192b6e535b47bd65fc76babbab (patch) | |
tree | 7114c22a646a4145a67c2e1d0c85a7734a50e9fd /slideshow/qa | |
parent | 19d2d3672194fd64ecaaec446abde6e3bf3cfa4d (diff) |
INTEGRATION: CWS presentationengine01 (1.1.2); FILE ADDED
2004/05/27 15:07:43 thb 1.1.2.2: #110496# Updated docs
2004/05/27 14:59:26 thb 1.1.2.1: Initial revision
Diffstat (limited to 'slideshow/qa')
-rw-r--r-- | slideshow/qa/debug/timings.pl | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/slideshow/qa/debug/timings.pl b/slideshow/qa/debug/timings.pl new file mode 100644 index 000000000000..5af3e89761e9 --- /dev/null +++ b/slideshow/qa/debug/timings.pl @@ -0,0 +1,81 @@ +: +eval 'exec perl -wS $0 ${1+"$@"}' + if 0; +# POD Documentation + +=head1 PROGRAM NAME AND AUTHOR + +Timings - $Revision: 1.2 $ +Last changes: $Author: rt $ $Date: 2004-11-26 18:43:32 $ + +=head1 WHAT IT IS + +Extract move effect timings from a verbose trace log of the +presentation engine. Generated is a gnuplot data file, which can be +displayed issuing a 'gnuplot <filename>' or at a gnuplot prompt, via +'load <filename>'. + +To generate such a verbose log file, rebuild module canvas and module +slideshow with VERBOSE=t defined in the environment, and debug=t at +the build tool command line. Then run the presentation, and redirect +stdout to your log file. + +Call me like this: timings.pl < trace-file > gnuplot-target + +The whole point in doing this is to detect jerks in shape movements, +which manifest themselves clearly in the graphed gnuplot output. Note +that there's some heuristic to recognize when one effect ends and +another has started: If the time difference between two subsequent +page flipping times is more than one second, a new effect is assumed +and a new gnuplot data record is generated. + +=head1 REQUIREMENTS + +Perl 5 + +=cut + +############################################################################## +# + +print "# Autogenerated by timings.pl, do not change\n", + "set ylabel \"position\"\n", + "set xlabel \"time\"\n", + "plot '-' index 0 using (\$1):(\$2) title \"Move effect position\" with lp\n", + "#0\n"; + +$state = 0; +$last_time = 0; +$record = 1; + +while( <> ) +{ + if( $state == 0 && m|next position will be| ) + { + ($posX) = m|.*\(([0-9]+.[0-9]+),|; + ($posY) = m|.*,([0-9]+.[0-9]+)\)|; + $state = 1; + } + elsif( $state == 1 && m|output pos is| ) + { + $state = 2; + } + elsif( $state == 2 && m|flip done at| ) + { + $state = 0; + ($flippingTime) = m|.*at ([0-9]+.[0-9]+)|; + + if( $last_time != 0 ) + { + if( $last_time + 1.0 < $flippingTime ) + { + # new record + print "\n\n#", $record, "\n"; + $record++; + } + } + + $last_time = $flippingTime; + print $flippingTime, " ", $posX, " ", $posY, "\n"; + } +} |