~ubuntu-branches/ubuntu/vivid/libxml-bare-perl/vivid

« back to all changes in this revision

Viewing changes to makebench.PL

  • Committer: Package Import Robot
  • Author(s): Nuno Carvalho, gregor herrmann, Salvatore Bonaccorso, Axel Beckert, Nuno Carvalho
  • Date: 2013-09-17 15:54:28 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20130917155428-4d0xb5cissw2323f
Tags: 0.53-1
* Team upload.

[ gregor herrmann ]
* debian/control: update {versioned,alternative} (build) dependencies.

[ Salvatore Bonaccorso ]
* Change Vcs-Git to canonical URI (git://anonscm.debian.org)
* Change search.cpan.org based URIs to metacpan.org based URIs

[ Axel Beckert ]
* debian/copyright: migrate pre-1.0 format to 1.0 using "cme fix dpkg-
  copyright"

[ Nuno Carvalho ]
* New upstream release.
* debian/copyright: update copyright years.
* debian/control: update standards version.
* debian/control: update debhelper required version, in order to pass all
  the hardening flags to EUMM.
* Add lintian override to apparently false-positive warning.
* Add set of patches accepted upstream but still not included in this
  release, visit https://rt.cpan.org/Public/Bug/Display.html?id=88155
  for details.

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
    $type = $1;
99
99
  }
100
100
  #print "[$type $module]\n";
101
 
 
 
101
  
102
102
  if( $type eq 'c' ) {
103
103
    $part =~ s/c\n//g;
104
104
    $part = "##".$part."##";
108
108
    next;
109
109
  }
110
110
  if( $type eq '0' ) {
111
 
 
 
111
    
112
112
    if( $module ) {
113
113
      $part =~ s/(#0)\W*.*/$1/;
114
114
    }
115
 
 
 
115
    
116
116
    while( $part =~ m/(require [A-Za-z\:]+;)/g ) {
117
117
      my $req = $1;
118
118
      if( !$module ) {
123
123
      push( @requires, $req );
124
124
    }
125
125
    $part =~ s/require [A-Za-z\:]+;\n//g;
126
 
 
 
126
    
127
127
    $part = "##".$part."##";
128
128
    $part =~ s/^##[#0 \n]+//;
129
129
    $part =~ s/[ \n]+##$//;
130
 
 
 
130
    
131
131
    print OUT "
132
132
    if( \$ARGV[0]*1 >= $i ) {
133
133
      (\$s, \$usec) = gettimeofday();
134
134
      if( eval( '@requires' ) ) {
135
135
        (\$s2, \$usec2) = gettimeofday();
136
 
 
 
136
        
137
137
$part
138
138
 
139
139
        (\$s3, \$usec3) = gettimeofday();
144
144
    ";
145
145
  }
146
146
  if( $type eq '-' ) {
147
 
 
 
147
    
148
148
    if( $module ) {
149
149
      $part =~ s/(#[\-\0\+])\W*.*/$1/;
150
150
    }
151
 
 
 
151
    
152
152
    while( $part =~ m/(require [A-Za-z\:]+;)/g ) {
153
153
      my $req = $1;
154
154
      if( !$module ) {
159
159
      push( @requires, $req );
160
160
    }
161
161
    $part =~ s/require [A-Za-z\:]+;\n//g;
162
 
 
 
162
    
163
163
    $part = "##".$part."##";
164
164
    $part =~ s/^##[#\- \n]+//;
165
165
    $part =~ s/[ \n]+##$//;
166
 
 
 
166
    
167
167
    print OUT "
168
168
    if( \$ARGV[0] eq '$i' ) {
169
169
      (\$s, \$usec) = gettimeofday();
170
170
      if( eval( '@requires' ) ) {
171
171
        (\$s2, \$usec2) = gettimeofday();
172
 
 
 
172
        
173
173
$part
174
174
 
175
175
        (\$s3, \$usec3) = gettimeofday();
185
185
    $part =~ s/[ \n]+##$//;
186
186
    print OUT "
187
187
    if( \$ARGV[0] eq '$i' ) {
188
 
 
 
188
    
189
189
$part
190
 
 
 
190
    
191
191
    }
192
192
    ";
193
193
  }
197
197
    $part =~ s/[ \n]+##$//;
198
198
    print OUT "
199
199
    #if( \$ARGV[0] eq '$i' ) {
200
 
 
 
200
    
201
201
$part
202
 
 
 
202
    
203
203
    #}
204
204
    ";
205
205
  }
220
220
sub timeit {
221
221
  my \$name = shift;
222
222
  my \$base = shift;
223
 
  \$sa = \$s2-\$s + ((\$usec2-\$usec)/1000000);
224
 
  \$sb = \$s3-\$s2 + ((\$usec3-\$usec2)/1000000);
225
 
  \$sc = \$s3-\$s + ((\$usec3-\$usec)/1000000);
 
223
  \$sa = \$s2-\$s + ((\$usec2-\$usec)/1000000); 
 
224
  \$sb = \$s3-\$s2 + ((\$usec3-\$usec2)/1000000); 
 
225
  \$sc = \$s3-\$s + ((\$usec3-\$usec)/1000000); 
226
226
  if( \$base ) {
227
227
    \$base1 = \$sa;
228
228
    \$base2 = \$sb;