summaryrefslogtreecommitdiff
path: root/libstdc++-v3/scripts
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-19 04:00:59 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-19 04:00:59 +0000
commitef8b25b2c9d4e42bfb75288235abd0c47c704837 (patch)
tree5fb5e827f14d1e3b023cb8539f22b20c7c5bf70c /libstdc++-v3/scripts
parent807be5b4953a6307c98b5318fa0f163ac9bb78cf (diff)
downloadgcc-ef8b25b2c9d4e42bfb75288235abd0c47c704837.tar.gz
2003-06-18 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/testsuite_performance.h (time_counter): New. (resource_counter): New. (report_performance): New. (start_counters): New. (stop_counters): New. (clear_counters): New. * testsuite/performance/allocator.cc: Instrument. * testsuite/performance/cout_insert_int.cc: Same. * testsuite/performance/complex_norm.cc: Same. * testsuite/performance/filebuf_sputc.cc: New. * testsuite/performance/fstream_seek_write.cc: Same. * testsuite/performance/ifstream_getline.cc: Same. * testsuite/performance/map_create_fill.cc: Same. * testsuite/performance/ofstream_insert_float.cc: Same. * testsuite/performance/ofstream_insert_int.cc: Same. * testsuite/performance/string_append.cc: Convert. * scripts/check_performance: New. * testsuite/Makefile.am (check-performance): New. (CLEANFILES): Add. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68175 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/scripts')
-rwxr-xr-xlibstdc++-v3/scripts/check_performance48
1 files changed, 48 insertions, 0 deletions
diff --git a/libstdc++-v3/scripts/check_performance b/libstdc++-v3/scripts/check_performance
new file mode 100755
index 00000000000..5fdf5817505
--- /dev/null
+++ b/libstdc++-v3/scripts/check_performance
@@ -0,0 +1,48 @@
+#!/usr/bin/env bash
+
+# Script to do performance testing.
+
+# Invocation
+# check_performance SRC_DIR BUILD_DIR
+
+# 1: variables
+#
+SRC_DIR=$1
+BUILD_DIR=$2
+
+# Now that we've successfully translated the numerical option into
+# a symbolic one, we can safely ignore it.
+shift
+
+# This has been true all along. Found out about it the hard way...
+case $BASH_VERSION in
+ 1*)
+ echo 'You need bash 2.x to run check_performance. Exiting.';
+ exit 1 ;;
+ *) ;;
+esac
+
+flags_script=$BUILD_DIR/scripts/testsuite_flags
+INCLUDES=`$flags_script --build-includes`
+FLAGS=`$flags_script --cxxflags`
+COMPILER=`$flags_script --build-cxx`
+SH_FLAG="-Wl,--rpath -Wl,$BUILD_DIR/../../gcc \
+ -Wl,--rpath -Wl,$BUILD_DIR/src/.libs"
+ST_FLAG="-static"
+LINK=$SH_FLAG
+CXX="$COMPILER $INCLUDES $FLAGS $LINK"
+
+
+TESTS_FILE="testsuite_files_performance"
+
+for NAME in `cat $TESTS_FILE`
+do
+ echo $NAME
+ FILE_NAME="`basename $NAME`"
+ EXE_NAME="`echo $FILE_NAME | sed 's/cc$/exe/'`"
+ $CXX $SRC_DIR/testsuite/$NAME -o $EXE_NAME
+ ./$EXE_NAME
+ echo ""
+done
+
+exit 0