OLD | NEW |
| (Empty) |
1 #!/bin/sh | |
2 | |
3 if [ -z "$1" ] || [ -z "$2" ]; then | |
4 echo "usage: $0 SKP_DIRECTORY MULTIPAGE_PDF_PROFILER_EXE" >&2 | |
5 exit 1 | |
6 fi | |
7 | |
8 SKP_DIRECTORY="$1" | |
9 MULTIPAGE_PDF_PROFILER_EXE="$2" | |
10 | |
11 printf '"FILE","SKP SIZE (BYTES)","MEMORY USE (MB)"\n' >&2 | |
12 for skp in "$SKP_DIRECTORY"/*.skp; do | |
13 r=$("$MULTIPAGE_PDF_PROFILER_EXE" 0 "$skp") | |
14 skp_size=$(echo $r | awk '{ print $1 }') | |
15 mem0=$(echo $r | awk '{ print $2 }') | |
16 mem1=$("$MULTIPAGE_PDF_PROFILER_EXE" 1 "$skp" | awk '{ print $2 }') | |
17 printf '"%s",%d,%d\n' $(basename "$skp") $skp_size $(($mem1 - $mem0)) | |
18 done | |
OLD | NEW |