summaryrefslogtreecommitdiff
path: root/tests/perf-startup
diff options
context:
space:
mode:
authorDavid Mosberger-Tang <davidm@koala.localdomain>2006-07-26 14:57:51 -0600
committerDavid Mosberger-Tang <davidm@koala.localdomain>2006-07-26 14:57:51 -0600
commit9e927e70871ecebee06b6d208bcbc1bb2ec9a655 (patch)
treeae7d2fad523d07f758e90021e388df80cc892aaf /tests/perf-startup
parent236e370dc5c8738c24e696cd4329167def8d8077 (diff)
downloadlibunwind-9e927e70871ecebee06b6d208bcbc1bb2ec9a655.tar.gz
Restore tests/perf-startup.
Another file that got wiped out during the Bitkeeper->CVS->GIT translation.
Diffstat (limited to 'tests/perf-startup')
-rw-r--r--tests/perf-startup19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/perf-startup b/tests/perf-startup
index e69de29b..c3707487 100644
--- a/tests/perf-startup
+++ b/tests/perf-startup
@@ -0,0 +1,19 @@
+#!/bin/sh
+platform=$1
+LIBUNWIND=../src/.libs/libunwind.so
+LIBUNWIND_PLAT=../src/.libs/libunwind-$platform.so
+warmup=$(./forker 2000 /bin/true | cut -f1 -d' ')
+
+nsec1=$(./forker 2000 /bin/true | cut -f1 -d' ')
+echo -e \"/bin/true\""\t\t\t\t\t\t": $nsec1 nsec/execution
+
+nsec2=$(LD_PRELOAD=$LIBUNWIND ./forker 2000 /bin/true | cut -f1 -d' ')
+echo -e \"LD_PRELOAD=$LIBUNWIND /bin/true\""\t": $nsec2 nsec/execution
+
+nsec3=$(LD_PRELOAD=$LIBUNWIND_PLAT ./forker 2000 /bin/true | cut -f1 -d' ')
+echo -e \"LD_PRELOAD=$LIBUNWIND_PLAT /bin/true\""\t": $nsec3 nsec/execution
+
+echo
+
+echo -e "Overhead of preloading $LIBUNWIND\t: " $(($nsec2 - $nsec1)) nsec
+echo -e "Overhead of preloading $LIBUNWIND_PLAT\t: " $(($nsec3 - $nsec1)) nsec