Initial import
This commit is contained in:
18
scripts/Makefile.am
Normal file
18
scripts/Makefile.am
Normal file
@ -0,0 +1,18 @@
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
bin_SCRIPTS = sb_run.sh sb_test_ps.sh
|
||||
EXTRA_DIST = sb_run.sh sb_test_ps.sh
|
||||
371
scripts/Makefile.in
Normal file
371
scripts/Makefile.in
Normal file
@ -0,0 +1,371 @@
|
||||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
subdir = scripts
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
|
||||
SCRIPTS = $(bin_SCRIPTS)
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AM_CFLAGS = @AM_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CAT_ENTRY_END = @CAT_ENTRY_END@
|
||||
CAT_ENTRY_START = @CAT_ENTRY_START@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DOCBOOK_ROOT = @DOCBOOK_ROOT@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
||||
MYSQL_LIBS = @MYSQL_LIBS@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_AIO_FALSE = @USE_AIO_FALSE@
|
||||
USE_AIO_TRUE = @USE_AIO_TRUE@
|
||||
USE_MYSQL_FALSE = @USE_MYSQL_FALSE@
|
||||
USE_MYSQL_TRUE = @USE_MYSQL_TRUE@
|
||||
VERSION = @VERSION@
|
||||
XML_CATALOG = @XML_CATALOG@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
have_xsltproc_FALSE = @have_xsltproc_FALSE@
|
||||
have_xsltproc_TRUE = @have_xsltproc_TRUE@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
mysqlconfig = @mysqlconfig@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
bin_SCRIPTS = sb_run.sh sb_test_ps.sh
|
||||
EXTRA_DIST = sb_run.sh sb_test_ps.sh
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign scripts/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign scripts/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-binSCRIPTS: $(bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
$(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binSCRIPTS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(SCRIPTS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-binSCRIPTS
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binSCRIPTS uninstall-info-am
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
distclean distclean-generic distclean-libtool distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-binSCRIPTS install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
uninstall uninstall-am uninstall-binSCRIPTS uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
104
scripts/sb_run.sh
Executable file
104
scripts/sb_run.sh
Executable file
@ -0,0 +1,104 @@
|
||||
#!/bin/bash
|
||||
# File: sb_run.sh
|
||||
#
|
||||
# Copyright (C) 2004 Alexey Kopytov & MySQL AB
|
||||
|
||||
sbname=sysbench
|
||||
|
||||
#Install signals handlers
|
||||
trap 'echo "Got SIGINT, exiting..."; \
|
||||
killall vmstat; killall iostat; killall mpstat' INT
|
||||
|
||||
trap 'echo "Got SIGTERM, exiting..."; \
|
||||
killall vmstat; killall iostat; killall mpstat' TERM
|
||||
|
||||
|
||||
# First try to find SysBench in the current dir
|
||||
found=""
|
||||
progname="$0"
|
||||
curdir=`dirname "$progname"`
|
||||
sbpath="$curdir/$sbname"
|
||||
|
||||
# Try to find SysBench in the current source tree
|
||||
if test -x "$sbpath"; then
|
||||
found=1
|
||||
else
|
||||
topsrcdir="$curdir/../"
|
||||
sbpath="$topsrcdir/sysbench/$sbname"
|
||||
fi
|
||||
|
||||
# Try to find SysBench in $PATH
|
||||
if test -z "$found" -a -x "$sbpath"; then
|
||||
found=1
|
||||
else
|
||||
sbpath=`which "$sbname" 2>/dev/null`
|
||||
fi
|
||||
|
||||
if test -z "$found" -a -n "$sbpath" -a -x "$sbpath"; then
|
||||
found=1
|
||||
fi
|
||||
|
||||
if test -z "$found"; then
|
||||
echo "$sbname binary not found, exiting..."
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
UPDATES_INTERVAL=5
|
||||
sbargs=""
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
-u)
|
||||
UPDATES_INTERVAL=$2
|
||||
shift 2
|
||||
;;
|
||||
-c)
|
||||
COMMENT="$2"
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
sbargs="$sbargs $1"
|
||||
shift 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Determine run number for the output directory
|
||||
RUN_NUMBER=1
|
||||
if [ -f ".run_number" ]; then
|
||||
read RUN_NUMBER < .run_number
|
||||
fi
|
||||
|
||||
if [ $RUN_NUMBER -eq -1 ]; then
|
||||
RUN_NUMBER=0
|
||||
fi
|
||||
|
||||
# Create the output directory
|
||||
OUTPUT_DIR=output/$RUN_NUMBER
|
||||
mkdir -p $OUTPUT_DIR
|
||||
|
||||
# Update the run number
|
||||
RUN_NUMBER=`expr $RUN_NUMBER + 1`
|
||||
echo $RUN_NUMBER > .run_number
|
||||
|
||||
# Start vmstat
|
||||
nohup vmstat -n $UPDATES_INTERVAL >$OUTPUT_DIR/vmstat.out 2>&1 &
|
||||
|
||||
# Start iostat
|
||||
nohup iostat $UPDATES_INTERVAL >$OUTPUT_DIR/iostat.out 2>&1 &
|
||||
|
||||
# Start mpstat
|
||||
nohup mpstat $UPDATES_INTERVAL >$OUTPUT_DIR/mpstat.out 2>&1 &
|
||||
|
||||
cat >$OUTPUT_DIR/desc.txt <<EOF
|
||||
$sbname command line args: $sbpath $sbargs
|
||||
comment: $COMMENT
|
||||
EOF
|
||||
|
||||
|
||||
echo "Running $sbpath $sbargs"
|
||||
|
||||
$sbpath $sbargs >$OUTPUT_DIR/sysbench.out 2>&1
|
||||
|
||||
killall vmstat; killall iostat; killall mpstat
|
||||
105
scripts/sb_test_ps.sh
Executable file
105
scripts/sb_test_ps.sh
Executable file
@ -0,0 +1,105 @@
|
||||
#!/bin/bash
|
||||
# File: sb_test_ps.sh
|
||||
#
|
||||
# Copyright (C) 2004 Alexey Kopytov & MySQL AB
|
||||
|
||||
NUM_THREADS=4
|
||||
|
||||
|
||||
progname="$0"
|
||||
curdir=`dirname "$progname"`
|
||||
sbrun="$curdir/sb_run.sh"
|
||||
|
||||
clean_vars()
|
||||
{
|
||||
point_selects=0
|
||||
simple_ranges=0
|
||||
sum_ranges=0
|
||||
order_ranges=0
|
||||
distinct_ranges=0
|
||||
index_updates=0
|
||||
non_index_updates=0
|
||||
}
|
||||
|
||||
run_test()
|
||||
{
|
||||
tname="$1"
|
||||
sbargs="--num-threads=$NUM_THREADS --max-requests=0 --max-time=60 \
|
||||
--test=oltp --oltp-table-size=100000 --mysql-table-type=myisam \
|
||||
--oltp-point-selects=$point_selects \
|
||||
--oltp-simple-ranges=$simple_ranges
|
||||
--oltp-sum-ranges=$sum_ranges
|
||||
--oltp-order-ranges=$order_ranges
|
||||
--oltp-distinct-ranges=$distinct_ranges
|
||||
--oltp-index-updates=$index_updates
|
||||
--oltp-non-index-updates=$non_index_updates"
|
||||
|
||||
echo -e "\n*** Running test for $tname (client-side PS) ***\n"
|
||||
sysbench $sbargs prepare >/dev/null
|
||||
sb_run.sh -c "$tname (client-side PS)" $sbargs --db-ps-mode=disable run
|
||||
sysbench $sbargs cleanup >/dev/null
|
||||
|
||||
echo -e "\n*** Running test for $tname (server-side PS)... ***\n"
|
||||
sysbench $sbargs prepare >/dev/null
|
||||
sb_run.sh -c "$tname (server-side PS)" $sbargs run
|
||||
sysbench $sbargs cleanup >/dev/null
|
||||
}
|
||||
|
||||
collect_results()
|
||||
{
|
||||
for dir in output/*; do
|
||||
trans=`grep "transactions:" $dir/sysbench.out | sed -e 's/.*(\([0-9.]\+\).*)/\1/g'`
|
||||
comment=`grep "comment:" $dir/desc.txt | sed -e 's/comment: //'`
|
||||
echo "$comment: $trans"
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
# Run point selects test
|
||||
clean_vars
|
||||
point_selects=1
|
||||
run_test "point_selects"
|
||||
|
||||
# Run simple ranges test
|
||||
clean_vars
|
||||
simple_ranges=1
|
||||
run_test "simple_ranges"
|
||||
|
||||
# Run sum ranges test
|
||||
clean_vars
|
||||
sum_ranges=1
|
||||
run_test "sum_ranges"
|
||||
|
||||
# Run order order ranges test
|
||||
clean_vars
|
||||
order_ranges=1
|
||||
run_test "order_ranges"
|
||||
|
||||
# Run distinct ranges test
|
||||
clean_vars
|
||||
distinct_ranges=1
|
||||
run_test "distinct_ranges"
|
||||
|
||||
# Run index updates test
|
||||
clean_vars
|
||||
index_updates=1
|
||||
run_test "index_updates"
|
||||
|
||||
# Run non-index updates test
|
||||
clean_vars
|
||||
non_index_updates=1
|
||||
run_test "non_index_updates"
|
||||
|
||||
# Run complex test
|
||||
clean_vars
|
||||
point_selects=10
|
||||
simple_ranges=1
|
||||
sum_ranges=1
|
||||
order_ranges=1
|
||||
distinct_ranges=1
|
||||
index_updates=1
|
||||
non_index_updates=1
|
||||
run_test "complex"
|
||||
|
||||
# Collect the results
|
||||
collect_results | sort
|
||||
Reference in New Issue
Block a user