Index: experimental/tools/multipage_pdf_profiler.sh |
diff --git a/experimental/tools/multipage_pdf_profiler.sh b/experimental/tools/multipage_pdf_profiler.sh |
new file mode 100755 |
index 0000000000000000000000000000000000000000..d2cbdc5a3d096c002a39ec19af8071ab4ad7a3fc |
--- /dev/null |
+++ b/experimental/tools/multipage_pdf_profiler.sh |
@@ -0,0 +1,18 @@ |
+#!/bin/sh |
+ |
+if [ -z "$1" ] || [ -z "$2" ]; then |
+ echo "usage: $0 SKP_DIRECTORY MULTIPAGE_PDF_PROFILER_EXE" >&2 |
+ exit 1 |
+fi |
+ |
+SKP_DIRECTORY="$1" |
+MULTIPAGE_PDF_PROFILER_EXE="$2" |
+ |
+printf '"FILE","SKP SIZE (BYTES)","MEMORY USE (MB)"\n' >&2 |
+for skp in "$SKP_DIRECTORY"/*.skp; do |
djsollen
2014/12/01 19:44:49
why not do this directory traversal in the C binar
|
+ r=$("$MULTIPAGE_PDF_PROFILER_EXE" 0 "$skp") |
+ skp_size=$(echo $r | awk '{ print $1 }') |
+ mem0=$(echo $r | awk '{ print $2 }') |
+ mem1=$("$MULTIPAGE_PDF_PROFILER_EXE" 1 "$skp" | awk '{ print $2 }') |
+ printf '"%s",%d,%d\n' $(basename "$skp") $skp_size $(($mem1 - $mem0)) |
+done |