Commit df3d3d23b1ad1a358d8215ccf2c7a10767dbc56f
1 parent
e94f4782
Update performance_check to notify about qpdf/performance-test-files
Showing
1 changed file
with
23 additions
and
3 deletions
performance_check
| @@ -55,6 +55,12 @@ Usage: $whoami [ args ] | @@ -55,6 +55,12 @@ Usage: $whoami [ args ] | ||
| 55 | --workdir where to write output pdfs (default: $default_workdir) | 55 | --workdir where to write output pdfs (default: $default_workdir) |
| 56 | --maxtime maximum time for a test; 0 means unlimited (default: $default_maxtime) | 56 | --maxtime maximum time for a test; 0 means unlimited (default: $default_maxtime) |
| 57 | --iterations number of iterations (default: $default_iterations) | 57 | --iterations number of iterations (default: $default_iterations) |
| 58 | + | ||
| 59 | +Populate $test_dir with files you want to use for performance | ||
| 60 | +benchmarking. PDF files and qpdf JSON files are allowed. The qpdf | ||
| 61 | +release process uses a clone of | ||
| 62 | +https://github.com/qpdf/performance-test-files for this purpose. | ||
| 63 | + | ||
| 58 | "; | 64 | "; |
| 59 | } | 65 | } |
| 60 | 66 | ||
| @@ -130,13 +136,27 @@ my @json_test_files = (); | @@ -130,13 +136,27 @@ my @json_test_files = (); | ||
| 130 | } | 136 | } |
| 131 | else | 137 | else |
| 132 | { | 138 | { |
| 133 | - opendir(D, $test_dir) or | ||
| 134 | - die "$whoami: can't open directory $test_dir: $!\n"; | 139 | + opendir(D, $test_dir) or die " |
| 140 | +$whoami: can't open test directory: $! | ||
| 141 | + | ||
| 142 | +Configured test directory: $test_dir | ||
| 143 | + | ||
| 144 | +Populate $test_dir with a clone of the | ||
| 145 | +qpdf/performance-test-files github repository. | ||
| 146 | +Run $whoami --help for details. | ||
| 147 | + | ||
| 148 | +Repository URL: https://github.com/qpdf/performance-test-files | ||
| 149 | + | ||
| 150 | +"; | ||
| 135 | my @entries = readdir(D); | 151 | my @entries = readdir(D); |
| 136 | closedir(D); | 152 | closedir(D); |
| 137 | for (sort @entries) | 153 | for (sort @entries) |
| 138 | { | 154 | { |
| 139 | - push(@tmp, "$test_dir/$_") unless (('.' eq $_) || ('..' eq $_)); | 155 | + my $file = "$test_dir/$_"; |
| 156 | + if (-f $file && $file =~ m/.(pdf|json)$/i) | ||
| 157 | + { | ||
| 158 | + push(@tmp, $file); | ||
| 159 | + } | ||
| 140 | } | 160 | } |
| 141 | } | 161 | } |
| 142 | foreach my $i (@tmp) | 162 | foreach my $i (@tmp) |